Lines Matching refs:imm
384 s32 imm = insn[i].imm; in bpf_jit_build_body() local
428 if (!imm) { in bpf_jit_build_body()
430 } else if (imm >= -32768 && imm < 32768) { in bpf_jit_build_body()
431 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
433 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
439 if (!imm) { in bpf_jit_build_body()
441 } else if (imm > -32768 && imm <= 32768) { in bpf_jit_build_body()
442 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(-imm))); in bpf_jit_build_body()
444 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
457 if (imm >= -32768 && imm < 32768) in bpf_jit_build_body()
458 EMIT(PPC_RAW_MULI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
460 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
489 if (imm == 0) in bpf_jit_build_body()
491 if (imm == 1) { in bpf_jit_build_body()
500 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
534 if (!IMM_H(imm)) in bpf_jit_build_body()
535 EMIT(PPC_RAW_ANDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
538 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
548 if (imm < 0 && BPF_CLASS(code) == BPF_ALU64) { in bpf_jit_build_body()
550 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
553 if (IMM_L(imm)) in bpf_jit_build_body()
554 EMIT(PPC_RAW_ORI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
555 if (IMM_H(imm)) in bpf_jit_build_body()
556 EMIT(PPC_RAW_ORIS(dst_reg, dst_reg, IMM_H(imm))); in bpf_jit_build_body()
565 if (imm < 0 && BPF_CLASS(code) == BPF_ALU64) { in bpf_jit_build_body()
567 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
570 if (IMM_L(imm)) in bpf_jit_build_body()
571 EMIT(PPC_RAW_XORI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
572 if (IMM_H(imm)) in bpf_jit_build_body()
573 EMIT(PPC_RAW_XORIS(dst_reg, dst_reg, IMM_H(imm))); in bpf_jit_build_body()
588 EMIT(PPC_RAW_SLWI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
593 if (imm != 0) in bpf_jit_build_body()
594 EMIT(PPC_RAW_SLDI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
605 EMIT(PPC_RAW_SRWI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
610 if (imm != 0) in bpf_jit_build_body()
611 EMIT(PPC_RAW_SRDI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
620 EMIT(PPC_RAW_SRAWI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
623 if (imm != 0) in bpf_jit_build_body()
624 EMIT(PPC_RAW_SRADI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
632 if (imm == 1) { in bpf_jit_build_body()
641 PPC_LI32(dst_reg, imm); in bpf_jit_build_body()
642 if (imm < 0) in bpf_jit_build_body()
666 switch (imm) { in bpf_jit_build_body()
709 switch (imm) { in bpf_jit_build_body()
761 EMIT(PPC_RAW_LI(tmp1_reg, imm)); in bpf_jit_build_body()
769 EMIT(PPC_RAW_LI(tmp1_reg, imm)); in bpf_jit_build_body()
777 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
785 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
813 if ((imm & BPF_FETCH) && IS_ENABLED(CONFIG_SMP)) in bpf_jit_build_body()
823 if (imm & BPF_FETCH) in bpf_jit_build_body()
826 switch (imm) { in bpf_jit_build_body()
876 if (imm & BPF_FETCH) { in bpf_jit_build_body()
885 if (size != BPF_DW && imm == BPF_CMPXCHG && in bpf_jit_build_body()
967 imm64 = ((u64)(u32) insn[i].imm) | in bpf_jit_build_body()
968 (((u64)(u32) insn[i+1].imm) << 32); in bpf_jit_build_body()
1147 if (imm >= 0 && imm < 32768) { in bpf_jit_build_body()
1149 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1151 EMIT(PPC_RAW_CMPLDI(dst_reg, imm)); in bpf_jit_build_body()
1154 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
1178 if (imm >= -32768 && imm < 32768) { in bpf_jit_build_body()
1180 EMIT(PPC_RAW_CMPWI(dst_reg, imm)); in bpf_jit_build_body()
1182 EMIT(PPC_RAW_CMPDI(dst_reg, imm)); in bpf_jit_build_body()
1184 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()
1195 if (imm >= 0 && imm < 32768) in bpf_jit_build_body()
1197 EMIT(PPC_RAW_ANDI(tmp1_reg, dst_reg, imm)); in bpf_jit_build_body()
1199 PPC_LI32(tmp1_reg, imm); in bpf_jit_build_body()