]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
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)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 30 Jul 2024 19:28:41 +0000 (22:28 +0300)
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>
(cherry picked from commit 83340193b991e7a974f117baa86a04db1fd835a9)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/rx/translate.c

index 87a3f54adb7d5c942778fe5a97971b405cb23198..4233622c4edcf018e899ca72abef0be97df6af13 100644 (file)
@@ -83,7 +83,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;