4
4
/// Check GCC register names and alias can be used in register variable definition.
5
5
6
6
// CHECK-LABEL: @test_r0
7
- // CHECK: call void asm sideeffect "", "{$r0}"(i32 undef)
7
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$r0}"(i32 undef)
8
+ // CHECK-NOT: call void asm sideeffect "", "{$r0}"(i32 undef)
8
9
void test_r0 () {
9
10
register int a asm ("$r0" );
10
11
register int b asm ("r0" );
@@ -13,7 +14,8 @@ void test_r0() {
13
14
}
14
15
15
16
// CHECK-LABEL: @test_r12
16
- // CHECK: call void asm sideeffect "", "{$r12}"(i32 undef)
17
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$r12}"(i32 undef)
18
+ // CHECK-NOT: call void asm sideeffect "", "{$r12}"(i32 undef)
17
19
void test_r12 () {
18
20
register int a asm ("$r12" );
19
21
register int b asm ("r12" );
@@ -22,7 +24,8 @@ void test_r12() {
22
24
}
23
25
24
26
// CHECK-LABEL: @test_r31
25
- // CHECK: call void asm sideeffect "", "{$r31}"(i32 undef)
27
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$r31}"(i32 undef)
28
+ // CHECK-NOT: call void asm sideeffect "", "{$r31}"(i32 undef)
26
29
void test_r31 () {
27
30
register int a asm ("$r31" );
28
31
register int b asm ("r31" );
@@ -31,7 +34,8 @@ void test_r31() {
31
34
}
32
35
33
36
// CHECK-LABEL: @test_zero
34
- // CHECK: call void asm sideeffect "", "{$r0}"(i32 undef)
37
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$r0}"(i32 undef)
38
+ // CHECK-NOT: call void asm sideeffect "", "{$r0}"(i32 undef)
35
39
void test_zero () {
36
40
register int a asm ("$zero" );
37
41
register int b asm ("zero" );
@@ -40,7 +44,8 @@ void test_zero() {
40
44
}
41
45
42
46
// CHECK-LABEL: @test_a0
43
- // CHECK: call void asm sideeffect "", "{$r4}"(i32 undef)
47
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$r4}"(i32 undef)
48
+ // CHECK-NOT: call void asm sideeffect "", "{$r4}"(i32 undef)
44
49
void test_a0 () {
45
50
register int a asm ("$a0" );
46
51
register int b asm ("a0" );
@@ -49,7 +54,8 @@ void test_a0() {
49
54
}
50
55
51
56
// CHECK-LABEL: @test_t1
52
- // CHECK: call void asm sideeffect "", "{$r13}"(i32 undef)
57
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$r13}"(i32 undef)
58
+ // CHECK-NOT: call void asm sideeffect "", "{$r13}"(i32 undef)
53
59
void test_t1 () {
54
60
register int a asm ("$t1" );
55
61
register int b asm ("t1" );
@@ -58,7 +64,8 @@ void test_t1() {
58
64
}
59
65
60
66
// CHECK-LABEL: @test_fp
61
- // CHECK: call void asm sideeffect "", "{$r22}"(i32 undef)
67
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$r22}"(i32 undef)
68
+ // CHECK-NOT: call void asm sideeffect "", "{$r22}"(i32 undef)
62
69
void test_fp () {
63
70
register int a asm ("$fp" );
64
71
register int b asm ("fp" );
@@ -67,7 +74,8 @@ void test_fp() {
67
74
}
68
75
69
76
// CHECK-LABEL: @test_s2
70
- // CHECK: call void asm sideeffect "", "{$r25}"(i32 undef)
77
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$r25}"(i32 undef)
78
+ // CHECK-NOT: call void asm sideeffect "", "{$r25}"(i32 undef)
71
79
void test_s2 () {
72
80
register int a asm ("$s2" );
73
81
register int b asm ("s2" );
@@ -76,51 +84,73 @@ void test_s2() {
76
84
}
77
85
78
86
// CHECK-LABEL: @test_f0
79
- // CHECK: call void asm sideeffect "", "{$f0}"(float undef)
87
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$f0}"(float undef)
88
+ // CHECK-NOT: call void asm sideeffect "", "{$f0}"(float undef)
80
89
void test_f0 () {
81
90
register float a asm ("$f0" );
91
+ register float b asm ("f0" );
82
92
asm ("" :: "f" (a ));
93
+ asm ("" :: "f" (b ));
83
94
}
84
95
85
96
// CHECK-LABEL: @test_f14
86
- // CHECK: call void asm sideeffect "", "{$f14}"(float undef)
97
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$f14}"(float undef)
98
+ // CHECK-NOT: call void asm sideeffect "", "{$f14}"(float undef)
87
99
void test_f14 () {
88
100
register float a asm ("$f14" );
101
+ register float b asm ("f14" );
89
102
asm ("" :: "f" (a ));
103
+ asm ("" :: "f" (b ));
90
104
}
91
105
92
106
// CHECK-LABEL: @test_f31
93
- // CHECK: call void asm sideeffect "", "{$f31}"(float undef)
107
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$f31}"(float undef)
108
+ // CHECK-NOT: call void asm sideeffect "", "{$f31}"(float undef)
94
109
void test_f31 () {
95
110
register float a asm ("$f31" );
111
+ register float b asm ("f31" );
96
112
asm ("" :: "f" (a ));
113
+ asm ("" :: "f" (b ));
97
114
}
98
115
99
116
// CHECK-LABEL: @test_fa0
100
- // CHECK: call void asm sideeffect "", "{$f0}"(float undef)
117
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$f0}"(float undef)
118
+ // CHECK-NOT: call void asm sideeffect "", "{$f0}"(float undef)
101
119
void test_fa0 () {
102
120
register float a asm ("$fa0" );
121
+ register float b asm ("fa0" );
103
122
asm ("" :: "f" (a ));
123
+ asm ("" :: "f" (b ));
104
124
}
105
125
106
126
// CHECK-LABEL: @test_ft1
107
- // CHECK: call void asm sideeffect "", "{$f9}"(float undef)
127
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$f9}"(float undef)
128
+ // CHECK-NOT: call void asm sideeffect "", "{$f9}"(float undef)
108
129
void test_ft1 () {
109
130
register float a asm ("$ft1" );
131
+ register float b asm ("ft1" );
110
132
asm ("" :: "f" (a ));
133
+ asm ("" :: "f" (b ));
111
134
}
112
135
113
136
// CHECK-LABEL: @test_fs2
114
- // CHECK: call void asm sideeffect "", "{$f26}"(float undef)
137
+ // CHECK-COUNT-2: call void asm sideeffect "", "{$f26}"(float undef)
138
+ // CHECK-NOT: call void asm sideeffect "", "{$f26}"(float undef)
115
139
void test_fs2 () {
116
140
register float a asm ("$fs2" );
141
+ register float b asm ("fs2" );
117
142
asm ("" :: "f" (a ));
143
+ asm ("" :: "f" (b ));
118
144
}
119
145
120
146
// CHECK-LABEL: @test_fcc
121
- // CHECK: call void asm sideeffect "", "~{$fcc0}"()
122
- // CHECK: call void asm sideeffect "", "~{$fcc7}"()
147
+ // CHECK-COUNT-2: call void asm sideeffect "", "~{$fcc0}"()
148
+ // CHECK-NOT: call void asm sideeffect "", "~{$fcc0}"()
149
+ // CHECK-COUNT-2: call void asm sideeffect "", "~{$fcc7}"()
150
+ // CHECK-NOT: call void asm sideeffect "", "~{$fcc7}"()
123
151
void test_fcc () {
124
152
asm ("" ::: "$fcc0" );
153
+ asm ("" ::: "fcc0" );
125
154
asm ("" ::: "$fcc7" );
155
+ asm ("" ::: "fcc7" );
126
156
}
0 commit comments