|
@@ -250,8 +250,9 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx)
|
|
off = offsetof(struct bpf_array, map.max_entries);
|
|
off = offsetof(struct bpf_array, map.max_entries);
|
|
emit_a64_mov_i64(tmp, off, ctx);
|
|
emit_a64_mov_i64(tmp, off, ctx);
|
|
emit(A64_LDR32(tmp, r2, tmp), ctx);
|
|
emit(A64_LDR32(tmp, r2, tmp), ctx);
|
|
|
|
+ emit(A64_MOV(0, r3, r3), ctx);
|
|
emit(A64_CMP(0, r3, tmp), ctx);
|
|
emit(A64_CMP(0, r3, tmp), ctx);
|
|
- emit(A64_B_(A64_COND_GE, jmp_offset), ctx);
|
|
|
|
|
|
+ emit(A64_B_(A64_COND_CS, jmp_offset), ctx);
|
|
|
|
|
|
/* if (tail_call_cnt > MAX_TAIL_CALL_CNT)
|
|
/* if (tail_call_cnt > MAX_TAIL_CALL_CNT)
|
|
* goto out;
|
|
* goto out;
|
|
@@ -259,7 +260,7 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx)
|
|
*/
|
|
*/
|
|
emit_a64_mov_i64(tmp, MAX_TAIL_CALL_CNT, ctx);
|
|
emit_a64_mov_i64(tmp, MAX_TAIL_CALL_CNT, ctx);
|
|
emit(A64_CMP(1, tcc, tmp), ctx);
|
|
emit(A64_CMP(1, tcc, tmp), ctx);
|
|
- emit(A64_B_(A64_COND_GT, jmp_offset), ctx);
|
|
|
|
|
|
+ emit(A64_B_(A64_COND_HI, jmp_offset), ctx);
|
|
emit(A64_ADD_I(1, tcc, tcc, 1), ctx);
|
|
emit(A64_ADD_I(1, tcc, tcc, 1), ctx);
|
|
|
|
|
|
/* prog = array->ptrs[index];
|
|
/* prog = array->ptrs[index];
|