8226525: HotSpot compile-time error for x86-32
Reviewed-by: shade
This commit is contained in:
parent
ebde73209f
commit
5f05ce78ec
@ -57,7 +57,13 @@ inline void OrderAccess::fence() {
|
||||
|
||||
inline void OrderAccess::cross_modify_fence() {
|
||||
int idx = 0;
|
||||
#ifdef AMD64
|
||||
__asm__ volatile ("cpuid " : "+a" (idx) : : "ebx", "ecx", "edx", "memory");
|
||||
#else
|
||||
// On some x86 systems EBX is a reserved register that cannot be
|
||||
// clobbered, so we must protect it around the CPUID.
|
||||
__asm__ volatile ("xchg %%esi, %%ebx; cpuid; xchg %%esi, %%ebx " : "+a" (idx) : : "esi", "ecx", "edx", "memory");
|
||||
#endif
|
||||
}
|
||||
|
||||
template<>
|
||||
|
Loading…
x
Reference in New Issue
Block a user