summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
diff options
context:
space:
mode:
authorMihai Popa <mihail.popa@gmail.com>2013-08-21 13:14:58 +0000
committerMihai Popa <mihail.popa@gmail.com>2013-08-21 13:14:58 +0000
commitae1112bae540972b6c663eb900333f8a677ce5a6 (patch)
tree8d68890791344444147c963e1696eb94e1b42016 /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
parent90f54229545e955d2e8ab37c25b6c2e88ec5a271 (diff)
downloadbcm5719-llvm-ae1112bae540972b6c663eb900333f8a677ce5a6.tar.gz
bcm5719-llvm-ae1112bae540972b6c663eb900333f8a677ce5a6.zip
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. llvm-svn: 188901
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index df9306a9b99..7467071db32 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -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());
OpenPOWER on IntegriCloud