Lines Matching +full:neo +full:- +full:8
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Just-In-Time compiler for eBPF bytecode on 32-bit and 64-bit MIPS.
10 * Copyright (c) 2017 Shubham Bansal <illusionist.neo@gmail.com>
26 #define MIPS_R_A4 8 /* Arg (n64) */
30 #define MIPS_R_T0 8 /* Temp (o32) */
62 #define JIT_MAX_ITERATIONS 8
65 * Jump pseudo-instructions used internally
71 /* Descriptor flag for PC-relative branch conversion */
81 u32 changes; /* Number of PC-relative branch conv */
85 u32 saved_size; /* Size of callee-saved registers */
92 if ((ctx)->target != NULL) { \
93 u32 *p = &(ctx)->target[ctx->jit_index]; \
96 (ctx)->jit_index++; \
107 /* Workaround for Loongson-3 ll/sc errata */
116 /* Workaround for Loongson-2F jump errata */
129 ctx->accessed |= BIT(reg); in access_reg()
134 * saved/restored by the program if callee-saved.
138 ctx->clobbered |= BIT(reg); in clobber_reg()
153 /* Compute the 28-bit jump target address from a BPF program location */
156 /* Compute the PC-relative offset to relative BPF program offset */
159 /* dst = imm (32-bit) */
162 /* dst = src (32-bit) */
171 /* ALU immediate operation (32-bit) */
174 /* ALU register operation (32-bit) */
177 /* Atomic read-modify-write (32-bit) */
180 /* Atomic compare-and-exchange (32-bit) */
189 /* Prepare a PC-relative jump operation with immediate conditional */
193 /* Prepare a PC-relative jump operation with register conditional */
197 /* Finish a PC-relative jump operation */
214 * This function is implemented separately for 32-bit and 64-bit JITs.
220 * This function is implemented separately for 32-bit and 64-bit JITs.
228 * 0 - Successfully JITed an 8-byte eBPF instruction
229 * >0 - Successfully JITed a 16-byte eBPF instruction
230 * <0 - Failed to JIT.
231 * This function is implemented separately for 32-bit and 64-bit JITs.