mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-21 03:28:31 +00:00
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
This commit is contained in:
parent
2234e5eee6
commit
d77c7aba83
@ -651,12 +651,12 @@ def t2STRB_POST : T2Iidxldst<(outs GPR:$base_wb),
|
||||
let mayLoad = 1 in
|
||||
def t2LDM : T2XI<(outs),
|
||||
(ins addrmode4:$addr, pred:$p, reglist:$dst1, variable_ops),
|
||||
IIC_iLoad, "ldm${addr:submode}${p} $addr, $dst1", []>;
|
||||
IIC_iLoad, "ldm${addr:submode}${p}${addr:wide} $addr, $dst1", []>;
|
||||
|
||||
let mayStore = 1 in
|
||||
def t2STM : T2XI<(outs),
|
||||
(ins addrmode4:$addr, pred:$p, reglist:$src1, variable_ops),
|
||||
IIC_iStore, "stm${addr:submode}${p} $addr, $src1", []>;
|
||||
IIC_iStore, "stm${addr:submode}${p}${addr:wide} $addr, $src1", []>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Move Instructions.
|
||||
@ -1072,7 +1072,7 @@ let isCall = 1,
|
||||
let isReturn = 1, isTerminator = 1, mayLoad = 1 in
|
||||
def t2LDM_RET : T2XI<(outs),
|
||||
(ins addrmode4:$addr, pred:$p, reglist:$dst1, variable_ops),
|
||||
IIC_iLoad, "ldm${addr:submode}${p} $addr, $dst1",
|
||||
IIC_iLoad, "ldm${addr:submode}${p}${addr:wide} $addr, $dst1",
|
||||
[]>;
|
||||
|
||||
let isBranch = 1, isTerminator = 1, isBarrier = 1 in {
|
||||
|
@ -599,6 +599,10 @@ void ARMAsmPrinter::printAddrMode4Operand(const MachineInstr *MI, int Op,
|
||||
O << ARM_AM::getAMSubModeAltStr(Mode, isLDM);
|
||||
} else
|
||||
O << ARM_AM::getAMSubModeStr(Mode);
|
||||
} else if (Modifier && strcmp(Modifier, "wide") == 0) {
|
||||
ARM_AM::AMSubMode Mode = ARM_AM::getAM4SubMode(MO2.getImm());
|
||||
if (Mode == ARM_AM::ia)
|
||||
O << ".w";
|
||||
} else {
|
||||
printOperand(MI, Op);
|
||||
if (ARM_AM::getAM4WBFlag(MO2.getImm()))
|
||||
|
@ -5,7 +5,7 @@
|
||||
define i32 @t1() {
|
||||
; CHECK: t1:
|
||||
; CHECK: stmfd sp!, {r7, lr}
|
||||
; CHECK: ldmfd sp!, {r7, pc}
|
||||
; CHECK: ldmfd.w sp!, {r7, pc}
|
||||
%tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 0) ; <i32> [#uses=1]
|
||||
%tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 1) ; <i32> [#uses=1]
|
||||
%tmp4 = tail call i32 @f1( i32 %tmp, i32 %tmp3 ) ; <i32> [#uses=1]
|
||||
@ -15,8 +15,8 @@ define i32 @t1() {
|
||||
define i32 @t2() {
|
||||
; CHECK: t2:
|
||||
; CHECK: stmfd sp!, {r7, lr}
|
||||
; CHECK: ldmia
|
||||
; CHECK: ldmfd sp!, {r7, pc}
|
||||
; CHECK: ldmia.w
|
||||
; CHECK: ldmfd.w sp!, {r7, pc}
|
||||
%tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 2) ; <i32> [#uses=1]
|
||||
%tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 3) ; <i32> [#uses=1]
|
||||
%tmp5 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 4) ; <i32> [#uses=1]
|
||||
@ -27,7 +27,7 @@ define i32 @t2() {
|
||||
define i32 @t3() {
|
||||
; CHECK: t3:
|
||||
; CHECK: stmfd sp!, {r7, lr}
|
||||
; CHECK: ldmfd sp!, {r7, pc}
|
||||
; CHECK: ldmfd.w sp!, {r7, pc}
|
||||
%tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 1) ; <i32> [#uses=1]
|
||||
%tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 2) ; <i32> [#uses=1]
|
||||
%tmp5 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 3) ; <i32> [#uses=1]
|
||||
|
Loading…
Reference in New Issue
Block a user