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
diff --git a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index cb4bdac..42f94ee 100644
--- a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
@@ -67,6 +67,8 @@
       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 @@
       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;
diff --git a/test/CodeGen/Thumb2/large-stack.ll b/test/CodeGen/Thumb2/large-stack.ll
index 763d316..68b5d1c 100644
--- a/test/CodeGen/Thumb2/large-stack.ll
+++ b/test/CodeGen/Thumb2/large-stack.ll
@@ -27,7 +27,7 @@
 ; 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
diff --git a/test/MC/Disassembler/ARM/thumb-tests.txt b/test/MC/Disassembler/ARM/thumb-tests.txt
index dfd80b3..29c67e7 100644
--- a/test/MC/Disassembler/ARM/thumb-tests.txt
+++ b/test/MC/Disassembler/ARM/thumb-tests.txt
@@ -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