diff options
author | Mihai Popa <mihail.popa@gmail.com> | 2013-08-15 15:43:06 +0000 |
---|---|---|
committer | Mihai Popa <mihail.popa@gmail.com> | 2013-08-15 15:43:06 +0000 |
commit | d79f00ba68310dc12b50cc53c9b58a062205f0de (patch) | |
tree | 8da51a46357019d3c65e9d4e291dc94f708e18f5 /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | |
parent | 16b4ff5c4dba74988d8b72050f988a5e152a32fc (diff) | |
download | bcm5719-llvm-d79f00ba68310dc12b50cc53c9b58a062205f0de.tar.gz bcm5719-llvm-d79f00ba68310dc12b50cc53c9b58a062205f0de.zip |
This fixes three issues related to Thumb literal loads:
1. The offset range for Thumb1 PC relative loads is [0..1020] and not [-1024..1020]
2. Thumb2 PC relative loads may define the PC, so the restriction placed on target register is removed
3. Removes unneeded alias between "ldr.n" and t1LDRpci. ".n" is actually stripped by both tablegen
and the ASM parser, so this alias rule really does nothing
llvm-svn: 188466
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 03d3a48f210..3d7baf5b28b 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -647,7 +647,7 @@ public: Val = Memory.OffsetImm->getValue(); } else return false; - return ((Val % 4) == 0) && (Val >= -1020) && (Val <= 1020); + return ((Val % 4) == 0) && (Val >= 0) && (Val <= 1020); } bool isFPImm() const { if (!isImm()) return false; |