1@ RUN: not llvm-mc -triple armv7-eabi -filetype asm -o /dev/null 2>&1 %s \ 2@ RUN: | FileCheck %s 3 4 .syntax unified 5 .thumb 6 7 .global false_start 8 .type false_start,%function 9 .thumb_func 10false_start: 11 .movsp r7 12 13@ CHECK: error: .fnstart must precede .movsp directive 14@ CHECK: .movsp r7 15@ CHECK: ^ 16 17 .global beyond_saving 18 .type beyond_saving,%function 19 .thumb_func 20beyond_saving: 21 .fnstart 22 .setfp r11, sp, #8 23 add r11, sp, #8 24 .movsp r7 25 mov r7, r11 26 .fnend 27 28@ CHECK: error: unexpected .movsp directive 29@ CHECK: .movsp r7 30@ CHECK: ^ 31 32 33 .global sp_invalid 34 .type sp_invalid,%function 35 .thumb_func 36sp_invalid: 37 .fnstart 38 .movsp r13 39 mov sp, sp 40 .fnend 41 42@ CHECK: error: sp and pc are not permitted in .movsp directive 43@ CHECK: .movsp r13 44@ CHECK: ^ 45 46 47 .global pc_invalid 48 .type pc_invalid,%function 49 .thumb_func 50pc_invalid: 51 .fnstart 52 .movsp r15 53 mov sp, pc 54 .fnend 55 56@ CHECK: error: sp and pc are not permitted in .movsp directive 57@ CHECK: .movsp r15 58@ CHECK: ^ 59 60 61 .global constant_required 62 .type constant_required,%function 63 .thumb_func 64constant_required: 65 .fnstart 66 .movsp r11, 67 mov sp, r11 68 .fnend 69 70@ CHECK: error: expected #constant 71@ CHECK: .movsp r11, 72@ CHECK: ^ 73 74 75 .global constant_constant 76 .type constant_constant,%function 77 .thumb_func 78constant_constant: 79 .fnstart 80 .movsp r11, #constant 81 mov sp, r11 82 .fnend 83 84@ CHECK: error: offset must be an immediate constant 85@ CHECK: .movsp r11, #constant 86@ CHECK: ^ 87 88 89 .arm 90 91 .global register_required 92 .type register_required,%function 93register_required: 94 .fnstart 95 .movsp #42 96 mov sp, #42 97 .fnend 98 99@ CHECK: error: register expected 100@ CHECK: .movsp #42 101@ CHECK: ^ 102 103