d_m3NoFloatDynamic support

extensions
Volodymyr Shymanskyy 4 years ago
parent 4b6ee387ea
commit 29d42c8078

@ -2113,7 +2113,7 @@ const M3OpInfo c_operations [] =
d_m3DebugOp (Entry), d_m3DebugOp (Compile), d_m3DebugOp (End),
d_m3DebugOp (CallRawFunction), d_m3DebugOp (CallRawFunctionEx),
d_m3DebugOp (CallRawFunction),
d_m3DebugOp (GetGlobal_s32), d_m3DebugOp (GetGlobal_s64), d_m3DebugOp (ContinueLoop), d_m3DebugOp (ContinueLoopIf),

@ -159,6 +159,8 @@ const M3OpInfo* GetOpInfo(m3opcode_t opcode) {
#if d_m3HasFloat
#define M3OP_F M3OP
#elif d_m3NoFloatDynamic
#define M3OP_F(n,o,t,op,...) M3OP(n, o, t, { op_Unsupported, op_Unsupported, op_Unsupported, op_Unsupported }, __VA_ARGS__)
#else
#define M3OP_F(...) { 0 }
#endif

@ -118,6 +118,10 @@
# define d_m3HasFloat 1 // implement floating point ops
# endif
#if !d_m3HasFloat && !defined(d_m3NoFloatDynamic)
# define d_m3NoFloatDynamic 1 // if no floats, do not fail until flops are actually executed
#endif
# ifndef d_m3SkipStackCheck
# define d_m3SkipStackCheck 0 // skip stack overrun checks
# endif

@ -274,7 +274,7 @@ M3Result Read_u32 (u32 * o_value, bytes_t * io_bytes, cbytes_t i_end)
else return m3Err_wasmUnderrun;
}
#if d_m3HasFloat
#if d_m3HasFloat || d_m3NoFloatDynamic
M3Result Read_f64 (f64 * o_value, bytes_t * io_bytes, cbytes_t i_end)
{

@ -28,7 +28,7 @@
d_m3BeginExternC
#if !defined(d_m3ShortTypesDefined)
#if d_m3HasFloat
#if d_m3HasFloat || d_m3NoFloatDynamic
typedef double f64;
typedef float f32;
#endif
@ -229,7 +229,7 @@ u32 SizeOfType (u8 i_m3Type);
M3Result Read_u64 (u64 * o_value, bytes_t * io_bytes, cbytes_t i_end);
M3Result Read_u32 (u32 * o_value, bytes_t * io_bytes, cbytes_t i_end);
#if d_m3HasFloat
#if d_m3HasFloat || d_m3NoFloatDynamic
M3Result Read_f64 (f64 * o_value, bytes_t * io_bytes, cbytes_t i_end);
M3Result Read_f32 (f32 * o_value, bytes_t * io_bytes, cbytes_t i_end);
#endif

Loading…
Cancel
Save