[PATCH] target/tcg: Expand tcg_global_mem_new() -> tcg_global_mem_new_i64()

Philippe Mathieu-Daudé posted 1 patch 1 day, 12 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260205212714.10035-1-philmd@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>, Thomas Huth <thuth@redhat.com>
target/s390x/tcg/translate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH] target/tcg: Expand tcg_global_mem_new() -> tcg_global_mem_new_i64()
Posted by Philippe Mathieu-Daudé 1 day, 12 hours ago
The s390x target is a 64-bit one, so tcg_global_mem_new()
expands to tcg_global_mem_new_i64(). Use the latter which
is more explicit.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/s390x/tcg/translate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 4dabd49840f..203afe265bc 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -217,9 +217,9 @@ void s390x_translate_init(void)
 
     for (i = 0; i < 16; i++) {
         snprintf(cpu_reg_names[i], sizeof(cpu_reg_names[0]), "r%d", i);
-        regs[i] = tcg_global_mem_new(tcg_env,
-                                     offsetof(CPUS390XState, regs[i]),
-                                     cpu_reg_names[i]);
+        regs[i] = tcg_global_mem_new_i64(tcg_env,
+                                         offsetof(CPUS390XState, regs[i]),
+                                         cpu_reg_names[i]);
     }
 }
 
-- 
2.52.0


Re: [PATCH] target/tcg: Expand tcg_global_mem_new() -> tcg_global_mem_new_i64()
Posted by Thomas Huth 1 day, 2 hours ago
On 05/02/2026 22.27, Philippe Mathieu-Daudé wrote:
> The s390x target is a 64-bit one, so tcg_global_mem_new()
> expands to tcg_global_mem_new_i64(). Use the latter which
> is more explicit.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/s390x/tcg/translate.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
> index 4dabd49840f..203afe265bc 100644
> --- a/target/s390x/tcg/translate.c
> +++ b/target/s390x/tcg/translate.c
> @@ -217,9 +217,9 @@ void s390x_translate_init(void)
>   
>       for (i = 0; i < 16; i++) {
>           snprintf(cpu_reg_names[i], sizeof(cpu_reg_names[0]), "r%d", i);
> -        regs[i] = tcg_global_mem_new(tcg_env,
> -                                     offsetof(CPUS390XState, regs[i]),
> -                                     cpu_reg_names[i]);
> +        regs[i] = tcg_global_mem_new_i64(tcg_env,
> +                                         offsetof(CPUS390XState, regs[i]),
> +                                         cpu_reg_names[i]);
>       }
>   }
>   

Reviewed-by: Thomas Huth <thuth@redhat.com>


Re: [PATCH] target/tcg: Expand tcg_global_mem_new() -> tcg_global_mem_new_i64()
Posted by Philippe Mathieu-Daudé 1 day, 11 hours ago
"target/s390x: ..." in subject :/

On 5/2/26 22:27, Philippe Mathieu-Daudé wrote:
> The s390x target is a 64-bit one, so tcg_global_mem_new()
> expands to tcg_global_mem_new_i64(). Use the latter which
> is more explicit.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/s390x/tcg/translate.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
> index 4dabd49840f..203afe265bc 100644
> --- a/target/s390x/tcg/translate.c
> +++ b/target/s390x/tcg/translate.c
> @@ -217,9 +217,9 @@ void s390x_translate_init(void)
>   
>       for (i = 0; i < 16; i++) {
>           snprintf(cpu_reg_names[i], sizeof(cpu_reg_names[0]), "r%d", i);
> -        regs[i] = tcg_global_mem_new(tcg_env,
> -                                     offsetof(CPUS390XState, regs[i]),
> -                                     cpu_reg_names[i]);
> +        regs[i] = tcg_global_mem_new_i64(tcg_env,
> +                                         offsetof(CPUS390XState, regs[i]),
> +                                         cpu_reg_names[i]);
>       }
>   }
>