[PATCH-for-10.1] target/i386/gdbstub: Replace ldtul_p() -> ldq_p()

Philippe Mathieu-Daudé posted 1 patch 10 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250325154528.93845-1-philmd@linaro.org
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Zhao Liu <zhao1.liu@intel.com>
target/i386/gdbstub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH-for-10.1] target/i386/gdbstub: Replace ldtul_p() -> ldq_p()
Posted by Philippe Mathieu-Daudé 10 months, 2 weeks ago
When TARGET_LONG_BITS == 64, ldtul_p() expand to ldq_p().
Directly use the expanded form for clarity.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/i386/gdbstub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c
index 04c49e802d7..3dc022fccf7 100644
--- a/target/i386/gdbstub.c
+++ b/target/i386/gdbstub.c
@@ -287,9 +287,9 @@ int x86_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
     if (n < CPU_NB_REGS) {
         if (TARGET_LONG_BITS == 64) {
             if (env->hflags & HF_CS64_MASK) {
-                env->regs[gpr_map[n]] = ldtul_p(mem_buf);
+                env->regs[gpr_map[n]] = ldq_p(mem_buf);
             } else if (n < CPU_NB_REGS32) {
-                env->regs[gpr_map[n]] = ldtul_p(mem_buf) & 0xffffffffUL;
+                env->regs[gpr_map[n]] = ldq_p(mem_buf) & 0xffffffffUL;
             }
             return sizeof(target_ulong);
         } else if (n < CPU_NB_REGS32) {
-- 
2.47.1


Re: [PATCH-for-10.1] target/i386/gdbstub: Replace ldtul_p() -> ldq_p()
Posted by Alex Bennée 10 months, 2 weeks ago
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> When TARGET_LONG_BITS == 64, ldtul_p() expand to ldq_p().
> Directly use the expanded form for clarity.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Queued to gdbsub/next, thanks.
<snip>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH-for-10.1] target/i386/gdbstub: Replace ldtul_p() -> ldq_p()
Posted by Philippe Mathieu-Daudé 1 month, 2 weeks ago
Hi,

On 26/3/25 12:26, Alex Bennée wrote:
> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> 
>> When TARGET_LONG_BITS == 64, ldtul_p() expand to ldq_p().
>> Directly use the expanded form for clarity.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> Queued to gdbsub/next, thanks.
> <snip>
> 

This patch got never merged, is there an issue with it?

Re: [PATCH-for-10.1] target/i386/gdbstub: Replace ldtul_p() -> ldq_p()
Posted by Zhao Liu 10 months, 2 weeks ago
On Tue, Mar 25, 2025 at 04:45:28PM +0100, Philippe Mathieu-Daudé wrote:
> Date: Tue, 25 Mar 2025 16:45:28 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: [PATCH-for-10.1] target/i386/gdbstub: Replace ldtul_p() -> ldq_p()
> X-Mailer: git-send-email 2.47.1
> 
> When TARGET_LONG_BITS == 64, ldtul_p() expand to ldq_p().
> Directly use the expanded form for clarity.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/i386/gdbstub.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Re: [PATCH-for-10.1] target/i386/gdbstub: Replace ldtul_p() -> ldq_p()
Posted by Richard Henderson 10 months, 2 weeks ago
On 3/25/25 08:45, Philippe Mathieu-Daudé wrote:
> When TARGET_LONG_BITS == 64, ldtul_p() expand to ldq_p().
> Directly use the expanded form for clarity.
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   target/i386/gdbstub.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~