const f32 fix

extensions
Steven Massey 5 years ago
parent 4e0e4b1f8b
commit 90bbb47ed1

@ -35,7 +35,10 @@ void PushCodePage (IM3CodePage * i_list, IM3CodePa
IM3CodePage PopCodePage (IM3CodePage * i_list);
void TestCodePageCapacity (IM3CodePage i_page);
# ifdef DEBUG
void DumpCodePage (IM3CodePage i_codePage, pc_t i_startPC);
# endif
#define EmitWord(page, val) EmitWordImpl(page, (void*)(val))

@ -671,7 +671,7 @@ _ (Read_f32 (& value, & o->wasm, o->wasmEnd)); m3log (compile,
union64.f = value;
_ (PushConst (o, union64.u, c_m3Type_f64));
_ (PushConst (o, union64.u, c_m3Type_f32));
_catch: return result;
}
@ -1520,6 +1520,9 @@ const M3OpInfo c_operations [] =
M3OP( "br", 0, none, op_Branch ),
M3OP( "br_table", 0, none, op_BranchTable ),
M3OP( "Call", 0, none, op_Call),
M3OP( "Compile", 0, none, op_Compile),
M3OP( "SetGlobal_s", 0, none, op_SetGlobal_s),
M3OP( "SetSlot_i32", 0, none, op_SetSlot_i32),
@ -1527,6 +1530,11 @@ const M3OpInfo c_operations [] =
M3OP( "SetSlot_f32", 0, none, op_SetSlot_f32),
M3OP( "SetSlot_f64", 0, none, op_SetSlot_f64),
M3OP( "SetRegister_i32", 0, none, op_SetRegister_i32),
M3OP( "SetRegister_i64", 0, none, op_SetRegister_i64),
M3OP( "SetRegister_f32", 0, none, op_SetRegister_f32),
M3OP( "SetRegister_f64", 0, none, op_SetRegister_f64),
M3OP( "End", 0, none, op_End ),
# endif
@ -1712,6 +1720,8 @@ _ (EmitOp (o, op_Branch));
EmitPointer (o, GetPagePC (savedPage));
o->page = savedPage;
ReleaseCodePage (o->runtime, elsePage);
}
else _throw (c_m3Err_mallocFailedCodePage);

@ -598,7 +598,9 @@ IM3CodePage AcquireCodePageWithCapacity (IM3Runtime i_runtime, u32 i_lineCount
void ReleaseCodePage (IM3Runtime i_runtime, IM3CodePage i_codePage)
{
DumpCodePage (i_codePage, /* startPC: */ NULL);
# if defined (DEBUG) && d_m3LogCodePages
DumpCodePage (i_codePage, /* startPC: */ NULL);
# endif
if (i_codePage)
{

@ -187,12 +187,11 @@ void DecodeOperation (char * o_string, u8 i_opcode, IM3OpInfo i_opInfo, pc_t *
}
# ifdef DEBUG
// WARNING/TODO: this isn't fully implemented. it blindly assumes each word is a Operation pointer
// and, if an operation happens to missing from the c_operations table it won't be recognized here
void DumpCodePage (IM3CodePage i_codePage, pc_t i_startPC)
{
# if defined (DEBUG) && d_m3LogCodePages
m3log (code, "code page seq: %d", i_codePage->info.sequence);
pc_t pc = i_startPC ? i_startPC : GetPageStartPC (i_codePage);
@ -221,9 +220,8 @@ void DumpCodePage (IM3CodePage i_codePage, pc_t i_startPC)
}
m3log (code, "---------------------------------------------------------------------------------------");
# endif
}
# endif

Loading…
Cancel
Save