Mesa (master): gallivm: Replace architecture test with PIPE_ARCH_*
Stephane Marchesin
marcheu at kemper.freedesktop.org
Mon Feb 13 00:37:31 UTC 2012
Module: Mesa
Branch: master
Commit: d2c54fb5223efee699862bef56177027edc140bc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d2c54fb5223efee699862bef56177027edc140bc
Author: Stéphane Marchesin <marcheu at chromium.org>
Date: Thu Feb 9 19:50:59 2012 -0800
gallivm: Replace architecture test with PIPE_ARCH_*
X86Target is a variable, and therefore isn't defined at compile time. So
LLVM_NATIVE_ARCH == X86Target
is translated into
0 == 0
and since X86 is first, we always pick it.
Therefore we replace the logic with PIPE_ARCH_*.
https://bugs.freedesktop.org/show_bug.cgi?id=45420
---
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index 5d98763..7f4d227 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -207,15 +207,17 @@ lp_disassemble(const void* func)
#if HAVE_LLVM >= 0x0208
InitializeNativeTargetAsmPrinter();
-#elif LLVM_NATIVE_ARCH == X86Target
+#elif defined(PIPE_ARCH_X86)
LLVMInitializeX86AsmPrinter();
-#elif LLVM_NATIVE_ARCH == ARMTarget
+#elif defined(PIPE_ARCH_ARM)
LLVMInitializeARMAsmPrinter();
+#elif defined(PIPE_ARCH_PPC)
+ LLVMInitializePowerPCAsmPrinter();
#endif
-#if (LLVM_NATIVE_ARCH == X86 || LLVM_NATIVE_ARCH == X86Target)
+#if defined(PIPE_ARCH_X86)
LLVMInitializeX86Disassembler();
-#elif (LLVM_NATIVE_ARCH == ARM || LLVM_NATIVE_ARCH == ARMTarget)
+#elif defined(PIPE_ARCH_ARM)
LLVMInitializeARMDisassembler();
#endif
More information about the mesa-commit
mailing list