diff options
author | Mihai Popa <mihail.popa@gmail.com> | 2013-06-11 09:48:35 +0000 |
---|---|---|
committer | Mihai Popa <mihail.popa@gmail.com> | 2013-06-11 09:48:35 +0000 |
commit | 55ab7315d04ce4f25a15e5cd50f6a23d950a00cf (patch) | |
tree | 8aa576a45ed168ba3f7dd4c76d15df65ef29aa86 /lib | |
parent | 16ad92ad3cd0cbbaa4d0524d9f201dd5dbefa15a (diff) | |
download | external_llvm-55ab7315d04ce4f25a15e5cd50f6a23d950a00cf.zip external_llvm-55ab7315d04ce4f25a15e5cd50f6a23d950a00cf.tar.gz external_llvm-55ab7315d04ce4f25a15e5cd50f6a23d950a00cf.tar.bz2 |
It adds support for negative zero offsets for loads and stores.
Negative zero is returned by the primary expression parser as INT32_MIN, so all that the method needs to do is to accept this value.
Behavior already present for Thumb2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 314d37d..c59ca64 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -994,7 +994,7 @@ public: const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm()); if (!CE) return false; int64_t Val = CE->getValue(); - return Val > -4096 && Val < 4096; + return (Val == INT32_MIN) || (Val > -4096 && Val < 4096); } bool isAddrMode3() const { // If we have an immediate that's not a constant, treat it as a label |