12874c5fdSThomas Gleixner/* SPDX-License-Identifier: GPL-2.0-or-later */ 2362e7701SMichael Ellerman/* 3362e7701SMichael Ellerman * Copyright 2008 Michael Ellerman, IBM Corporation. 4362e7701SMichael Ellerman */ 5362e7701SMichael Ellerman 6362e7701SMichael Ellerman#include <asm/feature-fixups.h> 7362e7701SMichael Ellerman#include <asm/ppc_asm.h> 82d1b2027SKumar Gala#include <asm/synch.h> 9ec0c464cSChristophe Leroy#include <asm/asm-compat.h> 10*785b79d1SJordan Niethe#include <asm/ppc-opcode.h> 11362e7701SMichael Ellerman 12362e7701SMichael Ellerman .text 13362e7701SMichael Ellerman 14362e7701SMichael Ellerman#define globl(x) \ 15362e7701SMichael Ellerman .globl x; \ 16362e7701SMichael Ellermanx: 17362e7701SMichael Ellerman 18362e7701SMichael Ellermanglobl(ftr_fixup_test1) 19362e7701SMichael Ellerman or 1,1,1 20362e7701SMichael Ellerman or 2,2,2 /* fixup will nop out this instruction */ 21362e7701SMichael Ellerman or 3,3,3 22362e7701SMichael Ellerman 23362e7701SMichael Ellermanglobl(end_ftr_fixup_test1) 24362e7701SMichael Ellerman 25362e7701SMichael Ellermanglobl(ftr_fixup_test1_orig) 26362e7701SMichael Ellerman or 1,1,1 27362e7701SMichael Ellerman or 2,2,2 28362e7701SMichael Ellerman or 3,3,3 29362e7701SMichael Ellerman 30362e7701SMichael Ellermanglobl(ftr_fixup_test1_expected) 31362e7701SMichael Ellerman or 1,1,1 32362e7701SMichael Ellerman nop 33362e7701SMichael Ellerman or 3,3,3 34362e7701SMichael Ellerman 35362e7701SMichael Ellermanglobl(ftr_fixup_test2) 36362e7701SMichael Ellerman or 1,1,1 37362e7701SMichael Ellerman or 2,2,2 /* fixup will replace this with ftr_fixup_test2_alt */ 38362e7701SMichael Ellerman or 3,3,3 39362e7701SMichael Ellerman 40362e7701SMichael Ellermanglobl(end_ftr_fixup_test2) 41362e7701SMichael Ellerman 42362e7701SMichael Ellermanglobl(ftr_fixup_test2_orig) 43362e7701SMichael Ellerman or 1,1,1 44362e7701SMichael Ellerman or 2,2,2 45362e7701SMichael Ellerman or 3,3,3 46362e7701SMichael Ellerman 47362e7701SMichael Ellermanglobl(ftr_fixup_test2_alt) 48362e7701SMichael Ellerman or 31,31,31 49362e7701SMichael Ellerman 50362e7701SMichael Ellermanglobl(ftr_fixup_test2_expected) 51362e7701SMichael Ellerman or 1,1,1 52362e7701SMichael Ellerman or 31,31,31 53362e7701SMichael Ellerman or 3,3,3 54362e7701SMichael Ellerman 55362e7701SMichael Ellermanglobl(ftr_fixup_test3) 56362e7701SMichael Ellerman or 1,1,1 57362e7701SMichael Ellerman or 2,2,2 /* fixup will fail to replace this */ 58362e7701SMichael Ellerman or 3,3,3 59362e7701SMichael Ellerman 60362e7701SMichael Ellermanglobl(end_ftr_fixup_test3) 61362e7701SMichael Ellerman 62362e7701SMichael Ellermanglobl(ftr_fixup_test3_orig) 63362e7701SMichael Ellerman or 1,1,1 64362e7701SMichael Ellerman or 2,2,2 65362e7701SMichael Ellerman or 3,3,3 66362e7701SMichael Ellerman 67362e7701SMichael Ellermanglobl(ftr_fixup_test3_alt) 68362e7701SMichael Ellerman or 31,31,31 69362e7701SMichael Ellerman or 31,31,31 70362e7701SMichael Ellerman 71362e7701SMichael Ellermanglobl(ftr_fixup_test4) 72362e7701SMichael Ellerman or 1,1,1 73362e7701SMichael Ellerman or 2,2,2 74362e7701SMichael Ellerman or 2,2,2 75362e7701SMichael Ellerman or 2,2,2 76362e7701SMichael Ellerman or 2,2,2 77362e7701SMichael Ellerman or 3,3,3 78362e7701SMichael Ellerman 79362e7701SMichael Ellermanglobl(end_ftr_fixup_test4) 80362e7701SMichael Ellerman 81362e7701SMichael Ellermanglobl(ftr_fixup_test4_expected) 82362e7701SMichael Ellerman or 1,1,1 83362e7701SMichael Ellerman or 31,31,31 84362e7701SMichael Ellerman or 31,31,31 85362e7701SMichael Ellerman nop 86362e7701SMichael Ellerman nop 87362e7701SMichael Ellerman or 3,3,3 88362e7701SMichael Ellerman 89362e7701SMichael Ellermanglobl(ftr_fixup_test4_orig) 90362e7701SMichael Ellerman or 1,1,1 91362e7701SMichael Ellerman or 2,2,2 92362e7701SMichael Ellerman or 2,2,2 93362e7701SMichael Ellerman or 2,2,2 94362e7701SMichael Ellerman or 2,2,2 95362e7701SMichael Ellerman or 3,3,3 96362e7701SMichael Ellerman 97362e7701SMichael Ellermanglobl(ftr_fixup_test4_alt) 98362e7701SMichael Ellerman or 31,31,31 99362e7701SMichael Ellerman or 31,31,31 100362e7701SMichael Ellerman 101362e7701SMichael Ellerman 102362e7701SMichael Ellermanglobl(ftr_fixup_test5) 103362e7701SMichael Ellerman or 1,1,1 104362e7701SMichael EllermanBEGIN_FTR_SECTION 105362e7701SMichael Ellerman or 2,2,2 106362e7701SMichael Ellerman or 2,2,2 107362e7701SMichael Ellerman or 2,2,2 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 EllermanFTR_SECTION_ELSE 113362e7701SMichael Ellerman2: b 3f 114362e7701SMichael Ellerman3: or 5,5,5 115362e7701SMichael Ellerman beq 3b 116362e7701SMichael Ellerman b 1f 117362e7701SMichael Ellerman or 6,6,6 118362e7701SMichael Ellerman b 2b 119362e7701SMichael Ellerman1: bdnz 3b 120362e7701SMichael EllermanALT_FTR_SECTION_END(0, 1) 121362e7701SMichael Ellerman or 1,1,1 122362e7701SMichael Ellerman 123362e7701SMichael Ellermanglobl(end_ftr_fixup_test5) 124362e7701SMichael Ellerman 125362e7701SMichael Ellermanglobl(ftr_fixup_test5_expected) 126362e7701SMichael Ellerman or 1,1,1 127362e7701SMichael Ellerman2: b 3f 128362e7701SMichael Ellerman3: or 5,5,5 129362e7701SMichael Ellerman beq 3b 130362e7701SMichael Ellerman b 1f 131362e7701SMichael Ellerman or 6,6,6 132362e7701SMichael Ellerman b 2b 133362e7701SMichael Ellerman1: bdnz 3b 134362e7701SMichael Ellerman or 1,1,1 135362e7701SMichael Ellerman 136362e7701SMichael Ellermanglobl(ftr_fixup_test6) 137362e7701SMichael Ellerman1: or 1,1,1 138362e7701SMichael EllermanBEGIN_FTR_SECTION 139362e7701SMichael Ellerman or 5,5,5 1405888da18SKumar Gala2: PPC_LCMPI r3,0 141362e7701SMichael Ellerman beq 4f 142362e7701SMichael Ellerman blt 2b 143362e7701SMichael Ellerman b 1b 144362e7701SMichael Ellerman b 4f 145362e7701SMichael EllermanFTR_SECTION_ELSE 146362e7701SMichael Ellerman2: or 2,2,2 1475888da18SKumar Gala PPC_LCMPI r3,1 148362e7701SMichael Ellerman beq 3f 149362e7701SMichael Ellerman blt 2b 150362e7701SMichael Ellerman b 3f 151362e7701SMichael Ellerman b 1b 152362e7701SMichael EllermanALT_FTR_SECTION_END(0, 1) 153362e7701SMichael Ellerman3: or 1,1,1 154362e7701SMichael Ellerman or 2,2,2 155362e7701SMichael Ellerman4: or 3,3,3 156362e7701SMichael Ellerman 157362e7701SMichael Ellermanglobl(end_ftr_fixup_test6) 158362e7701SMichael Ellerman 159362e7701SMichael Ellermanglobl(ftr_fixup_test6_expected) 160362e7701SMichael Ellerman1: or 1,1,1 161362e7701SMichael Ellerman2: or 2,2,2 1625888da18SKumar Gala PPC_LCMPI r3,1 163362e7701SMichael Ellerman beq 3f 164362e7701SMichael Ellerman blt 2b 165362e7701SMichael Ellerman b 3f 166362e7701SMichael Ellerman b 1b 16732810d91SMichael Ellerman3: or 1,1,1 168362e7701SMichael Ellerman or 2,2,2 16932810d91SMichael Ellerman or 3,3,3 170362e7701SMichael Ellerman 1716158faedSMichael Ellermanglobl(ftr_fixup_test7) 1726158faedSMichael Ellerman or 1,1,1 1736158faedSMichael EllermanBEGIN_FTR_SECTION 1746158faedSMichael Ellerman or 2,2,2 1756158faedSMichael Ellerman or 2,2,2 1766158faedSMichael Ellerman or 2,2,2 1776158faedSMichael Ellerman or 2,2,2 1786158faedSMichael Ellerman or 2,2,2 1796158faedSMichael Ellerman or 2,2,2 1806158faedSMichael Ellerman or 2,2,2 1816158faedSMichael EllermanFTR_SECTION_ELSE 1826158faedSMichael Ellerman2: b 3f 1836158faedSMichael Ellerman3: or 5,5,5 1846158faedSMichael Ellerman beq 3b 1856158faedSMichael Ellerman b 1f 1866158faedSMichael Ellerman or 6,6,6 1876158faedSMichael Ellerman b 2b 1886158faedSMichael Ellerman bdnz 3b 1896158faedSMichael Ellerman1: 1906158faedSMichael EllermanALT_FTR_SECTION_END(0, 1) 1916158faedSMichael Ellerman or 1,1,1 1926158faedSMichael Ellerman or 1,1,1 1936158faedSMichael Ellerman 1946158faedSMichael Ellermanglobl(end_ftr_fixup_test7) 1956158faedSMichael Ellerman nop 1966158faedSMichael Ellerman 1976158faedSMichael Ellermanglobl(ftr_fixup_test7_expected) 1986158faedSMichael Ellerman or 1,1,1 1996158faedSMichael Ellerman2: b 3f 2006158faedSMichael Ellerman3: or 5,5,5 2016158faedSMichael Ellerman beq 3b 2026158faedSMichael Ellerman b 1f 2036158faedSMichael Ellerman or 6,6,6 2046158faedSMichael Ellerman b 2b 2056158faedSMichael Ellerman bdnz 3b 2066158faedSMichael Ellerman1: or 1,1,1 207362e7701SMichael Ellerman 208c0337288SMichael Ellerman#if 0 209c0337288SMichael Ellerman/* Test that if we have a larger else case the assembler spots it and 210c0337288SMichael Ellerman * reports an error. #if 0'ed so as not to break the build normally. 211c0337288SMichael Ellerman */ 212b58e7987SMichael Ellermanftr_fixup_test_too_big: 213c0337288SMichael Ellerman or 1,1,1 214c0337288SMichael EllermanBEGIN_FTR_SECTION 215c0337288SMichael Ellerman or 2,2,2 216c0337288SMichael Ellerman or 2,2,2 217c0337288SMichael Ellerman or 2,2,2 218c0337288SMichael EllermanFTR_SECTION_ELSE 219c0337288SMichael Ellerman or 3,3,3 220c0337288SMichael Ellerman or 3,3,3 221c0337288SMichael Ellerman or 3,3,3 222c0337288SMichael Ellerman or 3,3,3 223c0337288SMichael EllermanALT_FTR_SECTION_END(0, 1) 224c0337288SMichael Ellerman or 1,1,1 225c0337288SMichael Ellerman#endif 226c0337288SMichael Ellerman 227362e7701SMichael Ellerman#define MAKE_MACRO_TEST(TYPE) \ 228362e7701SMichael Ellermanglobl(ftr_fixup_test_ ##TYPE##_macros) \ 229362e7701SMichael Ellerman or 1,1,1; \ 230362e7701SMichael Ellerman /* Basic test, this section should all be nop'ed */ \ 231362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 232362e7701SMichael Ellerman or 2,2,2; \ 233362e7701SMichael Ellerman or 2,2,2; \ 234362e7701SMichael Ellerman or 2,2,2; \ 235362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 1) \ 236362e7701SMichael Ellerman or 1,1,1; \ 237362e7701SMichael Ellerman or 1,1,1; \ 238362e7701SMichael Ellerman /* Basic test, this section should NOT be nop'ed */ \ 239362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 240362e7701SMichael Ellerman or 2,2,2; \ 241362e7701SMichael Ellerman or 2,2,2; \ 242362e7701SMichael Ellerman or 2,2,2; \ 243362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0) \ 244362e7701SMichael Ellerman or 1,1,1; \ 245362e7701SMichael Ellerman or 1,1,1; \ 246362e7701SMichael Ellerman /* Nesting test, inner section should be nop'ed */ \ 247362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 248362e7701SMichael Ellerman or 2,2,2; \ 249362e7701SMichael Ellerman or 2,2,2; \ 250362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(80) \ 251362e7701SMichael Ellerman or 3,3,3; \ 252362e7701SMichael Ellerman or 3,3,3; \ 253362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 80) \ 254362e7701SMichael Ellerman or 2,2,2; \ 255362e7701SMichael Ellerman or 2,2,2; \ 256362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0) \ 257362e7701SMichael Ellerman or 1,1,1; \ 258362e7701SMichael Ellerman or 1,1,1; \ 259362e7701SMichael Ellerman /* Nesting test, whole section should be nop'ed */ \ 260362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 261362e7701SMichael Ellerman or 2,2,2; \ 262362e7701SMichael Ellerman or 2,2,2; \ 263362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(80) \ 264362e7701SMichael Ellerman or 3,3,3; \ 265362e7701SMichael Ellerman or 3,3,3; \ 266362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 0, 80) \ 267362e7701SMichael Ellerman or 2,2,2; \ 268362e7701SMichael Ellerman or 2,2,2; \ 269362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 1) \ 270362e7701SMichael Ellerman or 1,1,1; \ 271362e7701SMichael Ellerman or 1,1,1; \ 272362e7701SMichael Ellerman /* Nesting test, none should be nop'ed */ \ 273362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 274362e7701SMichael Ellerman or 2,2,2; \ 275362e7701SMichael Ellerman or 2,2,2; \ 276362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(80) \ 277362e7701SMichael Ellerman or 3,3,3; \ 278362e7701SMichael Ellerman or 3,3,3; \ 279362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 0, 80) \ 280362e7701SMichael Ellerman or 2,2,2; \ 281362e7701SMichael Ellerman or 2,2,2; \ 282362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0) \ 283362e7701SMichael Ellerman or 1,1,1; \ 284362e7701SMichael Ellerman or 1,1,1; \ 285362e7701SMichael Ellerman /* Basic alt section test, default case should be taken */ \ 286362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 287362e7701SMichael Ellerman or 3,3,3; \ 288362e7701SMichael Ellerman or 3,3,3; \ 289362e7701SMichael Ellerman or 3,3,3; \ 290362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 291362e7701SMichael Ellerman or 5,5,5; \ 292362e7701SMichael Ellerman or 5,5,5; \ 293362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0) \ 294362e7701SMichael Ellerman or 1,1,1; \ 295362e7701SMichael Ellerman or 1,1,1; \ 296362e7701SMichael Ellerman /* Basic alt section test, else case should be taken */ \ 297362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 298362e7701SMichael Ellerman or 3,3,3; \ 299362e7701SMichael Ellerman or 3,3,3; \ 300362e7701SMichael Ellerman or 3,3,3; \ 301362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 302362e7701SMichael Ellerman or 31,31,31; \ 303362e7701SMichael Ellerman or 31,31,31; \ 304362e7701SMichael Ellerman or 31,31,31; \ 305362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1) \ 306362e7701SMichael Ellerman or 1,1,1; \ 307362e7701SMichael Ellerman or 1,1,1; \ 308362e7701SMichael Ellerman /* Alt with smaller else case, should be padded with nops */ \ 309362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 310362e7701SMichael Ellerman or 3,3,3; \ 311362e7701SMichael Ellerman or 3,3,3; \ 312362e7701SMichael Ellerman or 3,3,3; \ 313362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 314362e7701SMichael Ellerman or 31,31,31; \ 315362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1) \ 316362e7701SMichael Ellerman or 1,1,1; \ 317362e7701SMichael Ellerman or 1,1,1; \ 318362e7701SMichael Ellerman /* Alt section with nested section in default case */ \ 319362e7701SMichael Ellerman /* Default case should be taken, with nop'ed inner section */ \ 320362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 321362e7701SMichael Ellerman or 3,3,3; \ 322362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95) \ 323362e7701SMichael Ellerman or 3,3,3; \ 324362e7701SMichael Ellerman or 3,3,3; \ 325362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 95) \ 326362e7701SMichael Ellerman or 3,3,3; \ 327362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 328362e7701SMichael Ellerman or 2,2,2; \ 329362e7701SMichael Ellerman or 2,2,2; \ 330362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0) \ 331362e7701SMichael Ellerman or 1,1,1; \ 332362e7701SMichael Ellerman or 1,1,1; \ 333362e7701SMichael Ellerman /* Alt section with nested section in else, default taken */ \ 334362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 335362e7701SMichael Ellerman or 3,3,3; \ 336362e7701SMichael Ellerman or 3,3,3; \ 337362e7701SMichael Ellerman or 3,3,3; \ 338362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 339362e7701SMichael Ellerman or 5,5,5; \ 340362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95) \ 341362e7701SMichael Ellerman or 3,3,3; \ 342362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 95) \ 343362e7701SMichael Ellerman or 5,5,5; \ 344362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0) \ 345362e7701SMichael Ellerman or 1,1,1; \ 346362e7701SMichael Ellerman or 1,1,1; \ 347362e7701SMichael Ellerman /* Alt section with nested section in else, else taken & nop */ \ 348362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 349362e7701SMichael Ellerman or 3,3,3; \ 350362e7701SMichael Ellerman or 3,3,3; \ 351362e7701SMichael Ellerman or 3,3,3; \ 352362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 353362e7701SMichael Ellerman or 5,5,5; \ 354362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95) \ 355362e7701SMichael Ellerman or 3,3,3; \ 356362e7701SMichael EllermanEND_##TYPE##_SECTION_NESTED(0, 1, 95) \ 357362e7701SMichael Ellerman or 5,5,5; \ 358362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1) \ 359362e7701SMichael Ellerman or 1,1,1; \ 360362e7701SMichael Ellerman or 1,1,1; \ 361362e7701SMichael Ellerman /* Feature section with nested alt section, default taken */ \ 362362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 363362e7701SMichael Ellerman or 2,2,2; \ 364362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95) \ 365362e7701SMichael Ellerman or 1,1,1; \ 366362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95) \ 367362e7701SMichael Ellerman or 5,5,5; \ 368362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) \ 369362e7701SMichael Ellerman or 2,2,2; \ 370362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0) \ 371362e7701SMichael Ellerman or 1,1,1; \ 372362e7701SMichael Ellerman or 1,1,1; \ 373362e7701SMichael Ellerman /* Feature section with nested alt section, else taken */ \ 374362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 375362e7701SMichael Ellerman or 2,2,2; \ 376362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95) \ 377362e7701SMichael Ellerman or 1,1,1; \ 378362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95) \ 379362e7701SMichael Ellerman or 5,5,5; \ 380362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) \ 381362e7701SMichael Ellerman or 2,2,2; \ 382362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 0) \ 383362e7701SMichael Ellerman or 1,1,1; \ 384362e7701SMichael Ellerman or 1,1,1; \ 385362e7701SMichael Ellerman /* Feature section with nested alt section, all nop'ed */ \ 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, 0, 95) \ 393362e7701SMichael Ellerman or 2,2,2; \ 394362e7701SMichael EllermanEND_##TYPE##_SECTION(0, 1) \ 395362e7701SMichael Ellerman or 1,1,1; \ 396362e7701SMichael Ellerman or 1,1,1; \ 397362e7701SMichael Ellerman /* Nested alt sections, default with inner default taken */ \ 398362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 399362e7701SMichael Ellerman or 2,2,2; \ 400362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95) \ 401362e7701SMichael Ellerman or 1,1,1; \ 402362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95) \ 403362e7701SMichael Ellerman or 5,5,5; \ 404362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) \ 405362e7701SMichael Ellerman or 2,2,2; \ 406362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 407362e7701SMichael Ellerman or 31,31,31; \ 408362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94) \ 409362e7701SMichael Ellerman or 5,5,5; \ 410362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94) \ 411362e7701SMichael Ellerman or 1,1,1; \ 412362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) \ 413362e7701SMichael Ellerman or 31,31,31; \ 414362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0) \ 415362e7701SMichael Ellerman or 1,1,1; \ 416362e7701SMichael Ellerman or 1,1,1; \ 417362e7701SMichael Ellerman /* Nested alt sections, default with inner else taken */ \ 418362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 419362e7701SMichael Ellerman or 2,2,2; \ 420362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95) \ 421362e7701SMichael Ellerman or 1,1,1; \ 422362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95) \ 423362e7701SMichael Ellerman or 5,5,5; \ 424362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) \ 425362e7701SMichael Ellerman or 2,2,2; \ 426362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 427362e7701SMichael Ellerman or 31,31,31; \ 428362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94) \ 429362e7701SMichael Ellerman or 5,5,5; \ 430362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94) \ 431362e7701SMichael Ellerman or 1,1,1; \ 432362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) \ 433362e7701SMichael Ellerman or 31,31,31; \ 434362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 0) \ 435362e7701SMichael Ellerman or 1,1,1; \ 436362e7701SMichael Ellerman or 1,1,1; \ 437362e7701SMichael Ellerman /* Nested alt sections, else with inner default taken */ \ 438362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 439362e7701SMichael Ellerman or 2,2,2; \ 440362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95) \ 441362e7701SMichael Ellerman or 1,1,1; \ 442362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95) \ 443362e7701SMichael Ellerman or 5,5,5; \ 444362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) \ 445362e7701SMichael Ellerman or 2,2,2; \ 446362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 447362e7701SMichael Ellerman or 31,31,31; \ 448362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94) \ 449362e7701SMichael Ellerman or 5,5,5; \ 450362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94) \ 451362e7701SMichael Ellerman or 1,1,1; \ 452362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) \ 453362e7701SMichael Ellerman or 31,31,31; \ 454362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1) \ 455362e7701SMichael Ellerman or 1,1,1; \ 456362e7701SMichael Ellerman or 1,1,1; \ 457362e7701SMichael Ellerman /* Nested alt sections, else with inner else taken */ \ 458362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 459362e7701SMichael Ellerman or 2,2,2; \ 460362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(95) \ 461362e7701SMichael Ellerman or 1,1,1; \ 462362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(95) \ 463362e7701SMichael Ellerman or 5,5,5; \ 464362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) \ 465362e7701SMichael Ellerman or 2,2,2; \ 466362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 467362e7701SMichael Ellerman or 31,31,31; \ 468362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94) \ 469362e7701SMichael Ellerman or 5,5,5; \ 470362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94) \ 471362e7701SMichael Ellerman or 1,1,1; \ 472362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) \ 473362e7701SMichael Ellerman or 31,31,31; \ 474362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1) \ 475362e7701SMichael Ellerman or 1,1,1; \ 476362e7701SMichael Ellerman or 1,1,1; \ 477362e7701SMichael Ellerman /* Nested alt sections, else can have large else case */ \ 478362e7701SMichael EllermanBEGIN_##TYPE##_SECTION \ 479362e7701SMichael Ellerman or 2,2,2; \ 480362e7701SMichael Ellerman or 2,2,2; \ 481362e7701SMichael Ellerman or 2,2,2; \ 482362e7701SMichael Ellerman or 2,2,2; \ 483362e7701SMichael Ellerman##TYPE##_SECTION_ELSE \ 484362e7701SMichael EllermanBEGIN_##TYPE##_SECTION_NESTED(94) \ 485362e7701SMichael Ellerman or 5,5,5; \ 486362e7701SMichael Ellerman or 5,5,5; \ 487362e7701SMichael Ellerman or 5,5,5; \ 488362e7701SMichael Ellerman or 5,5,5; \ 489362e7701SMichael Ellerman##TYPE##_SECTION_ELSE_NESTED(94) \ 490362e7701SMichael Ellerman or 1,1,1; \ 491362e7701SMichael Ellerman or 1,1,1; \ 492362e7701SMichael Ellerman or 1,1,1; \ 493362e7701SMichael Ellerman or 1,1,1; \ 494362e7701SMichael EllermanALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) \ 495362e7701SMichael EllermanALT_##TYPE##_SECTION_END(0, 1) \ 496362e7701SMichael Ellerman or 1,1,1; \ 497362e7701SMichael Ellerman or 1,1,1; 498362e7701SMichael Ellerman 499362e7701SMichael Ellerman#define MAKE_MACRO_TEST_EXPECTED(TYPE) \ 500362e7701SMichael Ellermanglobl(ftr_fixup_test_ ##TYPE##_macros_expected) \ 501362e7701SMichael Ellerman or 1,1,1; \ 502362e7701SMichael Ellerman /* Basic test, this section should all be nop'ed */ \ 503362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 504362e7701SMichael Ellerman nop; \ 505362e7701SMichael Ellerman nop; \ 506362e7701SMichael Ellerman nop; \ 507362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 1) */ \ 508362e7701SMichael Ellerman or 1,1,1; \ 509362e7701SMichael Ellerman or 1,1,1; \ 510362e7701SMichael Ellerman /* Basic test, this section should NOT be nop'ed */ \ 511362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 512362e7701SMichael Ellerman or 2,2,2; \ 513362e7701SMichael Ellerman or 2,2,2; \ 514362e7701SMichael Ellerman or 2,2,2; \ 515362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */ \ 516362e7701SMichael Ellerman or 1,1,1; \ 517362e7701SMichael Ellerman or 1,1,1; \ 518362e7701SMichael Ellerman /* Nesting test, inner section should be nop'ed */ \ 519362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 520362e7701SMichael Ellerman or 2,2,2; \ 521362e7701SMichael Ellerman or 2,2,2; \ 522362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(80) */ \ 523362e7701SMichael Ellerman nop; \ 524362e7701SMichael Ellerman nop; \ 525362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 80) */ \ 526362e7701SMichael Ellerman or 2,2,2; \ 527362e7701SMichael Ellerman or 2,2,2; \ 528362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */ \ 529362e7701SMichael Ellerman or 1,1,1; \ 530362e7701SMichael Ellerman or 1,1,1; \ 531362e7701SMichael Ellerman /* Nesting test, whole section should be nop'ed */ \ 532362e7701SMichael Ellerman /* NB. inner section is not nop'ed, but then entire outer is */ \ 533362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 534362e7701SMichael Ellerman nop; \ 535362e7701SMichael Ellerman nop; \ 536362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(80) */ \ 537362e7701SMichael Ellerman nop; \ 538362e7701SMichael Ellerman nop; \ 539362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 0, 80) */ \ 540362e7701SMichael Ellerman nop; \ 541362e7701SMichael Ellerman nop; \ 542362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 1) */ \ 543362e7701SMichael Ellerman or 1,1,1; \ 544362e7701SMichael Ellerman or 1,1,1; \ 545362e7701SMichael Ellerman /* Nesting test, none should be nop'ed */ \ 546362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 547362e7701SMichael Ellerman or 2,2,2; \ 548362e7701SMichael Ellerman or 2,2,2; \ 549362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(80) */ \ 550362e7701SMichael Ellerman or 3,3,3; \ 551362e7701SMichael Ellerman or 3,3,3; \ 552362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 0, 80) */ \ 553362e7701SMichael Ellerman or 2,2,2; \ 554362e7701SMichael Ellerman or 2,2,2; \ 555362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */ \ 556362e7701SMichael Ellerman or 1,1,1; \ 557362e7701SMichael Ellerman or 1,1,1; \ 558362e7701SMichael Ellerman /* Basic alt section test, default case should be taken */ \ 559362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 560362e7701SMichael Ellerman or 3,3,3; \ 561362e7701SMichael Ellerman or 3,3,3; \ 562362e7701SMichael Ellerman or 3,3,3; \ 563362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 564362e7701SMichael Ellerman /* or 5,5,5; */ \ 565362e7701SMichael Ellerman /* or 5,5,5; */ \ 566362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */ \ 567362e7701SMichael Ellerman or 1,1,1; \ 568362e7701SMichael Ellerman or 1,1,1; \ 569362e7701SMichael Ellerman /* Basic alt section test, else case should be taken */ \ 570362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 571362e7701SMichael Ellerman /* or 3,3,3; */ \ 572362e7701SMichael Ellerman /* or 3,3,3; */ \ 573362e7701SMichael Ellerman /* or 3,3,3; */ \ 574362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 575362e7701SMichael Ellerman or 31,31,31; \ 576362e7701SMichael Ellerman or 31,31,31; \ 577362e7701SMichael Ellerman or 31,31,31; \ 578362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */ \ 579362e7701SMichael Ellerman or 1,1,1; \ 580362e7701SMichael Ellerman or 1,1,1; \ 581362e7701SMichael Ellerman /* Alt with smaller else case, should be padded with nops */ \ 582362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 583362e7701SMichael Ellerman /* or 3,3,3; */ \ 584362e7701SMichael Ellerman /* or 3,3,3; */ \ 585362e7701SMichael Ellerman /* or 3,3,3; */ \ 586362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 587362e7701SMichael Ellerman or 31,31,31; \ 588362e7701SMichael Ellerman nop; \ 589362e7701SMichael Ellerman nop; \ 590362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */ \ 591362e7701SMichael Ellerman or 1,1,1; \ 592362e7701SMichael Ellerman or 1,1,1; \ 593362e7701SMichael Ellerman /* Alt section with nested section in default case */ \ 594362e7701SMichael Ellerman /* Default case should be taken, with nop'ed inner section */ \ 595362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 596362e7701SMichael Ellerman or 3,3,3; \ 597362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 598362e7701SMichael Ellerman nop; \ 599362e7701SMichael Ellerman nop; \ 600362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */ \ 601362e7701SMichael Ellerman or 3,3,3; \ 602362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 603362e7701SMichael Ellerman /* or 2,2,2; */ \ 604362e7701SMichael Ellerman /* or 2,2,2; */ \ 605362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */ \ 606362e7701SMichael Ellerman or 1,1,1; \ 607362e7701SMichael Ellerman or 1,1,1; \ 608362e7701SMichael Ellerman /* Alt section with nested section in else, default taken */ \ 609362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 610362e7701SMichael Ellerman or 3,3,3; \ 611362e7701SMichael Ellerman or 3,3,3; \ 612362e7701SMichael Ellerman or 3,3,3; \ 613362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 614362e7701SMichael Ellerman /* or 5,5,5; */ \ 615362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 616362e7701SMichael Ellerman /* or 3,3,3; */ \ 617362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */ \ 618362e7701SMichael Ellerman /* or 5,5,5; */ \ 619362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */ \ 620362e7701SMichael Ellerman or 1,1,1; \ 621362e7701SMichael Ellerman or 1,1,1; \ 622362e7701SMichael Ellerman /* Alt section with nested section in else, else taken & nop */ \ 623362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 624362e7701SMichael Ellerman /* or 3,3,3; */ \ 625362e7701SMichael Ellerman /* or 3,3,3; */ \ 626362e7701SMichael Ellerman /* or 3,3,3; */ \ 627362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 628362e7701SMichael Ellerman or 5,5,5; \ 629362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 630362e7701SMichael Ellerman nop; \ 631362e7701SMichael Ellerman/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */ \ 632362e7701SMichael Ellerman or 5,5,5; \ 633362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */ \ 634362e7701SMichael Ellerman or 1,1,1; \ 635362e7701SMichael Ellerman or 1,1,1; \ 636362e7701SMichael Ellerman /* Feature section with nested alt section, default taken */ \ 637362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 638362e7701SMichael Ellerman or 2,2,2; \ 639362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 640362e7701SMichael Ellerman or 1,1,1; \ 641362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \ 642362e7701SMichael Ellerman /* or 5,5,5; */ \ 643362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */ \ 644362e7701SMichael Ellerman or 2,2,2; \ 645362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */ \ 646362e7701SMichael Ellerman or 1,1,1; \ 647362e7701SMichael Ellerman or 1,1,1; \ 648362e7701SMichael Ellerman /* Feature section with nested alt section, else taken */ \ 649362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 650362e7701SMichael Ellerman or 2,2,2; \ 651362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 652362e7701SMichael Ellerman /* or 1,1,1; */ \ 653362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \ 654362e7701SMichael Ellerman or 5,5,5; \ 655362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */ \ 656362e7701SMichael Ellerman or 2,2,2; \ 657362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 0) */ \ 658362e7701SMichael Ellerman or 1,1,1; \ 659362e7701SMichael Ellerman or 1,1,1; \ 660362e7701SMichael Ellerman /* Feature section with nested alt section, all nop'ed */ \ 661362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 662362e7701SMichael Ellerman nop; \ 663362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 664362e7701SMichael Ellerman nop; \ 665362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \ 666362e7701SMichael Ellerman /* or 5,5,5; */ \ 667362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */ \ 668362e7701SMichael Ellerman nop; \ 669362e7701SMichael Ellerman/* END_##TYPE##_SECTION(0, 1) */ \ 670362e7701SMichael Ellerman or 1,1,1; \ 671362e7701SMichael Ellerman or 1,1,1; \ 672362e7701SMichael Ellerman /* Nested alt sections, default with inner default taken */ \ 673362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 674362e7701SMichael Ellerman or 2,2,2; \ 675362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 676362e7701SMichael Ellerman or 1,1,1; \ 677362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \ 678362e7701SMichael Ellerman /* or 5,5,5; */ \ 679362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */ \ 680362e7701SMichael Ellerman or 2,2,2; \ 681362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 682362e7701SMichael Ellerman /* or 31,31,31; */ \ 683362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \ 684362e7701SMichael Ellerman /* or 5,5,5; */ \ 685362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \ 686362e7701SMichael Ellerman /* or 1,1,1; */ \ 687362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */ \ 688362e7701SMichael Ellerman /* or 31,31,31; */ \ 689362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */ \ 690362e7701SMichael Ellerman or 1,1,1; \ 691362e7701SMichael Ellerman or 1,1,1; \ 692362e7701SMichael Ellerman /* Nested alt sections, default with inner else taken */ \ 693362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 694362e7701SMichael Ellerman or 2,2,2; \ 695362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 696362e7701SMichael Ellerman /* or 1,1,1; */ \ 697362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \ 698362e7701SMichael Ellerman or 5,5,5; \ 699362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */ \ 700362e7701SMichael Ellerman or 2,2,2; \ 701362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 702362e7701SMichael Ellerman /* or 31,31,31; */ \ 703362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \ 704362e7701SMichael Ellerman /* or 5,5,5; */ \ 705362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \ 706362e7701SMichael Ellerman /* or 1,1,1; */ \ 707362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */ \ 708362e7701SMichael Ellerman /* or 31,31,31; */ \ 709362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 0) */ \ 710362e7701SMichael Ellerman or 1,1,1; \ 711362e7701SMichael Ellerman or 1,1,1; \ 712362e7701SMichael Ellerman /* Nested alt sections, else with inner default taken */ \ 713362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 714362e7701SMichael Ellerman /* or 2,2,2; */ \ 715362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 716362e7701SMichael Ellerman /* or 1,1,1; */ \ 717362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \ 718362e7701SMichael Ellerman /* or 5,5,5; */ \ 719362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */ \ 720362e7701SMichael Ellerman /* or 2,2,2; */ \ 721362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 722362e7701SMichael Ellerman or 31,31,31; \ 723362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \ 724362e7701SMichael Ellerman or 5,5,5; \ 725362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \ 726362e7701SMichael Ellerman /* or 1,1,1; */ \ 727362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */ \ 728362e7701SMichael Ellerman or 31,31,31; \ 729362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */ \ 730362e7701SMichael Ellerman or 1,1,1; \ 731362e7701SMichael Ellerman or 1,1,1; \ 732362e7701SMichael Ellerman /* Nested alt sections, else with inner else taken */ \ 733362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 734362e7701SMichael Ellerman /* or 2,2,2; */ \ 735362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \ 736362e7701SMichael Ellerman /* or 1,1,1; */ \ 737362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \ 738362e7701SMichael Ellerman /* or 5,5,5; */ \ 739362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */ \ 740362e7701SMichael Ellerman /* or 2,2,2; */ \ 741362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 742362e7701SMichael Ellerman or 31,31,31; \ 743362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \ 744362e7701SMichael Ellerman /* or 5,5,5; */ \ 745362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \ 746362e7701SMichael Ellerman or 1,1,1; \ 747362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) */ \ 748362e7701SMichael Ellerman or 31,31,31; \ 749362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */ \ 750362e7701SMichael Ellerman or 1,1,1; \ 751362e7701SMichael Ellerman or 1,1,1; \ 752362e7701SMichael Ellerman /* Nested alt sections, else can have large else case */ \ 753362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION */ \ 754362e7701SMichael Ellerman /* or 2,2,2; */ \ 755362e7701SMichael Ellerman /* or 2,2,2; */ \ 756362e7701SMichael Ellerman /* or 2,2,2; */ \ 757362e7701SMichael Ellerman /* or 2,2,2; */ \ 758362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE */ \ 759362e7701SMichael Ellerman/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \ 760362e7701SMichael Ellerman /* or 5,5,5; */ \ 761362e7701SMichael Ellerman /* or 5,5,5; */ \ 762362e7701SMichael Ellerman /* or 5,5,5; */ \ 763362e7701SMichael Ellerman /* or 5,5,5; */ \ 764362e7701SMichael Ellerman/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \ 765362e7701SMichael Ellerman or 1,1,1; \ 766362e7701SMichael Ellerman or 1,1,1; \ 767362e7701SMichael Ellerman or 1,1,1; \ 768362e7701SMichael Ellerman or 1,1,1; \ 769362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) */ \ 770362e7701SMichael Ellerman/* ALT_##TYPE##_SECTION_END(0, 1) */ \ 771362e7701SMichael Ellerman or 1,1,1; \ 772362e7701SMichael Ellerman or 1,1,1; 773362e7701SMichael Ellerman 774362e7701SMichael EllermanMAKE_MACRO_TEST(FTR); 775362e7701SMichael EllermanMAKE_MACRO_TEST_EXPECTED(FTR); 776362e7701SMichael Ellerman 777362e7701SMichael Ellerman#ifdef CONFIG_PPC64 778362e7701SMichael EllermanMAKE_MACRO_TEST(FW_FTR); 779362e7701SMichael EllermanMAKE_MACRO_TEST_EXPECTED(FW_FTR); 780362e7701SMichael Ellerman#endif 7812d1b2027SKumar Gala 7822d1b2027SKumar Galaglobl(lwsync_fixup_test) 7832d1b2027SKumar Gala1: or 1,1,1 7842d1b2027SKumar Gala LWSYNC 7852d1b2027SKumar Galaglobl(end_lwsync_fixup_test) 7862d1b2027SKumar Gala 7872d1b2027SKumar Galaglobl(lwsync_fixup_test_expected_LWSYNC) 7882d1b2027SKumar Gala1: or 1,1,1 7892d1b2027SKumar Gala lwsync 7902d1b2027SKumar Gala 7912d1b2027SKumar Galaglobl(lwsync_fixup_test_expected_SYNC) 7922d1b2027SKumar Gala1: or 1,1,1 7932d1b2027SKumar Gala sync 7942d1b2027SKumar Gala 795*785b79d1SJordan Nietheglobl(ftr_fixup_prefix1) 796*785b79d1SJordan Niethe or 1,1,1 797*785b79d1SJordan Niethe .long OP_PREFIX << 26 798*785b79d1SJordan Niethe .long 0x0000000 799*785b79d1SJordan Niethe or 2,2,2 800*785b79d1SJordan Nietheglobl(end_ftr_fixup_prefix1) 801*785b79d1SJordan Niethe 802*785b79d1SJordan Nietheglobl(ftr_fixup_prefix1_orig) 803*785b79d1SJordan Niethe or 1,1,1 804*785b79d1SJordan Niethe .long OP_PREFIX << 26 805*785b79d1SJordan Niethe .long 0x0000000 806*785b79d1SJordan Niethe or 2,2,2 807*785b79d1SJordan Niethe 808*785b79d1SJordan Nietheglobl(ftr_fixup_prefix1_expected) 809*785b79d1SJordan Niethe or 1,1,1 810*785b79d1SJordan Niethe nop 811*785b79d1SJordan Niethe nop 812*785b79d1SJordan Niethe or 2,2,2 813*785b79d1SJordan Niethe 814*785b79d1SJordan Nietheglobl(ftr_fixup_prefix2) 815*785b79d1SJordan Niethe or 1,1,1 816*785b79d1SJordan Niethe .long OP_PREFIX << 26 817*785b79d1SJordan Niethe .long 0x0000000 818*785b79d1SJordan Niethe or 2,2,2 819*785b79d1SJordan Nietheglobl(end_ftr_fixup_prefix2) 820*785b79d1SJordan Niethe 821*785b79d1SJordan Nietheglobl(ftr_fixup_prefix2_orig) 822*785b79d1SJordan Niethe or 1,1,1 823*785b79d1SJordan Niethe .long OP_PREFIX << 26 824*785b79d1SJordan Niethe .long 0x0000000 825*785b79d1SJordan Niethe or 2,2,2 826*785b79d1SJordan Niethe 827*785b79d1SJordan Nietheglobl(ftr_fixup_prefix2_alt) 828*785b79d1SJordan Niethe .long OP_PREFIX << 26 829*785b79d1SJordan Niethe .long 0x0000001 830*785b79d1SJordan Niethe 831*785b79d1SJordan Nietheglobl(ftr_fixup_prefix2_expected) 832*785b79d1SJordan Niethe or 1,1,1 833*785b79d1SJordan Niethe .long OP_PREFIX << 26 834*785b79d1SJordan Niethe .long 0x0000001 835*785b79d1SJordan Niethe or 2,2,2 836*785b79d1SJordan Niethe 837*785b79d1SJordan Nietheglobl(ftr_fixup_prefix3) 838*785b79d1SJordan Niethe or 1,1,1 839*785b79d1SJordan Niethe .long OP_PREFIX << 26 840*785b79d1SJordan Niethe .long 0x0000000 841*785b79d1SJordan Niethe or 2,2,2 842*785b79d1SJordan Niethe or 3,3,3 843*785b79d1SJordan Nietheglobl(end_ftr_fixup_prefix3) 844*785b79d1SJordan Niethe 845*785b79d1SJordan Nietheglobl(ftr_fixup_prefix3_orig) 846*785b79d1SJordan Niethe or 1,1,1 847*785b79d1SJordan Niethe .long OP_PREFIX << 26 848*785b79d1SJordan Niethe .long 0x0000000 849*785b79d1SJordan Niethe or 2,2,2 850*785b79d1SJordan Niethe or 3,3,3 851*785b79d1SJordan Niethe 852*785b79d1SJordan Nietheglobl(ftr_fixup_prefix3_alt) 853*785b79d1SJordan Niethe .long OP_PREFIX << 26 854*785b79d1SJordan Niethe .long 0x0000001 855*785b79d1SJordan Niethe nop 856*785b79d1SJordan Niethe 857*785b79d1SJordan Nietheglobl(ftr_fixup_prefix3_expected) 858*785b79d1SJordan Niethe or 1,1,1 859*785b79d1SJordan Niethe .long OP_PREFIX << 26 860*785b79d1SJordan Niethe .long 0x0000001 861*785b79d1SJordan Niethe nop 862*785b79d1SJordan Niethe or 3,3,3 863