Few targets like the tiny little PIC16 have only 16-bit pointers.
authorSanjiv Gupta <sanjiv.gupta@microchip.com>
Thu, 22 Jan 2009 10:14:21 +0000 (10:14 +0000)
committerSanjiv Gupta <sanjiv.gupta@microchip.com>
Thu, 22 Jan 2009 10:14:21 +0000 (10:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62763 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index 5b665a0c22139c80e5d613be1e4991e2610fc9cc..5085fd4bdab5a9fbea68a138ae2a7047e571abfe 100644 (file)
@@ -1516,6 +1516,10 @@ void AsmPrinter::printDataDirective(const Type *type) {
       assert(TAI->getData64bitsDirective() &&
              "Target cannot handle 64-bit pointer exprs!");
       O << TAI->getData64bitsDirective();
+    } else if (TD->getPointerSize() == 2) {
+      O << TAI->getData16bitsDirective();
+    } else if (TD->getPointerSize() == 1) {
+      O << TAI->getData8bitsDirective();
     } else {
       O << TAI->getData32bitsDirective();
     }