target/rx: Use target_ulong for address in LI
PATCH 1/1 target/rx: Use target_ulong for address in LI
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]>
--- target/rx/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
target/rx/translate.c +2 -1
@@ -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;
Signature · 1 line
2.43.0
Quoted 14 lines · Richard Henderson
Using
int32_tmeant that the address was sign-extended touint64_twhen passing to translator_ld*, triggering an assert.Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2453
Signed-off-by Richard Henderson <[email protected]>--- target/rx/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)target/rx/translate.c +0
-0
target/rx/translate.c static uint32_t decode_load_bytes(DisasContext *ctx, uint32_t insn, · line 92
Quoted 9 lines
target/rx/translate.c +2
-1@@ -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;
Thank you very much! This fixes the problem for me.
Tested-by Thomas Huth <[email protected]>