diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-08-18 18:08:29 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-08-18 18:08:29 +0000 |
commit | 0d1511c022e78e6d8769290b451b98a3b656de63 (patch) | |
tree | 7a7a2d847059543d040f20be928d767983fc2860 | |
parent | dbe46744c5bbf3c6d8fdfc52f18c6bdee8c37eb4 (diff) |
Thumb assembly parsing and encoding for CMP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137963 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMInstrThumb.td | 2 | ||||
-rw-r--r-- | test/MC/ARM/basic-thumb-instructions.s | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td index af502b63c6..2b047279d2 100644 --- a/lib/Target/ARM/ARMInstrThumb.td +++ b/lib/Target/ARM/ARMInstrThumb.td @@ -910,7 +910,7 @@ def tCMNz : // A8.6.33 // CMP immediate let isCompare = 1, Defs = [CPSR] in { -def tCMPi8 : T1pI<(outs), (ins tGPR:$Rn, i32imm:$imm8), IIC_iCMPi, +def tCMPi8 : T1pI<(outs), (ins tGPR:$Rn, imm0_255:$imm8), IIC_iCMPi, "cmp", "\t$Rn, $imm8", [(ARMcmp tGPR:$Rn, imm0_255:$imm8)]>, T1General<{1,0,1,?,?}> { diff --git a/test/MC/ARM/basic-thumb-instructions.s b/test/MC/ARM/basic-thumb-instructions.s index 1448538d6b..5ded1fadc8 100644 --- a/test/MC/ARM/basic-thumb-instructions.s +++ b/test/MC/ARM/basic-thumb-instructions.s @@ -144,3 +144,14 @@ _func: @ CHECK: cmn r5, r1 @ encoding: [0xcd,0x42] + +@------------------------------------------------------------------------------ +@ CMP +@------------------------------------------------------------------------------ + cmp r6, #32 + cmp r3, r4 + cmp r8, r1 + +@ CHECK: cmp r6, #32 @ encoding: [0x20,0x2e] +@ CHECK: cmp r3, r4 @ encoding: [0xa3,0x42] +@ CHECK: cmp r8, r1 @ encoding: [0x88,0x45] |