36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
|
|
From 3d5808bb00ec5cf2f2e78aa570a202af2ed3e201 Mon Sep 17 00:00:00 2001
|
||
|
|
From: dinglimin <dinglimin@cmss.chinamobile.com>
|
||
|
|
Date: Mon, 2 Sep 2024 14:42:51 +0800
|
||
|
|
Subject: [PATCH] target/rx: Use target_ulong for address in LI
|
||
|
|
|
||
|
|
cheery-pick from 83340193b991e7a974f117baa86a04db1fd835a9
|
||
|
|
|
||
|
|
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>
|
||
|
|
Signed-off-by: dinglimin <dinglimin@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
target/rx/translate.c | 3 ++-
|
||
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/target/rx/translate.c b/target/rx/translate.c
|
||
|
|
index 5db8f79a82..aacf59d5cb 100644
|
||
|
|
--- a/target/rx/translate.c
|
||
|
|
+++ b/target/rx/translate.c
|
||
|
|
@@ -82,7 +82,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;
|
||
|
|
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|