diff options
| author | Jim Grosbach <grosbach@apple.com> | 2011-10-28 22:50:54 +0000 | 
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2011-10-28 22:50:54 +0000 | 
| commit | 3d785edee273ee9fcb89d255dda1f787afa49197 (patch) | |
| tree | 10f21002cac2783481767de7480eab001b6806d8 /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | |
| parent | b009a872d7a3fde0933eb2d89ccca2cb1e584654 (diff) | |
| download | bcm5719-llvm-3d785edee273ee9fcb89d255dda1f787afa49197.tar.gz bcm5719-llvm-3d785edee273ee9fcb89d255dda1f787afa49197.zip | |
ARM mode 'mov' to 'mvn' assembler alias.
llvm-svn: 143237
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index ad5f061eaba..03fba5aee98 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -657,6 +657,14 @@ public:      int64_t Value = CE->getValue();      return ARM_AM::getSOImmVal(Value) != -1;    } +  bool isARMSOImmNot() const { +    if (Kind != k_Immediate) +      return false; +    const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm()); +    if (!CE) return false; +    int64_t Value = CE->getValue(); +    return ARM_AM::getSOImmVal(~Value) != -1; +  }    bool isT2SOImm() const {      if (Kind != k_Immediate)        return false; @@ -1257,6 +1265,14 @@ public:      Inst.addOperand(MCOperand::CreateImm(~CE->getValue()));    } +  void addARMSOImmNotOperands(MCInst &Inst, unsigned N) const { +    assert(N == 1 && "Invalid number of operands!"); +    // The operand is actually a so_imm, but we have its bitwise +    // negation in the assembly source, so twiddle it here. +    const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm()); +    Inst.addOperand(MCOperand::CreateImm(~CE->getValue())); +  } +    void addSetEndImmOperands(MCInst &Inst, unsigned N) const {      assert(N == 1 && "Invalid number of operands!");      addExpr(Inst, getImm()); | 

