Make "mov" work for all Thumb2 MOV encodings

According to the ARM specification, "mov" is a valid mnemonic for all Thumb2 MOV encodings.
To achieve this, the patch adds one instruction alias with a special range condition to avoid collision with the Thumb1 MOV.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188901 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mihai Popa
2013-08-21 13:14:58 +00:00
parent 8ba76daba0
commit 1a9f21abac
4 changed files with 33 additions and 1 deletions

View File

@@ -867,6 +867,15 @@ public:
int64_t Value = CE->getValue();
return Value >= 0 && Value < 65536;
}
bool isImm256_65535Expr() const {
if (!isImm()) return false;
const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
// If it's not a constant expression, it'll generate a fixup and be
// handled later.
if (!CE) return true;
int64_t Value = CE->getValue();
return Value >= 256 && Value < 65536;
}
bool isImm0_65535Expr() const {
if (!isImm()) return false;
const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());