[PATCH 4/8] accel/tcg: Replace target_ulong with vaddr in helper_unaligned_*()

Anton Johansson via posted 8 patches 1 year, 2 months ago
There is a newer version of this series
[PATCH 4/8] accel/tcg: Replace target_ulong with vaddr in helper_unaligned_*()
Posted by Anton Johansson via 1 year, 2 months ago
Updates helper_unaligned_[ld|st] to take the store/load address as a
vaddr instead of a target_ulong.

Signed-off-by: Anton Johansson <anjo@rev.ng>
---
 accel/tcg/user-exec.c  | 4 ++--
 include/tcg/tcg-ldst.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 7ec49933fb..d0673de771 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -904,12 +904,12 @@ static void validate_memop(MemOpIdx oi, MemOp expected)
 #endif
 }
 
-void helper_unaligned_ld(CPUArchState *env, target_ulong addr)
+void helper_unaligned_ld(CPUArchState *env, vaddr addr)
 {
     cpu_loop_exit_sigbus(env_cpu(env), addr, MMU_DATA_LOAD, GETPC());
 }
 
-void helper_unaligned_st(CPUArchState *env, target_ulong addr)
+void helper_unaligned_st(CPUArchState *env, vaddr addr)
 {
     cpu_loop_exit_sigbus(env_cpu(env), addr, MMU_DATA_STORE, GETPC());
 }
diff --git a/include/tcg/tcg-ldst.h b/include/tcg/tcg-ldst.h
index 2ba22bd5fe..cad7782e2e 100644
--- a/include/tcg/tcg-ldst.h
+++ b/include/tcg/tcg-ldst.h
@@ -72,8 +72,8 @@ void helper_be_stq_mmu(CPUArchState *env, target_ulong addr, uint64_t val,
 
 #else
 
-G_NORETURN void helper_unaligned_ld(CPUArchState *env, target_ulong addr);
-G_NORETURN void helper_unaligned_st(CPUArchState *env, target_ulong addr);
+G_NORETURN void helper_unaligned_ld(CPUArchState *env, vaddr addr);
+G_NORETURN void helper_unaligned_st(CPUArchState *env, vaddr addr);
 
 #endif /* CONFIG_SOFTMMU */
 #endif /* TCG_LDST_H */
-- 
2.39.1
Re: [PATCH 4/8] accel/tcg: Replace target_ulong with vaddr in helper_unaligned_*()
Posted by Richard Henderson 1 year, 2 months ago
On 4/20/23 22:28, Anton Johansson wrote:
> Updates helper_unaligned_[ld|st] to take the store/load address as a
> vaddr instead of a target_ulong.
> 
> Signed-off-by: Anton Johansson<anjo@rev.ng>
> ---
>   accel/tcg/user-exec.c  | 4 ++--
>   include/tcg/tcg-ldst.h | 4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)

I've got patches posted to remove these functions.


r~
Re: [PATCH 4/8] accel/tcg: Replace target_ulong with vaddr in helper_unaligned_*()
Posted by Anton Johansson via 1 year, 2 months ago
On 4/23/23 11:10, Richard Henderson wrote:
> On 4/20/23 22:28, Anton Johansson wrote:
>> Updates helper_unaligned_[ld|st] to take the store/load address as a
>> vaddr instead of a target_ulong.
>>
>> Signed-off-by: Anton Johansson<anjo@rev.ng>
>> ---
>>   accel/tcg/user-exec.c  | 4 ++--
>>   include/tcg/tcg-ldst.h | 4 ++--
>>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> I've got patches posted to remove these functions.
Nice, I'll remove this patch then!

-- 
Anton Johansson,
rev.ng Labs Srl.