diff --git a/source/m3_compile.c b/source/m3_compile.c index e5c71d2..6277d8f 100644 --- a/source/m3_compile.c +++ b/source/m3_compile.c @@ -1865,13 +1865,6 @@ const M3OpInfo c_operations [] = M3OP( "f32.reinterpret/i32", 0, f_32, d_convertOpList (f32_Reinterpret_i32), Compile_Convert ), // 0xbe M3OP( "f64.reinterpret/i64", 0, f_64, d_convertOpList (f64_Reinterpret_i64), Compile_Convert ), // 0xbf -// instr ::= ... -// | 0xC0 => i32.extend8_s -// | 0xC1 => i32.extend16_s -// | 0xC2 => i64.extend8_s -// | 0xC3 => i64.extend16_s -// | 0xC4 => i64.extend32_s -// M3OP( "i32.extend8_s", 0, i_32, d_unaryOpList (i32, Extend8_s) ), // 0xc0 M3OP( "i32.extend16_s", 0, i_32, d_unaryOpList (i32, Extend16_s) ), // 0xc1 M3OP( "i64.extend8_s", 0, i_64, d_unaryOpList (i64, Extend8_s) ), // 0xc2 @@ -1882,8 +1875,7 @@ const M3OpInfo c_operations [] = # define d_m3DebugOp(OP) M3OP (#OP, 0, none, { op_##OP }) # define d_m3DebugTypedOp(OP) M3OP (#OP, 0, none, { op_##OP##_i32, op_##OP##_i64, op_##OP##_f32, op_##OP##_f64, }) - d_m3DebugOp (Const), d_m3DebugOp (Entry), d_m3DebugOp (Compile), - d_m3DebugOp (Bridge), d_m3DebugOp (End), + d_m3DebugOp (Const), d_m3DebugOp (Entry), d_m3DebugOp (Compile), d_m3DebugOp (End), d_m3DebugOp (ContinueLoop), d_m3DebugOp (ContinueLoopIf), @@ -1905,9 +1897,9 @@ const M3OpInfo c_operations [] = d_m3DebugTypedOp (SetRegister), d_m3DebugTypedOp (SetSlot), d_m3DebugTypedOp (PreserveSetSlot), + M3OP( "termination for find_operation_info ()", 0, c_m3Type_void ) + # endif - - M3OP( "termination", 0, c_m3Type_void ) // termination for find_operation_info () }; diff --git a/source/m3_emit.c b/source/m3_emit.c index a360b8b..61a3703 100644 --- a/source/m3_emit.c +++ b/source/m3_emit.c @@ -25,7 +25,7 @@ M3Result EnsureCodePageNumLines (IM3Compilation o, u32 i_numLines) m3log (emit, "bridging new code page from: %d %p (free slots: %d) to: %d", o->page->info.sequence, GetPC (o), NumFreeLines (o->page), page->info.sequence); d_m3Assert (NumFreeLines (o->page) >= 2); - EmitWord (o->page, op_Bridge); + EmitWord (o->page, op_Branch); EmitWord (o->page, GetPagePC (page)); ReleaseCodePage (o->runtime, o->page); diff --git a/source/m3_exec.c b/source/m3_exec.c index ddfa81e..beb4f30 100644 --- a/source/m3_exec.c +++ b/source/m3_exec.c @@ -281,6 +281,12 @@ d_m3OpDef (Loop) } +d_m3OpDef (Branch) +{ + return jumpOp (* _pc); +} + + d_m3OpDef (If_r) { i32 condition = (i32) _r0; diff --git a/source/m3_exec.h b/source/m3_exec.h index b5e43e2..118e7a9 100644 --- a/source/m3_exec.h +++ b/source/m3_exec.h @@ -519,16 +519,7 @@ d_m3Op (Return) } -d_m3Op (Branch) -{ - return jumpOp (* _pc); -} - - -d_m3Op (Bridge) -{ - return jumpOp (* _pc); -} +d_m3OpDecl (Branch) d_m3Op (BranchIf_r)