aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-07-24 14:53:38 +1000
committerMichael Tokarev <mjt@tls.msk.ru>2024-07-30 22:28:41 +0300
commite929b9186ec1e25406cf4f04c5fe1b41bc0b0fe4 (patch)
treeabe61a5675895810eb1ca1e8c105cede4a3208a8
parent4aa3598170460aff3863d5fa079ac3c694e4055d (diff)
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 <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>
-rw-r--r--target/rx/translate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/rx/translate.c b/target/rx/translate.c
index 87a3f54adb..4233622c4e 100644
--- a/target/rx/translate.c
+++ b/target/rx/translate.c
@@ -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;