diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-12-22 17:37:00 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-12-22 17:37:00 +0000 |
commit | de626ad8726677328e10dbdc15011254214437d7 (patch) | |
tree | b6ecc0714da1cfd98cfed51a23670a301804795c /lib/Target/ARM/AsmParser | |
parent | 18c8d12dea944086ef0ce2f674ca8a34de2bbd74 (diff) | |
download | external_llvm-de626ad8726677328e10dbdc15011254214437d7.zip external_llvm-de626ad8726677328e10dbdc15011254214437d7.tar.gz external_llvm-de626ad8726677328e10dbdc15011254214437d7.tar.bz2 |
ARM assembly parser canonicallize on 'lsl' for shift-by-zero form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmParser')
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 4f4a135..d70511f 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -2421,6 +2421,10 @@ int ARMAsmParser::tryParseShiftRegister( Error(ImmLoc, "immediate shift value out of range"); return -1; } + // shift by zero is a nop. Always send it through as lsl. + // ('as' compatibility) + if (Imm == 0) + ShiftTy = ARM_AM::lsl; } else if (Parser.getTok().is(AsmToken::Identifier)) { ShiftReg = tryParseRegister(); SMLoc L = Parser.getTok().getLoc(); |