mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
TCG: Use gen_opc_ptr from context instead of global variable.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
8232a46a16
commit
efd7f48600
17 changed files with 109 additions and 106 deletions
70
tcg/tcg-op.h
70
tcg/tcg-op.h
|
@ -27,58 +27,58 @@ int gen_new_label(void);
|
|||
|
||||
static inline void tcg_gen_op0(TCGOpcode opc)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
}
|
||||
|
||||
static inline void tcg_gen_op1_i32(TCGOpcode opc, TCGv_i32 arg1)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
}
|
||||
|
||||
static inline void tcg_gen_op1_i64(TCGOpcode opc, TCGv_i64 arg1)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
}
|
||||
|
||||
static inline void tcg_gen_op1i(TCGOpcode opc, TCGArg arg1)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = arg1;
|
||||
}
|
||||
|
||||
static inline void tcg_gen_op2_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
}
|
||||
|
||||
static inline void tcg_gen_op2_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
}
|
||||
|
||||
static inline void tcg_gen_op2i_i32(TCGOpcode opc, TCGv_i32 arg1, TCGArg arg2)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = arg2;
|
||||
}
|
||||
|
||||
static inline void tcg_gen_op2i_i64(TCGOpcode opc, TCGv_i64 arg1, TCGArg arg2)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = arg2;
|
||||
}
|
||||
|
||||
static inline void tcg_gen_op2ii(TCGOpcode opc, TCGArg arg1, TCGArg arg2)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = arg1;
|
||||
*gen_opparam_ptr++ = arg2;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ static inline void tcg_gen_op2ii(TCGOpcode opc, TCGArg arg1, TCGArg arg2)
|
|||
static inline void tcg_gen_op3_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
||||
TCGv_i32 arg3)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg3);
|
||||
|
@ -95,7 +95,7 @@ static inline void tcg_gen_op3_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
|||
static inline void tcg_gen_op3_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
||||
TCGv_i64 arg3)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg3);
|
||||
|
@ -104,7 +104,7 @@ static inline void tcg_gen_op3_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
|||
static inline void tcg_gen_op3i_i32(TCGOpcode opc, TCGv_i32 arg1,
|
||||
TCGv_i32 arg2, TCGArg arg3)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = arg3;
|
||||
|
@ -113,7 +113,7 @@ static inline void tcg_gen_op3i_i32(TCGOpcode opc, TCGv_i32 arg1,
|
|||
static inline void tcg_gen_op3i_i64(TCGOpcode opc, TCGv_i64 arg1,
|
||||
TCGv_i64 arg2, TCGArg arg3)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = arg3;
|
||||
|
@ -122,7 +122,7 @@ static inline void tcg_gen_op3i_i64(TCGOpcode opc, TCGv_i64 arg1,
|
|||
static inline void tcg_gen_ldst_op_i32(TCGOpcode opc, TCGv_i32 val,
|
||||
TCGv_ptr base, TCGArg offset)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(val);
|
||||
*gen_opparam_ptr++ = GET_TCGV_PTR(base);
|
||||
*gen_opparam_ptr++ = offset;
|
||||
|
@ -131,7 +131,7 @@ static inline void tcg_gen_ldst_op_i32(TCGOpcode opc, TCGv_i32 val,
|
|||
static inline void tcg_gen_ldst_op_i64(TCGOpcode opc, TCGv_i64 val,
|
||||
TCGv_ptr base, TCGArg offset)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(val);
|
||||
*gen_opparam_ptr++ = GET_TCGV_PTR(base);
|
||||
*gen_opparam_ptr++ = offset;
|
||||
|
@ -140,7 +140,7 @@ static inline void tcg_gen_ldst_op_i64(TCGOpcode opc, TCGv_i64 val,
|
|||
static inline void tcg_gen_qemu_ldst_op_i64_i32(TCGOpcode opc, TCGv_i64 val,
|
||||
TCGv_i32 addr, TCGArg mem_index)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(val);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(addr);
|
||||
*gen_opparam_ptr++ = mem_index;
|
||||
|
@ -149,7 +149,7 @@ static inline void tcg_gen_qemu_ldst_op_i64_i32(TCGOpcode opc, TCGv_i64 val,
|
|||
static inline void tcg_gen_qemu_ldst_op_i64_i64(TCGOpcode opc, TCGv_i64 val,
|
||||
TCGv_i64 addr, TCGArg mem_index)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(val);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(addr);
|
||||
*gen_opparam_ptr++ = mem_index;
|
||||
|
@ -158,7 +158,7 @@ static inline void tcg_gen_qemu_ldst_op_i64_i64(TCGOpcode opc, TCGv_i64 val,
|
|||
static inline void tcg_gen_op4_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
||||
TCGv_i32 arg3, TCGv_i32 arg4)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg3);
|
||||
|
@ -168,7 +168,7 @@ static inline void tcg_gen_op4_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
|||
static inline void tcg_gen_op4_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
||||
TCGv_i64 arg3, TCGv_i64 arg4)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg3);
|
||||
|
@ -178,7 +178,7 @@ static inline void tcg_gen_op4_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
|||
static inline void tcg_gen_op4i_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
||||
TCGv_i32 arg3, TCGArg arg4)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg3);
|
||||
|
@ -188,7 +188,7 @@ static inline void tcg_gen_op4i_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
|||
static inline void tcg_gen_op4i_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
||||
TCGv_i64 arg3, TCGArg arg4)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg3);
|
||||
|
@ -198,7 +198,7 @@ static inline void tcg_gen_op4i_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
|||
static inline void tcg_gen_op4ii_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
||||
TCGArg arg3, TCGArg arg4)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = arg3;
|
||||
|
@ -208,7 +208,7 @@ static inline void tcg_gen_op4ii_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2
|
|||
static inline void tcg_gen_op4ii_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
||||
TCGArg arg3, TCGArg arg4)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = arg3;
|
||||
|
@ -218,7 +218,7 @@ static inline void tcg_gen_op4ii_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2
|
|||
static inline void tcg_gen_op5_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
||||
TCGv_i32 arg3, TCGv_i32 arg4, TCGv_i32 arg5)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg3);
|
||||
|
@ -229,7 +229,7 @@ static inline void tcg_gen_op5_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
|||
static inline void tcg_gen_op5_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
||||
TCGv_i64 arg3, TCGv_i64 arg4, TCGv_i64 arg5)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg3);
|
||||
|
@ -240,7 +240,7 @@ static inline void tcg_gen_op5_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
|||
static inline void tcg_gen_op5i_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
||||
TCGv_i32 arg3, TCGv_i32 arg4, TCGArg arg5)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg3);
|
||||
|
@ -251,7 +251,7 @@ static inline void tcg_gen_op5i_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
|||
static inline void tcg_gen_op5i_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
||||
TCGv_i64 arg3, TCGv_i64 arg4, TCGArg arg5)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg3);
|
||||
|
@ -263,7 +263,7 @@ static inline void tcg_gen_op5ii_i32(TCGOpcode opc, TCGv_i32 arg1,
|
|||
TCGv_i32 arg2, TCGv_i32 arg3,
|
||||
TCGArg arg4, TCGArg arg5)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg3);
|
||||
|
@ -275,7 +275,7 @@ static inline void tcg_gen_op5ii_i64(TCGOpcode opc, TCGv_i64 arg1,
|
|||
TCGv_i64 arg2, TCGv_i64 arg3,
|
||||
TCGArg arg4, TCGArg arg5)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg3);
|
||||
|
@ -287,7 +287,7 @@ static inline void tcg_gen_op6_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
|||
TCGv_i32 arg3, TCGv_i32 arg4, TCGv_i32 arg5,
|
||||
TCGv_i32 arg6)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg3);
|
||||
|
@ -300,7 +300,7 @@ static inline void tcg_gen_op6_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
|||
TCGv_i64 arg3, TCGv_i64 arg4, TCGv_i64 arg5,
|
||||
TCGv_i64 arg6)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg3);
|
||||
|
@ -313,7 +313,7 @@ static inline void tcg_gen_op6i_i32(TCGOpcode opc, TCGv_i32 arg1, TCGv_i32 arg2,
|
|||
TCGv_i32 arg3, TCGv_i32 arg4,
|
||||
TCGv_i32 arg5, TCGArg arg6)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg3);
|
||||
|
@ -326,7 +326,7 @@ static inline void tcg_gen_op6i_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 arg2,
|
|||
TCGv_i64 arg3, TCGv_i64 arg4,
|
||||
TCGv_i64 arg5, TCGArg arg6)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg3);
|
||||
|
@ -339,7 +339,7 @@ static inline void tcg_gen_op6ii_i32(TCGOpcode opc, TCGv_i32 arg1,
|
|||
TCGv_i32 arg2, TCGv_i32 arg3,
|
||||
TCGv_i32 arg4, TCGArg arg5, TCGArg arg6)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I32(arg3);
|
||||
|
@ -352,7 +352,7 @@ static inline void tcg_gen_op6ii_i64(TCGOpcode opc, TCGv_i64 arg1,
|
|||
TCGv_i64 arg2, TCGv_i64 arg3,
|
||||
TCGv_i64 arg4, TCGArg arg5, TCGArg arg6)
|
||||
{
|
||||
*gen_opc_ptr++ = opc;
|
||||
*tcg_ctx.gen_opc_ptr++ = opc;
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg1);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg2);
|
||||
*gen_opparam_ptr++ = GET_TCGV_I64(arg3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue