[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/31] tcg: Return TCGOp from tcg_gen_op[1-6]
From: |
Richard Henderson |
Subject: |
[PULL 01/31] tcg: Return TCGOp from tcg_gen_op[1-6] |
Date: |
Sun, 22 Sep 2024 14:00:42 +0200 |
TCGOp to be propagated further in the next patch.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tcg-internal.h | 12 ++++++------
tcg/tcg-op.c | 23 +++++++++++++++--------
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h
index 9b0d982f65..d18f49f5d3 100644
--- a/tcg/tcg-internal.h
+++ b/tcg/tcg-internal.h
@@ -92,12 +92,12 @@ TCGTemp *tcg_temp_new_internal(TCGType type, TCGTempKind
kind);
*/
TCGTemp *tcg_constant_internal(TCGType type, int64_t val);
-void tcg_gen_op1(TCGOpcode, TCGArg);
-void tcg_gen_op2(TCGOpcode, TCGArg, TCGArg);
-void tcg_gen_op3(TCGOpcode, TCGArg, TCGArg, TCGArg);
-void tcg_gen_op4(TCGOpcode, TCGArg, TCGArg, TCGArg, TCGArg);
-void tcg_gen_op5(TCGOpcode, TCGArg, TCGArg, TCGArg, TCGArg, TCGArg);
-void tcg_gen_op6(TCGOpcode, TCGArg, TCGArg, TCGArg, TCGArg, TCGArg, TCGArg);
+TCGOp *tcg_gen_op1(TCGOpcode, TCGArg);
+TCGOp *tcg_gen_op2(TCGOpcode, TCGArg, TCGArg);
+TCGOp *tcg_gen_op3(TCGOpcode, TCGArg, TCGArg, TCGArg);
+TCGOp *tcg_gen_op4(TCGOpcode, TCGArg, TCGArg, TCGArg, TCGArg);
+TCGOp *tcg_gen_op5(TCGOpcode, TCGArg, TCGArg, TCGArg, TCGArg, TCGArg);
+TCGOp *tcg_gen_op6(TCGOpcode, TCGArg, TCGArg, TCGArg, TCGArg, TCGArg, TCGArg);
void vec_gen_2(TCGOpcode, TCGType, unsigned, TCGArg, TCGArg);
void vec_gen_3(TCGOpcode, TCGType, unsigned, TCGArg, TCGArg, TCGArg);
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index eff3728622..28c41b37a4 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -37,38 +37,43 @@
*/
#define NI __attribute__((noinline))
-void NI tcg_gen_op1(TCGOpcode opc, TCGArg a1)
+TCGOp * NI tcg_gen_op1(TCGOpcode opc, TCGArg a1)
{
TCGOp *op = tcg_emit_op(opc, 1);
op->args[0] = a1;
+ return op;
}
-void NI tcg_gen_op2(TCGOpcode opc, TCGArg a1, TCGArg a2)
+TCGOp * NI tcg_gen_op2(TCGOpcode opc, TCGArg a1, TCGArg a2)
{
TCGOp *op = tcg_emit_op(opc, 2);
op->args[0] = a1;
op->args[1] = a2;
+ return op;
}
-void NI tcg_gen_op3(TCGOpcode opc, TCGArg a1, TCGArg a2, TCGArg a3)
+TCGOp * NI tcg_gen_op3(TCGOpcode opc, TCGArg a1, TCGArg a2, TCGArg a3)
{
TCGOp *op = tcg_emit_op(opc, 3);
op->args[0] = a1;
op->args[1] = a2;
op->args[2] = a3;
+ return op;
}
-void NI tcg_gen_op4(TCGOpcode opc, TCGArg a1, TCGArg a2, TCGArg a3, TCGArg a4)
+TCGOp * NI tcg_gen_op4(TCGOpcode opc, TCGArg a1, TCGArg a2,
+ TCGArg a3, TCGArg a4)
{
TCGOp *op = tcg_emit_op(opc, 4);
op->args[0] = a1;
op->args[1] = a2;
op->args[2] = a3;
op->args[3] = a4;
+ return op;
}
-void NI tcg_gen_op5(TCGOpcode opc, TCGArg a1, TCGArg a2, TCGArg a3,
- TCGArg a4, TCGArg a5)
+TCGOp * NI tcg_gen_op5(TCGOpcode opc, TCGArg a1, TCGArg a2,
+ TCGArg a3, TCGArg a4, TCGArg a5)
{
TCGOp *op = tcg_emit_op(opc, 5);
op->args[0] = a1;
@@ -76,10 +81,11 @@ void NI tcg_gen_op5(TCGOpcode opc, TCGArg a1, TCGArg a2,
TCGArg a3,
op->args[2] = a3;
op->args[3] = a4;
op->args[4] = a5;
+ return op;
}
-void NI tcg_gen_op6(TCGOpcode opc, TCGArg a1, TCGArg a2, TCGArg a3,
- TCGArg a4, TCGArg a5, TCGArg a6)
+TCGOp * NI tcg_gen_op6(TCGOpcode opc, TCGArg a1, TCGArg a2, TCGArg a3,
+ TCGArg a4, TCGArg a5, TCGArg a6)
{
TCGOp *op = tcg_emit_op(opc, 6);
op->args[0] = a1;
@@ -88,6 +94,7 @@ void NI tcg_gen_op6(TCGOpcode opc, TCGArg a1, TCGArg a2,
TCGArg a3,
op->args[3] = a4;
op->args[4] = a5;
op->args[5] = a6;
+ return op;
}
/*
--
2.43.0
- [PULL 00/31] tcg + linux-user patch queue, Richard Henderson, 2024/09/22
- [PULL 22/31] target/ppc: Fix lxvx/stxvx facility check, Richard Henderson, 2024/09/22
- [PULL 14/31] tcg/i386: Implement cmp_vec with avx512 insns, Richard Henderson, 2024/09/22
- [PULL 18/31] tcg/ppc: Implement cmpsel_vec, Richard Henderson, 2024/09/22
- [PULL 01/31] tcg: Return TCGOp from tcg_gen_op[1-6],
Richard Henderson <=
- [PULL 08/31] tcg/ppc: Do not expand cmp_vec early, Richard Henderson, 2024/09/22
- [PULL 13/31] tcg/i386: Optimize cmpsel with constant 0 operand 3., Richard Henderson, 2024/09/22
- [PULL 11/31] tcg/optimize: Optimize cmp_vec and cmpsel_vec, Richard Henderson, 2024/09/22
- [PULL 06/31] tcg/i386: Do not expand cmp_vec early, Richard Henderson, 2024/09/22
- [PULL 15/31] tcg/i386: Add predicate parameters to tcg_out_evex_opc, Richard Henderson, 2024/09/22
- [PULL 17/31] tcg/i386: Implement vector TST{EQ,NE} for avx512, Richard Henderson, 2024/09/22
- [PULL 21/31] tcg/s390x: Optimize cmpsel with constant 0/-1 arguments, Richard Henderson, 2024/09/22
- [PULL 02/31] tcg: Propagate new TCGOp to add_as_label_use, Richard Henderson, 2024/09/22
- [PULL 05/31] tcg/i386: Split out tcg_out_vex_modrm_type, Richard Henderson, 2024/09/22
- [PULL 07/31] tcg/i386: Do not expand cmpsel_vec early, Richard Henderson, 2024/09/22