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; \
55 * Sign-extended 32-bit immediate load
62 ctx->idx += 2; \
64 if ((int)(uintptr_t)(i) >= -32768 && \
78 ctx->idx += 5; \
80 if ((long)(i) >= -2147483648 && \
124 if (is_offset_in_cond_branch_range((long)(dest) - CTX_NIA(ctx))) { \
133 /* To create a branch condition, select a bit of cr0... */
155 * - register usage is tracked with corresponding
156 * bits (r3-r31)
157 * - rest of the bits can be used to track other
158 * things -- for now, we use bits 0 to 2
171 #define bpf_to_ppc(r) (ctx->b2p[r])
181 return ctx->seen & (1 << (31 - i)); in bpf_is_seen_register()
186 ctx->seen |= 1 << (31 - i); in bpf_set_seen_register()
191 ctx->seen &= ~(1 << (31 - i)); in bpf_clear_seen_register()