[PowerPC, JIT] PPCJITInfo.cpp "This is not a 32bit PowerPC"

David Fang fang at csl.cornell.edu
Tue Jul 23 18:50:39 PDT 2013


Patch attached for real this time.

>>  	A bunch of llvm tests in Analysis/Profiling and ExecutionEngine
>>  started failing for me on powerpc-darwin8 last week with the message:
>>
>>  This is not a 32bit PowerPC, you can't execute this!
>
> I meant to add a link to a failing log:
> http://www.csl.cornell.edu/~fang/sw/llvm/logs/llvm-r186533-O2-powerpc-darwin8-g++-4.0.1-debug-check.log
>
>>  	It looks like r186252 modified the conditionals that surround the
>>  callback function.  On darwinX, the system compiler (gcc-4.0.1) defines
>>  either __ppc__ or __ppc64__ for PowerPC.
>>  	The attached patch accounts for these preprocessor definitions and
>>  allows those recently failing tests to pass for me.
>>
>>  Ok to commit?
>
>

-- 
David Fang
http://www.csl.cornell.edu/~fang/
-------------- next part --------------
diff --git a/lib/Target/PowerPC/PPCJITInfo.cpp b/lib/Target/PowerPC/PPCJITInfo.cpp
index 1745061..18f4adf 100644
--- a/lib/Target/PowerPC/PPCJITInfo.cpp
+++ b/lib/Target/PowerPC/PPCJITInfo.cpp
@@ -71,7 +71,7 @@ static void EmitBranchToAt(uint64_t At, uint64_t To, bool isCall, bool is64Bit){
 extern "C" void PPC32CompilationCallback();
 extern "C" void PPC64CompilationCallback();
 
-#if !defined(__powerpc__) || defined(__powerpc64__)
+#if (!defined(__ppc__) && !defined(__powerpc__)) || defined(__powerpc64__) || defined(__ppc64__)
 void PPC32CompilationCallback() {
   llvm_unreachable("This is not a 32bit PowerPC, you can't execute this!");
 }
@@ -202,7 +202,7 @@ asm(
     );
 #endif
 
-#ifndef __powerpc64__
+#if !defined(__powerpc64__) && !defined(__ppc64__)
 void PPC64CompilationCallback() {
   llvm_unreachable("This is not a 64bit PowerPC, you can't execute this!");
 }


More information about the llvm-commits mailing list