This commit explicitly marks functions which aren't implemented in the Wasm
backend as C_NotImplemented.

Signed-off-by: Kohei Tokunaga <ktokunaga.m...@gmail.com>
---
 tcg/wasm/tcg-target.c.inc | 107 ++++----------------------------------
 1 file changed, 10 insertions(+), 97 deletions(-)

diff --git a/tcg/wasm/tcg-target.c.inc b/tcg/wasm/tcg-target.c.inc
index db92463941..6b8df4e9d7 100644
--- a/tcg/wasm/tcg-target.c.inc
+++ b/tcg/wasm/tcg-target.c.inc
@@ -1430,19 +1430,6 @@ static void tcg_out_op_rrrbb(TCGContext *s, TCGOpcode 
op, TCGReg r0,
     tcg_out32(s, insn);
 }
 
-static void tcg_out_op_rrrr(TCGContext *s, TCGOpcode op,
-                            TCGReg r0, TCGReg r1, TCGReg r2, TCGReg r3)
-{
-    tcg_insn_unit insn = 0;
-
-    insn = deposit32(insn, 0, 8, op);
-    insn = deposit32(insn, 8, 4, r0);
-    insn = deposit32(insn, 12, 4, r1);
-    insn = deposit32(insn, 16, 4, r2);
-    insn = deposit32(insn, 20, 4, r3);
-    tcg_out32(s, insn);
-}
-
 static void tcg_out_op_rrrrrc(TCGContext *s, TCGOpcode op,
                               TCGReg r0, TCGReg r1, TCGReg r2,
                               TCGReg r3, TCGReg r4, TCGCond c5)
@@ -1699,50 +1686,21 @@ static const TCGOutOpBinary outop_add = {
     .out_rrr = tgen_add,
 };
 
-static TCGConstraintSetIndex cset_addsubcarry(TCGType type, unsigned flags)
-{
-    return type == TCG_TYPE_REG ? C_O1_I2(r, r, r) : C_NotImplemented;
-}
-
-static void tgen_addco(TCGContext *s, TCGType type,
-                       TCGReg a0, TCGReg a1, TCGReg a2)
-{
-    tcg_out_op_rrr(s, INDEX_op_addco, a0, a1, a2);
-}
-
 static const TCGOutOpBinary outop_addco = {
-    .base.static_constraint = C_Dynamic,
-    .base.dynamic_constraint = cset_addsubcarry,
-    .out_rrr = tgen_addco,
+    .base.static_constraint = C_NotImplemented,
 };
 
-static void tgen_addci(TCGContext *s, TCGType type,
-                       TCGReg a0, TCGReg a1, TCGReg a2)
-{
-    tcg_out_op_rrr(s, INDEX_op_addci, a0, a1, a2);
-}
-
 static const TCGOutOpAddSubCarry outop_addci = {
-    .base.static_constraint = C_Dynamic,
-    .base.dynamic_constraint = cset_addsubcarry,
-    .out_rrr = tgen_addci,
+    .base.static_constraint = C_NotImplemented,
 };
 
-static void tgen_addcio(TCGContext *s, TCGType type,
-                        TCGReg a0, TCGReg a1, TCGReg a2)
-{
-    tcg_out_op_rrr(s, INDEX_op_addcio, a0, a1, a2);
-}
-
 static const TCGOutOpBinary outop_addcio = {
-    .base.static_constraint = C_Dynamic,
-    .base.dynamic_constraint = cset_addsubcarry,
-    .out_rrr = tgen_addcio,
+    .base.static_constraint = C_NotImplemented,
 };
 
 static void tcg_out_set_carry(TCGContext *s)
 {
-    tcg_out_op_v(s, INDEX_op_tci_setcarry);
+    g_assert_not_reached();
 }
 
 static void tgen_and(TCGContext *s, TCGType type,
@@ -1886,37 +1844,16 @@ static const TCGOutOpBinary outop_mul = {
     .out_rrr = tgen_mul,
 };
 
-static TCGConstraintSetIndex cset_mul2(TCGType type, unsigned flags)
-{
-    return type == TCG_TYPE_REG ? C_O2_I2(r, r, r, r) : C_NotImplemented;
-}
-
-static void tgen_muls2(TCGContext *s, TCGType type,
-                       TCGReg a0, TCGReg a1, TCGReg a2, TCGReg a3)
-{
-    tcg_out_op_rrrr(s, INDEX_op_muls2, a0, a1, a2, a3);
-}
-
 static const TCGOutOpMul2 outop_muls2 = {
-    .base.static_constraint = C_Dynamic,
-    .base.dynamic_constraint = cset_mul2,
-    .out_rrrr = tgen_muls2,
+    .base.static_constraint = C_NotImplemented,
 };
 
 static const TCGOutOpBinary outop_mulsh = {
     .base.static_constraint = C_NotImplemented,
 };
 
-static void tgen_mulu2(TCGContext *s, TCGType type,
-                       TCGReg a0, TCGReg a1, TCGReg a2, TCGReg a3)
-{
-    tcg_out_op_rrrr(s, INDEX_op_mulu2, a0, a1, a2, a3);
-}
-
 static const TCGOutOpMul2 outop_mulu2 = {
-    .base.static_constraint = C_Dynamic,
-    .base.dynamic_constraint = cset_mul2,
-    .out_rrrr = tgen_mulu2,
+    .base.static_constraint = C_NotImplemented,
 };
 
 static const TCGOutOpBinary outop_muluh = {
@@ -2091,45 +2028,21 @@ static const TCGOutOpSubtract outop_sub = {
     .out_rrr = tgen_sub,
 };
 
-static void tgen_subbo(TCGContext *s, TCGType type,
-                       TCGReg a0, TCGReg a1, TCGReg a2)
-{
-    tcg_out_op_rrr(s, INDEX_op_subbo, a0, a1, a2);
-}
-
 static const TCGOutOpAddSubCarry outop_subbo = {
-    .base.static_constraint = C_Dynamic,
-    .base.dynamic_constraint = cset_addsubcarry,
-    .out_rrr = tgen_subbo,
+    .base.static_constraint = C_NotImplemented,
 };
 
-static void tgen_subbi(TCGContext *s, TCGType type,
-                       TCGReg a0, TCGReg a1, TCGReg a2)
-{
-    tcg_out_op_rrr(s, INDEX_op_subbi, a0, a1, a2);
-}
-
 static const TCGOutOpAddSubCarry outop_subbi = {
-    .base.static_constraint = C_Dynamic,
-    .base.dynamic_constraint = cset_addsubcarry,
-    .out_rrr = tgen_subbi,
+    .base.static_constraint = C_NotImplemented,
 };
 
-static void tgen_subbio(TCGContext *s, TCGType type,
-                        TCGReg a0, TCGReg a1, TCGReg a2)
-{
-    tcg_out_op_rrr(s, INDEX_op_subbio, a0, a1, a2);
-}
-
 static const TCGOutOpAddSubCarry outop_subbio = {
-    .base.static_constraint = C_Dynamic,
-    .base.dynamic_constraint = cset_addsubcarry,
-    .out_rrr = tgen_subbio,
+    .base.static_constraint = C_NotImplemented,
 };
 
 static void tcg_out_set_borrow(TCGContext *s)
 {
-    tcg_out_op_v(s, INDEX_op_tci_setcarry);  /* borrow == carry */
+    g_assert_not_reached();
 }
 
 static void tgen_xor(TCGContext *s, TCGType type,
-- 
2.43.0


Reply via email to