diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-11-02 19:36:20 -0800 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2020-11-04 10:35:40 -0800 |
commit | f14bed3fd4a17e1255e2ed6db1dfe50e654e601d (patch) | |
tree | a234e89d41e7bb18ce0876236904fdf71077003f /tcg | |
parent | 3c8c36c9087da957f580a9bb5ebf7814a753d1c6 (diff) | |
download | qemu-f14bed3fd4a17e1255e2ed6db1dfe50e654e601d.zip qemu-f14bed3fd4a17e1255e2ed6db1dfe50e654e601d.tar.gz qemu-f14bed3fd4a17e1255e2ed6db1dfe50e654e601d.tar.bz2 |
tcg: Remove assert from set_jmp_reset_offset
Since 6e6c4efed99, there has been a more appropriate range check
done later at the end of tcg_gen_code. There, a failing range
check results in a returned error code, which causes the TB to
be restarted at half the size.
Reported-by: Sai Pavan Boddu <saipava@xilinx.com>
Tested-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/tcg.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -335,10 +335,11 @@ static bool tcg_resolve_relocs(TCGContext *s) static void set_jmp_reset_offset(TCGContext *s, int which) { - size_t off = tcg_current_code_size(s); - s->tb_jmp_reset_offset[which] = off; - /* Make sure that we didn't overflow the stored offset. */ - assert(s->tb_jmp_reset_offset[which] == off); + /* + * We will check for overflow at the end of the opcode loop in + * tcg_gen_code, where we bound tcg_current_code_size to UINT16_MAX. + */ + s->tb_jmp_reset_offset[which] = tcg_current_code_size(s); } #include "tcg-target.c.inc" |