Path: blob/master/arch/powerpc/lib/feature-fixups-test.S
26424 views
/* SPDX-License-Identifier: GPL-2.0-or-later */1/*2* Copyright 2008 Michael Ellerman, IBM Corporation.3*/45#include <asm/feature-fixups.h>6#include <asm/ppc_asm.h>7#include <asm/synch.h>8#include <asm/asm-compat.h>9#include <asm/ppc-opcode.h>1011.text1213#define globl(x) \14.globl x; \15x:1617globl(ftr_fixup_test1)18or 1,1,119or 2,2,2 /* fixup will nop out this instruction */20or 3,3,32122globl(end_ftr_fixup_test1)2324globl(ftr_fixup_test1_orig)25or 1,1,126or 2,2,227or 3,3,32829globl(ftr_fixup_test1_expected)30or 1,1,131nop32or 3,3,33334globl(ftr_fixup_test2)35or 1,1,136or 2,2,2 /* fixup will replace this with ftr_fixup_test2_alt */37or 3,3,33839globl(end_ftr_fixup_test2)4041globl(ftr_fixup_test2_orig)42or 1,1,143or 2,2,244or 3,3,34546globl(ftr_fixup_test2_alt)47or 31,31,314849globl(ftr_fixup_test2_expected)50or 1,1,151or 31,31,3152or 3,3,35354globl(ftr_fixup_test3)55or 1,1,156or 2,2,2 /* fixup will fail to replace this */57or 3,3,35859globl(end_ftr_fixup_test3)6061globl(ftr_fixup_test3_orig)62or 1,1,163or 2,2,264or 3,3,36566globl(ftr_fixup_test3_alt)67or 31,31,3168or 31,31,316970globl(ftr_fixup_test4)71or 1,1,172or 2,2,273or 2,2,274or 2,2,275or 2,2,276or 3,3,37778globl(end_ftr_fixup_test4)7980globl(ftr_fixup_test4_expected)81or 1,1,182or 31,31,3183or 31,31,3184nop85nop86or 3,3,38788globl(ftr_fixup_test4_orig)89or 1,1,190or 2,2,291or 2,2,292or 2,2,293or 2,2,294or 3,3,39596globl(ftr_fixup_test4_alt)97or 31,31,3198or 31,31,3199100101globl(ftr_fixup_test5)102or 1,1,1103BEGIN_FTR_SECTION104or 2,2,2105or 2,2,2106or 2,2,2107or 2,2,2108or 2,2,2109or 2,2,2110or 2,2,2111FTR_SECTION_ELSE1122: b 3f1133: or 5,5,5114beq 3b115b 1f116or 6,6,6117b 2b1181: bdnz 3b119ALT_FTR_SECTION_END(0, 1)120or 1,1,1121122globl(end_ftr_fixup_test5)123124globl(ftr_fixup_test5_expected)125or 1,1,11262: b 3f1273: or 5,5,5128beq 3b129b 1f130or 6,6,6131b 2b1321: bdnz 3b133or 1,1,1134135globl(ftr_fixup_test6)1361: or 1,1,1137BEGIN_FTR_SECTION138or 5,5,51392: PPC_LCMPI r3,0140beq 4f141blt 2b142b 1b143b 4f144FTR_SECTION_ELSE1452: or 2,2,2146PPC_LCMPI r3,1147beq 3f148blt 2b149b 3f150b 1b151ALT_FTR_SECTION_END(0, 1)1523: or 1,1,1153or 2,2,21544: or 3,3,3155156globl(end_ftr_fixup_test6)157158globl(ftr_fixup_test6_expected)1591: or 1,1,11602: or 2,2,2161PPC_LCMPI r3,1162beq 3f163blt 2b164b 3f165b 1b1663: or 1,1,1167or 2,2,2168or 3,3,3169170globl(ftr_fixup_test7)171or 1,1,1172BEGIN_FTR_SECTION173or 2,2,2174or 2,2,2175or 2,2,2176or 2,2,2177or 2,2,2178or 2,2,2179or 2,2,2180FTR_SECTION_ELSE1812: b 3f1823: or 5,5,5183beq 3b184b 1f185or 6,6,6186b 2b187bdnz 3b1881:189ALT_FTR_SECTION_END(0, 1)190or 1,1,1191or 1,1,1192193globl(end_ftr_fixup_test7)194nop195196globl(ftr_fixup_test7_expected)197or 1,1,11982: b 3f1993: or 5,5,5200beq 3b201b 1f202or 6,6,6203b 2b204bdnz 3b2051: or 1,1,1206207#if 0208/* Test that if we have a larger else case the assembler spots it and209* reports an error. #if 0'ed so as not to break the build normally.210*/211ftr_fixup_test_too_big:212or 1,1,1213BEGIN_FTR_SECTION214or 2,2,2215or 2,2,2216or 2,2,2217FTR_SECTION_ELSE218or 3,3,3219or 3,3,3220or 3,3,3221or 3,3,3222ALT_FTR_SECTION_END(0, 1)223or 1,1,1224#endif225226#define MAKE_MACRO_TEST(TYPE) \227globl(ftr_fixup_test_ ##TYPE##_macros) \228or 1,1,1; \229/* Basic test, this section should all be nop'ed */ \230BEGIN_##TYPE##_SECTION \231or 2,2,2; \232or 2,2,2; \233or 2,2,2; \234END_##TYPE##_SECTION(0, 1) \235or 1,1,1; \236or 1,1,1; \237/* Basic test, this section should NOT be nop'ed */ \238BEGIN_##TYPE##_SECTION \239or 2,2,2; \240or 2,2,2; \241or 2,2,2; \242END_##TYPE##_SECTION(0, 0) \243or 1,1,1; \244or 1,1,1; \245/* Nesting test, inner section should be nop'ed */ \246BEGIN_##TYPE##_SECTION \247or 2,2,2; \248or 2,2,2; \249BEGIN_##TYPE##_SECTION_NESTED(80) \250or 3,3,3; \251or 3,3,3; \252END_##TYPE##_SECTION_NESTED(0, 1, 80) \253or 2,2,2; \254or 2,2,2; \255END_##TYPE##_SECTION(0, 0) \256or 1,1,1; \257or 1,1,1; \258/* Nesting test, whole section should be nop'ed */ \259BEGIN_##TYPE##_SECTION \260or 2,2,2; \261or 2,2,2; \262BEGIN_##TYPE##_SECTION_NESTED(80) \263or 3,3,3; \264or 3,3,3; \265END_##TYPE##_SECTION_NESTED(0, 0, 80) \266or 2,2,2; \267or 2,2,2; \268END_##TYPE##_SECTION(0, 1) \269or 1,1,1; \270or 1,1,1; \271/* Nesting test, none should be nop'ed */ \272BEGIN_##TYPE##_SECTION \273or 2,2,2; \274or 2,2,2; \275BEGIN_##TYPE##_SECTION_NESTED(80) \276or 3,3,3; \277or 3,3,3; \278END_##TYPE##_SECTION_NESTED(0, 0, 80) \279or 2,2,2; \280or 2,2,2; \281END_##TYPE##_SECTION(0, 0) \282or 1,1,1; \283or 1,1,1; \284/* Basic alt section test, default case should be taken */ \285BEGIN_##TYPE##_SECTION \286or 3,3,3; \287or 3,3,3; \288or 3,3,3; \289##TYPE##_SECTION_ELSE \290or 5,5,5; \291or 5,5,5; \292ALT_##TYPE##_SECTION_END(0, 0) \293or 1,1,1; \294or 1,1,1; \295/* Basic alt section test, else case should be taken */ \296BEGIN_##TYPE##_SECTION \297or 3,3,3; \298or 3,3,3; \299or 3,3,3; \300##TYPE##_SECTION_ELSE \301or 31,31,31; \302or 31,31,31; \303or 31,31,31; \304ALT_##TYPE##_SECTION_END(0, 1) \305or 1,1,1; \306or 1,1,1; \307/* Alt with smaller else case, should be padded with nops */ \308BEGIN_##TYPE##_SECTION \309or 3,3,3; \310or 3,3,3; \311or 3,3,3; \312##TYPE##_SECTION_ELSE \313or 31,31,31; \314ALT_##TYPE##_SECTION_END(0, 1) \315or 1,1,1; \316or 1,1,1; \317/* Alt section with nested section in default case */ \318/* Default case should be taken, with nop'ed inner section */ \319BEGIN_##TYPE##_SECTION \320or 3,3,3; \321BEGIN_##TYPE##_SECTION_NESTED(95) \322or 3,3,3; \323or 3,3,3; \324END_##TYPE##_SECTION_NESTED(0, 1, 95) \325or 3,3,3; \326##TYPE##_SECTION_ELSE \327or 2,2,2; \328or 2,2,2; \329ALT_##TYPE##_SECTION_END(0, 0) \330or 1,1,1; \331or 1,1,1; \332/* Alt section with nested section in else, default taken */ \333BEGIN_##TYPE##_SECTION \334or 3,3,3; \335or 3,3,3; \336or 3,3,3; \337##TYPE##_SECTION_ELSE \338or 5,5,5; \339BEGIN_##TYPE##_SECTION_NESTED(95) \340or 3,3,3; \341END_##TYPE##_SECTION_NESTED(0, 1, 95) \342or 5,5,5; \343ALT_##TYPE##_SECTION_END(0, 0) \344or 1,1,1; \345or 1,1,1; \346/* Alt section with nested section in else, else taken & nop */ \347BEGIN_##TYPE##_SECTION \348or 3,3,3; \349or 3,3,3; \350or 3,3,3; \351##TYPE##_SECTION_ELSE \352or 5,5,5; \353BEGIN_##TYPE##_SECTION_NESTED(95) \354or 3,3,3; \355END_##TYPE##_SECTION_NESTED(0, 1, 95) \356or 5,5,5; \357ALT_##TYPE##_SECTION_END(0, 1) \358or 1,1,1; \359or 1,1,1; \360/* Feature section with nested alt section, default taken */ \361BEGIN_##TYPE##_SECTION \362or 2,2,2; \363BEGIN_##TYPE##_SECTION_NESTED(95) \364or 1,1,1; \365##TYPE##_SECTION_ELSE_NESTED(95) \366or 5,5,5; \367ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) \368or 2,2,2; \369END_##TYPE##_SECTION(0, 0) \370or 1,1,1; \371or 1,1,1; \372/* Feature section with nested alt section, else taken */ \373BEGIN_##TYPE##_SECTION \374or 2,2,2; \375BEGIN_##TYPE##_SECTION_NESTED(95) \376or 1,1,1; \377##TYPE##_SECTION_ELSE_NESTED(95) \378or 5,5,5; \379ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) \380or 2,2,2; \381END_##TYPE##_SECTION(0, 0) \382or 1,1,1; \383or 1,1,1; \384/* Feature section with nested alt section, all nop'ed */ \385BEGIN_##TYPE##_SECTION \386or 2,2,2; \387BEGIN_##TYPE##_SECTION_NESTED(95) \388or 1,1,1; \389##TYPE##_SECTION_ELSE_NESTED(95) \390or 5,5,5; \391ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) \392or 2,2,2; \393END_##TYPE##_SECTION(0, 1) \394or 1,1,1; \395or 1,1,1; \396/* Nested alt sections, default with inner default taken */ \397BEGIN_##TYPE##_SECTION \398or 2,2,2; \399BEGIN_##TYPE##_SECTION_NESTED(95) \400or 1,1,1; \401##TYPE##_SECTION_ELSE_NESTED(95) \402or 5,5,5; \403ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) \404or 2,2,2; \405##TYPE##_SECTION_ELSE \406or 31,31,31; \407BEGIN_##TYPE##_SECTION_NESTED(94) \408or 5,5,5; \409##TYPE##_SECTION_ELSE_NESTED(94) \410or 1,1,1; \411ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) \412or 31,31,31; \413ALT_##TYPE##_SECTION_END(0, 0) \414or 1,1,1; \415or 1,1,1; \416/* Nested alt sections, default with inner else taken */ \417BEGIN_##TYPE##_SECTION \418or 2,2,2; \419BEGIN_##TYPE##_SECTION_NESTED(95) \420or 1,1,1; \421##TYPE##_SECTION_ELSE_NESTED(95) \422or 5,5,5; \423ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) \424or 2,2,2; \425##TYPE##_SECTION_ELSE \426or 31,31,31; \427BEGIN_##TYPE##_SECTION_NESTED(94) \428or 5,5,5; \429##TYPE##_SECTION_ELSE_NESTED(94) \430or 1,1,1; \431ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) \432or 31,31,31; \433ALT_##TYPE##_SECTION_END(0, 0) \434or 1,1,1; \435or 1,1,1; \436/* Nested alt sections, else with inner default taken */ \437BEGIN_##TYPE##_SECTION \438or 2,2,2; \439BEGIN_##TYPE##_SECTION_NESTED(95) \440or 1,1,1; \441##TYPE##_SECTION_ELSE_NESTED(95) \442or 5,5,5; \443ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) \444or 2,2,2; \445##TYPE##_SECTION_ELSE \446or 31,31,31; \447BEGIN_##TYPE##_SECTION_NESTED(94) \448or 5,5,5; \449##TYPE##_SECTION_ELSE_NESTED(94) \450or 1,1,1; \451ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) \452or 31,31,31; \453ALT_##TYPE##_SECTION_END(0, 1) \454or 1,1,1; \455or 1,1,1; \456/* Nested alt sections, else with inner else taken */ \457BEGIN_##TYPE##_SECTION \458or 2,2,2; \459BEGIN_##TYPE##_SECTION_NESTED(95) \460or 1,1,1; \461##TYPE##_SECTION_ELSE_NESTED(95) \462or 5,5,5; \463ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) \464or 2,2,2; \465##TYPE##_SECTION_ELSE \466or 31,31,31; \467BEGIN_##TYPE##_SECTION_NESTED(94) \468or 5,5,5; \469##TYPE##_SECTION_ELSE_NESTED(94) \470or 1,1,1; \471ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) \472or 31,31,31; \473ALT_##TYPE##_SECTION_END(0, 1) \474or 1,1,1; \475or 1,1,1; \476/* Nested alt sections, else can have large else case */ \477BEGIN_##TYPE##_SECTION \478or 2,2,2; \479or 2,2,2; \480or 2,2,2; \481or 2,2,2; \482##TYPE##_SECTION_ELSE \483BEGIN_##TYPE##_SECTION_NESTED(94) \484or 5,5,5; \485or 5,5,5; \486or 5,5,5; \487or 5,5,5; \488##TYPE##_SECTION_ELSE_NESTED(94) \489or 1,1,1; \490or 1,1,1; \491or 1,1,1; \492or 1,1,1; \493ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) \494ALT_##TYPE##_SECTION_END(0, 1) \495or 1,1,1; \496or 1,1,1;497498#define MAKE_MACRO_TEST_EXPECTED(TYPE) \499globl(ftr_fixup_test_ ##TYPE##_macros_expected) \500or 1,1,1; \501/* Basic test, this section should all be nop'ed */ \502/* BEGIN_##TYPE##_SECTION */ \503nop; \504nop; \505nop; \506/* END_##TYPE##_SECTION(0, 1) */ \507or 1,1,1; \508or 1,1,1; \509/* Basic test, this section should NOT be nop'ed */ \510/* BEGIN_##TYPE##_SECTION */ \511or 2,2,2; \512or 2,2,2; \513or 2,2,2; \514/* END_##TYPE##_SECTION(0, 0) */ \515or 1,1,1; \516or 1,1,1; \517/* Nesting test, inner section should be nop'ed */ \518/* BEGIN_##TYPE##_SECTION */ \519or 2,2,2; \520or 2,2,2; \521/* BEGIN_##TYPE##_SECTION_NESTED(80) */ \522nop; \523nop; \524/* END_##TYPE##_SECTION_NESTED(0, 1, 80) */ \525or 2,2,2; \526or 2,2,2; \527/* END_##TYPE##_SECTION(0, 0) */ \528or 1,1,1; \529or 1,1,1; \530/* Nesting test, whole section should be nop'ed */ \531/* NB. inner section is not nop'ed, but then entire outer is */ \532/* BEGIN_##TYPE##_SECTION */ \533nop; \534nop; \535/* BEGIN_##TYPE##_SECTION_NESTED(80) */ \536nop; \537nop; \538/* END_##TYPE##_SECTION_NESTED(0, 0, 80) */ \539nop; \540nop; \541/* END_##TYPE##_SECTION(0, 1) */ \542or 1,1,1; \543or 1,1,1; \544/* Nesting test, none should be nop'ed */ \545/* BEGIN_##TYPE##_SECTION */ \546or 2,2,2; \547or 2,2,2; \548/* BEGIN_##TYPE##_SECTION_NESTED(80) */ \549or 3,3,3; \550or 3,3,3; \551/* END_##TYPE##_SECTION_NESTED(0, 0, 80) */ \552or 2,2,2; \553or 2,2,2; \554/* END_##TYPE##_SECTION(0, 0) */ \555or 1,1,1; \556or 1,1,1; \557/* Basic alt section test, default case should be taken */ \558/* BEGIN_##TYPE##_SECTION */ \559or 3,3,3; \560or 3,3,3; \561or 3,3,3; \562/* ##TYPE##_SECTION_ELSE */ \563/* or 5,5,5; */ \564/* or 5,5,5; */ \565/* ALT_##TYPE##_SECTION_END(0, 0) */ \566or 1,1,1; \567or 1,1,1; \568/* Basic alt section test, else case should be taken */ \569/* BEGIN_##TYPE##_SECTION */ \570/* or 3,3,3; */ \571/* or 3,3,3; */ \572/* or 3,3,3; */ \573/* ##TYPE##_SECTION_ELSE */ \574or 31,31,31; \575or 31,31,31; \576or 31,31,31; \577/* ALT_##TYPE##_SECTION_END(0, 1) */ \578or 1,1,1; \579or 1,1,1; \580/* Alt with smaller else case, should be padded with nops */ \581/* BEGIN_##TYPE##_SECTION */ \582/* or 3,3,3; */ \583/* or 3,3,3; */ \584/* or 3,3,3; */ \585/* ##TYPE##_SECTION_ELSE */ \586or 31,31,31; \587nop; \588nop; \589/* ALT_##TYPE##_SECTION_END(0, 1) */ \590or 1,1,1; \591or 1,1,1; \592/* Alt section with nested section in default case */ \593/* Default case should be taken, with nop'ed inner section */ \594/* BEGIN_##TYPE##_SECTION */ \595or 3,3,3; \596/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \597nop; \598nop; \599/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */ \600or 3,3,3; \601/* ##TYPE##_SECTION_ELSE */ \602/* or 2,2,2; */ \603/* or 2,2,2; */ \604/* ALT_##TYPE##_SECTION_END(0, 0) */ \605or 1,1,1; \606or 1,1,1; \607/* Alt section with nested section in else, default taken */ \608/* BEGIN_##TYPE##_SECTION */ \609or 3,3,3; \610or 3,3,3; \611or 3,3,3; \612/* ##TYPE##_SECTION_ELSE */ \613/* or 5,5,5; */ \614/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \615/* or 3,3,3; */ \616/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */ \617/* or 5,5,5; */ \618/* ALT_##TYPE##_SECTION_END(0, 0) */ \619or 1,1,1; \620or 1,1,1; \621/* Alt section with nested section in else, else taken & nop */ \622/* BEGIN_##TYPE##_SECTION */ \623/* or 3,3,3; */ \624/* or 3,3,3; */ \625/* or 3,3,3; */ \626/* ##TYPE##_SECTION_ELSE */ \627or 5,5,5; \628/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \629nop; \630/* END_##TYPE##_SECTION_NESTED(0, 1, 95) */ \631or 5,5,5; \632/* ALT_##TYPE##_SECTION_END(0, 1) */ \633or 1,1,1; \634or 1,1,1; \635/* Feature section with nested alt section, default taken */ \636/* BEGIN_##TYPE##_SECTION */ \637or 2,2,2; \638/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \639or 1,1,1; \640/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \641/* or 5,5,5; */ \642/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */ \643or 2,2,2; \644/* END_##TYPE##_SECTION(0, 0) */ \645or 1,1,1; \646or 1,1,1; \647/* Feature section with nested alt section, else taken */ \648/* BEGIN_##TYPE##_SECTION */ \649or 2,2,2; \650/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \651/* or 1,1,1; */ \652/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \653or 5,5,5; \654/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */ \655or 2,2,2; \656/* END_##TYPE##_SECTION(0, 0) */ \657or 1,1,1; \658or 1,1,1; \659/* Feature section with nested alt section, all nop'ed */ \660/* BEGIN_##TYPE##_SECTION */ \661nop; \662/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \663nop; \664/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \665/* or 5,5,5; */ \666/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */ \667nop; \668/* END_##TYPE##_SECTION(0, 1) */ \669or 1,1,1; \670or 1,1,1; \671/* Nested alt sections, default with inner default taken */ \672/* BEGIN_##TYPE##_SECTION */ \673or 2,2,2; \674/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \675or 1,1,1; \676/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \677/* or 5,5,5; */ \678/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 95) */ \679or 2,2,2; \680/* ##TYPE##_SECTION_ELSE */ \681/* or 31,31,31; */ \682/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \683/* or 5,5,5; */ \684/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \685/* or 1,1,1; */ \686/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */ \687/* or 31,31,31; */ \688/* ALT_##TYPE##_SECTION_END(0, 0) */ \689or 1,1,1; \690or 1,1,1; \691/* Nested alt sections, default with inner else taken */ \692/* BEGIN_##TYPE##_SECTION */ \693or 2,2,2; \694/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \695/* or 1,1,1; */ \696/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \697or 5,5,5; \698/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */ \699or 2,2,2; \700/* ##TYPE##_SECTION_ELSE */ \701/* or 31,31,31; */ \702/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \703/* or 5,5,5; */ \704/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \705/* or 1,1,1; */ \706/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */ \707/* or 31,31,31; */ \708/* ALT_##TYPE##_SECTION_END(0, 0) */ \709or 1,1,1; \710or 1,1,1; \711/* Nested alt sections, else with inner default taken */ \712/* BEGIN_##TYPE##_SECTION */ \713/* or 2,2,2; */ \714/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \715/* or 1,1,1; */ \716/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \717/* or 5,5,5; */ \718/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */ \719/* or 2,2,2; */ \720/* ##TYPE##_SECTION_ELSE */ \721or 31,31,31; \722/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \723or 5,5,5; \724/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \725/* or 1,1,1; */ \726/* ALT_##TYPE##_SECTION_END_NESTED(0, 0, 94) */ \727or 31,31,31; \728/* ALT_##TYPE##_SECTION_END(0, 1) */ \729or 1,1,1; \730or 1,1,1; \731/* Nested alt sections, else with inner else taken */ \732/* BEGIN_##TYPE##_SECTION */ \733/* or 2,2,2; */ \734/* BEGIN_##TYPE##_SECTION_NESTED(95) */ \735/* or 1,1,1; */ \736/* ##TYPE##_SECTION_ELSE_NESTED(95) */ \737/* or 5,5,5; */ \738/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 95) */ \739/* or 2,2,2; */ \740/* ##TYPE##_SECTION_ELSE */ \741or 31,31,31; \742/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \743/* or 5,5,5; */ \744/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \745or 1,1,1; \746/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) */ \747or 31,31,31; \748/* ALT_##TYPE##_SECTION_END(0, 1) */ \749or 1,1,1; \750or 1,1,1; \751/* Nested alt sections, else can have large else case */ \752/* BEGIN_##TYPE##_SECTION */ \753/* or 2,2,2; */ \754/* or 2,2,2; */ \755/* or 2,2,2; */ \756/* or 2,2,2; */ \757/* ##TYPE##_SECTION_ELSE */ \758/* BEGIN_##TYPE##_SECTION_NESTED(94) */ \759/* or 5,5,5; */ \760/* or 5,5,5; */ \761/* or 5,5,5; */ \762/* or 5,5,5; */ \763/* ##TYPE##_SECTION_ELSE_NESTED(94) */ \764or 1,1,1; \765or 1,1,1; \766or 1,1,1; \767or 1,1,1; \768/* ALT_##TYPE##_SECTION_END_NESTED(0, 1, 94) */ \769/* ALT_##TYPE##_SECTION_END(0, 1) */ \770or 1,1,1; \771or 1,1,1;772773MAKE_MACRO_TEST(FTR);774MAKE_MACRO_TEST_EXPECTED(FTR);775776#ifdef CONFIG_PPC64777MAKE_MACRO_TEST(FW_FTR);778MAKE_MACRO_TEST_EXPECTED(FW_FTR);779#endif780781globl(lwsync_fixup_test)7821: or 1,1,1783LWSYNC784globl(end_lwsync_fixup_test)785786globl(lwsync_fixup_test_expected_LWSYNC)7871: or 1,1,1788lwsync789790globl(lwsync_fixup_test_expected_SYNC)7911: or 1,1,1792sync793794globl(ftr_fixup_prefix1)795or 1,1,1796.long OP_PREFIX << 26797.long 0x0000000798or 2,2,2799globl(end_ftr_fixup_prefix1)800801globl(ftr_fixup_prefix1_orig)802or 1,1,1803.long OP_PREFIX << 26804.long 0x0000000805or 2,2,2806807globl(ftr_fixup_prefix1_expected)808or 1,1,1809nop810nop811or 2,2,2812813globl(ftr_fixup_prefix2)814or 1,1,1815.long OP_PREFIX << 26816.long 0x0000000817or 2,2,2818globl(end_ftr_fixup_prefix2)819820globl(ftr_fixup_prefix2_orig)821or 1,1,1822.long OP_PREFIX << 26823.long 0x0000000824or 2,2,2825826globl(ftr_fixup_prefix2_alt)827.long OP_PREFIX << 26828.long 0x0000001829830globl(ftr_fixup_prefix2_expected)831or 1,1,1832.long OP_PREFIX << 26833.long 0x0000001834or 2,2,2835836globl(ftr_fixup_prefix3)837or 1,1,1838.long OP_PREFIX << 26839.long 0x0000000840or 2,2,2841or 3,3,3842globl(end_ftr_fixup_prefix3)843844globl(ftr_fixup_prefix3_orig)845or 1,1,1846.long OP_PREFIX << 26847.long 0x0000000848or 2,2,2849or 3,3,3850851globl(ftr_fixup_prefix3_alt)852.long OP_PREFIX << 26853.long 0x0000001854nop855856globl(ftr_fixup_prefix3_expected)857or 1,1,1858.long OP_PREFIX << 26859.long 0x0000001860nop861or 3,3,3862863864