diff options
author | David Woodhouse <dwmw2@infradead.org> | 2014-02-01 16:52:33 +0000 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2014-02-01 16:52:33 +0000 |
commit | 6c9a6f9b3d82f041cc6ae3997775bac74df4cbc4 (patch) | |
tree | 658ee663c0cccb3a7be3a66bea747874c3f3239a /llvm/lib/MC/MCParser/AsmParser.cpp | |
parent | d6de0d99c5878ab76e72b7d1fccdc25dda4b9623 (diff) | |
download | bcm5719-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.cpp | 3 |
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"); |