[llvm-commits] CVS: llvm/lib/Target/X86/X86JITInfo.cpp

Evan Cheng evan.cheng at apple.com
Mon Oct 16 15:53:42 PDT 2006



Changes in directory llvm/lib/Target/X86:

X86JITInfo.cpp updated: 1.28 -> 1.29
---
Log message:

Unbreak x86-64 build.


---
Diffs of the changes:  (+9 -2)

 X86JITInfo.cpp |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/X86/X86JITInfo.cpp
diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.28 llvm/lib/Target/X86/X86JITInfo.cpp:1.29
--- llvm/lib/Target/X86/X86JITInfo.cpp:1.28	Mon Oct 16 16:01:55 2006
+++ llvm/lib/Target/X86/X86JITInfo.cpp	Mon Oct 16 17:53:28 2006
@@ -256,6 +256,7 @@
 X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
   JITCompilerFunction = F;
 
+#if !defined(__x86_64__)
   unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0;
   union {
     unsigned u[3];
@@ -270,6 +271,7 @@
         return X86CompilationCallback_SSE;
     }
   }
+#endif
 
   return X86CompilationCallback;
 }
@@ -277,8 +279,13 @@
 void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) {
   // Note, we cast to intptr_t here to silence a -pedantic warning that 
   // complains about casting a function pointer to a normal pointer.
-  if (Fn != (void*)(intptr_t)X86CompilationCallback &&
-      Fn != (void*)(intptr_t)X86CompilationCallback_SSE) {
+#if defined(__x86_64__)
+  bool NotCC = Fn != (void*)(intptr_t)X86CompilationCallback;
+#else
+  bool NotCC = (Fn != (void*)(intptr_t)X86CompilationCallback &&
+                Fn != (void*)(intptr_t)X86CompilationCallback_SSE);
+#endif
+  if (NotCC) {
     MCE.startFunctionStub(5);
     MCE.emitByte(0xE9);
     MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4);






More information about the llvm-commits mailing list