ebx is no problem with pic when compiling in 64bit (but the pushl+popl are)
authorMatthias Braun <matze@braunis.de>
Wed, 9 Feb 2011 13:55:12 +0000 (13:55 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 9 Feb 2011 13:55:12 +0000 (13:55 +0000)
[r28342]

ir/be/ia32/ia32_architecture.c

index 56af304..2ffda78 100644 (file)
@@ -740,7 +740,7 @@ typedef union {
 static void x86_cpuid(cpuid_registers *regs, unsigned level)
 {
 #if defined(__GNUC__)
-#      ifdef __PIC__ // GCC cannot handle EBX in PIC
+#      if defined(__PIC__) && !defined(__amd64) // GCC cannot handle EBX in PIC
        __asm (
                "pushl %%ebx\n\t"
                "cpuid\n\t"