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
175362e7701SMichael Ellerman#define	MAKE_MACRO_TEST(TYPE)						\
176362e7701SMichael Ellermanglobl(ftr_fixup_test_ ##TYPE##_macros)					\
177362e7701SMichael Ellerman	or	1,1,1;							\
178362e7701SMichael Ellerman	/* Basic test, this section should all be nop'ed */		\
179362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
180362e7701SMichael Ellerman	or	2,2,2;							\
181362e7701SMichael Ellerman	or	2,2,2;							\
182362e7701SMichael Ellerman	or	2,2,2;							\
183362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 1)						\
184362e7701SMichael Ellerman	or	1,1,1;							\
185362e7701SMichael Ellerman	or	1,1,1;							\
186362e7701SMichael Ellerman	/* Basic test, this section should NOT be nop'ed */		\
187362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
188362e7701SMichael Ellerman	or	2,2,2;							\
189362e7701SMichael Ellerman	or	2,2,2;							\
190362e7701SMichael Ellerman	or	2,2,2;							\
191362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
192362e7701SMichael Ellerman	or	1,1,1;							\
193362e7701SMichael Ellerman	or	1,1,1;							\
194362e7701SMichael Ellerman	/* Nesting test, inner section should be nop'ed */		\
195362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
196362e7701SMichael Ellerman	or	2,2,2;							\
197362e7701SMichael Ellerman	or	2,2,2;							\
198362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(80)					\
199362e7701SMichael Ellerman	or	3,3,3;							\
200362e7701SMichael Ellerman	or	3,3,3;							\
201362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 80)					\
202362e7701SMichael Ellerman	or	2,2,2;							\
203362e7701SMichael Ellerman	or	2,2,2;							\
204362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
205362e7701SMichael Ellerman	or	1,1,1;							\
206362e7701SMichael Ellerman	or	1,1,1;							\
207362e7701SMichael Ellerman	/* Nesting test, whole section should be nop'ed */		\
208362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
209362e7701SMichael Ellerman	or	2,2,2;							\
210362e7701SMichael Ellerman	or	2,2,2;							\
211362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(80)					\
212362e7701SMichael Ellerman	or	3,3,3;							\
213362e7701SMichael Ellerman	or	3,3,3;							\
214362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 0, 80)					\
215362e7701SMichael Ellerman	or	2,2,2;							\
216362e7701SMichael Ellerman	or	2,2,2;							\
217362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 1)						\
218362e7701SMichael Ellerman	or	1,1,1;							\
219362e7701SMichael Ellerman	or	1,1,1;							\
220362e7701SMichael Ellerman	/* Nesting test, none should be nop'ed */			\
221362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
222362e7701SMichael Ellerman	or	2,2,2;							\
223362e7701SMichael Ellerman	or	2,2,2;							\
224362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(80)					\
225362e7701SMichael Ellerman	or	3,3,3;							\
226362e7701SMichael Ellerman	or	3,3,3;							\
227362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 0, 80)					\
228362e7701SMichael Ellerman	or	2,2,2;							\
229362e7701SMichael Ellerman	or	2,2,2;							\
230362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
231362e7701SMichael Ellerman	or	1,1,1;							\
232362e7701SMichael Ellerman	or	1,1,1;							\
233362e7701SMichael Ellerman	/* Basic alt section test, default case should be taken */	\
234362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
235362e7701SMichael Ellerman	or	3,3,3;							\
236362e7701SMichael Ellerman	or	3,3,3;							\
237362e7701SMichael Ellerman	or	3,3,3;							\
238362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
239362e7701SMichael Ellerman	or	5,5,5;							\
240362e7701SMichael Ellerman	or	5,5,5;							\
241362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
242362e7701SMichael Ellerman	or	1,1,1;							\
243362e7701SMichael Ellerman	or	1,1,1;							\
244362e7701SMichael Ellerman	/* Basic alt section test, else case should be taken */		\
245362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
246362e7701SMichael Ellerman	or	3,3,3;							\
247362e7701SMichael Ellerman	or	3,3,3;							\
248362e7701SMichael Ellerman	or	3,3,3;							\
249362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
250362e7701SMichael Ellerman	or	31,31,31;						\
251362e7701SMichael Ellerman	or	31,31,31;						\
252362e7701SMichael Ellerman	or	31,31,31;						\
253362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
254362e7701SMichael Ellerman	or	1,1,1;							\
255362e7701SMichael Ellerman	or	1,1,1;							\
256362e7701SMichael Ellerman	/* Alt with smaller else case, should be padded with nops */	\
257362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
258362e7701SMichael Ellerman	or	3,3,3;							\
259362e7701SMichael Ellerman	or	3,3,3;							\
260362e7701SMichael Ellerman	or	3,3,3;							\
261362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
262362e7701SMichael Ellerman	or	31,31,31;						\
263362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
264362e7701SMichael Ellerman	or	1,1,1;							\
265362e7701SMichael Ellerman	or	1,1,1;							\
266362e7701SMichael Ellerman	/* Alt section with nested section in default case */		\
267362e7701SMichael Ellerman	/* Default case should be taken, with nop'ed inner section */	\
268362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
269362e7701SMichael Ellerman	or	3,3,3;							\
270362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
271362e7701SMichael Ellerman	or	3,3,3;							\
272362e7701SMichael Ellerman	or	3,3,3;							\
273362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 95)					\
274362e7701SMichael Ellerman	or	3,3,3;							\
275362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
276362e7701SMichael Ellerman	or	2,2,2;							\
277362e7701SMichael Ellerman	or	2,2,2;							\
278362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
279362e7701SMichael Ellerman	or	1,1,1;							\
280362e7701SMichael Ellerman	or	1,1,1;							\
281362e7701SMichael Ellerman	/* Alt section with nested section in else, default taken */	\
282362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
283362e7701SMichael Ellerman	or	3,3,3;							\
284362e7701SMichael Ellerman	or	3,3,3;							\
285362e7701SMichael Ellerman	or	3,3,3;							\
286362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
287362e7701SMichael Ellerman	or	5,5,5;							\
288362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
289362e7701SMichael Ellerman	or	3,3,3;							\
290362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 95)					\
291362e7701SMichael Ellerman	or	5,5,5;							\
292362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
293362e7701SMichael Ellerman	or	1,1,1;							\
294362e7701SMichael Ellerman	or	1,1,1;							\
295362e7701SMichael Ellerman	/* Alt section with nested section in else, else taken & nop */	\
296362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
297362e7701SMichael Ellerman	or	3,3,3;							\
298362e7701SMichael Ellerman	or	3,3,3;							\
299362e7701SMichael Ellerman	or	3,3,3;							\
300362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
301362e7701SMichael Ellerman	or	5,5,5;							\
302362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
303362e7701SMichael Ellerman	or	3,3,3;							\
304362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 95)					\
305362e7701SMichael Ellerman	or	5,5,5;							\
306362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
307362e7701SMichael Ellerman	or	1,1,1;							\
308362e7701SMichael Ellerman	or	1,1,1;							\
309362e7701SMichael Ellerman	/* Feature section with nested alt section, default taken */	\
310362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
311362e7701SMichael Ellerman	or	2,2,2;							\
312362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
313362e7701SMichael Ellerman	or	1,1,1;							\
314362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
315362e7701SMichael Ellerman	or	5,5,5;							\
316362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 95)				\
317362e7701SMichael Ellerman	or	2,2,2;							\
318362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
319362e7701SMichael Ellerman	or	1,1,1;							\
320362e7701SMichael Ellerman	or	1,1,1;							\
321362e7701SMichael Ellerman	/* Feature section with nested alt section, else taken */	\
322362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
323362e7701SMichael Ellerman	or	2,2,2;							\
324362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
325362e7701SMichael Ellerman	or	1,1,1;							\
326362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
327362e7701SMichael Ellerman	or	5,5,5;							\
328362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95)				\
329362e7701SMichael Ellerman	or	2,2,2;							\
330362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0)						\
331362e7701SMichael Ellerman	or	1,1,1;							\
332362e7701SMichael Ellerman	or	1,1,1;							\
333362e7701SMichael Ellerman	/* Feature section with nested alt section, all nop'ed */	\
334362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
335362e7701SMichael Ellerman	or	2,2,2;							\
336362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
337362e7701SMichael Ellerman	or	1,1,1;							\
338362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
339362e7701SMichael Ellerman	or	5,5,5;							\
340362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 95)				\
341362e7701SMichael Ellerman	or	2,2,2;							\
342362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 1)						\
343362e7701SMichael Ellerman	or	1,1,1;							\
344362e7701SMichael Ellerman	or	1,1,1;							\
345362e7701SMichael Ellerman	/* Nested alt sections, default with inner default taken */	\
346362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
347362e7701SMichael Ellerman	or	2,2,2;							\
348362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
349362e7701SMichael Ellerman	or	1,1,1;							\
350362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
351362e7701SMichael Ellerman	or	5,5,5;							\
352362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 95)				\
353362e7701SMichael Ellerman	or	2,2,2;							\
354362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
355362e7701SMichael Ellerman	or	31,31,31;						\
356362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94)					\
357362e7701SMichael Ellerman	or	5,5,5;							\
358362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94)					\
359362e7701SMichael Ellerman	or	1,1,1;							\
360362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 94)				\
361362e7701SMichael Ellerman	or	31,31,31;						\
362362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
363362e7701SMichael Ellerman	or	1,1,1;							\
364362e7701SMichael Ellerman	or	1,1,1;							\
365362e7701SMichael Ellerman	/* Nested alt sections, default with inner else taken */	\
366362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
367362e7701SMichael Ellerman	or	2,2,2;							\
368362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
369362e7701SMichael Ellerman	or	1,1,1;							\
370362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
371362e7701SMichael Ellerman	or	5,5,5;							\
372362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95)				\
373362e7701SMichael Ellerman	or	2,2,2;							\
374362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
375362e7701SMichael Ellerman	or	31,31,31;						\
376362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94)					\
377362e7701SMichael Ellerman	or	5,5,5;							\
378362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94)					\
379362e7701SMichael Ellerman	or	1,1,1;							\
380362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 94)				\
381362e7701SMichael Ellerman	or	31,31,31;						\
382362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0)						\
383362e7701SMichael Ellerman	or	1,1,1;							\
384362e7701SMichael Ellerman	or	1,1,1;							\
385362e7701SMichael Ellerman	/* Nested alt sections, else with inner default taken */	\
386362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
387362e7701SMichael Ellerman	or	2,2,2;							\
388362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
389362e7701SMichael Ellerman	or	1,1,1;							\
390362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
391362e7701SMichael Ellerman	or	5,5,5;							\
392362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95)				\
393362e7701SMichael Ellerman	or	2,2,2;							\
394362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
395362e7701SMichael Ellerman	or	31,31,31;						\
396362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94)					\
397362e7701SMichael Ellerman	or	5,5,5;							\
398362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94)					\
399362e7701SMichael Ellerman	or	1,1,1;							\
400362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 94)				\
401362e7701SMichael Ellerman	or	31,31,31;						\
402362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
403362e7701SMichael Ellerman	or	1,1,1;							\
404362e7701SMichael Ellerman	or	1,1,1;							\
405362e7701SMichael Ellerman	/* Nested alt sections, else with inner else taken */		\
406362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
407362e7701SMichael Ellerman	or	2,2,2;							\
408362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95)					\
409362e7701SMichael Ellerman	or	1,1,1;							\
410362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95)					\
411362e7701SMichael Ellerman	or	5,5,5;							\
412362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95)				\
413362e7701SMichael Ellerman	or	2,2,2;							\
414362e7701SMichael Ellerman##TYPE##_SECTION_ELSE							\
415362e7701SMichael Ellerman	or	31,31,31;						\
416362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94)					\
417362e7701SMichael Ellerman	or	5,5,5;							\
418362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94)					\
419362e7701SMichael Ellerman	or	1,1,1;							\
420362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 94)				\
421362e7701SMichael Ellerman	or	31,31,31;						\
422362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
423362e7701SMichael Ellerman	or	1,1,1;							\
424362e7701SMichael Ellerman	or	1,1,1;							\
425362e7701SMichael Ellerman	/* Nested alt sections, else can have large else case */	\
426362e7701SMichael EllermanBEGIN_##TYPE##_SECTION							\
427362e7701SMichael Ellerman	or	2,2,2;							\
428362e7701SMichael Ellerman	or	2,2,2;							\
429362e7701SMichael Ellerman	or	2,2,2;							\
430362e7701SMichael Ellerman	or	2,2,2;							\
431362e7701SMichael Ellerman##TYPE##_SECTION_ELSE 							\
432362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94) 					\
433362e7701SMichael Ellerman	or	5,5,5;							\
434362e7701SMichael Ellerman	or	5,5,5;							\
435362e7701SMichael Ellerman	or	5,5,5;							\
436362e7701SMichael Ellerman	or	5,5,5;							\
437362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94) 					\
438362e7701SMichael Ellerman	or	1,1,1;							\
439362e7701SMichael Ellerman	or	1,1,1;							\
440362e7701SMichael Ellerman	or	1,1,1;							\
441362e7701SMichael Ellerman	or	1,1,1;							\
442362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 94)				\
443362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1)						\
444362e7701SMichael Ellerman	or	1,1,1;							\
445362e7701SMichael Ellerman	or	1,1,1;
446362e7701SMichael Ellerman
447362e7701SMichael Ellerman#define	MAKE_MACRO_TEST_EXPECTED(TYPE)					\
448362e7701SMichael Ellermanglobl(ftr_fixup_test_ ##TYPE##_macros_expected)				\
449362e7701SMichael Ellerman	or	1,1,1;							\
450362e7701SMichael Ellerman	/* Basic test, this section should all be nop'ed */		\
451362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
452362e7701SMichael Ellerman	nop;								\
453362e7701SMichael Ellerman	nop;								\
454362e7701SMichael Ellerman	nop;								\
455362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 1) */					\
456362e7701SMichael Ellerman	or	1,1,1;							\
457362e7701SMichael Ellerman	or	1,1,1;							\
458362e7701SMichael Ellerman	/* Basic test, this section should NOT be nop'ed */		\
459362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
460362e7701SMichael Ellerman	or	2,2,2;							\
461362e7701SMichael Ellerman	or	2,2,2;							\
462362e7701SMichael Ellerman	or	2,2,2;							\
463362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
464362e7701SMichael Ellerman	or	1,1,1;							\
465362e7701SMichael Ellerman	or	1,1,1;							\
466362e7701SMichael Ellerman	/* Nesting test, inner section should be nop'ed */		\
467362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
468362e7701SMichael Ellerman	or	2,2,2;							\
469362e7701SMichael Ellerman	or	2,2,2;							\
470362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(80) */					\
471362e7701SMichael Ellerman	nop;								\
472362e7701SMichael Ellerman	nop;								\
473362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 80) */				\
474362e7701SMichael Ellerman	or	2,2,2;							\
475362e7701SMichael Ellerman	or	2,2,2;							\
476362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
477362e7701SMichael Ellerman	or	1,1,1;							\
478362e7701SMichael Ellerman	or	1,1,1;							\
479362e7701SMichael Ellerman	/* Nesting test, whole section should be nop'ed */		\
480362e7701SMichael Ellerman	/* NB. inner section is not nop'ed, but then entire outer is */	\
481362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
482362e7701SMichael Ellerman	nop;								\
483362e7701SMichael Ellerman	nop;								\
484362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(80) */					\
485362e7701SMichael Ellerman	nop;								\
486362e7701SMichael Ellerman	nop;								\
487362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 0, 80) */				\
488362e7701SMichael Ellerman	nop;								\
489362e7701SMichael Ellerman	nop;								\
490362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 1) */					\
491362e7701SMichael Ellerman	or	1,1,1;							\
492362e7701SMichael Ellerman	or	1,1,1;							\
493362e7701SMichael Ellerman	/* Nesting test, none should be nop'ed */			\
494362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
495362e7701SMichael Ellerman	or	2,2,2;							\
496362e7701SMichael Ellerman	or	2,2,2;							\
497362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(80) */					\
498362e7701SMichael Ellerman	or	3,3,3;							\
499362e7701SMichael Ellerman	or	3,3,3;							\
500362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 0, 80) */				\
501362e7701SMichael Ellerman	or	2,2,2;							\
502362e7701SMichael Ellerman	or	2,2,2;							\
503362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
504362e7701SMichael Ellerman	or	1,1,1;							\
505362e7701SMichael Ellerman	or	1,1,1;							\
506362e7701SMichael Ellerman	/* Basic alt section test, default case should be taken */	\
507362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
508362e7701SMichael Ellerman	or	3,3,3;							\
509362e7701SMichael Ellerman	or	3,3,3;							\
510362e7701SMichael Ellerman	or	3,3,3;							\
511362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
512362e7701SMichael Ellerman	/* or	5,5,5; */						\
513362e7701SMichael Ellerman	/* or	5,5,5; */						\
514362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
515362e7701SMichael Ellerman	or	1,1,1;							\
516362e7701SMichael Ellerman	or	1,1,1;							\
517362e7701SMichael Ellerman	/* Basic alt section test, else case should be taken */		\
518362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
519362e7701SMichael Ellerman	/* or	3,3,3; */						\
520362e7701SMichael Ellerman	/* or	3,3,3; */						\
521362e7701SMichael Ellerman	/* or	3,3,3; */						\
522362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
523362e7701SMichael Ellerman	or	31,31,31;						\
524362e7701SMichael Ellerman	or	31,31,31;						\
525362e7701SMichael Ellerman	or	31,31,31;						\
526362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
527362e7701SMichael Ellerman	or	1,1,1;							\
528362e7701SMichael Ellerman	or	1,1,1;							\
529362e7701SMichael Ellerman	/* Alt with smaller else case, should be padded with nops */	\
530362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
531362e7701SMichael Ellerman	/* or	3,3,3; */						\
532362e7701SMichael Ellerman	/* or	3,3,3; */						\
533362e7701SMichael Ellerman	/* or	3,3,3; */						\
534362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
535362e7701SMichael Ellerman	or	31,31,31;						\
536362e7701SMichael Ellerman	nop;								\
537362e7701SMichael Ellerman	nop;								\
538362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
539362e7701SMichael Ellerman	or	1,1,1;							\
540362e7701SMichael Ellerman	or	1,1,1;							\
541362e7701SMichael Ellerman	/* Alt section with nested section in default case */		\
542362e7701SMichael Ellerman	/* Default case should be taken, with nop'ed inner section */	\
543362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
544362e7701SMichael Ellerman	or	3,3,3;							\
545362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
546362e7701SMichael Ellerman	nop;								\
547362e7701SMichael Ellerman	nop;								\
548362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */				\
549362e7701SMichael Ellerman	or	3,3,3;							\
550362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
551362e7701SMichael Ellerman	/* or	2,2,2; */						\
552362e7701SMichael Ellerman	/* or	2,2,2; */						\
553362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
554362e7701SMichael Ellerman	or	1,1,1;							\
555362e7701SMichael Ellerman	or	1,1,1;							\
556362e7701SMichael Ellerman	/* Alt section with nested section in else, default taken */	\
557362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
558362e7701SMichael Ellerman	or	3,3,3;							\
559362e7701SMichael Ellerman	or	3,3,3;							\
560362e7701SMichael Ellerman	or	3,3,3;							\
561362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
562362e7701SMichael Ellerman	/* or	5,5,5; */						\
563362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
564362e7701SMichael Ellerman	/* or	3,3,3; */						\
565362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */				\
566362e7701SMichael Ellerman	/* or	5,5,5; */						\
567362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
568362e7701SMichael Ellerman	or	1,1,1;							\
569362e7701SMichael Ellerman	or	1,1,1;							\
570362e7701SMichael Ellerman	/* Alt section with nested section in else, else taken & nop */	\
571362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
572362e7701SMichael Ellerman	/* or	3,3,3; */						\
573362e7701SMichael Ellerman	/* or	3,3,3; */						\
574362e7701SMichael Ellerman	/* or	3,3,3; */						\
575362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
576362e7701SMichael Ellerman	or	5,5,5;							\
577362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
578362e7701SMichael Ellerman	nop;								\
579362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */				\
580362e7701SMichael Ellerman	or	5,5,5;							\
581362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
582362e7701SMichael Ellerman	or	1,1,1;							\
583362e7701SMichael Ellerman	or	1,1,1;							\
584362e7701SMichael Ellerman	/* Feature section with nested alt section, default taken */	\
585362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
586362e7701SMichael Ellerman	or	2,2,2;							\
587362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
588362e7701SMichael Ellerman	or	1,1,1;							\
589362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
590362e7701SMichael Ellerman	/* or	5,5,5; */						\
591362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */				\
592362e7701SMichael Ellerman	or	2,2,2;							\
593362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
594362e7701SMichael Ellerman	or	1,1,1;							\
595362e7701SMichael Ellerman	or	1,1,1;							\
596362e7701SMichael Ellerman	/* Feature section with nested alt section, else taken */	\
597362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
598362e7701SMichael Ellerman	or	2,2,2;							\
599362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
600362e7701SMichael Ellerman	/* or	1,1,1; */						\
601362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
602362e7701SMichael Ellerman	or	5,5,5;							\
603362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */				\
604362e7701SMichael Ellerman	or	2,2,2;							\
605362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */					\
606362e7701SMichael Ellerman	or	1,1,1;							\
607362e7701SMichael Ellerman	or	1,1,1;							\
608362e7701SMichael Ellerman	/* Feature section with nested alt section, all nop'ed */	\
609362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
610362e7701SMichael Ellerman	nop;								\
611362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
612362e7701SMichael Ellerman	nop;								\
613362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
614362e7701SMichael Ellerman	/* or	5,5,5; */						\
615362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */				\
616362e7701SMichael Ellerman	nop;								\
617362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 1) */					\
618362e7701SMichael Ellerman	or	1,1,1;							\
619362e7701SMichael Ellerman	or	1,1,1;							\
620362e7701SMichael Ellerman	/* Nested alt sections, default with inner default taken */	\
621362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
622362e7701SMichael Ellerman	or	2,2,2;							\
623362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
624362e7701SMichael Ellerman	or	1,1,1;							\
625362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
626362e7701SMichael Ellerman	/* or	5,5,5; */						\
627362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */				\
628362e7701SMichael Ellerman	or	2,2,2;							\
629362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
630362e7701SMichael Ellerman	/* or	31,31,31; */						\
631362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
632362e7701SMichael Ellerman	/* or	5,5,5; */						\
633362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
634362e7701SMichael Ellerman	/* or	1,1,1; */						\
635362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */				\
636362e7701SMichael Ellerman	/* or	31,31,31; */						\
637362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
638362e7701SMichael Ellerman	or	1,1,1;							\
639362e7701SMichael Ellerman	or	1,1,1;							\
640362e7701SMichael Ellerman	/* Nested alt sections, default with inner else taken */	\
641362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
642362e7701SMichael Ellerman	or	2,2,2;							\
643362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
644362e7701SMichael Ellerman	/* or	1,1,1; */						\
645362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
646362e7701SMichael Ellerman	or	5,5,5;							\
647362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */				\
648362e7701SMichael Ellerman	or	2,2,2;							\
649362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
650362e7701SMichael Ellerman	/* or	31,31,31; */						\
651362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
652362e7701SMichael Ellerman	/* or	5,5,5; */						\
653362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
654362e7701SMichael Ellerman	/* or	1,1,1; */						\
655362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */				\
656362e7701SMichael Ellerman	/* or	31,31,31; */						\
657362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */					\
658362e7701SMichael Ellerman	or	1,1,1;							\
659362e7701SMichael Ellerman	or	1,1,1;							\
660362e7701SMichael Ellerman	/* Nested alt sections, else with inner default taken */	\
661362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
662362e7701SMichael Ellerman	/* or	2,2,2; */						\
663362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
664362e7701SMichael Ellerman	/* or	1,1,1; */						\
665362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
666362e7701SMichael Ellerman	/* or	5,5,5; */						\
667362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */				\
668362e7701SMichael Ellerman	/* or	2,2,2; */						\
669362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
670362e7701SMichael Ellerman	or	31,31,31;						\
671362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
672362e7701SMichael Ellerman	or	5,5,5;							\
673362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
674362e7701SMichael Ellerman	/* or	1,1,1; */						\
675362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */				\
676362e7701SMichael Ellerman	or	31,31,31;						\
677362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
678362e7701SMichael Ellerman	or	1,1,1;							\
679362e7701SMichael Ellerman	or	1,1,1;							\
680362e7701SMichael Ellerman	/* Nested alt sections, else with inner else taken */		\
681362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
682362e7701SMichael Ellerman	/* or	2,2,2; */						\
683362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */					\
684362e7701SMichael Ellerman	/* or	1,1,1; */						\
685362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */					\
686362e7701SMichael Ellerman	/* or	5,5,5; */						\
687362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */				\
688362e7701SMichael Ellerman	/* or	2,2,2; */						\
689362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
690362e7701SMichael Ellerman	or	31,31,31;						\
691362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
692362e7701SMichael Ellerman	/* or	5,5,5; */						\
693362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
694362e7701SMichael Ellerman	or	1,1,1;							\
695362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) */				\
696362e7701SMichael Ellerman	or	31,31,31;						\
697362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
698362e7701SMichael Ellerman	or	1,1,1;							\
699362e7701SMichael Ellerman	or	1,1,1;							\
700362e7701SMichael Ellerman	/* Nested alt sections, else can have large else case */	\
701362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */						\
702362e7701SMichael Ellerman	/* or	2,2,2; */						\
703362e7701SMichael Ellerman	/* or	2,2,2; */						\
704362e7701SMichael Ellerman	/* or	2,2,2; */						\
705362e7701SMichael Ellerman	/* or	2,2,2; */						\
706362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */						\
707362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */					\
708362e7701SMichael Ellerman	/* or	5,5,5; */						\
709362e7701SMichael Ellerman	/* or	5,5,5; */						\
710362e7701SMichael Ellerman	/* or	5,5,5; */						\
711362e7701SMichael Ellerman	/* or	5,5,5; */						\
712362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */					\
713362e7701SMichael Ellerman	or	1,1,1;							\
714362e7701SMichael Ellerman	or	1,1,1;							\
715362e7701SMichael Ellerman	or	1,1,1;							\
716362e7701SMichael Ellerman	or	1,1,1;							\
717362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) */				\
718362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */					\
719362e7701SMichael Ellerman	or	1,1,1;							\
720362e7701SMichael Ellerman	or	1,1,1;
721362e7701SMichael Ellerman
722362e7701SMichael EllermanMAKE_MACRO_TEST(FTR);
723362e7701SMichael EllermanMAKE_MACRO_TEST_EXPECTED(FTR);
724362e7701SMichael Ellerman
725362e7701SMichael Ellerman#ifdef CONFIG_PPC64
726362e7701SMichael EllermanMAKE_MACRO_TEST(FW_FTR);
727362e7701SMichael EllermanMAKE_MACRO_TEST_EXPECTED(FW_FTR);
728362e7701SMichael Ellerman#endif
7292d1b2027SKumar Gala
7302d1b2027SKumar Galaglobl(lwsync_fixup_test)
7312d1b2027SKumar Gala1:	or	1,1,1
7322d1b2027SKumar Gala	LWSYNC
7332d1b2027SKumar Galaglobl(end_lwsync_fixup_test)
7342d1b2027SKumar Gala
7352d1b2027SKumar Galaglobl(lwsync_fixup_test_expected_LWSYNC)
7362d1b2027SKumar Gala1:	or	1,1,1
7372d1b2027SKumar Gala	lwsync
7382d1b2027SKumar Gala
7392d1b2027SKumar Galaglobl(lwsync_fixup_test_expected_SYNC)
7402d1b2027SKumar Gala1:	or	1,1,1
7412d1b2027SKumar Gala	sync
7422d1b2027SKumar Gala
743