diff options
Diffstat (limited to 'arch/arm64/include/asm/alternative.h')
-rw-r--r-- | arch/arm64/include/asm/alternative.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/arm64/include/asm/alternative.h b/arch/arm64/include/asm/alternative.h index c385a0c4057f..8c8cdfac7251 100644 --- a/arch/arm64/include/asm/alternative.h +++ b/arch/arm64/include/asm/alternative.h @@ -65,13 +65,19 @@ void free_alternatives_memory(void); .byte \alt_len .endm -.macro alternative_insn insn1 insn2 cap -661: \insn1 -662: .pushsection .altinstructions, "a" - altinstruction_entry 661b, 663f, \cap, 662b-661b, 664f-663f +.macro alternative_if_not cap + .pushsection .altinstructions, "a" + altinstruction_entry 661f, 663f, \cap, 662f-661f, 664f-663f .popsection - .pushsection .altinstr_replacement, "ax" -663: \insn2 +661: +.endm + +.macro alternative_else +662: .pushsection .altinstr_replacement, "ax" +663: +.endm + +.macro alternative_endif 664: .popsection .org . - (664b-663b) + (662b-661b) .org . - (662b-661b) + (664b-663b) |