Lines Matching +full:conditional +full:- +full:select
1 /* SPDX-License-Identifier: GPL-2.0-only */
14 #include <asm/ppc-opcode.h>
22 #define CTX_NIA(ctx) ((unsigned long)ctx->idx * 4)
26 #define EMIT(instr) PLANT_INSTR(image, ctx->idx, instr)
31 long offset = (long)(dest) - CTX_NIA(ctx); \
33 pr_err_ratelimited("Branch offset 0x%lx (@%u) out of range\n", offset, ctx->idx); \
34 return -ERANGE; \
42 long offset = (long)(dest) - CTX_NIA(ctx); \
44 pr_err_ratelimited("Conditional branch offset 0x%lx (@%u) out of range\n", offset, ctx->idx); \
45 return -ERANGE; \
50 /* Sign-extended 32-bit immediate load */
52 if ((int)(uintptr_t)(i) >= -32768 && \
63 if ((long)(i) >= -2147483648 && \
94 if (is_offset_in_cond_branch_range((long)(dest) - CTX_NIA(ctx))) { \
103 /* To create a branch condition, select a bit of cr0... */
125 * - register usage is tracked with corresponding
126 * bits (r3-r31)
127 * - rest of the bits can be used to track other
128 * things -- for now, we use bits 0 to 2
139 #define bpf_to_ppc(r) (ctx->b2p[r])
149 return ctx->seen & (1 << (31 - i)); in bpf_is_seen_register()
154 ctx->seen |= 1 << (31 - i); in bpf_set_seen_register()
159 ctx->seen &= ~(1 << (31 - i)); in bpf_clear_seen_register()