Lines Matching refs:K
111 #define CHOOSE_LOAD_FUNC(K, func) \ argument
112 ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset)
129 unsigned int K = filter[i].k; in bpf_jit_build_body() local
145 if (!K) in bpf_jit_build_body()
147 PPC_ADDI(r_A, r_A, IMM_L(K)); in bpf_jit_build_body()
148 if (K >= 32768) in bpf_jit_build_body()
149 PPC_ADDIS(r_A, r_A, IMM_HA(K)); in bpf_jit_build_body()
156 if (!K) in bpf_jit_build_body()
158 PPC_ADDI(r_A, r_A, IMM_L(-K)); in bpf_jit_build_body()
159 if (K >= 32768) in bpf_jit_build_body()
160 PPC_ADDIS(r_A, r_A, IMM_HA(-K)); in bpf_jit_build_body()
167 if (K < 32768) in bpf_jit_build_body()
168 PPC_MULI(r_A, r_A, K); in bpf_jit_build_body()
170 PPC_LI32(r_scratch1, K); in bpf_jit_build_body()
194 PPC_LI32(r_scratch2, K); in bpf_jit_build_body()
200 if (K == 1) in bpf_jit_build_body()
202 PPC_LI32(r_scratch1, K); in bpf_jit_build_body()
210 if (!IMM_H(K)) in bpf_jit_build_body()
211 PPC_ANDI(r_A, r_A, K); in bpf_jit_build_body()
213 PPC_LI32(r_scratch1, K); in bpf_jit_build_body()
222 if (IMM_L(K)) in bpf_jit_build_body()
223 PPC_ORI(r_A, r_A, IMM_L(K)); in bpf_jit_build_body()
224 if (K >= 65536) in bpf_jit_build_body()
225 PPC_ORIS(r_A, r_A, IMM_H(K)); in bpf_jit_build_body()
233 if (IMM_L(K)) in bpf_jit_build_body()
234 PPC_XORI(r_A, r_A, IMM_L(K)); in bpf_jit_build_body()
235 if (K >= 65536) in bpf_jit_build_body()
236 PPC_XORIS(r_A, r_A, IMM_H(K)); in bpf_jit_build_body()
243 if (K == 0) in bpf_jit_build_body()
246 PPC_SLWI(r_A, r_A, K); in bpf_jit_build_body()
253 if (K == 0) in bpf_jit_build_body()
256 PPC_SRWI(r_A, r_A, K); in bpf_jit_build_body()
262 PPC_LI32(r_ret, K); in bpf_jit_build_body()
263 if (!K) { in bpf_jit_build_body()
307 PPC_LI32(r_A, K); in bpf_jit_build_body()
310 PPC_LI32(r_X, K); in bpf_jit_build_body()
313 PPC_MR(r_A, r_M + (K & 0xf)); in bpf_jit_build_body()
314 ctx->seen |= SEEN_MEM | (1<<(K & 0xf)); in bpf_jit_build_body()
317 PPC_MR(r_X, r_M + (K & 0xf)); in bpf_jit_build_body()
318 ctx->seen |= SEEN_MEM | (1<<(K & 0xf)); in bpf_jit_build_body()
321 PPC_MR(r_M + (K & 0xf), r_A); in bpf_jit_build_body()
322 ctx->seen |= SEEN_MEM | (1<<(K & 0xf)); in bpf_jit_build_body()
325 PPC_MR(r_M + (K & 0xf), r_X); in bpf_jit_build_body()
326 ctx->seen |= SEEN_XREG | SEEN_MEM | (1<<(K & 0xf)); in bpf_jit_build_body()
409 func = CHOOSE_LOAD_FUNC(K, sk_load_word); in bpf_jit_build_body()
412 func = CHOOSE_LOAD_FUNC(K, sk_load_half); in bpf_jit_build_body()
415 func = CHOOSE_LOAD_FUNC(K, sk_load_byte); in bpf_jit_build_body()
421 PPC_LI32(r_addr, K); in bpf_jit_build_body()
447 PPC_ADDI(r_addr, r_X, IMM_L(K)); in bpf_jit_build_body()
448 if (K >= 32768) in bpf_jit_build_body()
449 PPC_ADDIS(r_addr, r_addr, IMM_HA(K)); in bpf_jit_build_body()
456 func = CHOOSE_LOAD_FUNC(K, sk_load_byte_msh); in bpf_jit_build_body()
462 if (K != 0) in bpf_jit_build_body()
463 PPC_JMP(addrs[i + 1 + K]); in bpf_jit_build_body()
504 if (K < 32768) in bpf_jit_build_body()
505 PPC_CMPLWI(r_A, K); in bpf_jit_build_body()
507 PPC_LI32(r_scratch1, K); in bpf_jit_build_body()
512 if (K < 32768) in bpf_jit_build_body()
514 PPC_ANDI(r_scratch1, r_A, K); in bpf_jit_build_body()
516 PPC_LI32(r_scratch1, K); in bpf_jit_build_body()