aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMInstrThumb.td
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-08-24 21:42:27 +0000
committerJim Grosbach <grosbach@apple.com>2011-08-24 21:42:27 +0000
commitf69c80403620ef38674e037ae2664f1bbe5a4f3c (patch)
tree829f8df69c0fd11a461f0d3b158fa3624ebd7bed /lib/Target/ARM/ARMInstrThumb.td
parent12a1e3bbcbd4e8f740c8304379001d1e6731561c (diff)
downloadexternal_llvm-f69c80403620ef38674e037ae2664f1bbe5a4f3c.zip
external_llvm-f69c80403620ef38674e037ae2664f1bbe5a4f3c.tar.gz
external_llvm-f69c80403620ef38674e037ae2664f1bbe5a4f3c.tar.bz2
Thumb parsing and encoding for SUB (SP minu immediate).
Fix FiXME in test file. Remove FIXME for SUB (SP minus register) since that form is Thumb2 only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMInstrThumb.td')
-rw-r--r--lib/Target/ARM/ARMInstrThumb.td10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td
index a5ddec3..837d853 100644
--- a/lib/Target/ARM/ARMInstrThumb.td
+++ b/lib/Target/ARM/ARMInstrThumb.td
@@ -335,10 +335,6 @@ def tADDspi : T1pIt<(outs GPRsp:$Rdn), (ins GPRsp:$Rn, t_imm0_508s4:$imm),
let DecoderMethod = "DecodeThumbAddSPImm";
}
-// Can optionally specify SP as a three operand instruction.
-def : tInstAlias<"add${p} sp, sp, $imm",
- (tADDspi SP, t_imm0_508s4:$imm, pred:$p)>;
-
// SUB sp, sp, #<imm7>
// FIXME: The encoding and the ASM string don't match up.
def tSUBspi : T1pIt<(outs GPRsp:$Rdn), (ins GPRsp:$Rn, t_imm0_508s4:$imm),
@@ -350,6 +346,12 @@ def tSUBspi : T1pIt<(outs GPRsp:$Rdn), (ins GPRsp:$Rn, t_imm0_508s4:$imm),
let DecoderMethod = "DecodeThumbAddSPImm";
}
+// Can optionally specify SP as a three operand instruction.
+def : tInstAlias<"add${p} sp, sp, $imm",
+ (tADDspi SP, t_imm0_508s4:$imm, pred:$p)>;
+def : tInstAlias<"sub${p} sp, sp, $imm",
+ (tSUBspi SP, t_imm0_508s4:$imm, pred:$p)>;
+
// ADD <Rm>, sp
def tADDrSP : T1pIt<(outs GPR:$Rdn), (ins GPR:$Rn, GPRsp:$sp), IIC_iALUr,
"add", "\t$Rdn, $sp, $Rn", []>,