Signed-off-by: Richard Henderson <[email protected]>
---
include/tcg/tcg-op-common.h | 2 --
include/tcg/tcg-op-def2.h.inc | 1 +
tcg/tcg-op.c | 30 ++++++++++--------------------
3 files changed, 11 insertions(+), 22 deletions(-)
diff --git a/include/tcg/tcg-op-common.h b/include/tcg/tcg-op-common.h
index b458b1a0b64..7d225eed9b4 100644
--- a/include/tcg/tcg-op-common.h
+++ b/include/tcg/tcg-op-common.h
@@ -121,7 +121,6 @@ void tcg_gen_plugin_mem_cb(TCGv_i64 addr, unsigned meminfo);
/* 32 bit ops */
-void tcg_gen_eqv_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2);
void tcg_gen_nand_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2);
void tcg_gen_nor_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2);
void tcg_gen_orc_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2);
@@ -198,7 +197,6 @@ void tcg_gen_st_i32(TCGv_i32 arg1, TCGv_ptr arg2,
tcg_target_long offset);
/* 64 bit ops */
-void tcg_gen_eqv_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2);
void tcg_gen_nand_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2);
void tcg_gen_nor_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2);
void tcg_gen_orc_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2);
diff --git a/include/tcg/tcg-op-def2.h.inc b/include/tcg/tcg-op-def2.h.inc
index 54c3c51ed29..3b2807c48d9 100644
--- a/include/tcg/tcg-op-def2.h.inc
+++ b/include/tcg/tcg-op-def2.h.inc
@@ -20,6 +20,7 @@ DEF_RRR(and)
DEF_RRR(andc)
DEF_RRR(div)
DEF_RRR(divu)
+DEF_RRR(eqv)
DEF_RRR(mul)
DEF_RRR(or)
DEF_RRR(rem)
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index ca383e44b59..9811b26a84e 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -445,6 +445,16 @@ static void gen_divu(TCGType type, TCGTemp *dst, TCGTemp
*src1, TCGTemp *src2)
}
}
+static void gen_eqv(TCGType type, TCGTemp *dst, TCGTemp *src1, TCGTemp *src2)
+{
+ if (tcg_op_supported(INDEX_op_eqv, type, 0)) {
+ gen_op_ttt(INDEX_op_eqv, type, dst, src1, src2);
+ } else {
+ gen_xor(type, dst, src1, src2);
+ gen_not(type, dst, dst);
+ }
+}
+
static void gen_mov(TCGType type, TCGTemp *dst, TCGTemp *src)
{
if (src != dst) {
@@ -723,16 +733,6 @@ void tcg_gen_negsetcondi_i32(TCGCond cond, TCGv_i32 ret,
tcg_gen_negsetcond_i32(cond, ret, arg1, tcg_constant_i32(arg2));
}
-void tcg_gen_eqv_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2)
-{
- if (tcg_op_supported(INDEX_op_eqv, TCG_TYPE_I32, 0)) {
- tcg_gen_op3_i32(INDEX_op_eqv, ret, arg1, arg2);
- } else {
- tcg_gen_xor_i32(ret, arg1, arg2);
- tcg_gen_not_i32(ret, ret);
- }
-}
-
void tcg_gen_nand_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2)
{
if (tcg_op_supported(INDEX_op_nand, TCG_TYPE_I32, 0)) {
@@ -1770,16 +1770,6 @@ void tcg_gen_revbit64_i64(TCGv_i64 ret, TCGv_i64 arg)
}
}
-void tcg_gen_eqv_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2)
-{
- if (tcg_op_supported(INDEX_op_eqv, TCG_TYPE_I64, 0)) {
- tcg_gen_op3_i64(INDEX_op_eqv, ret, arg1, arg2);
- } else {
- tcg_gen_xor_i64(ret, arg1, arg2);
- tcg_gen_not_i64(ret, ret);
- }
-}
-
void tcg_gen_nand_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2)
{
if (tcg_op_supported(INDEX_op_nand, TCG_TYPE_I64, 0)) {
--
2.53.0