Thumb2 alias for long-form pop and friends.

rdar://10542474

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2011-12-07 18:32:28 +00:00
parent 996ff1469f
commit 8524bca750
2 changed files with 14 additions and 0 deletions

View File

@ -3971,6 +3971,18 @@ def : t2InstAlias<"push${p} $regs", (t2STMDB_UPD SP, pred:$p, reglist:$regs)>;
def : t2InstAlias<"pop${p}.w $regs", (t2LDMIA_UPD SP, pred:$p, reglist:$regs)>;
def : t2InstAlias<"pop${p} $regs", (t2LDMIA_UPD SP, pred:$p, reglist:$regs)>;
// STMIA/STMIA_UPD aliases w/o the optional .w suffix
def : t2InstAlias<"stm${p} $Rn, $regs",
(t2STMIA GPR:$Rn, pred:$p, reglist:$regs)>;
def : t2InstAlias<"stm${p} $Rn!, $regs",
(t2STMIA_UPD GPR:$Rn, pred:$p, reglist:$regs)>;
// LDMIA/LDMIA_UPD aliases w/o the optional .w suffix
def : t2InstAlias<"ldm${p} $Rn, $regs",
(t2LDMIA GPR:$Rn, pred:$p, reglist:$regs)>;
def : t2InstAlias<"ldm${p} $Rn!, $regs",
(t2LDMIA_UPD GPR:$Rn, pred:$p, reglist:$regs)>;
// STMDB/STMDB_UPD aliases w/ the optional .w suffix
def : t2InstAlias<"stmdb${p}.w $Rn, $regs",
(t2STMDB GPR:$Rn, pred:$p, reglist:$regs)>;

View File

@ -581,6 +581,7 @@ _func:
ldm r4, {r5, r6}
ldm r5!, {r3, r8}
ldmfd r5!, {r3, r8}
ldmia sp!, {r4-r11, pc}
@ CHECK: ldm.w r4, {r4, r5, r8, r9} @ encoding: [0x94,0xe8,0x30,0x03]
@ CHECK: ldm.w r4, {r5, r6} @ encoding: [0x94,0xe8,0x60,0x00]
@ -598,6 +599,7 @@ _func:
@ CHECK: ldm.w r4, {r5, r6} @ encoding: [0x94,0xe8,0x60,0x00]
@ CHECK: ldm.w r5!, {r3, r8} @ encoding: [0xb5,0xe8,0x08,0x01]
@ CHECK: ldm.w r5!, {r3, r8} @ encoding: [0xb5,0xe8,0x08,0x01]
@ CHECK: pop.w {pc, r4, r5, r6, r7, r8, r9, r10, r11} @ encoding: [0xbd,0xe8,0xf0,0x8f]
@------------------------------------------------------------------------------