diff mbox series

tcg: Add tcg_gen_mov_ptr

Message ID 20220531032103.406203-1-richard.henderson@linaro.org
State New
Headers show
Series tcg: Add tcg_gen_mov_ptr | expand

Commit Message

Richard Henderson May 31, 2022, 3:21 a.m. UTC
Add an interface to perform moves between TCGv_ptr.

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

This will be required for target/arm FEAT_SME.

r~

---
 include/tcg/tcg-op.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Matheus K. Ferst June 1, 2022, 2:12 p.m. UTC | #1
On 31/05/2022 00:21, Richard Henderson wrote:
> Add an interface to perform moves between TCGv_ptr.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> 
> This will be required for target/arm FEAT_SME.
> 
> r~
> 
> ---
>   include/tcg/tcg-op.h | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h
> index b09b8b4a05..209e168305 100644
> --- a/include/tcg/tcg-op.h
> +++ b/include/tcg/tcg-op.h
> @@ -1288,6 +1288,11 @@ static inline void tcg_gen_addi_ptr(TCGv_ptr r, TCGv_ptr a, intptr_t b)
>       glue(tcg_gen_addi_,PTR)((NAT)r, (NAT)a, b);
>   }
> 
> +static inline void tcg_gen_mov_ptr(TCGv_ptr d, TCGv_ptr s)
> +{
> +    glue(tcg_gen_mov_,PTR)((NAT)d, (NAT)s);
> +}
> +
>   static inline void tcg_gen_brcondi_ptr(TCGCond cond, TCGv_ptr a,
>                                          intptr_t b, TCGLabel *label)
>   {
> --
> 2.34.1
> 
> 

Reviewed-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
diff mbox series

Patch

diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h
index b09b8b4a05..209e168305 100644
--- a/include/tcg/tcg-op.h
+++ b/include/tcg/tcg-op.h
@@ -1288,6 +1288,11 @@  static inline void tcg_gen_addi_ptr(TCGv_ptr r, TCGv_ptr a, intptr_t b)
     glue(tcg_gen_addi_,PTR)((NAT)r, (NAT)a, b);
 }
 
+static inline void tcg_gen_mov_ptr(TCGv_ptr d, TCGv_ptr s)
+{
+    glue(tcg_gen_mov_,PTR)((NAT)d, (NAT)s);
+}
+
 static inline void tcg_gen_brcondi_ptr(TCGCond cond, TCGv_ptr a,
                                        intptr_t b, TCGLabel *label)
 {