1 /* Functional tests for the "target" attribute and pragma. */
2
3 /* { dg-do assemble { target { lp64 } } } */
4 /* { dg-require-effective-target target_attribute } */
5 /* { dg-options "-save-temps -mdebug -m64 -march=z13 -mtune=z10 -mstack-size=4096 -mstack-guard=0 -mbranch-cost=2 -mwarn-framesize=0 -mhard-dfp -mno-backchain -mhard-float -mvx -mhtm -mpacked-stack -mno-small-exec -mzvector -mno-mvcle -mzarch -mwarn-dynamicstack" } */
6
7 /**
8 **
9 ** Start
10 **
11 **/
12
fn_default_start(void)13 void fn_default_start (void) { }
14 /* { dg-final { scan-assembler "fn:fn_default_start ar7" } } */
15 /* { dg-final { scan-assembler "fn:fn_default_start tu4" } } */
16 /* { dg-final { scan-assembler "fn:fn_default_start ss4096" } } */
17 /* { dg-final { scan-assembler "fn:fn_default_start sg0" } } */
18 /* { dg-final { scan-assembler "fn:fn_default_start bc2" } } */
19 /* { dg-final { scan-assembler "fn:fn_default_start wf0" } } */
20 /* { dg-final { scan-assembler "fn:fn_default_start hd1" } } */
21 /* { dg-final { scan-assembler "fn:fn_default_start ba0" } } */
22 /* { dg-final { scan-assembler "fn:fn_default_start hf1" } } */
23 /* { dg-final { scan-assembler "fn:fn_default_start vx1" } } */
24 /* { dg-final { scan-assembler "fn:fn_default_start ht1" } } */
25 /* { dg-final { scan-assembler "fn:fn_default_start ps1" } } */
26 /* { dg-final { scan-assembler "fn:fn_default_start se0" } } */
27 /* { dg-final { scan-assembler "fn:fn_default_start zv1" } } */
28 /* { dg-final { scan-assembler "fn:fn_default_start mv0" } } */
29 /* { dg-final { scan-assembler "fn:fn_default_start wd1" } } */
30
31 /**
32 **
33 ** Pragma
34 **
35 **/
36
37 #pragma GCC target ("zvector")
fn_pragma_1(void)38 void fn_pragma_1 (void) { }
39 /* { dg-final { scan-assembler "fn:fn_pragma_1 zv1" } } */
40 /* { dg-final { scan-assembler "fn:fn_pragma_1 ar7" } } */
41 /* { dg-final { scan-assembler "fn:fn_pragma_1 tu4" } } */
42 /* { dg-final { scan-assembler "fn:fn_pragma_1 ss4096" } } */
43 /* { dg-final { scan-assembler "fn:fn_pragma_1 sg0" } } */
44 /* { dg-final { scan-assembler "fn:fn_pragma_1 bc2" } } */
45 /* { dg-final { scan-assembler "fn:fn_pragma_1 wf0" } } */
46 /* { dg-final { scan-assembler "fn:fn_pragma_1 hd1" } } */
47 /* { dg-final { scan-assembler "fn:fn_pragma_1 ba0" } } */
48 /* { dg-final { scan-assembler "fn:fn_pragma_1 hf1" } } */
49 /* { dg-final { scan-assembler "fn:fn_pragma_1 vx1" } } */
50 /* { dg-final { scan-assembler "fn:fn_pragma_1 ht1" } } */
51 /* { dg-final { scan-assembler "fn:fn_pragma_1 ps1" } } */
52 /* { dg-final { scan-assembler "fn:fn_pragma_1 se0" } } */
53 /* { dg-final { scan-assembler "fn:fn_pragma_1 mv0" } } */
54 /* { dg-final { scan-assembler "fn:fn_pragma_1 wd1" } } */
55 #pragma GCC reset_options
56
fn_pragma_1_default(void)57 void fn_pragma_1_default (void) { }
58 /* { dg-final { scan-assembler "fn:fn_pragma_1_default ar7" } } */
59 /* { dg-final { scan-assembler "fn:fn_pragma_1_default tu4" } } */
60 /* { dg-final { scan-assembler "fn:fn_pragma_1_default ss4096" } } */
61 /* { dg-final { scan-assembler "fn:fn_pragma_1_default sg0" } } */
62 /* { dg-final { scan-assembler "fn:fn_pragma_1_default bc2" } } */
63 /* { dg-final { scan-assembler "fn:fn_pragma_1_default wf0" } } */
64 /* { dg-final { scan-assembler "fn:fn_pragma_1_default hd1" } } */
65 /* { dg-final { scan-assembler "fn:fn_pragma_1_default ba0" } } */
66 /* { dg-final { scan-assembler "fn:fn_pragma_1_default hf1" } } */
67 /* { dg-final { scan-assembler "fn:fn_pragma_1_default vx1" } } */
68 /* { dg-final { scan-assembler "fn:fn_pragma_1_default ht1" } } */
69 /* { dg-final { scan-assembler "fn:fn_pragma_1_default ps1" } } */
70 /* { dg-final { scan-assembler "fn:fn_pragma_1_default se0" } } */
71 /* { dg-final { scan-assembler "fn:fn_pragma_1_default zv1" } } */
72 /* { dg-final { scan-assembler "fn:fn_pragma_1_default mv0" } } */
73 /* { dg-final { scan-assembler "fn:fn_pragma_1_default wd1" } } */
74
75 #pragma GCC target ("no-zvector")
fn_pragma_0(void)76 void fn_pragma_0 (void) { }
77 /* { dg-final { scan-assembler "fn:fn_pragma_0 zv0" } } */
78 /* { dg-final { scan-assembler "fn:fn_pragma_0 ar7" } } */
79 /* { dg-final { scan-assembler "fn:fn_pragma_0 tu4" } } */
80 /* { dg-final { scan-assembler "fn:fn_pragma_0 ss4096" } } */
81 /* { dg-final { scan-assembler "fn:fn_pragma_0 sg0" } } */
82 /* { dg-final { scan-assembler "fn:fn_pragma_0 bc2" } } */
83 /* { dg-final { scan-assembler "fn:fn_pragma_0 wf0" } } */
84 /* { dg-final { scan-assembler "fn:fn_pragma_0 hd1" } } */
85 /* { dg-final { scan-assembler "fn:fn_pragma_0 ba0" } } */
86 /* { dg-final { scan-assembler "fn:fn_pragma_0 hf1" } } */
87 /* { dg-final { scan-assembler "fn:fn_pragma_0 vx1" } } */
88 /* { dg-final { scan-assembler "fn:fn_pragma_0 ht1" } } */
89 /* { dg-final { scan-assembler "fn:fn_pragma_0 ps1" } } */
90 /* { dg-final { scan-assembler "fn:fn_pragma_0 se0" } } */
91 /* { dg-final { scan-assembler "fn:fn_pragma_0 mv0" } } */
92 /* { dg-final { scan-assembler "fn:fn_pragma_0 wd1" } } */
93 #pragma GCC reset_options
94
fn_pragma_0_default(void)95 void fn_pragma_0_default (void) { }
96 /* { dg-final { scan-assembler "fn:fn_pragma_0_default ar7" } } */
97 /* { dg-final { scan-assembler "fn:fn_pragma_0_default tu4" } } */
98 /* { dg-final { scan-assembler "fn:fn_pragma_0_default ss4096" } } */
99 /* { dg-final { scan-assembler "fn:fn_pragma_0_default sg0" } } */
100 /* { dg-final { scan-assembler "fn:fn_pragma_0_default bc2" } } */
101 /* { dg-final { scan-assembler "fn:fn_pragma_0_default wf0" } } */
102 /* { dg-final { scan-assembler "fn:fn_pragma_0_default hd1" } } */
103 /* { dg-final { scan-assembler "fn:fn_pragma_0_default ba0" } } */
104 /* { dg-final { scan-assembler "fn:fn_pragma_0_default hf1" } } */
105 /* { dg-final { scan-assembler "fn:fn_pragma_0_default vx1" } } */
106 /* { dg-final { scan-assembler "fn:fn_pragma_0_default ht1" } } */
107 /* { dg-final { scan-assembler "fn:fn_pragma_0_default ps1" } } */
108 /* { dg-final { scan-assembler "fn:fn_pragma_0_default se0" } } */
109 /* { dg-final { scan-assembler "fn:fn_pragma_0_default zv1" } } */
110 /* { dg-final { scan-assembler "fn:fn_pragma_0_default mv0" } } */
111 /* { dg-final { scan-assembler "fn:fn_pragma_0_default wd1" } } */
112
113 #pragma GCC target ("no-zvector")
114 #pragma GCC target ("zvector")
fn_pragma_0_1(void)115 void fn_pragma_0_1 (void) { }
116 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 zv1" } } */
117 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 ar7" } } */
118 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 tu4" } } */
119 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 ss4096" } } */
120 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 sg0" } } */
121 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 bc2" } } */
122 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 wf0" } } */
123 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 hd1" } } */
124 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 ba0" } } */
125 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 hf1" } } */
126 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 vx1" } } */
127 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 ht1" } } */
128 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 ps1" } } */
129 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 se0" } } */
130 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 mv0" } } */
131 /* { dg-final { scan-assembler "fn:fn_pragma_0_1 wd1" } } */
132 #pragma GCC reset_options
133
134 #pragma GCC target ("zvector")
135 #pragma GCC target ("no-zvector")
fn_pragma_1_0(void)136 void fn_pragma_1_0 (void) { }
137 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 zv0" } } */
138 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 ar7" } } */
139 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 tu4" } } */
140 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 ss4096" } } */
141 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 sg0" } } */
142 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 bc2" } } */
143 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 wf0" } } */
144 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 hd1" } } */
145 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 ba0" } } */
146 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 hf1" } } */
147 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 vx1" } } */
148 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 ht1" } } */
149 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 ps1" } } */
150 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 se0" } } */
151 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 mv0" } } */
152 /* { dg-final { scan-assembler "fn:fn_pragma_1_0 wd1" } } */
153 #pragma GCC reset_options
154
155 /**
156 **
157 ** End
158 **
159 **/
160
fn_default_end(void)161 void fn_default_end (void) { }
162 /* { dg-final { scan-assembler "fn:fn_default_end ar7" } } */
163 /* { dg-final { scan-assembler "fn:fn_default_end tu4" } } */
164 /* { dg-final { scan-assembler "fn:fn_default_end ss4096" } } */
165 /* { dg-final { scan-assembler "fn:fn_default_end sg0" } } */
166 /* { dg-final { scan-assembler "fn:fn_default_end bc2" } } */
167 /* { dg-final { scan-assembler "fn:fn_default_end wf0" } } */
168 /* { dg-final { scan-assembler "fn:fn_default_end hd1" } } */
169 /* { dg-final { scan-assembler "fn:fn_default_end ba0" } } */
170 /* { dg-final { scan-assembler "fn:fn_default_end hf1" } } */
171 /* { dg-final { scan-assembler "fn:fn_default_end vx1" } } */
172 /* { dg-final { scan-assembler "fn:fn_default_end ht1" } } */
173 /* { dg-final { scan-assembler "fn:fn_default_end ps1" } } */
174 /* { dg-final { scan-assembler "fn:fn_default_end se0" } } */
175 /* { dg-final { scan-assembler "fn:fn_default_end zv1" } } */
176 /* { dg-final { scan-assembler "fn:fn_default_end mv0" } } */
177 /* { dg-final { scan-assembler "fn:fn_default_end wd1" } } */
178