When using the 'push' mnemonic for Thumb2 stmdb, be explicit when it's the

32-bit wide version by adding the .w suffix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120838 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2010-12-03 20:33:01 +00:00
parent b3a04d46e8
commit 41ad0c4c73
3 changed files with 7 additions and 3 deletions

View File

@ -67,6 +67,8 @@ void ARMInstPrinter::printInst(const MCInst *MI, raw_ostream &O) {
MI->getOperand(0).getReg() == ARM::SP) {
O << '\t' << "push";
printPredicateOperand(MI, 2, O);
if (Opcode == ARM::t2STMDB_UPD)
O << ".w";
O << '\t';
printRegisterList(MI, 4, O);
return;
@ -77,6 +79,8 @@ void ARMInstPrinter::printInst(const MCInst *MI, raw_ostream &O) {
MI->getOperand(0).getReg() == ARM::SP) {
O << '\t' << "pop";
printPredicateOperand(MI, 2, O);
if (Opcode == ARM::t2LDMIA_UPD)
O << ".w";
O << '\t';
printRegisterList(MI, 4, O);
return;

View File

@ -27,7 +27,7 @@ define i32 @test3() {
; DARWIN: sub.w sp, sp, #805306368
; DARWIN: sub sp, #20
; LINUX: test3:
; LINUX: push {r4, r7, r11, lr}
; LINUX: push.w {r4, r7, r11, lr}
; LINUX: sub.w sp, sp, #805306368
; LINUX: sub sp, #16
%retval = alloca i32, align 4

View File

@ -46,10 +46,10 @@
# CHECK: pkhbt r2, r4, r6
0xc4 0xea 0x06 0x02
# CHECK: pop {r2, r4, r6, r8, r10, r12}
# CHECK: pop.w {r2, r4, r6, r8, r10, r12}
0xbd 0xe8 0x54 0x15
# CHECK: push {r2, r4, r6, r8, r10, r12}
# CHECK: push.w {r2, r4, r6, r8, r10, r12}
0x2d 0xe9 0x54 0x15
# CHECK: rsbs r0, r0, #0