summaryrefslogtreecommitdiff
path: root/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-04-30 16:13:07 +0000
committerTim Northover <tnorthover@apple.com>2014-04-30 16:13:07 +0000
commit52f60f81d958c5ce7be81161dd6adee508605673 (patch)
tree952056d027c5561ba569d5125d291a5b982e753c /lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
parentc16fa8872080f5beb927e6c68b5ada50cbc9dc24 (diff)
downloadllvm-52f60f81d958c5ce7be81161dd6adee508605673.tar.gz
llvm-52f60f81d958c5ce7be81161dd6adee508605673.tar.bz2
llvm-52f60f81d958c5ce7be81161dd6adee508605673.tar.xz
AArch64/ARM64: accept and print floating-point immediate 0 as "#0.0"
It's been decided that in the future, the floating-point immediate in instructions like "fcmeq v0.2s, v1.2s, #0.0" will be canonically "0.0", which has been implemented on AArch64 already but not ARM64. This fixes that issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp')
-rw-r--r--lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp b/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
index ee9c61e528..530bab80b6 100644
--- a/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
+++ b/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
@@ -3230,7 +3230,10 @@ 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"))
+ if (IntVal != 0 ||
+ (Mnemonic != "fcmp" && Mnemonic != "fcmpe" && Mnemonic != "fcmeq" &&
+ Mnemonic != "fcmge" && Mnemonic != "fcmgt" && Mnemonic != "fcmle" &&
+ Mnemonic != "fcmlt"))
return TokError("unexpected floating point literal");
Parser.Lex(); // Eat the token.