llvm.org GIT mirror llvm / d77c7ab
Thumb2 32-bit ldm / stm needs .w suffix if submode is ia. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78410 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
3 changed file(s) with 11 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
650650 let mayLoad = 1 in
651651 def t2LDM : T2XI<(outs),
652652 (ins addrmode4:$addr, pred:$p, reglist:$dst1, variable_ops),
653 IIC_iLoad, "ldm${addr:submode}${p} $addr, $dst1", []>;
653 IIC_iLoad, "ldm${addr:submode}${p}${addr:wide} $addr, $dst1", []>;
654654
655655 let mayStore = 1 in
656656 def t2STM : T2XI<(outs),
657657 (ins addrmode4:$addr, pred:$p, reglist:$src1, variable_ops),
658 IIC_iStore, "stm${addr:submode}${p} $addr, $src1", []>;
658 IIC_iStore, "stm${addr:submode}${p}${addr:wide} $addr, $src1", []>;
659659
660660 //===----------------------------------------------------------------------===//
661661 // Move Instructions.
10711071 let isReturn = 1, isTerminator = 1, mayLoad = 1 in
10721072 def t2LDM_RET : T2XI<(outs),
10731073 (ins addrmode4:$addr, pred:$p, reglist:$dst1, variable_ops),
1074 IIC_iLoad, "ldm${addr:submode}${p} $addr, $dst1",
1074 IIC_iLoad, "ldm${addr:submode}${p}${addr:wide} $addr, $dst1",
10751075 []>;
10761076
10771077 let isBranch = 1, isTerminator = 1, isBarrier = 1 in {
598598 O << ARM_AM::getAMSubModeAltStr(Mode, isLDM);
599599 } else
600600 O << ARM_AM::getAMSubModeStr(Mode);
601 } else if (Modifier && strcmp(Modifier, "wide") == 0) {
602 ARM_AM::AMSubMode Mode = ARM_AM::getAM4SubMode(MO2.getImm());
603 if (Mode == ARM_AM::ia)
604 O << ".w";
601605 } else {
602606 printOperand(MI, Op);
603607 if (ARM_AM::getAM4WBFlag(MO2.getImm()))
44 define i32 @t1() {
55 ; CHECK: t1:
66 ; CHECK: stmfd sp!, {r7, lr}
7 ; CHECK: ldmfd sp!, {r7, pc}
7 ; CHECK: ldmfd.w sp!, {r7, pc}
88 %tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 0) ; [#uses=1]
99 %tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 1) ; [#uses=1]
1010 %tmp4 = tail call i32 @f1( i32 %tmp, i32 %tmp3 ) ; [#uses=1]
1414 define i32 @t2() {
1515 ; CHECK: t2:
1616 ; CHECK: stmfd sp!, {r7, lr}
17 ; CHECK: ldmia
18 ; CHECK: ldmfd sp!, {r7, pc}
17 ; CHECK: ldmia.w
18 ; CHECK: ldmfd.w sp!, {r7, pc}
1919 %tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 2) ; [#uses=1]
2020 %tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 3) ; [#uses=1]
2121 %tmp5 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 4) ; [#uses=1]
2626 define i32 @t3() {
2727 ; CHECK: t3:
2828 ; CHECK: stmfd sp!, {r7, lr}
29 ; CHECK: ldmfd sp!, {r7, pc}
29 ; CHECK: ldmfd.w sp!, {r7, pc}
3030 %tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 1) ; [#uses=1]
3131 %tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 2) ; [#uses=1]
3232 %tmp5 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 3) ; [#uses=1]