Changeset 58 for trunk/openjdk/hotspot/src/os_cpu
- Timestamp:
- Jul 15, 2010, 2:46:42 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp
r2 r58 58 58 if ( ThreadLocalStorage::get_thread_ptr_offset() == 0 ) { 59 59 int thread_ptr_offset; 60 #ifdef __EMX__ 61 __asm__("leal %1, %%eax; " 62 "subl %%fs:0, %%eax; " 63 "movl %%eax, %0; " 64 : "=m"(thread_ptr_offset) : "m"(wrapperthread) : "%eax"); 65 #else 60 66 __asm { 61 67 lea eax, dword ptr wrapperthread; … … 63 69 mov thread_ptr_offset, eax 64 70 }; 71 #endif 65 72 ThreadLocalStorage::set_thread_ptr_offset(thread_ptr_offset); 66 73 } … … 71 78 else { 72 79 int test_thread_ptr_offset; 80 #ifdef __EMX__ 81 __asm__("leal %1, %%eax; " 82 "subl %%fs:0, %%eax; " 83 "movl %%eax, %0; " 84 : "=m"(test_thread_ptr_offset) : "m"(wrapperthread) : "%eax"); 85 #else 73 86 __asm { 74 87 lea eax, dword ptr wrapperthread; … … 76 89 mov test_thread_ptr_offset, eax 77 90 }; 91 #endif 78 92 assert(test_thread_ptr_offset == ThreadLocalStorage::get_thread_ptr_offset(), 79 93 "thread pointer offset from SEH changed"); … … 340 354 intptr_t* _get_previous_fp() { 341 355 intptr_t **frameptr; 356 #ifdef __EMX__ 357 __asm("movl %%ebp, %0" : "=m"(frameptr)); 358 #else 342 359 __asm { 343 360 mov frameptr, ebp 344 361 }; 362 #endif 345 363 return *frameptr; 346 364 } … … 423 441 extern "C" int SafeFetch32 (int * adr, int Err) { 424 442 int rv = Err ; 425 _ try {443 __try { 426 444 rv = *((volatile int *) adr) ; 427 445 } __except(EXCEPTION_EXECUTE_HANDLER) { … … 432 450 extern "C" intptr_t SafeFetchN (intptr_t * adr, intptr_t Err) { 433 451 intptr_t rv = Err ; 434 _ try {452 __try { 435 453 rv = *((volatile intptr_t *) adr) ; 436 454 } __except(EXCEPTION_EXECUTE_HANDLER) { … … 446 464 // On systems that don't support pause a rep:nop 447 465 // is executed as a nop. The rep: prefix is ignored. 466 #ifdef __EMX__ 467 __asm__("pause; "); 468 #else 448 469 _asm { 449 470 pause ; 450 471 }; 472 #endif 451 473 return 1 ; 452 474 #endif // AMD64 … … 457 479 #ifndef AMD64 458 480 int fpu_cntrl_word = StubRoutines::fpu_cntrl_wrd_std(); 481 #ifdef __EMX__ 482 __asm__("fldcw %0; " : : "m"(fpu_cntrl_word)); 483 #else 459 484 __asm fldcw fpu_cntrl_word; 485 #endif 460 486 #endif // !AMD64 461 487 }
Note:
See TracChangeset
for help on using the changeset viewer.