Philippe Mathieu-Daudé <phi...@linaro.org> writes:

> tcg_gen_insn_start() is now common to all TCG frontends.
> We don't need to keep it inlined, move it to tcg.c.
>
> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
> ---
>  include/tcg/tcg-op.h | 15 ---------------
>  include/tcg/tcg.h    |  2 ++
>  tcg/tcg.c            | 15 +++++++++++++++
>  3 files changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h
> index cf177a1fd3b..470cb46225e 100644
> --- a/include/tcg/tcg-op.h
> +++ b/include/tcg/tcg-op.h
> @@ -22,21 +22,6 @@
>  # error
>  #endif
>  
> -static inline void tcg_gen_insn_start(uint64_t pc, uint64_t a1, uint64_t a2)
> -{
> -    unsigned insn_start_words = tcg_ctx->insn_start_words;
> -    TCGOp *op = tcg_emit_op(INDEX_op_insn_start,
> -                            insn_start_words * 64 / TCG_TARGET_REG_BITS);
> -
> -    tcg_set_insn_start_param(op, 0, pc);
> -    if (insn_start_words > 1) {
> -        tcg_set_insn_start_param(op, 1, a1);
> -    }
> -    if (insn_start_words > 2) {
> -        tcg_set_insn_start_param(op, 2, a2);
> -    }
> -}
> -
>  #if TARGET_LONG_BITS == 32
>  typedef TCGv_i32 TCGv;
>  #define tcg_temp_new() tcg_temp_new_i32()
> diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
> index 92a23e10218..d87d900bf81 100644
> --- a/include/tcg/tcg.h
> +++ b/include/tcg/tcg.h
> @@ -609,6 +609,8 @@ static inline void tcg_set_insn_start_param(TCGOp *op, 
> int arg, uint64_t v)
>      }
>  }
>  
> +void tcg_gen_insn_start(uint64_t pc, uint64_t a1, uint64_t a2);
> +

Is would be nice to docstring the function to explain what it does and
note where the additional data is interpreted
(cpu_restore_state_from_tb?).

Otherwise:

Reviewed-by: Alex Bennée <alex.ben...@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to