aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-01-22 10:14:21 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-01-22 10:14:21 +0000
commitfcc6f1556efb386af47293d9f8599bab2b34321c (patch)
treef82fb8fd1c2ed2ded69404fbf843e42ece822bcb
parent536ab130ec95cbb7bf30530251dafa7dfecc8471 (diff)
Few targets like the tiny little PIC16 have only 16-bit pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62763 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 5b665a0c22..5085fd4bda 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -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();
}