632 st->print("EDI="); print_location(st, uc->Edi); 633 #endif 634 635 st->cr(); 636 } 637 638 extern "C" int SpinPause () { 639 #ifdef AMD64 640 return 0 ; 641 #else 642 // pause == rep:nop 643 // On systems that don't support pause a rep:nop 644 // is executed as a nop. The rep: prefix is ignored. 645 _asm { 646 pause ; 647 }; 648 return 1 ; 649 #endif // AMD64 650 } 651 652 653 void os::setup_fpu() { 654 #ifndef AMD64 655 int fpu_cntrl_word = StubRoutines::fpu_cntrl_wrd_std(); 656 __asm fldcw fpu_cntrl_word; 657 #endif // !AMD64 658 } 659 660 #ifndef PRODUCT 661 void os::verify_stack_alignment() { 662 #ifdef AMD64 663 // The current_stack_pointer() calls generated get_previous_sp stub routine. 664 // Only enable the assert after the routine becomes available. 665 if (StubRoutines::code1() != NULL) { 666 assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment"); 667 } 668 #endif 669 } 670 #endif 671 | 632 st->print("EDI="); print_location(st, uc->Edi); 633 #endif 634 635 st->cr(); 636 } 637 638 extern "C" int SpinPause () { 639 #ifdef AMD64 640 return 0 ; 641 #else 642 // pause == rep:nop 643 // On systems that don't support pause a rep:nop 644 // is executed as a nop. The rep: prefix is ignored. 645 _asm { 646 pause ; 647 }; 648 return 1 ; 649 #endif // AMD64 650 } 651 652 juint os::cpu_microcode_revision() { 653 juint result = 0; 654 BYTE data[8] = {0}; 655 HKEY key; 656 DWORD status = RegOpenKey(HKEY_LOCAL_MACHINE, 657 "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", &key); 658 if (status == ERROR_SUCCESS) { 659 DWORD size = sizeof(data); 660 status = RegQueryValueEx(key, "Update Revision", NULL, NULL, data, &size); 661 if (status == ERROR_SUCCESS) { 662 if (size == 4) result = *((juint*)data); 663 if (size == 8) result = *((juint*)data + 1); // upper 32-bits 664 } 665 RegCloseKey(key); 666 } 667 return result; 668 } 669 670 void os::setup_fpu() { 671 #ifndef AMD64 672 int fpu_cntrl_word = StubRoutines::fpu_cntrl_wrd_std(); 673 __asm fldcw fpu_cntrl_word; 674 #endif // !AMD64 675 } 676 677 #ifndef PRODUCT 678 void os::verify_stack_alignment() { 679 #ifdef AMD64 680 // The current_stack_pointer() calls generated get_previous_sp stub routine. 681 // Only enable the assert after the routine becomes available. 682 if (StubRoutines::code1() != NULL) { 683 assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment"); 684 } 685 #endif 686 } 687 #endif 688 |