Lines Matching +full:conditional +full:- +full:select
1 /* SPDX-License-Identifier: GPL-2.0-only */
14 #include <asm/ppc-opcode.h>
23 #define CTX_NIA(ctx) ((unsigned long)ctx->idx * 4)
30 #define EMIT(instr) PLANT_INSTR(image, ctx->idx, instr)
35 long offset = (long)(dest) - CTX_NIA(ctx); \
37 pr_err_ratelimited("Branch offset 0x%lx (@%u) out of range\n", offset, ctx->idx); \
38 return -ERANGE; \
46 long offset = (long)(dest) - CTX_NIA(ctx); \
48 pr_err_ratelimited("Conditional branch offset 0x%lx (@%u) out of range\n", offset, ctx->idx); \
49 return -ERANGE; \
54 /* Sign-extended 32-bit immediate load */
56 if ((int)(uintptr_t)(i) >= -32768 && \
67 if ((long)(i) >= -2147483648 && \
110 if (is_offset_in_cond_branch_range((long)(dest) - CTX_NIA(ctx))) { \
119 /* To create a branch condition, select a bit of cr0... */
141 * - register usage is tracked with corresponding
142 * bits (r3-r31)
143 * - rest of the bits can be used to track other
144 * things -- for now, we use bits 0 to 2
155 #define bpf_to_ppc(r) (ctx->b2p[r])
165 return ctx->seen & (1 << (31 - i)); in bpf_is_seen_register()
170 ctx->seen |= 1 << (31 - i); in bpf_set_seen_register()
175 ctx->seen &= ~(1 << (31 - i)); in bpf_clear_seen_register()