--- hotspot/src/os/linux/launcher/java_md.c.orig 2007-10-30 09:46:23.000000000 +0100 +++ hotspot/src/os/linux/launcher/java_md.c 2007-11-25 00:01:54.000000000 +0100 @@ -1256,24 +1256,27 @@ uint32_t value_of_ebx = 0; uint32_t value_of_ecx = 0; uint32_t value_of_edx = 0; + /* ebx handling is needed for PIC code (GCC can't handle it) */ + uint32_t ebx_tmp = 0; __asm__ volatile (/* Instructions */ - /* ebx is callee-save, so push it */ - /* even though it's in the clobbers section */ - " pushl %%ebx \n" - " movl %4, %%eax \n" + /* Save ebx */ + " movl %%ebx, %4 \n" + /* Set the value to call cpuid with */ + " movl %5, %%eax \n" + /* Call cpuid and get values */ " cpuid \n" " movl %%eax, %0 \n" " movl %%ebx, %1 \n" " movl %%ecx, %2 \n" " movl %%edx, %3 \n" /* restore ebx */ - " popl %%ebx \n" - + " movl %4, %%ebx \n" : /* Outputs */ "=m" (value_of_eax), "=m" (value_of_ebx), "=m" (value_of_ecx), - "=m" (value_of_edx) + "=m" (value_of_edx), + "=m" (ebx_tmp) : /* Inputs */ "m" (arg) : /* Clobbers */