[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / msp430-register-names.c
blob106b6c933a49bcb88c998a3d366d84ea6e83b1a6
1 // Registers R0 - R3 have different names inside the LLVM MSP430 target code.
2 // Test that they are handled properly when used inside clobber lists.
3 // At the time of writing, llc silently ignores unknown register names.
5 // REQUIRES: msp430-registered-target
6 // RUN: %clang -target msp430 -c %s -mllvm -stop-after=finalize-isel -o- | FileCheck %s
8 void test_function(void) {
9 asm volatile(""
12 : "r0");
13 asm volatile(""
16 : "r1");
17 asm volatile(""
20 : "r2");
21 asm volatile(""
24 : "r3");
25 asm volatile(""
28 : "r4");
29 asm volatile(""
32 : "r5");
33 asm volatile(""
36 : "r6");
37 asm volatile(""
40 : "r7");
41 asm volatile(""
44 : "r8");
45 asm volatile(""
48 : "r9");
49 asm volatile(""
52 : "r10");
53 asm volatile(""
56 : "r11");
57 asm volatile(""
60 : "r12");
61 asm volatile(""
64 : "r13");
65 asm volatile(""
68 : "r14");
69 asm volatile(""
72 : "r15");
73 // CHECK: call void asm sideeffect "", "~{pc}"()
74 // CHECK: call void asm sideeffect "", "~{sp}"()
75 // CHECK: call void asm sideeffect "", "~{sr}"()
76 // CHECK: call void asm sideeffect "", "~{cg}"()
77 // CHECK: call void asm sideeffect "", "~{r4}"()
78 // CHECK: call void asm sideeffect "", "~{r5}"()
79 // CHECK: call void asm sideeffect "", "~{r6}"()
80 // CHECK: call void asm sideeffect "", "~{r7}"()
81 // CHECK: call void asm sideeffect "", "~{r8}"()
82 // CHECK: call void asm sideeffect "", "~{r9}"()
83 // CHECK: call void asm sideeffect "", "~{r10}"()
84 // CHECK: call void asm sideeffect "", "~{r11}"()
85 // CHECK: call void asm sideeffect "", "~{r12}"()
86 // CHECK: call void asm sideeffect "", "~{r13}"()
87 // CHECK: call void asm sideeffect "", "~{r14}"()
88 // CHECK: call void asm sideeffect "", "~{r15}"()
89 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $pc
90 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $sp
91 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $sr
92 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $cg
93 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r4
94 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r5
95 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r6
96 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r7
97 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r8
98 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r9
99 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r10
100 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r11
101 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r12
102 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r13
103 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r14
104 // CHECK: INLINEASM &"", {{.*}} implicit-def early-clobber $r15