summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-02-04 13:47:16 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-02-04 13:47:16 +0000
commitc8770aa5070eb484ea21c29d78f71e9c139281a9 (patch)
treeee80d89ea5432e53ec5d817be03fe3a9cb6259ad
parent20b8a65627f85f85b5f411869ce751fa8d734662 (diff)
downloadbcm5719-llvm-c8770aa5070eb484ea21c29d78f71e9c139281a9.tar.gz
bcm5719-llvm-c8770aa5070eb484ea21c29d78f71e9c139281a9.zip
fix constant pointer outputing on 64 bit machines
llvm-svn: 20026
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 96d9492c307..80f67023f43 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -284,6 +284,11 @@ void AsmPrinter::emitGlobalConstant(const Constant *CV) {
O << Data16bitsDirective;
break;
case Type::PointerTyID:
+ if (TD.getPointerSize() == 8) {
+ O << Data64bitsDirective;
+ break;
+ }
+ //Fall through for pointer size == int size
case Type::UIntTyID: case Type::IntTyID:
O << Data32bitsDirective;
break;
OpenPOWER on IntegriCloud