summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2014-02-01 16:52:33 +0000
committerDavid Woodhouse <dwmw2@infradead.org>2014-02-01 16:52:33 +0000
commit6c9a6f9b3d82f041cc6ae3997775bac74df4cbc4 (patch)
tree658ee663c0cccb3a7be3a66bea747874c3f3239a /llvm/lib/MC/MCParser/AsmParser.cpp
parentd6de0d99c5878ab76e72b7d1fccdc25dda4b9623 (diff)
downloadbcm5719-llvm-6c9a6f9b3d82f041cc6ae3997775bac74df4cbc4.tar.gz
bcm5719-llvm-6c9a6f9b3d82f041cc6ae3997775bac74df4cbc4.zip
MC: Fix .octa output for APInts with BitWidth > 128
llvm-svn: 200615
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index 37b759e64f5..63a00fedfa7 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -2335,7 +2335,8 @@ bool AsmParser::parseDirectiveOctaValue() {
hi = 0;
lo = IntValue.getZExtValue();
} else if (IntValue.isIntN(128)) {
- hi = IntValue.getHiBits(64).getZExtValue();
+ // It might actually have more than 128 bits, but the top ones are zero.
+ hi = IntValue.getHiBits(IntValue.getBitWidth() - 64).getZExtValue();
lo = IntValue.getLoBits(64).getZExtValue();
} else
return Error(ExprLoc, "literal value out of range for directive");
OpenPOWER on IntegriCloud