diff options
author | Colin LeMahieu <colinl@codeaurora.org> | 2016-12-05 04:29:00 +0000 |
---|---|---|
committer | Colin LeMahieu <colinl@codeaurora.org> | 2016-12-05 04:29:00 +0000 |
commit | 81707549191eae0aa7b571165ebd030dd82a50f3 (patch) | |
tree | e6a2b4ab5a9b2a0c27c4bfe5342642f0b0606627 /llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp | |
parent | c5882a73a0306ec20831a82c4c9e92dc2cc5854e (diff) | |
download | bcm5719-llvm-81707549191eae0aa7b571165ebd030dd82a50f3.tar.gz bcm5719-llvm-81707549191eae0aa7b571165ebd030dd82a50f3.zip |
[Hexagon] Changing from literal numeric value to argument since #-1 will not parse when '-' is converted to a token.
llvm-svn: 288634
Diffstat (limited to 'llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp b/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp index 50f529e5b24..024a634f1a8 100644 --- a/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp +++ b/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp @@ -314,6 +314,14 @@ public: bool ism6_0Imm() const { return CheckImmRange(6, 0, false, false, false); } bool isn8_0Imm() const { return CheckImmRange(8, 0, false, false, false); } + bool isn1Const() const { + if (!isImm()) + return false; + int64_t Value; + if (!getImm()->evaluateAsAbsolute(Value)) + return false; + return Value == -1; + } bool iss16_0Ext() const { return CheckImmRange(16 + 26, 0, true, true, true); } bool iss12_0Ext() const { return CheckImmRange(12 + 26, 0, true, true, true); } @@ -506,6 +514,9 @@ public: void adds11_3ExtOperands(MCInst &Inst, unsigned N) const { addSignedImmOperands(Inst, N); } + void addn1ConstOperands(MCInst &Inst, unsigned N) const { + addImmOperands(Inst, N); + } void addu7_0ExtOperands(MCInst &Inst, unsigned N) const { addImmOperands(Inst, N); |