summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-10-16 22:53:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-10-16 22:53:28 +0000
commit1367ff084df5aa8138d2cd17658750d4bf40d3f7 (patch)
treeb322447d0073a21a78bb64c82cefdda0d45335a3 /llvm/lib/Target
parentf3ae00a64a1e55f5f9078c137979896175792913 (diff)
downloadbcm5719-llvm-1367ff084df5aa8138d2cd17658750d4bf40d3f7.tar.gz
bcm5719-llvm-1367ff084df5aa8138d2cd17658750d4bf40d3f7.zip
Unbreak x86-64 build.
llvm-svn: 30990
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86JITInfo.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86JITInfo.cpp b/llvm/lib/Target/X86/X86JITInfo.cpp
index 027c2e7a8cc..713579e6bb4 100644
--- a/llvm/lib/Target/X86/X86JITInfo.cpp
+++ b/llvm/lib/Target/X86/X86JITInfo.cpp
@@ -256,6 +256,7 @@ TargetJITInfo::LazyResolverFn
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 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
return X86CompilationCallback_SSE;
}
}
+#endif
return X86CompilationCallback;
}
@@ -277,8 +279,13 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
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);
OpenPOWER on IntegriCloud