1*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple armv6t2-linux-eabi -filetype asm -o - %s 2>&1 \ 2*9880d681SAndroid Build Coastguard Worker@ RUN: | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple armv7-linux-eabi -filetype asm -o - %s 2>&1 \ 5*9880d681SAndroid Build Coastguard Worker@ RUN: | FileCheck %s -check-prefix CHECK -check-prefix CHECK-V7 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker .syntax unified 8*9880d681SAndroid Build Coastguard Worker .arm 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Worker .global stm 11*9880d681SAndroid Build Coastguard Worker .type stm,%function 12*9880d681SAndroid Build Coastguard Workerstm: 13*9880d681SAndroid Build Coastguard Worker stm sp!, {r0, pc} 14*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 15*9880d681SAndroid Build Coastguard Worker@ CHECK: stm sp!, {r0, pc} 16*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 17*9880d681SAndroid Build Coastguard Worker stm r0!, {r0, sp} 18*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 19*9880d681SAndroid Build Coastguard Worker@ CHECK: stm r0!, {r0, sp} 20*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 21*9880d681SAndroid Build Coastguard Worker stm r1!, {r0, sp, pc} 22*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 23*9880d681SAndroid Build Coastguard Worker@ CHECK: stm r1!, {r0, sp, pc} 24*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 25*9880d681SAndroid Build Coastguard Worker stm r2!, {sp, pc} 26*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 27*9880d681SAndroid Build Coastguard Worker@ CHECK: stm r2!, {sp, pc} 28*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 29*9880d681SAndroid Build Coastguard Worker stm sp!, {pc} 30*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 31*9880d681SAndroid Build Coastguard Worker@ CHECK: stm sp!, {pc} 32*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 33*9880d681SAndroid Build Coastguard Worker stm r0!, {sp} 34*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 35*9880d681SAndroid Build Coastguard Worker@ CHECK: stm r0!, {sp} 36*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Worker .global stmda 39*9880d681SAndroid Build Coastguard Worker .type stmda,%function 40*9880d681SAndroid Build Coastguard Workerstmda: 41*9880d681SAndroid Build Coastguard Worker stmda sp!, {r0, pc} 42*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 43*9880d681SAndroid Build Coastguard Worker@ CHECK: stmda sp!, {r0, pc} 44*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 45*9880d681SAndroid Build Coastguard Worker stmda r0!, {r0, sp} 46*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 47*9880d681SAndroid Build Coastguard Worker@ CHECK: stmda r0!, {r0, sp} 48*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 49*9880d681SAndroid Build Coastguard Worker stmda r1!, {r0, sp, pc} 50*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 51*9880d681SAndroid Build Coastguard Worker@ CHECK: stmda r1!, {r0, sp, pc} 52*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 53*9880d681SAndroid Build Coastguard Worker stmda r2!, {sp, pc} 54*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 55*9880d681SAndroid Build Coastguard Worker@ CHECK: stmda r2!, {sp, pc} 56*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 57*9880d681SAndroid Build Coastguard Worker stmda sp!, {pc} 58*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 59*9880d681SAndroid Build Coastguard Worker@ CHECK: stmda sp!, {pc} 60*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 61*9880d681SAndroid Build Coastguard Worker stmda r0!, {sp} 62*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 63*9880d681SAndroid Build Coastguard Worker@ CHECK: stmda r0!, {sp} 64*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 65*9880d681SAndroid Build Coastguard Worker 66*9880d681SAndroid Build Coastguard Worker .global stmdb 67*9880d681SAndroid Build Coastguard Worker .type stmdb,%function 68*9880d681SAndroid Build Coastguard Workerstmdb: 69*9880d681SAndroid Build Coastguard Worker stmdb sp!, {r0, pc} 70*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 71*9880d681SAndroid Build Coastguard Worker@ CHECK: stmdb sp!, {r0, pc} 72*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 73*9880d681SAndroid Build Coastguard Worker stmdb r0!, {r0, sp} 74*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 75*9880d681SAndroid Build Coastguard Worker@ CHECK: stmdb r0!, {r0, sp} 76*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 77*9880d681SAndroid Build Coastguard Worker stmdb r1!, {r0, sp, pc} 78*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 79*9880d681SAndroid Build Coastguard Worker@ CHECK: stmdb r1!, {r0, sp, pc} 80*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 81*9880d681SAndroid Build Coastguard Worker stmdb r2!, {sp, pc} 82*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 83*9880d681SAndroid Build Coastguard Worker@ CHECK: stmdb r2!, {sp, pc} 84*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 85*9880d681SAndroid Build Coastguard Worker stmdb sp!, {pc} 86*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 87*9880d681SAndroid Build Coastguard Worker@ CHECK: stmdb sp!, {pc} 88*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 89*9880d681SAndroid Build Coastguard Worker stmdb r0!, {sp} 90*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 91*9880d681SAndroid Build Coastguard Worker@ CHECK: stmdb r0!, {sp} 92*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 93*9880d681SAndroid Build Coastguard Worker 94*9880d681SAndroid Build Coastguard Worker .global stmib 95*9880d681SAndroid Build Coastguard Worker .type stmib,%function 96*9880d681SAndroid Build Coastguard Workerstmib: 97*9880d681SAndroid Build Coastguard Worker stmib sp!, {r0, pc} 98*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 99*9880d681SAndroid Build Coastguard Worker@ CHECK: stmib sp!, {r0, pc} 100*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 101*9880d681SAndroid Build Coastguard Worker stmib r0!, {r0, sp} 102*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 103*9880d681SAndroid Build Coastguard Worker@ CHECK: stmib r0!, {r0, sp} 104*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 105*9880d681SAndroid Build Coastguard Worker stmib r1!, {r0, sp, pc} 106*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 107*9880d681SAndroid Build Coastguard Worker@ CHECK: stmib r1!, {r0, sp, pc} 108*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 109*9880d681SAndroid Build Coastguard Worker stmib r2!, {sp, pc} 110*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 111*9880d681SAndroid Build Coastguard Worker@ CHECK: stmib r2!, {sp, pc} 112*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 113*9880d681SAndroid Build Coastguard Worker stmib sp!, {pc} 114*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 115*9880d681SAndroid Build Coastguard Worker@ CHECK: stmib sp!, {pc} 116*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 117*9880d681SAndroid Build Coastguard Worker stmib r0!, {sp} 118*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 119*9880d681SAndroid Build Coastguard Worker@ CHECK: stmib r0!, {sp} 120*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 121*9880d681SAndroid Build Coastguard Worker 122*9880d681SAndroid Build Coastguard Worker 123*9880d681SAndroid Build Coastguard Worker .global push 124*9880d681SAndroid Build Coastguard Worker .type push,%function 125*9880d681SAndroid Build Coastguard Workerpush: 126*9880d681SAndroid Build Coastguard Worker push {r0, pc} 127*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 128*9880d681SAndroid Build Coastguard Worker@ CHECK: push {r0, pc} 129*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 130*9880d681SAndroid Build Coastguard Worker push {r0, sp} 131*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 132*9880d681SAndroid Build Coastguard Worker@ CHECK: push {r0, sp} 133*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 134*9880d681SAndroid Build Coastguard Worker push {r0, sp, pc} 135*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 136*9880d681SAndroid Build Coastguard Worker@ CHECK: push {r0, sp, pc} 137*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 138*9880d681SAndroid Build Coastguard Worker push {sp, pc} 139*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 140*9880d681SAndroid Build Coastguard Worker@ CHECK: push {sp, pc} 141*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 142*9880d681SAndroid Build Coastguard Worker push {pc} 143*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 144*9880d681SAndroid Build Coastguard Worker@ CHECK: push {pc} 145*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 146*9880d681SAndroid Build Coastguard Worker push {sp} 147*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP or PC in the list is deprecated 148*9880d681SAndroid Build Coastguard Worker@ CHECK: push {sp} 149*9880d681SAndroid Build Coastguard Worker@ CHECK: ^ 150*9880d681SAndroid Build Coastguard Worker 151*9880d681SAndroid Build Coastguard Worker .global ldm 152*9880d681SAndroid Build Coastguard Worker .type ldm,%function 153*9880d681SAndroid Build Coastguard Workerldm: 154*9880d681SAndroid Build Coastguard Worker ldm r0!, {r1, sp} 155*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 156*9880d681SAndroid Build Coastguard Worker ldm r0!, {sp} 157*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 158*9880d681SAndroid Build Coastguard Worker ldm r0!, {r1, lr, pc} 159*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 160*9880d681SAndroid Build Coastguard Worker ldm r0!, {lr, pc} 161*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 162*9880d681SAndroid Build Coastguard Worker 163*9880d681SAndroid Build Coastguard Worker .global ldmda 164*9880d681SAndroid Build Coastguard Worker .type ldmda,%function 165*9880d681SAndroid Build Coastguard Workerldmda: 166*9880d681SAndroid Build Coastguard Worker ldmda r0!, {r1, sp} 167*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 168*9880d681SAndroid Build Coastguard Worker ldmda r0!, {sp} 169*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 170*9880d681SAndroid Build Coastguard Worker ldmda r0!, {r1, lr, pc} 171*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 172*9880d681SAndroid Build Coastguard Worker ldmda r0!, {lr, pc} 173*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 174*9880d681SAndroid Build Coastguard Worker 175*9880d681SAndroid Build Coastguard Worker .global ldmdb 176*9880d681SAndroid Build Coastguard Worker .type ldmdb,%function 177*9880d681SAndroid Build Coastguard Workerldmdb: 178*9880d681SAndroid Build Coastguard Worker ldmdb r0!, {r1, sp} 179*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 180*9880d681SAndroid Build Coastguard Worker ldmdb r0!, {sp} 181*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 182*9880d681SAndroid Build Coastguard Worker ldmdb r0!, {r1, lr, pc} 183*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 184*9880d681SAndroid Build Coastguard Worker ldmdb r0!, {lr, pc} 185*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 186*9880d681SAndroid Build Coastguard Worker 187*9880d681SAndroid Build Coastguard Worker .global ldmib 188*9880d681SAndroid Build Coastguard Worker .type ldmib,%function 189*9880d681SAndroid Build Coastguard Workerldmib: 190*9880d681SAndroid Build Coastguard Worker ldmib r0!, {r1, sp} 191*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 192*9880d681SAndroid Build Coastguard Worker ldmib r0!, {sp} 193*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 194*9880d681SAndroid Build Coastguard Worker ldmib r0!, {r1, lr, pc} 195*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 196*9880d681SAndroid Build Coastguard Worker ldmib r0!, {lr, pc} 197*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 198*9880d681SAndroid Build Coastguard Worker 199*9880d681SAndroid Build Coastguard Worker .global pop 200*9880d681SAndroid Build Coastguard Worker .type pop,%function 201*9880d681SAndroid Build Coastguard Workerpop: 202*9880d681SAndroid Build Coastguard Worker pop {r0, sp} 203*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 204*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: writeback register not allowed in register list 205*9880d681SAndroid Build Coastguard Worker pop {sp} 206*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of SP in the list is deprecated 207*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: writeback register not allowed in register list 208*9880d681SAndroid Build Coastguard Worker pop {r0, lr, pc} 209*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 210*9880d681SAndroid Build Coastguard Worker pop {lr, pc} 211*9880d681SAndroid Build Coastguard Worker@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated 212*9880d681SAndroid Build Coastguard Worker 213*9880d681SAndroid Build Coastguard Worker .global valid 214*9880d681SAndroid Build Coastguard Worker .type valid,%function 215*9880d681SAndroid Build Coastguard Workervalid: 216*9880d681SAndroid Build Coastguard Worker stmdaeq r0, {r0} 217*9880d681SAndroid Build Coastguard Worker@ CHECK: stmdaeq r0, {r0} 218*9880d681SAndroid Build Coastguard Worker ldmdaeq r0, {r0} 219*9880d681SAndroid Build Coastguard Worker@ CHECK: ldmdaeq r0, {r0} 220*9880d681SAndroid Build Coastguard Worker pop {r0, pc} 221*9880d681SAndroid Build Coastguard Worker@ CHECK: pop {r0, pc} 222*9880d681SAndroid Build Coastguard Worker 223