[llvm] r208082 - AArch64/ARM64: add more specific diagnostic for floating imm 0.0.
Tim Northover
tnorthover at apple.com
Tue May 6 05:50:48 PDT 2014
Author: tnorthover
Date: Tue May 6 07:50:47 2014
New Revision: 208082
URL: http://llvm.org/viewvc/llvm-project?rev=208082&view=rev
Log:
AArch64/ARM64: add more specific diagnostic for floating imm 0.0.
Modified:
llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp?rev=208082&r1=208081&r2=208082&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp Tue May 6 07:50:47 2014
@@ -3246,11 +3246,12 @@ bool ARM64AsmParser::parseOperand(Operan
if (Tok.is(AsmToken::Real)) {
APFloat RealVal(APFloat::IEEEdouble, Tok.getString());
uint64_t IntVal = RealVal.bitcastToAPInt().getZExtValue();
- if (IntVal != 0 ||
- (Mnemonic != "fcmp" && Mnemonic != "fcmpe" && Mnemonic != "fcmeq" &&
- Mnemonic != "fcmge" && Mnemonic != "fcmgt" && Mnemonic != "fcmle" &&
- Mnemonic != "fcmlt"))
+ if (Mnemonic != "fcmp" && Mnemonic != "fcmpe" && Mnemonic != "fcmeq" &&
+ Mnemonic != "fcmge" && Mnemonic != "fcmgt" && Mnemonic != "fcmle" &&
+ Mnemonic != "fcmlt")
return TokError("unexpected floating point literal");
+ else if (IntVal != 0)
+ return TokError("only valid floating-point immediate is #0.0");
Parser.Lex(); // Eat the token.
Operands.push_back(
More information about the llvm-commits
mailing list