[NDS32] Add intrinsic functions for TLB operation and data prefech.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr61692.c
blob1b619bd753555e6fa92399ea7b56fc6fe66a520e
1 /* PR 61692 */
2 /* { dg-do compile } */
4 /* Check for ice when exceededing the max #
5 of parameters to inline asm. */
7 int Labels()
9 label01: label02: label03: label04: label05:
10 label06: label07: label08: label09: label10:
11 label11: label12: label13: label14: label15:
12 label16: label17: label18: label19: label20:
13 label21: label22: label23: label24: label25:
14 label26: label27: label28: label29: label30:
15 label31:
17 __asm__ goto ("" /* Works. */
18 : /* no outputs */
19 : /* no inputs */
20 : /* no clobbers */
21 : label01, label02, label03, label04, label05,
22 label06, label07, label08, label09, label10,
23 label11, label12, label13, label14, label15,
24 label16, label17, label18, label19, label20,
25 label21, label22, label23, label24, label25,
26 label26, label27, label28, label29, label30);
28 __asm__ goto ("" /* { dg-error "more than 30 operands" } */
29 : /* no outputs */
30 : /* no inputs */
31 : /* no clobbers */
32 : label01, label02, label03, label04, label05,
33 label06, label07, label08, label09, label10,
34 label11, label12, label13, label14, label15,
35 label16, label17, label18, label19, label20,
36 label21, label22, label23, label24, label25,
37 label26, label27, label28, label29, label30,
38 label31);
40 return 0;
43 int Labels_and_Inputs()
45 int b01, b02, b03, b04, b05, b06, b07, b08, b09, b10;
46 int b11, b12, b13, b14, b15, b16, b17, b18, b19, b20;
47 int b21, b22, b23, b24, b25, b26, b27, b28, b29, b30;
48 int b31;
50 label01: label02: label03: label04: label05:
51 label06: label07: label08: label09: label10:
52 label11: label12: label13: label14: label15:
53 label16: label17: label18: label19: label20:
54 label21: label22: label23: label24: label25:
55 label26: label27: label28: label29: label30:
56 label31:
58 b01 = b02 = b03 = b04 = b05 = b06 = b07 = b08 = b09 = b10 = 0;
59 b11 = b12 = b13 = b14 = b15 = b16 = b17 = b18 = b19 = b20 = 0;
60 b21 = b22 = b23 = b24 = b25 = b26 = b27 = b28 = b29 = b30 = 0;
61 b31 = 0;
63 __asm__ goto ("" /* Works. */
64 : /* no outputs */
65 : "m" (b01), "m" (b02), "m" (b03), "m" (b04), "m" (b05),
66 "m" (b06), "m" (b07), "m" (b08), "m" (b09), "m" (b10),
67 "m" (b11), "m" (b12), "m" (b13), "m" (b14), "m" (b15),
68 "m" (b16), "m" (b17), "m" (b18), "m" (b19), "m" (b20),
69 "m" (b21), "m" (b22), "m" (b23), "m" (b24), "m" (b25),
70 "m" (b26), "m" (b27), "m" (b28), "m" (b29)
71 : /* no clobbers */
72 : label01);
74 __asm__ goto ("" /* { dg-error "more than 30 operands" } */
75 : /* no outputs */
76 : "m" (b01), "m" (b02), "m" (b03), "m" (b04), "m" (b05),
77 "m" (b06), "m" (b07), "m" (b08), "m" (b09), "m" (b10),
78 "m" (b11), "m" (b12), "m" (b13), "m" (b14), "m" (b15),
79 "m" (b16), "m" (b17), "m" (b18), "m" (b19), "m" (b20),
80 "m" (b21), "m" (b22), "m" (b23), "m" (b24), "m" (b25),
81 "m" (b26), "m" (b27), "m" (b28), "m" (b29), "m" (b30)
82 : /* no clobbers */
83 : label01);
85 return 0;
88 int Outputs()
90 int b01, b02, b03, b04, b05, b06, b07, b08, b09, b10;
91 int b11, b12, b13, b14, b15, b16, b17, b18, b19, b20;
92 int b21, b22, b23, b24, b25, b26, b27, b28, b29, b30;
93 int b31;
95 /* Outputs. */
96 __asm__ volatile ("" /* Works. */
97 : "=m" (b01), "=m" (b02), "=m" (b03), "=m" (b04), "=m" (b05),
98 "=m" (b06), "=m" (b07), "=m" (b08), "=m" (b09), "=m" (b10),
99 "=m" (b11), "=m" (b12), "=m" (b13), "=m" (b14), "=m" (b15),
100 "=m" (b16), "=m" (b17), "=m" (b18), "=m" (b19), "=m" (b20),
101 "=m" (b21), "=m" (b22), "=m" (b23), "=m" (b24), "=m" (b25),
102 "=m" (b26), "=m" (b27), "=m" (b28), "=m" (b29), "=m" (b30));
104 __asm__ volatile ("" /* { dg-error "more than 30 operands" } */
105 : "=m" (b01), "=m" (b02), "=m" (b03), "=m" (b04), "=m" (b05),
106 "=m" (b06), "=m" (b07), "=m" (b08), "=m" (b09), "=m" (b10),
107 "=m" (b11), "=m" (b12), "=m" (b13), "=m" (b14), "=m" (b15),
108 "=m" (b16), "=m" (b17), "=m" (b18), "=m" (b19), "=m" (b20),
109 "=m" (b21), "=m" (b22), "=m" (b23), "=m" (b24), "=m" (b25),
110 "=m" (b26), "=m" (b27), "=m" (b28), "=m" (b29), "=m" (b30),
111 "=m" (b31));
113 return 0;
116 int Inputs()
118 int b01, b02, b03, b04, b05, b06, b07, b08, b09, b10;
119 int b11, b12, b13, b14, b15, b16, b17, b18, b19, b20;
120 int b21, b22, b23, b24, b25, b26, b27, b28, b29, b30;
121 int b31;
123 b01 = b02 = b03 = b04 = b05 = b06 = b07 = b08 = b09 = b10 = 0;
124 b11 = b12 = b13 = b14 = b15 = b16 = b17 = b18 = b19 = b20 = 0;
125 b21 = b22 = b23 = b24 = b25 = b26 = b27 = b28 = b29 = b30 = 0;
126 b31 = 0;
128 __asm__ volatile ("" /* Works. */
129 : /* no outputs */
130 : "m" (b01), "m" (b02), "m" (b03), "m" (b04), "m" (b05),
131 "m" (b06), "m" (b07), "m" (b08), "m" (b09), "m" (b10),
132 "m" (b11), "m" (b12), "m" (b13), "m" (b14), "m" (b15),
133 "m" (b16), "m" (b17), "m" (b18), "m" (b19), "m" (b20),
134 "m" (b21), "m" (b22), "m" (b23), "m" (b24), "m" (b25),
135 "m" (b26), "m" (b27), "m" (b28), "m" (b29), "m" (b30));
137 __asm__ volatile ("" /* { dg-error "more than 30 operands" } */
138 : /* no outputs */
139 : "m" (b01), "m" (b02), "m" (b03), "m" (b04), "m" (b05),
140 "m" (b06), "m" (b07), "m" (b08), "m" (b09), "m" (b10),
141 "m" (b11), "m" (b12), "m" (b13), "m" (b14), "m" (b15),
142 "m" (b16), "m" (b17), "m" (b18), "m" (b19), "m" (b20),
143 "m" (b21), "m" (b22), "m" (b23), "m" (b24), "m" (b25),
144 "m" (b26), "m" (b27), "m" (b28), "m" (b29), "m" (b30),
145 "m" (b31));
147 return 0;
150 int Input_Output()
152 int b01, b02, b03, b04, b05, b06, b07, b08, b09, b10;
153 int b11, b12, b13, b14, b15, b16, b17, b18, b19, b20;
154 int b21, b22, b23, b24, b25, b26, b27, b28, b29, b30;
155 int b31;
157 b01 = b02 = b03 = b04 = b05 = b06 = b07 = b08 = b09 = b10 = 0;
158 b11 = b12 = b13 = b14 = b15 = b16 = b17 = b18 = b19 = b20 = 0;
159 b21 = b22 = b23 = b24 = b25 = b26 = b27 = b28 = b29 = b30 = 0;
160 b31 = 0;
162 __asm__ volatile ("" /* Works. */
163 : "+m" (b01), "+m" (b02), "+m" (b03), "+m" (b04), "+m" (b05),
164 "+m" (b06), "+m" (b07), "+m" (b08), "+m" (b09), "+m" (b10),
165 "+m" (b11), "+m" (b12), "+m" (b13), "+m" (b14), "+m" (b15));
167 __asm__ volatile ("" /* { dg-error "more than 30 operands" } */
168 : "+m" (b01), "+m" (b02), "+m" (b03), "+m" (b04), "+m" (b05),
169 "+m" (b06), "+m" (b07), "+m" (b08), "+m" (b09), "+m" (b10),
170 "+m" (b11), "+m" (b12), "+m" (b13), "+m" (b14), "+m" (b15),
171 "+m" (b16));
173 return 0;