diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2017-10-15 13:27:56 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2017-10-24 21:47:46 +0200 |
commit | ae8b75dc6ec808378487064922f25f1e7ea7a9be (patch) | |
tree | 706ea97a6b29077f7dc1f73c5b2922be28c416a0 /tcg/tcg.h | |
parent | 960c50e07746048a5c74f4dd29bb04763fc80eba (diff) | |
download | qemu-ae8b75dc6ec808378487064922f25f1e7ea7a9be.zip |
tcg: Introduce tcgv_{i32,i64,ptr}_{arg,temp}
Transform TCGv_* to an "argument" or a temporary.
For now, an argument is simply the temporary index.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r-- | tcg/tcg.h | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -756,6 +756,36 @@ static inline size_t arg_index(TCGArg a) return a; } +static inline TCGArg tcgv_i32_arg(TCGv_i32 t) +{ + return (intptr_t)t; +} + +static inline TCGArg tcgv_i64_arg(TCGv_i64 t) +{ + return (intptr_t)t; +} + +static inline TCGArg tcgv_ptr_arg(TCGv_ptr t) +{ + return (intptr_t)t; +} + +static inline TCGTemp *tcgv_i32_temp(TCGv_i32 t) +{ + return arg_temp(tcgv_i32_arg(t)); +} + +static inline TCGTemp *tcgv_i64_temp(TCGv_i64 t) +{ + return arg_temp(tcgv_i64_arg(t)); +} + +static inline TCGTemp *tcgv_ptr_temp(TCGv_ptr t) +{ + return arg_temp(tcgv_ptr_arg(t)); +} + static inline void tcg_set_insn_param(int op_idx, int arg, TCGArg v) { tcg_ctx.gen_op_buf[op_idx].args[arg] = v; @@ -951,7 +981,7 @@ do {\ bool tcg_op_supported(TCGOpcode op); -void tcg_gen_callN(void *func, TCGArg ret, int nargs, TCGArg *args); +void tcg_gen_callN(void *func, TCGTemp *ret, int nargs, TCGTemp **args); void tcg_op_remove(TCGContext *s, TCGOp *op); TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *op, TCGOpcode opc, int narg); |