diff mbox

[v6,07/50] tcg: Return NULL temp for TCG_CALL_DUMMY_ARG

Message ID 20171016172609.23422-8-richard.henderson@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Richard Henderson Oct. 16, 2017, 5:25 p.m. UTC
From: Richard Henderson <rth@twiddle.net>

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/tcg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Emilio Cota Oct. 17, 2017, 8:56 p.m. UTC | #1
On Mon, Oct 16, 2017 at 10:25:26 -0700, Richard Henderson wrote:
> From: Richard Henderson <rth@twiddle.net>
> 
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>  tcg/tcg.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tcg/tcg.h b/tcg/tcg.h
> index fc4d1ed58b..5fcdec1fc5 100644
> --- a/tcg/tcg.h
> +++ b/tcg/tcg.h
> @@ -731,7 +731,7 @@ extern bool parallel_cpus;
>  
>  static inline TCGTemp *arg_temp(TCGArg a)
>  {
> -    return &tcg_ctx.temps[a];
> +    return a == TCG_CALL_DUMMY_ARG ? NULL : &tcg_ctx.temps[a];
>  }

Reviewed-by: Emilio G. Cota <cota@braap.org>

		E.
diff mbox

Patch

diff --git a/tcg/tcg.h b/tcg/tcg.h
index fc4d1ed58b..5fcdec1fc5 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -731,7 +731,7 @@  extern bool parallel_cpus;
 
 static inline TCGTemp *arg_temp(TCGArg a)
 {
-    return &tcg_ctx.temps[a];
+    return a == TCG_CALL_DUMMY_ARG ? NULL : &tcg_ctx.temps[a];
 }
 
 static inline void tcg_set_insn_param(int op_idx, int arg, TCGArg v)