mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 00:29:20 +00:00
AArch64/ARM64: add more specific diagnostic for floating imm 0.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c5f9aff43e
commit
d58350d789
@ -3246,11 +3246,12 @@ bool ARM64AsmParser::parseOperand(OperandVector &Operands, bool isCondCode,
|
||||
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(
|
||||
|
Loading…
Reference in New Issue
Block a user