[PATCH v3 14/30] tcg: Use tcg_constant_ptr in do_dup

Richard Henderson posted 30 patches 2 years, 2 months ago
There is a newer version of this series
[PATCH v3 14/30] tcg: Use tcg_constant_ptr in do_dup
Posted by Richard Henderson 2 years, 2 months ago
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/tcg-op-gvec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c
index a10d406bba..877b0b659b 100644
--- a/tcg/tcg-op-gvec.c
+++ b/tcg/tcg-op-gvec.c
@@ -630,7 +630,7 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32_t oprsz,
      * stores through to memset.
      */
     if (oprsz == maxsz && vece == MO_8) {
-        TCGv_ptr t_size = tcg_const_ptr(oprsz);
+        TCGv_ptr t_size = tcg_constant_ptr(oprsz);
         TCGv_i32 t_val;
 
         if (in_32) {
@@ -646,7 +646,6 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32_t oprsz,
         if (in_64) {
             tcg_temp_free_i32(t_val);
         }
-        tcg_temp_free_ptr(t_size);
         tcg_temp_free_ptr(t_ptr);
         return;
     }
-- 
2.34.1
Re: [PATCH v3 14/30] tcg: Use tcg_constant_ptr in do_dup
Posted by Philippe Mathieu-Daudé 2 years, 2 months ago
On 25/2/23 09:59, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   tcg/tcg-op-gvec.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c
> index a10d406bba..877b0b659b 100644
> --- a/tcg/tcg-op-gvec.c
> +++ b/tcg/tcg-op-gvec.c
> @@ -630,7 +630,7 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32_t oprsz,
>        * stores through to memset.
>        */
>       if (oprsz == maxsz && vece == MO_8) {
> -        TCGv_ptr t_size = tcg_const_ptr(oprsz);
> +        TCGv_ptr t_size = tcg_constant_ptr(oprsz);

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Can we remove tcg_const_ptr() or inline it in plugin-gen.c?

Re: [PATCH v3 14/30] tcg: Use tcg_constant_ptr in do_dup
Posted by Richard Henderson 2 years, 2 months ago
On 2/24/23 23:53, Philippe Mathieu-Daudé wrote:
> On 25/2/23 09:59, Richard Henderson wrote:
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   tcg/tcg-op-gvec.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c
>> index a10d406bba..877b0b659b 100644
>> --- a/tcg/tcg-op-gvec.c
>> +++ b/tcg/tcg-op-gvec.c
>> @@ -630,7 +630,7 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32_t oprsz,
>>        * stores through to memset.
>>        */
>>       if (oprsz == maxsz && vece == MO_8) {
>> -        TCGv_ptr t_size = tcg_const_ptr(oprsz);
>> +        TCGv_ptr t_size = tcg_constant_ptr(oprsz);
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> Can we remove tcg_const_ptr() or inline it in plugin-gen.c?

There's some cleanup in the next patch.
Is that the last use?  If so, we can remove it.


r~

Re: [PATCH v3 14/30] tcg: Use tcg_constant_ptr in do_dup
Posted by Daniel Henrique Barboza 2 years, 2 months ago

On 2/25/23 05:59, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

>   tcg/tcg-op-gvec.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c
> index a10d406bba..877b0b659b 100644
> --- a/tcg/tcg-op-gvec.c
> +++ b/tcg/tcg-op-gvec.c
> @@ -630,7 +630,7 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32_t oprsz,
>        * stores through to memset.
>        */
>       if (oprsz == maxsz && vece == MO_8) {
> -        TCGv_ptr t_size = tcg_const_ptr(oprsz);
> +        TCGv_ptr t_size = tcg_constant_ptr(oprsz);
>           TCGv_i32 t_val;
>   
>           if (in_32) {
> @@ -646,7 +646,6 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32_t oprsz,
>           if (in_64) {
>               tcg_temp_free_i32(t_val);
>           }
> -        tcg_temp_free_ptr(t_size);
>           tcg_temp_free_ptr(t_ptr);
>           return;
>       }