target/rx: Use target_ulong for address in LI
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 24 Jul 2024 04:53:38 +0000 (14:53 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 28 Jul 2024 04:13:05 +0000 (14:13 +1000)
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 <richard.henderson@linaro.org>
Tested-by: Thomas Huth <thuth@redhat.com>
target/rx/translate.c

index 9b81cf20b36f03606fdad9b60d53b656548701b6..9aade2b6e5c0020986db8783d98213946de19fa2 100644 (file)
@@ -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;