summaryrefslogtreecommitdiff
path: root/lib
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
commit2d53a375732b044a3ec44bd41f17feed0eb8f064 (patch)
tree5983c44f07d95d913930bb634ec74716316658ba /lib
parent075a90a913e4f26ea074e720130ce8a0a892d235 (diff)
downloadllvm-2d53a375732b044a3ec44bd41f17feed0eb8f064.tar.gz
llvm-2d53a375732b044a3ec44bd41f17feed0eb8f064.tar.bz2
llvm-2d53a375732b044a3ec44bd41f17feed0eb8f064.tar.xz
MC: Fix .octa output for APInts with BitWidth > 128
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCParser/AsmParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp
index 37b759e64f..63a00fedfa 100644
--- a/lib/MC/MCParser/AsmParser.cpp
+++ b/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");