1 ; RUN: llc <%s -mtriple=arm64ec-pc-windows-msvc 2>&1 | FileCheck %s
3 ; Check that we warn that x13, x14, x23, x24, x28 and float regs v16-v31
4 ; will be clobbered on Arm64EC. With a note explaining the reason.
6 ; CHECK: warning: inline asm clobber list contains reserved registers: X13, X14, X23, X24, X28
7 ; CHECK-NEXT: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
8 ; CHECK-NEXT: note: x13 is clobbered by asynchronous signals when using Arm64EC.
9 ; CHECK-NEXT: note: x14 is clobbered by asynchronous signals when using Arm64EC.
10 ; CHECK-NEXT: note: x23 is clobbered by asynchronous signals when using Arm64EC.
11 ; CHECK-NEXT: note: x24 is clobbered by asynchronous signals when using Arm64EC.
12 ; CHECK-NEXT: note: x28 is clobbered by asynchronous signals when using Arm64EC.
16 call void asm sideeffect "nop", "~{x13},~{x14},~{x23},~{x24},~{x28}"()
20 ; CHECK: warning: inline asm clobber list contains reserved registers: W13, W14, W23, W24, W28
21 ; CHECK-NEXT: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
22 ; CHECK-NEXT: note: w13 is clobbered by asynchronous signals when using Arm64EC.
23 ; CHECK-NEXT: note: w14 is clobbered by asynchronous signals when using Arm64EC.
24 ; CHECK-NEXT: note: w23 is clobbered by asynchronous signals when using Arm64EC.
25 ; CHECK-NEXT: note: w24 is clobbered by asynchronous signals when using Arm64EC.
26 ; CHECK-NEXT: note: w28 is clobbered by asynchronous signals when using Arm64EC.
30 call void asm sideeffect "nop", "~{w13},~{w14},~{w23},~{w24},~{w28}"()
34 ; CHECK: warning: inline asm clobber list contains reserved registers: Q16, Q17, Q18, Q19, Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q30, Q31
35 ; CHECK-NEXT: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
36 ; CHECK-NEXT: note: q16 is clobbered by asynchronous signals when using Arm64EC.
37 ; CHECK-NEXT: note: q17 is clobbered by asynchronous signals when using Arm64EC.
38 ; CHECK-NEXT: note: q18 is clobbered by asynchronous signals when using Arm64EC.
39 ; CHECK-NEXT: note: q19 is clobbered by asynchronous signals when using Arm64EC.
40 ; CHECK-NEXT: note: q20 is clobbered by asynchronous signals when using Arm64EC.
41 ; CHECK-NEXT: note: q21 is clobbered by asynchronous signals when using Arm64EC.
42 ; CHECK-NEXT: note: q22 is clobbered by asynchronous signals when using Arm64EC.
43 ; CHECK-NEXT: note: q23 is clobbered by asynchronous signals when using Arm64EC.
44 ; CHECK-NEXT: note: q24 is clobbered by asynchronous signals when using Arm64EC.
45 ; CHECK-NEXT: note: q25 is clobbered by asynchronous signals when using Arm64EC.
46 ; CHECK-NEXT: note: q26 is clobbered by asynchronous signals when using Arm64EC.
47 ; CHECK-NEXT: note: q27 is clobbered by asynchronous signals when using Arm64EC.
48 ; CHECK-NEXT: note: q28 is clobbered by asynchronous signals when using Arm64EC.
49 ; CHECK-NEXT: note: q29 is clobbered by asynchronous signals when using Arm64EC.
50 ; CHECK-NEXT: note: q30 is clobbered by asynchronous signals when using Arm64EC.
51 ; CHECK-NEXT: note: q31 is clobbered by asynchronous signals when using Arm64EC.
54 define void @fn_float_v() {
56 call void asm sideeffect "nop", "~{v16},~{v17},~{v18},~{v19},~{v20},~{v21},~{v22},~{v23},~{v24},~{v25},~{v26},~{v27},~{v28},~{v29},~{v30},~{v31}"()
60 ; CHECK: warning: inline asm clobber list contains reserved registers: D16, D17, D18, D19, D20, D21, D22, D23, D24, D25, D26, D27, D28, D29, D30, D31
61 ; CHECK-NEXT: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
62 ; CHECK-NEXT: note: d16 is clobbered by asynchronous signals when using Arm64EC.
63 ; CHECK-NEXT: note: d17 is clobbered by asynchronous signals when using Arm64EC.
64 ; CHECK-NEXT: note: d18 is clobbered by asynchronous signals when using Arm64EC.
65 ; CHECK-NEXT: note: d19 is clobbered by asynchronous signals when using Arm64EC.
66 ; CHECK-NEXT: note: d20 is clobbered by asynchronous signals when using Arm64EC.
67 ; CHECK-NEXT: note: d21 is clobbered by asynchronous signals when using Arm64EC.
68 ; CHECK-NEXT: note: d22 is clobbered by asynchronous signals when using Arm64EC.
69 ; CHECK-NEXT: note: d23 is clobbered by asynchronous signals when using Arm64EC.
70 ; CHECK-NEXT: note: d24 is clobbered by asynchronous signals when using Arm64EC.
71 ; CHECK-NEXT: note: d25 is clobbered by asynchronous signals when using Arm64EC.
72 ; CHECK-NEXT: note: d26 is clobbered by asynchronous signals when using Arm64EC.
73 ; CHECK-NEXT: note: d27 is clobbered by asynchronous signals when using Arm64EC.
74 ; CHECK-NEXT: note: d28 is clobbered by asynchronous signals when using Arm64EC.
75 ; CHECK-NEXT: note: d29 is clobbered by asynchronous signals when using Arm64EC.
76 ; CHECK-NEXT: note: d30 is clobbered by asynchronous signals when using Arm64EC.
77 ; CHECK-NEXT: note: d31 is clobbered by asynchronous signals when using Arm64EC.
79 define void @fn_float_d() {
81 call void asm sideeffect "nop", "~{d16},~{d17},~{d18},~{d19},~{d20},~{d21},~{d22},~{d23},~{d24},~{d25},~{d26},~{d27},~{d28},~{d29},~{d30},~{d31}"()
85 ; CHECK: warning: inline asm clobber list contains reserved registers: S16, S17, S18, S19, S20, S21, S22, S23, S24, S25, S26, S27, S28, S29, S30, S31
86 ; CHECK-NEXT: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
87 ; CHECK-NEXT: note: s16 is clobbered by asynchronous signals when using Arm64EC.
88 ; CHECK-NEXT: note: s17 is clobbered by asynchronous signals when using Arm64EC.
89 ; CHECK-NEXT: note: s18 is clobbered by asynchronous signals when using Arm64EC.
90 ; CHECK-NEXT: note: s19 is clobbered by asynchronous signals when using Arm64EC.
91 ; CHECK-NEXT: note: s20 is clobbered by asynchronous signals when using Arm64EC.
92 ; CHECK-NEXT: note: s21 is clobbered by asynchronous signals when using Arm64EC.
93 ; CHECK-NEXT: note: s22 is clobbered by asynchronous signals when using Arm64EC.
94 ; CHECK-NEXT: note: s23 is clobbered by asynchronous signals when using Arm64EC.
95 ; CHECK-NEXT: note: s24 is clobbered by asynchronous signals when using Arm64EC.
96 ; CHECK-NEXT: note: s25 is clobbered by asynchronous signals when using Arm64EC.
97 ; CHECK-NEXT: note: s26 is clobbered by asynchronous signals when using Arm64EC.
98 ; CHECK-NEXT: note: s27 is clobbered by asynchronous signals when using Arm64EC.
99 ; CHECK-NEXT: note: s28 is clobbered by asynchronous signals when using Arm64EC.
100 ; CHECK-NEXT: note: s29 is clobbered by asynchronous signals when using Arm64EC.
101 ; CHECK-NEXT: note: s30 is clobbered by asynchronous signals when using Arm64EC.
102 ; CHECK-NEXT: note: s31 is clobbered by asynchronous signals when using Arm64EC.
104 define void @fn_float_s() {
106 call void asm sideeffect "nop", "~{s16},~{s17},~{s18},~{s19},~{s20},~{s21},~{s22},~{s23},~{s24},~{s25},~{s26},~{s27},~{s28},~{s29},~{s30},~{s31}"()
110 ; CHECK: warning: inline asm clobber list contains reserved registers: H16, H17, H18, H19, H20, H21, H22, H23, H24, H25, H26, H27, H28, H29, H30, H31
111 ; CHECK-NEXT: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
112 ; CHECK-NEXT: note: h16 is clobbered by asynchronous signals when using Arm64EC.
113 ; CHECK-NEXT: note: h17 is clobbered by asynchronous signals when using Arm64EC.
114 ; CHECK-NEXT: note: h18 is clobbered by asynchronous signals when using Arm64EC.
115 ; CHECK-NEXT: note: h19 is clobbered by asynchronous signals when using Arm64EC.
116 ; CHECK-NEXT: note: h20 is clobbered by asynchronous signals when using Arm64EC.
117 ; CHECK-NEXT: note: h21 is clobbered by asynchronous signals when using Arm64EC.
118 ; CHECK-NEXT: note: h22 is clobbered by asynchronous signals when using Arm64EC.
119 ; CHECK-NEXT: note: h23 is clobbered by asynchronous signals when using Arm64EC.
120 ; CHECK-NEXT: note: h24 is clobbered by asynchronous signals when using Arm64EC.
121 ; CHECK-NEXT: note: h25 is clobbered by asynchronous signals when using Arm64EC.
122 ; CHECK-NEXT: note: h26 is clobbered by asynchronous signals when using Arm64EC.
123 ; CHECK-NEXT: note: h27 is clobbered by asynchronous signals when using Arm64EC.
124 ; CHECK-NEXT: note: h28 is clobbered by asynchronous signals when using Arm64EC.
125 ; CHECK-NEXT: note: h29 is clobbered by asynchronous signals when using Arm64EC.
126 ; CHECK-NEXT: note: h30 is clobbered by asynchronous signals when using Arm64EC.
127 ; CHECK-NEXT: note: h31 is clobbered by asynchronous signals when using Arm64EC.
129 define void @fn_float_h() {
131 call void asm sideeffect "nop", "~{h16},~{h17},~{h18},~{h19},~{h20},~{h21},~{h22},~{h23},~{h24},~{h25},~{h26},~{h27},~{h28},~{h29},~{h30},~{h31}"()
135 ; llvm does not currently handle the B registers so they are not tested.