Lines Matching full:off

330 /* Load operation: dst = *(size*)(src + off) */
331 static void emit_ldx(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 size) in emit_ldx() argument
336 emit(ctx, lbu, dst, off, src); in emit_ldx()
340 emit(ctx, lhu, dst, off, src); in emit_ldx()
344 emit(ctx, lwu, dst, off, src); in emit_ldx()
348 emit(ctx, ld, dst, off, src); in emit_ldx()
354 /* Store operation: *(size *)(dst + off) = src */
355 static void emit_stx(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 size) in emit_stx() argument
360 emit(ctx, sb, src, off, dst); in emit_stx()
364 emit(ctx, sh, src, off, dst); in emit_stx()
368 emit(ctx, sw, src, off, dst); in emit_stx()
372 emit(ctx, sd, src, off, dst); in emit_stx()
379 u8 dst, u8 src, s16 off, u8 code) in emit_atomic_r64() argument
385 emit(ctx, lld, t1, off, dst); in emit_atomic_r64()
407 emit(ctx, scd, t2, off, dst); in emit_atomic_r64()
418 static void emit_cmpxchg_r64(struct jit_context *ctx, u8 dst, u8 src, s16 off) in emit_cmpxchg_r64() argument
425 emit(ctx, lld, t1, off, dst); in emit_cmpxchg_r64()
428 emit(ctx, scd, t2, off, dst); in emit_cmpxchg_r64()
480 int off; in emit_tail_call() local
490 off = offsetof(struct bpf_array, map.max_entries); in emit_tail_call()
491 if (off > 0x7fff) in emit_tail_call()
493 emit(ctx, lwu, tmp, off, ary); /* tmp = ary->map.max_entrs*/ in emit_tail_call()
495 emit(ctx, beqz, tmp, get_offset(ctx, 1)); /* PC += off(1) if tmp == 0*/ in emit_tail_call()
499 emit(ctx, bltz, tcc, get_offset(ctx, 1)); /* PC += off(1) if tcc < 0 */ in emit_tail_call()
502 off = offsetof(struct bpf_array, ptrs); in emit_tail_call()
503 if (off > 0x7fff) in emit_tail_call()
507 emit(ctx, ld, tmp, off, tmp); /* tmp = *(tmp + off) */ in emit_tail_call()
510 emit(ctx, beqz, tmp, get_offset(ctx, 1)); /* PC += off(1) if tmp == 0*/ in emit_tail_call()
514 off = offsetof(struct bpf_prog, bpf_func); in emit_tail_call()
515 if (off > 0x7fff) in emit_tail_call()
517 emit(ctx, ld, tmp, off, tmp); /* tmp = *(tmp + off) */ in emit_tail_call()
638 s16 off = insn->off; in build_insn() local
820 /* LDX: dst = *(size *)(src + off) */ in build_insn()
825 emit_ldx(ctx, dst, src, off, BPF_SIZE(code)); in build_insn()
827 /* ST: *(size *)(dst + off) = imm */ in build_insn()
833 emit_stx(ctx, dst, MIPS_R_T4, off, BPF_SIZE(code)); in build_insn()
835 /* STX: *(size *)(dst + off) = src */ in build_insn()
840 emit_stx(ctx, dst, src, off, BPF_SIZE(code)); in build_insn()
859 emit_atomic_r64(ctx, dst, src, off, imm); in build_insn()
868 emit_atomic_r(ctx, tmp, src, off, imm); in build_insn()
872 emit_atomic_r(ctx, dst, MIPS_R_T4, off, imm); in build_insn()
877 emit_cmpxchg_r64(ctx, dst, src, off); in build_insn()
885 emit_cmpxchg_r(ctx, dst, MIPS_R_T5, tmp, off); in build_insn()
895 /* PC += off if dst == src */ in build_insn()
896 /* PC += off if dst != src */ in build_insn()
897 /* PC += off if dst & src */ in build_insn()
898 /* PC += off if dst > src */ in build_insn()
899 /* PC += off if dst >= src */ in build_insn()
900 /* PC += off if dst < src */ in build_insn()
901 /* PC += off if dst <= src */ in build_insn()
902 /* PC += off if dst > src (signed) */ in build_insn()
903 /* PC += off if dst >= src (signed) */ in build_insn()
904 /* PC += off if dst < src (signed) */ in build_insn()
905 /* PC += off if dst <= src (signed) */ in build_insn()
917 if (off == 0) in build_insn()
919 setup_jmp_r(ctx, dst == src, BPF_OP(code), off, &jmp, &rel); in build_insn()
923 if (finish_jmp(ctx, jmp, off) < 0) in build_insn()
926 /* PC += off if dst == imm */ in build_insn()
927 /* PC += off if dst != imm */ in build_insn()
928 /* PC += off if dst & imm */ in build_insn()
929 /* PC += off if dst > imm */ in build_insn()
930 /* PC += off if dst >= imm */ in build_insn()
931 /* PC += off if dst < imm */ in build_insn()
932 /* PC += off if dst <= imm */ in build_insn()
933 /* PC += off if dst > imm (signed) */ in build_insn()
934 /* PC += off if dst >= imm (signed) */ in build_insn()
935 /* PC += off if dst < imm (signed) */ in build_insn()
936 /* PC += off if dst <= imm (signed) */ in build_insn()
948 if (off == 0) in build_insn()
950 setup_jmp_i(ctx, imm, 32, BPF_OP(code), off, &jmp, &rel); in build_insn()
959 if (finish_jmp(ctx, jmp, off) < 0) in build_insn()
962 /* PC += off if dst == src */ in build_insn()
963 /* PC += off if dst != src */ in build_insn()
964 /* PC += off if dst & src */ in build_insn()
965 /* PC += off if dst > src */ in build_insn()
966 /* PC += off if dst >= src */ in build_insn()
967 /* PC += off if dst < src */ in build_insn()
968 /* PC += off if dst <= src */ in build_insn()
969 /* PC += off if dst > src (signed) */ in build_insn()
970 /* PC += off if dst >= src (signed) */ in build_insn()
971 /* PC += off if dst < src (signed) */ in build_insn()
972 /* PC += off if dst <= src (signed) */ in build_insn()
984 if (off == 0) in build_insn()
986 setup_jmp_r(ctx, dst == src, BPF_OP(code), off, &jmp, &rel); in build_insn()
988 if (finish_jmp(ctx, jmp, off) < 0) in build_insn()
991 /* PC += off if dst == imm */ in build_insn()
992 /* PC += off if dst != imm */ in build_insn()
993 /* PC += off if dst & imm */ in build_insn()
994 /* PC += off if dst > imm */ in build_insn()
995 /* PC += off if dst >= imm */ in build_insn()
996 /* PC += off if dst < imm */ in build_insn()
997 /* PC += off if dst <= imm */ in build_insn()
998 /* PC += off if dst > imm (signed) */ in build_insn()
999 /* PC += off if dst >= imm (signed) */ in build_insn()
1000 /* PC += off if dst < imm (signed) */ in build_insn()
1001 /* PC += off if dst <= imm (signed) */ in build_insn()
1013 if (off == 0) in build_insn()
1015 setup_jmp_i(ctx, imm, 64, BPF_OP(code), off, &jmp, &rel); in build_insn()
1023 if (finish_jmp(ctx, jmp, off) < 0) in build_insn()
1026 /* PC += off */ in build_insn()
1028 if (off == 0) in build_insn()
1030 if (emit_ja(ctx, off) < 0) in build_insn()