mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
target-xtensa: fix search_pc for the last TB opcode
Zero out tcg_ctx.gen_opc_instr_start for instructions representing the last guest opcode in the TB. Cc: qemu-stable@nongnu.org Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
3f124b6874
commit
36f25d2537
1 changed files with 5 additions and 1 deletions
|
|
@ -3005,7 +3005,11 @@ static void gen_intermediate_code_internal(
|
||||||
gen_icount_end(tb, insn_count);
|
gen_icount_end(tb, insn_count);
|
||||||
*tcg_ctx.gen_opc_ptr = INDEX_op_end;
|
*tcg_ctx.gen_opc_ptr = INDEX_op_end;
|
||||||
|
|
||||||
if (!search_pc) {
|
if (search_pc) {
|
||||||
|
j = tcg_ctx.gen_opc_ptr - tcg_ctx.gen_opc_buf;
|
||||||
|
memset(tcg_ctx.gen_opc_instr_start + lj + 1, 0,
|
||||||
|
(j - lj) * sizeof(tcg_ctx.gen_opc_instr_start[0]));
|
||||||
|
} else {
|
||||||
tb->size = dc.pc - pc_start;
|
tb->size = dc.pc - pc_start;
|
||||||
tb->icount = insn_count;
|
tb->icount = insn_count;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue