On 7/9/2026 4:06 PM, Brian Cain wrote:
> Add hex_next_PC, a global mirroring CPUHexagonState::next_PC,
> and ctx->need_next_pc, so that gen_write_new_pc_addr() can write the
> branch target through hex_next_PC instead of hex_gpr[HEX_REG_PC]
> when a later unconditional write of PC is expected. gen_end_tb()
> then commits hex_next_PC into hex_gpr[HEX_REG_PC] at the end of the
> packet.
> 
> Previously, non-COF instructions that still end a TB did not advance the
> PC, since next_PC's value was never written back into the PC register.
> 
> Signed-off-by: Brian Cain <[email protected]>
> ---
>  target/hexagon/translate.h |  3 +++
>  target/hexagon/genptr.c    | 14 ++++++++---
>  target/hexagon/translate.c | 51 ++++++++++++++++++++++++++------------
>  3 files changed, 49 insertions(+), 19 deletions(-)
> 

Reviewed-by: Pierrick Bouvier <[email protected]>

Reply via email to