xref: /openbmc/linux/arch/powerpc/lib/feature-fixups-test.S (revision c0337288ab165be17081d61d4ef13b79d3ac55d4)
1362e7701SMichael Ellerman/*
2362e7701SMichael Ellerman * Copyright 2008 Michael Ellerman, IBM Corporation.
3362e7701SMichael Ellerman *
4362e7701SMichael Ellerman *
5362e7701SMichael Ellerman * This program is free software; you can redistribute it and/or
6362e7701SMichael Ellerman * modify it under the terms of the GNU General Public License
7362e7701SMichael Ellerman * as published by the Free Software Foundation; either version
8362e7701SMichael Ellerman * 2 of the License, or (at your option) any later version.
9362e7701SMichael Ellerman */
10362e7701SMichael Ellerman
11362e7701SMichael Ellerman#include <asm/feature-fixups.h>
12362e7701SMichael Ellerman#include <asm/ppc_asm.h>
132d1b2027SKumar Gala#include <asm/synch.h>
14362e7701SMichael Ellerman
15362e7701SMichael Ellerman	.text
16362e7701SMichael Ellerman
17362e7701SMichael Ellerman#define globl(x)		\
18362e7701SMichael Ellerman	.globl x;	\
19362e7701SMichael Ellermanx:
20362e7701SMichael Ellerman
21362e7701SMichael Ellermanglobl(ftr_fixup_test1)
22362e7701SMichael Ellerman	or	1,1,1
23362e7701SMichael Ellerman	or	2,2,2	/* fixup will nop out this instruction */
24362e7701SMichael Ellerman	or	3,3,3
25362e7701SMichael Ellerman
26362e7701SMichael Ellermanglobl(end_ftr_fixup_test1)
27362e7701SMichael Ellerman
28362e7701SMichael Ellermanglobl(ftr_fixup_test1_orig)
29362e7701SMichael Ellerman	or	1,1,1
30362e7701SMichael Ellerman	or	2,2,2
31362e7701SMichael Ellerman	or	3,3,3
32362e7701SMichael Ellerman
33362e7701SMichael Ellermanglobl(ftr_fixup_test1_expected)
34362e7701SMichael Ellerman	or	1,1,1
35362e7701SMichael Ellerman	nop
36362e7701SMichael Ellerman	or	3,3,3
37362e7701SMichael Ellerman
38362e7701SMichael Ellermanglobl(ftr_fixup_test2)
39362e7701SMichael Ellerman	or	1,1,1
40362e7701SMichael Ellerman	or	2,2,2	/* fixup will replace this with ftr_fixup_test2_alt */
41362e7701SMichael Ellerman	or	3,3,3
42362e7701SMichael Ellerman
43362e7701SMichael Ellermanglobl(end_ftr_fixup_test2)
44362e7701SMichael Ellerman
45362e7701SMichael Ellermanglobl(ftr_fixup_test2_orig)
46362e7701SMichael Ellerman	or	1,1,1
47362e7701SMichael Ellerman	or	2,2,2
48362e7701SMichael Ellerman	or	3,3,3
49362e7701SMichael Ellerman
50362e7701SMichael Ellermanglobl(ftr_fixup_test2_alt)
51362e7701SMichael Ellerman	or	31,31,31
52362e7701SMichael Ellerman
53362e7701SMichael Ellermanglobl(ftr_fixup_test2_expected)
54362e7701SMichael Ellerman	or	1,1,1
55362e7701SMichael Ellerman	or	31,31,31
56362e7701SMichael Ellerman	or	3,3,3
57362e7701SMichael Ellerman
58362e7701SMichael Ellermanglobl(ftr_fixup_test3)
59362e7701SMichael Ellerman	or	1,1,1
60362e7701SMichael Ellerman	or	2,2,2	/* fixup will fail to replace this */
61362e7701SMichael Ellerman	or	3,3,3
62362e7701SMichael Ellerman
63362e7701SMichael Ellermanglobl(end_ftr_fixup_test3)
64362e7701SMichael Ellerman
65362e7701SMichael Ellermanglobl(ftr_fixup_test3_orig)
66362e7701SMichael Ellerman	or	1,1,1
67362e7701SMichael Ellerman	or	2,2,2
68362e7701SMichael Ellerman	or	3,3,3
69362e7701SMichael Ellerman
70362e7701SMichael Ellermanglobl(ftr_fixup_test3_alt)
71362e7701SMichael Ellerman	or	31,31,31
72362e7701SMichael Ellerman	or	31,31,31
73362e7701SMichael Ellerman
74362e7701SMichael Ellermanglobl(ftr_fixup_test4)
75362e7701SMichael Ellerman	or	1,1,1
76362e7701SMichael Ellerman	or	2,2,2
77362e7701SMichael Ellerman	or	2,2,2
78362e7701SMichael Ellerman	or	2,2,2
79362e7701SMichael Ellerman	or	2,2,2
80362e7701SMichael Ellerman	or	3,3,3
81362e7701SMichael Ellerman
82362e7701SMichael Ellermanglobl(end_ftr_fixup_test4)
83362e7701SMichael Ellerman
84362e7701SMichael Ellermanglobl(ftr_fixup_test4_expected)
85362e7701SMichael Ellerman	or	1,1,1
86362e7701SMichael Ellerman	or	31,31,31
87362e7701SMichael Ellerman	or	31,31,31
88362e7701SMichael Ellerman	nop
89362e7701SMichael Ellerman	nop
90362e7701SMichael Ellerman	or	3,3,3
91362e7701SMichael Ellerman
92362e7701SMichael Ellermanglobl(ftr_fixup_test4_orig)
93362e7701SMichael Ellerman	or	1,1,1
94362e7701SMichael Ellerman	or	2,2,2
95362e7701SMichael Ellerman	or	2,2,2
96362e7701SMichael Ellerman	or	2,2,2
97362e7701SMichael Ellerman	or	2,2,2
98362e7701SMichael Ellerman	or	3,3,3
99362e7701SMichael Ellerman
100362e7701SMichael Ellermanglobl(ftr_fixup_test4_alt)
101362e7701SMichael Ellerman	or	31,31,31
102362e7701SMichael Ellerman	or	31,31,31
103362e7701SMichael Ellerman
104362e7701SMichael Ellerman
105362e7701SMichael Ellermanglobl(ftr_fixup_test5)
106362e7701SMichael Ellerman	or	1,1,1
107362e7701SMichael EllermanBEGIN_FTR_SECTION
108362e7701SMichael Ellerman	or	2,2,2
109362e7701SMichael Ellerman	or	2,2,2
110362e7701SMichael Ellerman	or	2,2,2
111362e7701SMichael Ellerman	or	2,2,2
112362e7701SMichael Ellerman	or	2,2,2
113362e7701SMichael Ellerman	or	2,2,2
114362e7701SMichael Ellerman	or	2,2,2
115362e7701SMichael EllermanFTR_SECTION_ELSE
116362e7701SMichael Ellerman2:	b	3f
117362e7701SMichael Ellerman3:	or	5,5,5
118362e7701SMichael Ellerman	beq	3b
119362e7701SMichael Ellerman	b	1f
120362e7701SMichael Ellerman	or	6,6,6
121362e7701SMichael Ellerman	b	2b
122362e7701SMichael Ellerman1:	bdnz	3b
123362e7701SMichael EllermanALT_FTR_SECTION_END(0, 1)
124362e7701SMichael Ellerman	or	1,1,1
125362e7701SMichael Ellerman
126362e7701SMichael Ellermanglobl(end_ftr_fixup_test5)
127362e7701SMichael Ellerman
128362e7701SMichael Ellermanglobl(ftr_fixup_test5_expected)
129362e7701SMichael Ellerman	or	1,1,1
130362e7701SMichael Ellerman2:	b	3f
131362e7701SMichael Ellerman3:	or	5,5,5
132362e7701SMichael Ellerman	beq	3b
133362e7701SMichael Ellerman	b	1f
134362e7701SMichael Ellerman	or	6,6,6
135362e7701SMichael Ellerman	b	2b
136362e7701SMichael Ellerman1:	bdnz	3b
137362e7701SMichael Ellerman	or	1,1,1
138362e7701SMichael Ellerman
139362e7701SMichael Ellermanglobl(ftr_fixup_test6)
140362e7701SMichael Ellerman1:	or	1,1,1
141362e7701SMichael EllermanBEGIN_FTR_SECTION
142362e7701SMichael Ellerman	or	5,5,5
1435888da18SKumar Gala2:	PPC_LCMPI	r3,0
144362e7701SMichael Ellerman	beq	4f
145362e7701SMichael Ellerman	blt	2b
146362e7701SMichael Ellerman	b	1b
147362e7701SMichael Ellerman	b	4f
148362e7701SMichael EllermanFTR_SECTION_ELSE
149362e7701SMichael Ellerman2:	or	2,2,2
1505888da18SKumar Gala	PPC_LCMPI	r3,1
151362e7701SMichael Ellerman	beq	3f
152362e7701SMichael Ellerman	blt	2b
153362e7701SMichael Ellerman	b	3f
154362e7701SMichael Ellerman	b	1b
155362e7701SMichael EllermanALT_FTR_SECTION_END(0, 1)
156362e7701SMichael Ellerman3:	or	1,1,1
157362e7701SMichael Ellerman	or	2,2,2
158362e7701SMichael Ellerman4:	or	3,3,3
159362e7701SMichael Ellerman
160362e7701SMichael Ellermanglobl(end_ftr_fixup_test6)
161362e7701SMichael Ellerman
162362e7701SMichael Ellermanglobl(ftr_fixup_test6_expected)
163362e7701SMichael Ellerman1:	or	1,1,1
164362e7701SMichael Ellerman2:	or	2,2,2
1655888da18SKumar Gala	PPC_LCMPI	r3,1
166362e7701SMichael Ellerman	beq	3f
167362e7701SMichael Ellerman	blt	2b
168362e7701SMichael Ellerman	b	3f
169362e7701SMichael Ellerman	b	1b
170362e7701SMichael Ellerman2:	or	1,1,1
171362e7701SMichael Ellerman	or	2,2,2
172362e7701SMichael Ellerman3:	or	3,3,3
173362e7701SMichael Ellerman
174362e7701SMichael Ellerman
175*c0337288SMichael Ellerman#if 0
176*c0337288SMichael Ellerman/* Test that if we have a larger else case the assembler spots it and
177*c0337288SMichael Ellerman * reports an error. #if 0'ed so as not to break the build normally.
178*c0337288SMichael Ellerman */
179*c0337288SMichael Ellermanftr_fixup_test7:
180*c0337288SMichael Ellerman	or	1,1,1
181*c0337288SMichael EllermanBEGIN_FTR_SECTION
182*c0337288SMichael Ellerman	or	2,2,2
183*c0337288SMichael Ellerman	or	2,2,2
184*c0337288SMichael Ellerman	or	2,2,2
185*c0337288SMichael EllermanFTR_SECTION_ELSE
186*c0337288SMichael Ellerman	or	3,3,3
187*c0337288SMichael Ellerman	or	3,3,3
188*c0337288SMichael Ellerman	or	3,3,3
189*c0337288SMichael Ellerman	or	3,3,3
190*c0337288SMichael EllermanALT_FTR_SECTION_END(0, 1)
191*c0337288SMichael Ellerman	or	1,1,1
192*c0337288SMichael Ellerman#endif
193*c0337288SMichael Ellerman
194362e7701SMichael Ellerman#define	MAKE_MACRO_TEST(TYPE)						\
195362e7701SMichael Ellermanglobl(ftr_fixup_test_ ##TYPE##_macros)					\
196362e7701SMichael Ellerman	or	1,1,1;							\
197362e7701SMichael Ellerman	/* Basic test, this section should all be nop'ed */		\
198362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
199362e7701SMichael Ellerman	or	2,2,2;							\
200362e7701SMichael Ellerman	or	2,2,2;							\
201362e7701SMichael Ellerman	or	2,2,2;							\
202362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 1)						\
203362e7701SMichael Ellerman	or	1,1,1;							\
204362e7701SMichael Ellerman	or	1,1,1;							\
205362e7701SMichael Ellerman	/* Basic test, this section should NOT be nop'ed */		\
206362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
207362e7701SMichael Ellerman	or	2,2,2;							\
208362e7701SMichael Ellerman	or	2,2,2;							\
209362e7701SMichael Ellerman	or	2,2,2;							\
210362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
211362e7701SMichael Ellerman	or	1,1,1;							\
212362e7701SMichael Ellerman	or	1,1,1;							\
213362e7701SMichael Ellerman	/* Nesting test, inner section should be nop'ed */		\
214362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
215362e7701SMichael Ellerman	or	2,2,2;							\
216362e7701SMichael Ellerman	or	2,2,2;							\
217362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(80)					\
218362e7701SMichael Ellerman	or	3,3,3;							\
219362e7701SMichael Ellerman	or	3,3,3;							\
220362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 80)					\
221362e7701SMichael Ellerman	or	2,2,2;							\
222362e7701SMichael Ellerman	or	2,2,2;							\
223362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
224362e7701SMichael Ellerman	or	1,1,1;							\
225362e7701SMichael Ellerman	or	1,1,1;							\
226362e7701SMichael Ellerman	/* Nesting test, whole section should be nop'ed */		\
227362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
228362e7701SMichael Ellerman	or	2,2,2;							\
229362e7701SMichael Ellerman	or	2,2,2;							\
230362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(80)					\
231362e7701SMichael Ellerman	or	3,3,3;							\
232362e7701SMichael Ellerman	or	3,3,3;							\
233362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 0, 80)					\
234362e7701SMichael Ellerman	or	2,2,2;							\
235362e7701SMichael Ellerman	or	2,2,2;							\
236362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 1)						\
237362e7701SMichael Ellerman	or	1,1,1;							\
238362e7701SMichael Ellerman	or	1,1,1;							\
239362e7701SMichael Ellerman	/* Nesting test, none should be nop'ed */			\
240362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
241362e7701SMichael Ellerman	or	2,2,2;							\
242362e7701SMichael Ellerman	or	2,2,2;							\
243362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(80)					\
244362e7701SMichael Ellerman	or	3,3,3;							\
245362e7701SMichael Ellerman	or	3,3,3;							\
246362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 0, 80)					\
247362e7701SMichael Ellerman	or	2,2,2;							\
248362e7701SMichael Ellerman	or	2,2,2;							\
249362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
250362e7701SMichael Ellerman	or	1,1,1;							\
251362e7701SMichael Ellerman	or	1,1,1;							\
252362e7701SMichael Ellerman	/* Basic alt section test, default case should be taken */	\
253362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
254362e7701SMichael Ellerman	or	3,3,3;							\
255362e7701SMichael Ellerman	or	3,3,3;							\
256362e7701SMichael Ellerman	or	3,3,3;							\
257362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
258362e7701SMichael Ellerman	or	5,5,5;							\
259362e7701SMichael Ellerman	or	5,5,5;							\
260362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
261362e7701SMichael Ellerman	or	1,1,1;							\
262362e7701SMichael Ellerman	or	1,1,1;							\
263362e7701SMichael Ellerman	/* Basic alt section test, else case should be taken */		\
264362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
265362e7701SMichael Ellerman	or	3,3,3;							\
266362e7701SMichael Ellerman	or	3,3,3;							\
267362e7701SMichael Ellerman	or	3,3,3;							\
268362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
269362e7701SMichael Ellerman	or	31,31,31;						\
270362e7701SMichael Ellerman	or	31,31,31;						\
271362e7701SMichael Ellerman	or	31,31,31;						\
272362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
273362e7701SMichael Ellerman	or	1,1,1;							\
274362e7701SMichael Ellerman	or	1,1,1;							\
275362e7701SMichael Ellerman	/* Alt with smaller else case, should be padded with nops */	\
276362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
277362e7701SMichael Ellerman	or	3,3,3;							\
278362e7701SMichael Ellerman	or	3,3,3;							\
279362e7701SMichael Ellerman	or	3,3,3;							\
280362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
281362e7701SMichael Ellerman	or	31,31,31;						\
282362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
283362e7701SMichael Ellerman	or	1,1,1;							\
284362e7701SMichael Ellerman	or	1,1,1;							\
285362e7701SMichael Ellerman	/* Alt section with nested section in default case */		\
286362e7701SMichael Ellerman	/* Default case should be taken, with nop'ed inner section */	\
287362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
288362e7701SMichael Ellerman	or	3,3,3;							\
289362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
290362e7701SMichael Ellerman	or	3,3,3;							\
291362e7701SMichael Ellerman	or	3,3,3;							\
292362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 95)					\
293362e7701SMichael Ellerman	or	3,3,3;							\
294362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
295362e7701SMichael Ellerman	or	2,2,2;							\
296362e7701SMichael Ellerman	or	2,2,2;							\
297362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
298362e7701SMichael Ellerman	or	1,1,1;							\
299362e7701SMichael Ellerman	or	1,1,1;							\
300362e7701SMichael Ellerman	/* Alt section with nested section in else, default taken */	\
301362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
302362e7701SMichael Ellerman	or	3,3,3;							\
303362e7701SMichael Ellerman	or	3,3,3;							\
304362e7701SMichael Ellerman	or	3,3,3;							\
305362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
306362e7701SMichael Ellerman	or	5,5,5;							\
307362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
308362e7701SMichael Ellerman	or	3,3,3;							\
309362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 95)					\
310362e7701SMichael Ellerman	or	5,5,5;							\
311362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
312362e7701SMichael Ellerman	or	1,1,1;							\
313362e7701SMichael Ellerman	or	1,1,1;							\
314362e7701SMichael Ellerman	/* Alt section with nested section in else, else taken & nop */	\
315362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
316362e7701SMichael Ellerman	or	3,3,3;							\
317362e7701SMichael Ellerman	or	3,3,3;							\
318362e7701SMichael Ellerman	or	3,3,3;							\
319362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
320362e7701SMichael Ellerman	or	5,5,5;							\
321362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
322362e7701SMichael Ellerman	or	3,3,3;							\
323362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 95)					\
324362e7701SMichael Ellerman	or	5,5,5;							\
325362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
326362e7701SMichael Ellerman	or	1,1,1;							\
327362e7701SMichael Ellerman	or	1,1,1;							\
328362e7701SMichael Ellerman	/* Feature section with nested alt section, default taken */	\
329362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
330362e7701SMichael Ellerman	or	2,2,2;							\
331362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
332362e7701SMichael Ellerman	or	1,1,1;							\
333362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
334362e7701SMichael Ellerman	or	5,5,5;							\
335362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 95)				\
336362e7701SMichael Ellerman	or	2,2,2;							\
337362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
338362e7701SMichael Ellerman	or	1,1,1;							\
339362e7701SMichael Ellerman	or	1,1,1;							\
340362e7701SMichael Ellerman	/* Feature section with nested alt section, else taken */	\
341362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
342362e7701SMichael Ellerman	or	2,2,2;							\
343362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
344362e7701SMichael Ellerman	or	1,1,1;							\
345362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
346362e7701SMichael Ellerman	or	5,5,5;							\
347362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95)				\
348362e7701SMichael Ellerman	or	2,2,2;							\
349362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
350362e7701SMichael Ellerman	or	1,1,1;							\
351362e7701SMichael Ellerman	or	1,1,1;							\
352362e7701SMichael Ellerman	/* Feature section with nested alt section, all nop'ed */	\
353362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
354362e7701SMichael Ellerman	or	2,2,2;							\
355362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
356362e7701SMichael Ellerman	or	1,1,1;							\
357362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
358362e7701SMichael Ellerman	or	5,5,5;							\
359362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 95)				\
360362e7701SMichael Ellerman	or	2,2,2;							\
361362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 1)						\
362362e7701SMichael Ellerman	or	1,1,1;							\
363362e7701SMichael Ellerman	or	1,1,1;							\
364362e7701SMichael Ellerman	/* Nested alt sections, default with inner default taken */	\
365362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
366362e7701SMichael Ellerman	or	2,2,2;							\
367362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
368362e7701SMichael Ellerman	or	1,1,1;							\
369362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
370362e7701SMichael Ellerman	or	5,5,5;							\
371362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 95)				\
372362e7701SMichael Ellerman	or	2,2,2;							\
373362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
374362e7701SMichael Ellerman	or	31,31,31;						\
375362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94)					\
376362e7701SMichael Ellerman	or	5,5,5;							\
377362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94)					\
378362e7701SMichael Ellerman	or	1,1,1;							\
379362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 94)				\
380362e7701SMichael Ellerman	or	31,31,31;						\
381362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
382362e7701SMichael Ellerman	or	1,1,1;							\
383362e7701SMichael Ellerman	or	1,1,1;							\
384362e7701SMichael Ellerman	/* Nested alt sections, default with inner else taken */	\
385362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
386362e7701SMichael Ellerman	or	2,2,2;							\
387362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
388362e7701SMichael Ellerman	or	1,1,1;							\
389362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
390362e7701SMichael Ellerman	or	5,5,5;							\
391362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95)				\
392362e7701SMichael Ellerman	or	2,2,2;							\
393362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
394362e7701SMichael Ellerman	or	31,31,31;						\
395362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94)					\
396362e7701SMichael Ellerman	or	5,5,5;							\
397362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94)					\
398362e7701SMichael Ellerman	or	1,1,1;							\
399362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 94)				\
400362e7701SMichael Ellerman	or	31,31,31;						\
401362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
402362e7701SMichael Ellerman	or	1,1,1;							\
403362e7701SMichael Ellerman	or	1,1,1;							\
404362e7701SMichael Ellerman	/* Nested alt sections, else with inner default taken */	\
405362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
406362e7701SMichael Ellerman	or	2,2,2;							\
407362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
408362e7701SMichael Ellerman	or	1,1,1;							\
409362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
410362e7701SMichael Ellerman	or	5,5,5;							\
411362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95)				\
412362e7701SMichael Ellerman	or	2,2,2;							\
413362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
414362e7701SMichael Ellerman	or	31,31,31;						\
415362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94)					\
416362e7701SMichael Ellerman	or	5,5,5;							\
417362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94)					\
418362e7701SMichael Ellerman	or	1,1,1;							\
419362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 94)				\
420362e7701SMichael Ellerman	or	31,31,31;						\
421362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
422362e7701SMichael Ellerman	or	1,1,1;							\
423362e7701SMichael Ellerman	or	1,1,1;							\
424362e7701SMichael Ellerman	/* Nested alt sections, else with inner else taken */		\
425362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
426362e7701SMichael Ellerman	or	2,2,2;							\
427362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
428362e7701SMichael Ellerman	or	1,1,1;							\
429362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
430362e7701SMichael Ellerman	or	5,5,5;							\
431362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95)				\
432362e7701SMichael Ellerman	or	2,2,2;							\
433362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
434362e7701SMichael Ellerman	or	31,31,31;						\
435362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94)					\
436362e7701SMichael Ellerman	or	5,5,5;							\
437362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94)					\
438362e7701SMichael Ellerman	or	1,1,1;							\
439362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 94)				\
440362e7701SMichael Ellerman	or	31,31,31;						\
441362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
442362e7701SMichael Ellerman	or	1,1,1;							\
443362e7701SMichael Ellerman	or	1,1,1;							\
444362e7701SMichael Ellerman	/* Nested alt sections, else can have large else case */	\
445362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
446362e7701SMichael Ellerman	or	2,2,2;							\
447362e7701SMichael Ellerman	or	2,2,2;							\
448362e7701SMichael Ellerman	or	2,2,2;							\
449362e7701SMichael Ellerman	or	2,2,2;							\
450362e7701SMichael Ellerman##TYPE##_SECTION_ELSE 							\
451362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94) 					\
452362e7701SMichael Ellerman	or	5,5,5;							\
453362e7701SMichael Ellerman	or	5,5,5;							\
454362e7701SMichael Ellerman	or	5,5,5;							\
455362e7701SMichael Ellerman	or	5,5,5;							\
456362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94) 					\
457362e7701SMichael Ellerman	or	1,1,1;							\
458362e7701SMichael Ellerman	or	1,1,1;							\
459362e7701SMichael Ellerman	or	1,1,1;							\
460362e7701SMichael Ellerman	or	1,1,1;							\
461362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 94)				\
462362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
463362e7701SMichael Ellerman	or	1,1,1;							\
464362e7701SMichael Ellerman	or	1,1,1;
465362e7701SMichael Ellerman
466362e7701SMichael Ellerman#define	MAKE_MACRO_TEST_EXPECTED(TYPE)					\
467362e7701SMichael Ellermanglobl(ftr_fixup_test_ ##TYPE##_macros_expected)				\
468362e7701SMichael Ellerman	or	1,1,1;							\
469362e7701SMichael Ellerman	/* Basic test, this section should all be nop'ed */		\
470362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
471362e7701SMichael Ellerman	nop;								\
472362e7701SMichael Ellerman	nop;								\
473362e7701SMichael Ellerman	nop;								\
474362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 1) */					\
475362e7701SMichael Ellerman	or	1,1,1;							\
476362e7701SMichael Ellerman	or	1,1,1;							\
477362e7701SMichael Ellerman	/* Basic test, this section should NOT be nop'ed */		\
478362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
479362e7701SMichael Ellerman	or	2,2,2;							\
480362e7701SMichael Ellerman	or	2,2,2;							\
481362e7701SMichael Ellerman	or	2,2,2;							\
482362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
483362e7701SMichael Ellerman	or	1,1,1;							\
484362e7701SMichael Ellerman	or	1,1,1;							\
485362e7701SMichael Ellerman	/* Nesting test, inner section should be nop'ed */		\
486362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
487362e7701SMichael Ellerman	or	2,2,2;							\
488362e7701SMichael Ellerman	or	2,2,2;							\
489362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(80) */					\
490362e7701SMichael Ellerman	nop;								\
491362e7701SMichael Ellerman	nop;								\
492362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 80) */				\
493362e7701SMichael Ellerman	or	2,2,2;							\
494362e7701SMichael Ellerman	or	2,2,2;							\
495362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
496362e7701SMichael Ellerman	or	1,1,1;							\
497362e7701SMichael Ellerman	or	1,1,1;							\
498362e7701SMichael Ellerman	/* Nesting test, whole section should be nop'ed */		\
499362e7701SMichael Ellerman	/* NB. inner section is not nop'ed, but then entire outer is */	\
500362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
501362e7701SMichael Ellerman	nop;								\
502362e7701SMichael Ellerman	nop;								\
503362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(80) */					\
504362e7701SMichael Ellerman	nop;								\
505362e7701SMichael Ellerman	nop;								\
506362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 0, 80) */				\
507362e7701SMichael Ellerman	nop;								\
508362e7701SMichael Ellerman	nop;								\
509362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 1) */					\
510362e7701SMichael Ellerman	or	1,1,1;							\
511362e7701SMichael Ellerman	or	1,1,1;							\
512362e7701SMichael Ellerman	/* Nesting test, none should be nop'ed */			\
513362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
514362e7701SMichael Ellerman	or	2,2,2;							\
515362e7701SMichael Ellerman	or	2,2,2;							\
516362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(80) */					\
517362e7701SMichael Ellerman	or	3,3,3;							\
518362e7701SMichael Ellerman	or	3,3,3;							\
519362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 0, 80) */				\
520362e7701SMichael Ellerman	or	2,2,2;							\
521362e7701SMichael Ellerman	or	2,2,2;							\
522362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
523362e7701SMichael Ellerman	or	1,1,1;							\
524362e7701SMichael Ellerman	or	1,1,1;							\
525362e7701SMichael Ellerman	/* Basic alt section test, default case should be taken */	\
526362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
527362e7701SMichael Ellerman	or	3,3,3;							\
528362e7701SMichael Ellerman	or	3,3,3;							\
529362e7701SMichael Ellerman	or	3,3,3;							\
530362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
531362e7701SMichael Ellerman	/* or	5,5,5; */						\
532362e7701SMichael Ellerman	/* or	5,5,5; */						\
533362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
534362e7701SMichael Ellerman	or	1,1,1;							\
535362e7701SMichael Ellerman	or	1,1,1;							\
536362e7701SMichael Ellerman	/* Basic alt section test, else case should be taken */		\
537362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
538362e7701SMichael Ellerman	/* or	3,3,3; */						\
539362e7701SMichael Ellerman	/* or	3,3,3; */						\
540362e7701SMichael Ellerman	/* or	3,3,3; */						\
541362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
542362e7701SMichael Ellerman	or	31,31,31;						\
543362e7701SMichael Ellerman	or	31,31,31;						\
544362e7701SMichael Ellerman	or	31,31,31;						\
545362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
546362e7701SMichael Ellerman	or	1,1,1;							\
547362e7701SMichael Ellerman	or	1,1,1;							\
548362e7701SMichael Ellerman	/* Alt with smaller else case, should be padded with nops */	\
549362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
550362e7701SMichael Ellerman	/* or	3,3,3; */						\
551362e7701SMichael Ellerman	/* or	3,3,3; */						\
552362e7701SMichael Ellerman	/* or	3,3,3; */						\
553362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
554362e7701SMichael Ellerman	or	31,31,31;						\
555362e7701SMichael Ellerman	nop;								\
556362e7701SMichael Ellerman	nop;								\
557362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
558362e7701SMichael Ellerman	or	1,1,1;							\
559362e7701SMichael Ellerman	or	1,1,1;							\
560362e7701SMichael Ellerman	/* Alt section with nested section in default case */		\
561362e7701SMichael Ellerman	/* Default case should be taken, with nop'ed inner section */	\
562362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
563362e7701SMichael Ellerman	or	3,3,3;							\
564362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
565362e7701SMichael Ellerman	nop;								\
566362e7701SMichael Ellerman	nop;								\
567362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */				\
568362e7701SMichael Ellerman	or	3,3,3;							\
569362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
570362e7701SMichael Ellerman	/* or	2,2,2; */						\
571362e7701SMichael Ellerman	/* or	2,2,2; */						\
572362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
573362e7701SMichael Ellerman	or	1,1,1;							\
574362e7701SMichael Ellerman	or	1,1,1;							\
575362e7701SMichael Ellerman	/* Alt section with nested section in else, default taken */	\
576362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
577362e7701SMichael Ellerman	or	3,3,3;							\
578362e7701SMichael Ellerman	or	3,3,3;							\
579362e7701SMichael Ellerman	or	3,3,3;							\
580362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
581362e7701SMichael Ellerman	/* or	5,5,5; */						\
582362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
583362e7701SMichael Ellerman	/* or	3,3,3; */						\
584362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */				\
585362e7701SMichael Ellerman	/* or	5,5,5; */						\
586362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
587362e7701SMichael Ellerman	or	1,1,1;							\
588362e7701SMichael Ellerman	or	1,1,1;							\
589362e7701SMichael Ellerman	/* Alt section with nested section in else, else taken & nop */	\
590362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
591362e7701SMichael Ellerman	/* or	3,3,3; */						\
592362e7701SMichael Ellerman	/* or	3,3,3; */						\
593362e7701SMichael Ellerman	/* or	3,3,3; */						\
594362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
595362e7701SMichael Ellerman	or	5,5,5;							\
596362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
597362e7701SMichael Ellerman	nop;								\
598362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */				\
599362e7701SMichael Ellerman	or	5,5,5;							\
600362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
601362e7701SMichael Ellerman	or	1,1,1;							\
602362e7701SMichael Ellerman	or	1,1,1;							\
603362e7701SMichael Ellerman	/* Feature section with nested alt section, default taken */	\
604362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
605362e7701SMichael Ellerman	or	2,2,2;							\
606362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
607362e7701SMichael Ellerman	or	1,1,1;							\
608362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
609362e7701SMichael Ellerman	/* or	5,5,5; */						\
610362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */				\
611362e7701SMichael Ellerman	or	2,2,2;							\
612362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
613362e7701SMichael Ellerman	or	1,1,1;							\
614362e7701SMichael Ellerman	or	1,1,1;							\
615362e7701SMichael Ellerman	/* Feature section with nested alt section, else taken */	\
616362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
617362e7701SMichael Ellerman	or	2,2,2;							\
618362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
619362e7701SMichael Ellerman	/* or	1,1,1; */						\
620362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
621362e7701SMichael Ellerman	or	5,5,5;							\
622362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */				\
623362e7701SMichael Ellerman	or	2,2,2;							\
624362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
625362e7701SMichael Ellerman	or	1,1,1;							\
626362e7701SMichael Ellerman	or	1,1,1;							\
627362e7701SMichael Ellerman	/* Feature section with nested alt section, all nop'ed */	\
628362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
629362e7701SMichael Ellerman	nop;								\
630362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
631362e7701SMichael Ellerman	nop;								\
632362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
633362e7701SMichael Ellerman	/* or	5,5,5; */						\
634362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */				\
635362e7701SMichael Ellerman	nop;								\
636362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 1) */					\
637362e7701SMichael Ellerman	or	1,1,1;							\
638362e7701SMichael Ellerman	or	1,1,1;							\
639362e7701SMichael Ellerman	/* Nested alt sections, default with inner default taken */	\
640362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
641362e7701SMichael Ellerman	or	2,2,2;							\
642362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
643362e7701SMichael Ellerman	or	1,1,1;							\
644362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
645362e7701SMichael Ellerman	/* or	5,5,5; */						\
646362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */				\
647362e7701SMichael Ellerman	or	2,2,2;							\
648362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
649362e7701SMichael Ellerman	/* or	31,31,31; */						\
650362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
651362e7701SMichael Ellerman	/* or	5,5,5; */						\
652362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
653362e7701SMichael Ellerman	/* or	1,1,1; */						\
654362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */				\
655362e7701SMichael Ellerman	/* or	31,31,31; */						\
656362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
657362e7701SMichael Ellerman	or	1,1,1;							\
658362e7701SMichael Ellerman	or	1,1,1;							\
659362e7701SMichael Ellerman	/* Nested alt sections, default with inner else taken */	\
660362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
661362e7701SMichael Ellerman	or	2,2,2;							\
662362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
663362e7701SMichael Ellerman	/* or	1,1,1; */						\
664362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
665362e7701SMichael Ellerman	or	5,5,5;							\
666362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */				\
667362e7701SMichael Ellerman	or	2,2,2;							\
668362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
669362e7701SMichael Ellerman	/* or	31,31,31; */						\
670362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
671362e7701SMichael Ellerman	/* or	5,5,5; */						\
672362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
673362e7701SMichael Ellerman	/* or	1,1,1; */						\
674362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */				\
675362e7701SMichael Ellerman	/* or	31,31,31; */						\
676362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
677362e7701SMichael Ellerman	or	1,1,1;							\
678362e7701SMichael Ellerman	or	1,1,1;							\
679362e7701SMichael Ellerman	/* Nested alt sections, else with inner default taken */	\
680362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
681362e7701SMichael Ellerman	/* or	2,2,2; */						\
682362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
683362e7701SMichael Ellerman	/* or	1,1,1; */						\
684362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
685362e7701SMichael Ellerman	/* or	5,5,5; */						\
686362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */				\
687362e7701SMichael Ellerman	/* or	2,2,2; */						\
688362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
689362e7701SMichael Ellerman	or	31,31,31;						\
690362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
691362e7701SMichael Ellerman	or	5,5,5;							\
692362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
693362e7701SMichael Ellerman	/* or	1,1,1; */						\
694362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */				\
695362e7701SMichael Ellerman	or	31,31,31;						\
696362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
697362e7701SMichael Ellerman	or	1,1,1;							\
698362e7701SMichael Ellerman	or	1,1,1;							\
699362e7701SMichael Ellerman	/* Nested alt sections, else with inner else taken */		\
700362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
701362e7701SMichael Ellerman	/* or	2,2,2; */						\
702362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
703362e7701SMichael Ellerman	/* or	1,1,1; */						\
704362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
705362e7701SMichael Ellerman	/* or	5,5,5; */						\
706362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */				\
707362e7701SMichael Ellerman	/* or	2,2,2; */						\
708362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
709362e7701SMichael Ellerman	or	31,31,31;						\
710362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
711362e7701SMichael Ellerman	/* or	5,5,5; */						\
712362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
713362e7701SMichael Ellerman	or	1,1,1;							\
714362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) */				\
715362e7701SMichael Ellerman	or	31,31,31;						\
716362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
717362e7701SMichael Ellerman	or	1,1,1;							\
718362e7701SMichael Ellerman	or	1,1,1;							\
719362e7701SMichael Ellerman	/* Nested alt sections, else can have large else case */	\
720362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
721362e7701SMichael Ellerman	/* or	2,2,2; */						\
722362e7701SMichael Ellerman	/* or	2,2,2; */						\
723362e7701SMichael Ellerman	/* or	2,2,2; */						\
724362e7701SMichael Ellerman	/* or	2,2,2; */						\
725362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
726362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
727362e7701SMichael Ellerman	/* or	5,5,5; */						\
728362e7701SMichael Ellerman	/* or	5,5,5; */						\
729362e7701SMichael Ellerman	/* or	5,5,5; */						\
730362e7701SMichael Ellerman	/* or	5,5,5; */						\
731362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
732362e7701SMichael Ellerman	or	1,1,1;							\
733362e7701SMichael Ellerman	or	1,1,1;							\
734362e7701SMichael Ellerman	or	1,1,1;							\
735362e7701SMichael Ellerman	or	1,1,1;							\
736362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) */				\
737362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
738362e7701SMichael Ellerman	or	1,1,1;							\
739362e7701SMichael Ellerman	or	1,1,1;
740362e7701SMichael Ellerman
741362e7701SMichael EllermanMAKE_MACRO_TEST(FTR);
742362e7701SMichael EllermanMAKE_MACRO_TEST_EXPECTED(FTR);
743362e7701SMichael Ellerman
744362e7701SMichael Ellerman#ifdef CONFIG_PPC64
745362e7701SMichael EllermanMAKE_MACRO_TEST(FW_FTR);
746362e7701SMichael EllermanMAKE_MACRO_TEST_EXPECTED(FW_FTR);
747362e7701SMichael Ellerman#endif
7482d1b2027SKumar Gala
7492d1b2027SKumar Galaglobl(lwsync_fixup_test)
7502d1b2027SKumar Gala1:	or	1,1,1
7512d1b2027SKumar Gala	LWSYNC
7522d1b2027SKumar Galaglobl(end_lwsync_fixup_test)
7532d1b2027SKumar Gala
7542d1b2027SKumar Galaglobl(lwsync_fixup_test_expected_LWSYNC)
7552d1b2027SKumar Gala1:	or	1,1,1
7562d1b2027SKumar Gala	lwsync
7572d1b2027SKumar Gala
7582d1b2027SKumar Galaglobl(lwsync_fixup_test_expected_SYNC)
7592d1b2027SKumar Gala1:	or	1,1,1
7602d1b2027SKumar Gala	sync
7612d1b2027SKumar Gala
762