Skip to content

Commit

Permalink
target/rx: Use target_ulong for address in LI
Browse files Browse the repository at this point in the history
Using int32_t meant that the address was sign-extended to uint64_t
when passing to translator_ld*, triggering an assert.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2453
Signed-off-by: Richard Henderson <[email protected]>
Tested-by: Thomas Huth <[email protected]>
  • Loading branch information
rth7680 committed Jul 28, 2024
1 parent 93b799f commit 8334019
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target/rx/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ static uint32_t decode_load_bytes(DisasContext *ctx, uint32_t insn,

static uint32_t li(DisasContext *ctx, int sz)
{
int32_t tmp, addr;
target_ulong addr;
uint32_t tmp;
CPURXState *env = ctx->env;
addr = ctx->base.pc_next;

Expand Down

0 comments on commit 8334019

Please sign in to comment.