1 ; RUN: not llc -mtriple thumbv6m-arm-none-eabi -frame-pointer=all %s -o - 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
3 ; CHECK-ERROR: error: write to reserved register 'R7'
4 define void @test_framepointer_output(i32 %input) {
6 %0 = call i32 asm sideeffect "mov $0, $1", "={r7},r"(i32 %input)
10 ; CHECK-ERROR: error: write to reserved register 'R7'
11 define void @test_framepointer_input(i32 %input) {
13 %0 = call i32 asm sideeffect "mov $0, $1", "=r,{r7}"(i32 %input)
17 ; CHECK-ERROR: error: write to reserved register 'PC'
18 define void @test_pc_output(i32 %input) {
20 %0 = call i32 asm sideeffect "mov $0, $1", "={pc},r"(i32 %input)
24 ; CHECK-ERROR: error: write to reserved register 'PC'
25 define void @test_pc_input(i32 %input) {
27 %0 = call i32 asm sideeffect "mov $0, $1", "=r,{pc}"(i32 %input)
31 ; CHECK-ERROR: error: write to reserved register 'R6'
32 define void @test_basepointer_output(i32 %size, i32 %input) alignstack(8) {
34 %vla = alloca i32, i32 %size, align 4
35 %0 = call i32 asm sideeffect "mov $0, $1", "={r6},r"(i32 %input)
39 ; CHECK-ERROR: error: write to reserved register 'R6'
40 define void @test_basepointer_input(i32 %size, i32 %input) alignstack(8) {
42 %vla = alloca i32, i32 %size, align 4
43 %0 = call i32 asm sideeffect "mov $0, $1", "=r,{r6}"(i32 %input)