Do not sign extend floating-point values in the asm parser.
authorBob Wilson <bob.wilson@apple.com>
Thu, 3 Feb 2011 23:17:47 +0000 (23:17 +0000)
committerBob Wilson <bob.wilson@apple.com>
Thu, 3 Feb 2011 23:17:47 +0000 (23:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124831 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCParser/AsmParser.cpp

index 61ceee45f5f3f8504737ac4b9c045a908f8b9293..8654db559669233cd762620aef32b8b766d83686 100644 (file)
@@ -568,7 +568,7 @@ bool AsmParser::ParsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
   }
   case AsmToken::Real: {
     APFloat RealVal(APFloat::IEEEdouble, getTok().getString());
-    int64_t IntVal = RealVal.bitcastToAPInt().getSExtValue();
+    uint64_t IntVal = RealVal.bitcastToAPInt().getZExtValue();
     Res = MCConstantExpr::Create(IntVal, getContext());
     Lex(); // Eat token.
     return false;