Lines Matching full:off
333 /* Load operation: dst = *(size*)(src + off) */
334 static void emit_ldx(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 size) in emit_ldx() argument
339 emit(ctx, lbu, dst, off, src); in emit_ldx()
343 emit(ctx, lhu, dst, off, src); in emit_ldx()
347 emit(ctx, lwu, dst, off, src); in emit_ldx()
351 emit(ctx, ld, dst, off, src); in emit_ldx()
357 /* Store operation: *(size *)(dst + off) = src */
358 static void emit_stx(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 size) in emit_stx() argument
363 emit(ctx, sb, src, off, dst); in emit_stx()
367 emit(ctx, sh, src, off, dst); in emit_stx()
371 emit(ctx, sw, src, off, dst); in emit_stx()
375 emit(ctx, sd, src, off, dst); in emit_stx()
382 u8 dst, u8 src, s16 off, u8 code) in emit_atomic_r64() argument
388 emit(ctx, lld, t1, off, dst); in emit_atomic_r64()
410 emit(ctx, scd, t2, off, dst); in emit_atomic_r64()
421 static void emit_cmpxchg_r64(struct jit_context *ctx, u8 dst, u8 src, s16 off) in emit_cmpxchg_r64() argument
428 emit(ctx, lld, t1, off, dst); in emit_cmpxchg_r64()
431 emit(ctx, scd, t2, off, dst); in emit_cmpxchg_r64()
483 int off; in emit_tail_call() local
493 off = offsetof(struct bpf_array, map.max_entries); in emit_tail_call()
494 if (off > 0x7fff) in emit_tail_call()
496 emit(ctx, lwu, tmp, off, ary); /* tmp = ary->map.max_entrs*/ in emit_tail_call()
498 emit(ctx, beqz, tmp, get_offset(ctx, 1)); /* PC += off(1) if tmp == 0*/ in emit_tail_call()
502 emit(ctx, bltz, tcc, get_offset(ctx, 1)); /* PC += off(1) if tcc < 0 */ in emit_tail_call()
505 off = offsetof(struct bpf_array, ptrs); in emit_tail_call()
506 if (off > 0x7fff) in emit_tail_call()
510 emit(ctx, ld, tmp, off, tmp); /* tmp = *(tmp + off) */ in emit_tail_call()
513 emit(ctx, beqz, tmp, get_offset(ctx, 1)); /* PC += off(1) if tmp == 0*/ in emit_tail_call()
517 off = offsetof(struct bpf_prog, bpf_func); in emit_tail_call()
518 if (off > 0x7fff) in emit_tail_call()
520 emit(ctx, ld, tmp, off, tmp); /* tmp = *(tmp + off) */ in emit_tail_call()
641 s16 off = insn->off; in build_insn() local
823 /* LDX: dst = *(size *)(src + off) */ in build_insn()
828 emit_ldx(ctx, dst, src, off, BPF_SIZE(code)); in build_insn()
830 /* ST: *(size *)(dst + off) = imm */ in build_insn()
836 emit_stx(ctx, dst, MIPS_R_T4, off, BPF_SIZE(code)); in build_insn()
838 /* STX: *(size *)(dst + off) = src */ in build_insn()
843 emit_stx(ctx, dst, src, off, BPF_SIZE(code)); in build_insn()
862 emit_atomic_r64(ctx, dst, src, off, imm); in build_insn()
871 emit_atomic_r(ctx, tmp, src, off, imm); in build_insn()
875 emit_atomic_r(ctx, dst, MIPS_R_T4, off, imm); in build_insn()
880 emit_cmpxchg_r64(ctx, dst, src, off); in build_insn()
888 emit_cmpxchg_r(ctx, dst, MIPS_R_T5, tmp, off); 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 */ in build_insn()
903 /* PC += off if dst < src */ in build_insn()
904 /* PC += off if dst <= src */ in build_insn()
905 /* PC += off if dst > src (signed) */ in build_insn()
906 /* PC += off if dst >= src (signed) */ in build_insn()
907 /* PC += off if dst < src (signed) */ in build_insn()
908 /* PC += off if dst <= src (signed) */ in build_insn()
920 if (off == 0) in build_insn()
922 setup_jmp_r(ctx, dst == src, BPF_OP(code), off, &jmp, &rel); in build_insn()
926 if (finish_jmp(ctx, jmp, off) < 0) 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 */ in build_insn()
934 /* PC += off if dst < imm */ in build_insn()
935 /* PC += off if dst <= imm */ in build_insn()
936 /* PC += off if dst > imm (signed) */ in build_insn()
937 /* PC += off if dst >= imm (signed) */ in build_insn()
938 /* PC += off if dst < imm (signed) */ in build_insn()
939 /* PC += off if dst <= imm (signed) */ in build_insn()
951 if (off == 0) in build_insn()
953 setup_jmp_i(ctx, imm, 32, BPF_OP(code), off, &jmp, &rel); in build_insn()
962 if (finish_jmp(ctx, jmp, off) < 0) 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 */ in build_insn()
970 /* PC += off if dst < src */ in build_insn()
971 /* PC += off if dst <= src */ in build_insn()
972 /* PC += off if dst > src (signed) */ in build_insn()
973 /* PC += off if dst >= src (signed) */ in build_insn()
974 /* PC += off if dst < src (signed) */ in build_insn()
975 /* PC += off if dst <= src (signed) */ in build_insn()
987 if (off == 0) in build_insn()
989 setup_jmp_r(ctx, dst == src, BPF_OP(code), off, &jmp, &rel); in build_insn()
991 if (finish_jmp(ctx, jmp, off) < 0) 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 */ in build_insn()
999 /* PC += off if dst < imm */ in build_insn()
1000 /* PC += off if dst <= imm */ in build_insn()
1001 /* PC += off if dst > imm (signed) */ in build_insn()
1002 /* PC += off if dst >= imm (signed) */ in build_insn()
1003 /* PC += off if dst < imm (signed) */ in build_insn()
1004 /* PC += off if dst <= imm (signed) */ in build_insn()
1016 if (off == 0) in build_insn()
1018 setup_jmp_i(ctx, imm, 64, BPF_OP(code), off, &jmp, &rel); in build_insn()
1026 if (finish_jmp(ctx, jmp, off) < 0) in build_insn()
1029 /* PC += off */ in build_insn()
1031 if (off == 0) in build_insn()
1033 if (emit_ja(ctx, off) < 0) in build_insn()