qemu-e2k/include/tcg
Alex Bennée 453d50ce75 accel/tcg: re-factor plugin_inject_cb so we can assert insn_idx is valid
Coverity doesn't know enough about how we have arranged our plugin TCG
ops to know we will always have incremented insn_idx before injecting
the callback. Let us assert it for the benefit of Coverity and protect
ourselves from accidentally breaking the assumption and triggering
harder to grok errors deeper in the code if we attempt a negative
indexed array lookup.

However to get to this point we re-factor the code and remove the
second hand instruction boundary detection in favour of scanning the
full set of ops and using the existing INDEX_op_insn_start to cleanly
detect when the instruction has started. As we no longer need the
plugin specific list of ops we delete that.

My initial benchmarks shows no discernible impact of dropping the
plugin specific ops list.

Fixes: Coverity 1459509
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210917162332.3511179-12-alex.bennee@linaro.org>
2021-10-12 08:38:10 +01:00
..
tcg-cond.h tcg: expose TCGCond manipulation routines 2021-06-19 14:51:51 -07:00
tcg-gvec-desc.h tcg: Adjust simd_desc size encoding 2020-10-08 05:57:32 -05:00
tcg-mo.h
tcg-op-gvec.h tcg: Implement tcg_gen_vec_add{sub}32_tl 2021-06-29 10:04:57 -07:00
tcg-op.h tcg: Remove tcg_global_reg_new defines 2021-09-14 12:00:20 -07:00
tcg-opc.h tcg: Remove TCG_TARGET_HAS_goto_ptr 2021-07-09 20:23:38 -07:00
tcg.h accel/tcg: re-factor plugin_inject_cb so we can assert insn_idx is valid 2021-10-12 08:38:10 +01:00