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 6ee12cc2dbe..b48e85f0b9c 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_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);
void tcg_gen_clz_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2);
void tcg_gen_ctz_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2);
@@ -196,7 +195,6 @@ void tcg_gen_st_i32(TCGv_i32 arg1, TCGv_ptr arg2,
tcg_target_long offset);
/* 64 bit ops */
-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);
void tcg_gen_clz_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2);
void tcg_gen_ctz_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 276c0059ec2..055e98672d6 100644
--- a/include/tcg/tcg-op-def2.h.inc
+++ b/include/tcg/tcg-op-def2.h.inc
@@ -23,6 +23,7 @@ DEF_RRR(divu)
DEF_RRR(eqv)
DEF_RRR(mul)
DEF_RRR(nand)
+DEF_RRR(nor)
DEF_RRR(or)
DEF_RRR(rem)
DEF_RRR(remu)
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 1caedda8931..87fb5fb5f51 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -508,6 +508,16 @@ static void gen_not(TCGType type, TCGTemp *dst, TCGTemp
*src)
}
}
+static void gen_nor(TCGType type, TCGTemp *dst, TCGTemp *src1, TCGTemp *src2)
+{
+ if (tcg_op_supported(INDEX_op_nor, type, 0)) {
+ gen_op_ttt(INDEX_op_nor, type, dst, src1, src2);
+ } else {
+ gen_or(type, dst, src1, src2);
+ gen_not(type, dst, dst);
+ }
+}
+
static void gen_or(TCGType type, TCGTemp *dst, TCGTemp *src1, TCGTemp *src2)
{
gen_op_ttt(INDEX_op_or, type, dst, src1, src2);
@@ -743,16 +753,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_nor_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2)
-{
- if (tcg_op_supported(INDEX_op_nor, TCG_TYPE_I32, 0)) {
- tcg_gen_op3_i32(INDEX_op_nor, ret, arg1, arg2);
- } else {
- tcg_gen_or_i32(ret, arg1, arg2);
- tcg_gen_not_i32(ret, ret);
- }
-}
-
void tcg_gen_orc_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2)
{
if (tcg_op_supported(INDEX_op_orc, TCG_TYPE_I32, 0)) {
@@ -1770,16 +1770,6 @@ void tcg_gen_revbit64_i64(TCGv_i64 ret, TCGv_i64 arg)
}
}
-void tcg_gen_nor_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2)
-{
- if (tcg_op_supported(INDEX_op_nor, TCG_TYPE_I64, 0)) {
- tcg_gen_op3_i64(INDEX_op_nor, ret, arg1, arg2);
- } else {
- tcg_gen_or_i64(ret, arg1, arg2);
- tcg_gen_not_i64(ret, ret);
- }
-}
-
void tcg_gen_orc_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2)
{
if (tcg_op_supported(INDEX_op_orc, TCG_TYPE_I64, 0)) {
--
2.53.0