Lines Matching +full:alternative +full:- +full:a
1 /* SPDX-License-Identifier: GPL-2.0 */
21 * Debug flag that can be tested to see whether alternative
34 #define alt_slen "662b-661b"
35 #define alt_total_slen alt_end_marker"b-661b"
36 #define alt_rlen(num) e_replacement(num)"f-"b_replacement(num)"f"
40 ".fill -(((" alt_rlen(num) ")-(" alt_slen ")) > 0) * " \
41 "((" alt_rlen(num) ")-(" alt_slen ")) / 4, 4, 0x03400000\n"
47 #define alt_max_short(a, b) "((" a ") ^ (((" a ") ^ (" b ")) & -(-((" a ") < (" b ")))))" argument
50 * Pad the second replacement alternative with additional NOPs if it is
51 * additionally longer than the first replacement alternative.
55 ".fill -((" alt_max_short(alt_rlen(num1), alt_rlen(num2)) " - (" alt_slen ")) > 0) * " \
56 "(" alt_max_short(alt_rlen(num1), alt_rlen(num2)) " - (" alt_slen ")) / 4, " \
61 " .long 661b - .\n" /* label */ \
62 " .long " b_replacement(num)"f - .\n" /* new instruction */ \
70 /* alternative assembly primitive: */
71 #define ALTERNATIVE(oldinstr, newinstr, feature) \ macro
73 ".pushsection .altinstructions,\"a\"\n" \
82 ".pushsection .altinstructions,\"a\"\n" \
92 * Alternative instructions for different CPU types or capabilities.
103 #define alternative(oldinstr, newinstr, feature) \ macro
104 (asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) : : : "memory"))