219 lines · plain
1@ RUN: llvm-mc -triple armv6t2-linux-eabi -filetype asm -o - %s 2>&1 \2@ RUN: | FileCheck %s3@ RUN: not llvm-mc -triple armv6t2-linux-eabi --fatal-warnings -filetype asm -o - %s 2>&1 \4@ RUN: | FileCheck -check-prefix CHECK-ERROR %s5 6@ RUN: not llvm-mc -triple armv7-linux-eabi -filetype asm -o - %s 2>&1 \7@ RUN: | FileCheck %s -check-prefix CHECK -check-prefix CHECK-V78 9@ RUN: not llvm-mc -triple armv8-linux-eabi -filetype asm -o - %s 2>&1 \10@ RUN: | FileCheck %s -check-prefix CHECK -check-prefix CHECK-V711 12 .syntax unified13 .arm14 15 .global stm16 .type stm,%function17stm:18 stm sp!, {r0, pc}19@ CHECK: warning: use of PC in the list is deprecated20@ CHECK-ERROR: error: use of PC in the list is deprecated21@ CHECK: stm sp!, {r0, pc}22@ CHECK: ^23 stm r1!, {r0, sp, pc}24@ CHECK: warning: use of PC in the list is deprecated25@ CHECK: stm r1!, {r0, sp, pc}26@ CHECK: ^27 stm r2!, {sp, pc}28@ CHECK: warning: use of PC in the list is deprecated29@ CHECK: stm r2!, {sp, pc}30@ CHECK: ^31 stm sp!, {pc}32@ CHECK: warning: use of PC in the list is deprecated33@ CHECK: stm sp!, {pc}34@ CHECK: ^35 36 .global stmda37 .type stmda,%function38stmda:39 stmda sp!, {r0, pc}40@ CHECK: warning: use of PC in the list is deprecated41@ CHECK: stmda sp!, {r0, pc}42@ CHECK: ^43 stmda r1!, {r0, sp, pc}44@ CHECK: warning: use of PC in the list is deprecated45@ CHECK: stmda r1!, {r0, sp, pc}46@ CHECK: ^47 stmda r2!, {sp, pc}48@ CHECK: warning: use of PC in the list is deprecated49@ CHECK: stmda r2!, {sp, pc}50@ CHECK: ^51 stmda sp!, {pc}52@ CHECK: warning: use of PC in the list is deprecated53@ CHECK: stmda sp!, {pc}54@ CHECK: ^55 56 .global stmdb57 .type stmdb,%function58stmdb:59 stmdb sp!, {r0, pc}60@ CHECK: warning: use of PC in the list is deprecated61@ CHECK: stmdb sp!, {r0, pc}62@ CHECK: ^63 stmdb r1!, {r0, sp, pc}64@ CHECK: warning: use of PC in the list is deprecated65@ CHECK: stmdb r1!, {r0, sp, pc}66@ CHECK: ^67 stmdb r2!, {sp, pc}68@ CHECK: warning: use of PC in the list is deprecated69@ CHECK: stmdb r2!, {sp, pc}70@ CHECK: ^71 stmdb sp!, {pc}72@ CHECK: warning: use of PC in the list is deprecated73@ CHECK: stmdb sp!, {pc}74@ CHECK: ^75 76 .global stmib77 .type stmib,%function78stmib:79 stmib sp!, {r0, pc}80@ CHECK: warning: use of PC in the list is deprecated81@ CHECK: stmib sp!, {r0, pc}82@ CHECK: ^83 stmib r1!, {r0, sp, pc}84@ CHECK: warning: use of PC in the list is deprecated85@ CHECK: stmib r1!, {r0, sp, pc}86@ CHECK: ^87 stmib r2!, {sp, pc}88@ CHECK: warning: use of PC in the list is deprecated89@ CHECK: stmib r2!, {sp, pc}90@ CHECK: ^91 stmib sp!, {pc}92@ CHECK: warning: use of PC in the list is deprecated93@ CHECK: stmib sp!, {pc}94@ CHECK: ^95 96 97 .global push98 .type push,%function99push:100 push {r0, pc}101@ CHECK: warning: use of PC in the list is deprecated102@ CHECK: push {r0, pc}103@ CHECK: ^104 push {r0, sp, pc}105@ CHECK: warning: use of PC in the list is deprecated106@ CHECK: push {r0, sp, pc}107@ CHECK: ^108 push {sp, pc}109@ CHECK: warning: use of PC in the list is deprecated110@ CHECK: push {sp, pc}111@ CHECK: ^112 push {pc}113@ CHECK: warning: use of PC in the list is deprecated114@ CHECK: push {pc}115@ CHECK: ^116 117 .global ldm118 .type ldm,%function119ldm:120 ldm r0!, {r1, lr, pc}121@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated122 ldm r0!, {lr, pc}123@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated124 125 .global ldmda126 .type ldmda,%function127ldmda:128 ldmda r0!, {r1, lr, pc}129@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated130 ldmda r0!, {lr, pc}131@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated132 133 .global ldmdb134 .type ldmdb,%function135ldmdb:136 ldmdb r0!, {r1, lr, pc}137@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated138 ldmdb r0!, {lr, pc}139@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated140 141 .global ldmib142 .type ldmib,%function143ldmib:144 ldmib r0!, {r1, lr, pc}145@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated146 ldmib r0!, {lr, pc}147@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated148 149 .global pop150 .type pop,%function151pop:152 pop {r0, sp}153@ CHECK-V7: error: writeback register not allowed in register list154 pop {sp}155@ CHECK-V7: error: writeback register not allowed in register list156 pop {r0, lr, pc}157@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated158 pop {lr, pc}159@ CHECK: warning: use of LR and PC simultaneously in the list is deprecated160 161 .global valid_stm162 .type valid,%function163valid_stm:164 stm r0!, {r0, sp}165@ CHECK: stm r0!, {r0, sp}166 stm r0!, {sp}167@ CHECK: stm r0!, {sp}168 stmda r0!, {r0, sp}169@ CHECK: stmda r0!, {r0, sp}170 stmda r0!, {sp}171@ CHECK: stmda r0!, {sp}172 stmdb r0!, {r0, sp}173@ CHECK: stmdb r0!, {r0, sp}174 stmdb r0!, {sp}175@ CHECK: stmdb r0!, {sp}176 stmib r0!, {r0, sp}177@ CHECK: stmib r0!, {r0, sp}178 stmib r0!, {sp}179@ CHECK: stmib r0!, {sp}180 stmdaeq r0, {r0}181@ CHECK: stmdaeq r0, {r0}182 183 .global valid_push184 .type valid,%function185valid_push:186 push {r0, sp}187@ CHECK: push {r0, sp}188 push {sp}189@ CHECK: push {sp}190 191 .global valid_ldm192 .type valid,%function193valid_ldm:194 ldm r0!, {r1, sp}195@ CHECK: ldm r0!, {r1, sp}196 ldm r0!, {sp}197@ CHECK: ldm r0!, {sp}198 ldmda r0!, {r1, sp}199@ CHECK: ldmda r0!, {r1, sp}200 ldmda r0!, {sp}201@ CHECK: ldmda r0!, {sp}202 ldmdb r0!, {r1, sp}203@ CHECK: ldmdb r0!, {r1, sp}204 ldmdb r0!, {sp}205@ CHECK: ldmdb r0!, {sp}206 ldmib r0!, {r1, sp}207@ CHECK: ldmib r0!, {r1, sp}208 ldmib r0!, {sp}209@ CHECK: ldmib r0!, {sp}210 ldmdaeq r0, {r0}211@ CHECK: ldmdaeq r0, {r0}212 213 .global valid_pop214 .type valid,%function215valid_pop:216 pop {r0, pc}217@ CHECK: pop {r0, pc}218 219