Patchwork [2/2] tcg: Use INDEX_op_qemu_ld32 for 32-bit results.

login
register
mail settings
Submitter Richard Henderson
Date May 3, 2010, 11:30 p.m.
Message ID <1272929448-4223-3-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/51545/
State New
Headers show

Comments

Richard Henderson - May 3, 2010, 11:30 p.m.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/tcg-op.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
Aurelien Jarno - May 28, 2010, 6:22 p.m.
On Mon, May 03, 2010 at 04:30:48PM -0700, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <rth@twiddle.net>

Thanks, applied.

> ---
>  tcg/tcg-op.h |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
> index bafac2b..aa436de 100644
> --- a/tcg/tcg-op.h
> +++ b/tcg/tcg-op.h
> @@ -2172,12 +2172,20 @@ static inline void tcg_gen_qemu_ld16s(TCGv ret, TCGv addr, int mem_index)
>  
>  static inline void tcg_gen_qemu_ld32u(TCGv ret, TCGv addr, int mem_index)
>  {
> +#if TARGET_LONG_BITS == 32
> +    tcg_gen_qemu_ldst_op(INDEX_op_qemu_ld32, ret, addr, mem_index);
> +#else
>      tcg_gen_qemu_ldst_op(INDEX_op_qemu_ld32u, ret, addr, mem_index);
> +#endif
>  }
>  
>  static inline void tcg_gen_qemu_ld32s(TCGv ret, TCGv addr, int mem_index)
>  {
> +#if TARGET_LONG_BITS == 32
> +    tcg_gen_qemu_ldst_op(INDEX_op_qemu_ld32, ret, addr, mem_index);
> +#else
>      tcg_gen_qemu_ldst_op(INDEX_op_qemu_ld32s, ret, addr, mem_index);
> +#endif
>  }
>  
>  static inline void tcg_gen_qemu_ld64(TCGv_i64 ret, TCGv addr, int mem_index)
> -- 
> 1.7.0.1
> 
> 
> 
>

Patch

diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index bafac2b..aa436de 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -2172,12 +2172,20 @@  static inline void tcg_gen_qemu_ld16s(TCGv ret, TCGv addr, int mem_index)
 
 static inline void tcg_gen_qemu_ld32u(TCGv ret, TCGv addr, int mem_index)
 {
+#if TARGET_LONG_BITS == 32
+    tcg_gen_qemu_ldst_op(INDEX_op_qemu_ld32, ret, addr, mem_index);
+#else
     tcg_gen_qemu_ldst_op(INDEX_op_qemu_ld32u, ret, addr, mem_index);
+#endif
 }
 
 static inline void tcg_gen_qemu_ld32s(TCGv ret, TCGv addr, int mem_index)
 {
+#if TARGET_LONG_BITS == 32
+    tcg_gen_qemu_ldst_op(INDEX_op_qemu_ld32, ret, addr, mem_index);
+#else
     tcg_gen_qemu_ldst_op(INDEX_op_qemu_ld32s, ret, addr, mem_index);
+#endif
 }
 
 static inline void tcg_gen_qemu_ld64(TCGv_i64 ret, TCGv addr, int mem_index)