Lines Matching +full:alternative +full:- +full:a

1 /* SPDX-License-Identifier: GPL-2.0 */
9 #include <asm/insn-def.h>
12 * Binutils 2.27.0 can't handle a 'UL' suffix on constants, so for the assembly
27 " .word 661b - .\n" /* label */ \
28 " .word 663f - .\n" /* new instruction */ \
30 " .byte 662b-661b\n" /* source len */ \
31 " .byte 664f-663f\n" /* replacement len */
34 " .word 661b - .\n" /* label */ \
35 " .word " __stringify(cb) "- .\n" /* callback */ \
37 " .byte 662b-661b\n" /* source len */ \
38 " .byte 664f-663f\n" /* replacement len */
41 * alternative assembly primitive:
46 * .if ((664b-663b) != (662b-661b))
50 * but most assemblers die if insn1 or insn2 have a .inst. This should
51 * be fixed in a binutils release posterior to 2.25.51.0.2 (anything
61 ".pushsection .altinstructions,\"a\"\n" \
68 ".org . - (664b-663b) + (662b-661b)\n\t" \
69 ".org . - (662b-661b) + (664b-663b)\n\t" \
78 ".pushsection .altinstructions,\"a\"\n" \
95 .word \orig_offset - .
96 .word \alt_offset - .
105 662: .pushsection .altinstructions, "a"
106 altinstruction_entry 661b, 663f, \cap, 662b-661b, 664f-663f
110 664: .org . - (664b-663b) + (662b-661b)
111 .org . - (662b-661b) + (664b-663b)
117 * Alternative sequences
124 * assembled into a special section to be used for dynamic patching.
130 * 2. Not contain a branch target that is used outside of the
131 * alternative sequence it is defined in (branches into an
132 * alternative sequence are not fixed up).
136 * Begin an alternative code sequence.
140 .pushsection .altinstructions, "a"
141 altinstruction_entry 661f, 663f, \cap, 662f-661f, 664f-663f
148 .pushsection .altinstructions, "a"
149 altinstruction_entry 663f, 661f, \cap, 664f-663f, 662f-661f
158 .pushsection .altinstructions, "a"
159 altinstruction_entry 661f, \cb, (1 << ARM64_CB_SHIFT) | \cap, 662f-661f, 0
165 * Provide the other half of the alternative code sequence.
178 * Complete an alternative code sequence.
182 .org . - (664b-663b) + (662b-661b)
183 .org . - (662b-661b) + (664b-663b)
190 * Callback-based alternative epilogue
197 * Provides a trivial alternative or default sequence consisting solely
203 nops (662b-661b) / AARCH64_INSN_SIZE
213 * Usage: asm(ALTERNATIVE(oldinstr, newinstr, cpucap));
215 * Usage: asm(ALTERNATIVE(oldinstr, newinstr, cpucap, CONFIG_FOO));
219 #define ALTERNATIVE(oldinstr, newinstr, ...) \ macro
234 ALTERNATIVE("b %l[l_no]", "nop", %[cpucap])
255 ALTERNATIVE("nop", "b %l[l_yes]", %[cpucap]) in alternative_has_cap_unlikely()