Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::vm::interpret_visitor< ExecutionContext > Struct Template Reference

#include <interpret_visitor.hpp>

Inheritance diagram for sysio::vm::interpret_visitor< ExecutionContext >:
Collaboration diagram for sysio::vm::interpret_visitor< ExecutionContext >:

Public Member Functions

 interpret_visitor (ExecutionContext &ec)
 
ExecutionContext & get_context ()
 
void operator() (const unreachable_t &op)
 
void operator() (const nop_t &op)
 
void operator() (const end_t &op)
 
void operator() (const return_t &op)
 
void operator() (const block_t &op)
 
void operator() (const loop_t &op)
 
void operator() (const if_t &op)
 
void operator() (const else_t &op)
 
void operator() (const br_t &op)
 
void operator() (const br_if_t &op)
 
void operator() (const br_table_data_t &op)
 
void operator() (const br_table_t &op)
 
void operator() (const call_t &op)
 
void operator() (const call_indirect_t &op)
 
void operator() (const drop_t &op)
 
void operator() (const select_t &op)
 
void operator() (const get_local_t &op)
 
void operator() (const set_local_t &op)
 
void operator() (const tee_local_t &op)
 
void operator() (const get_global_t &op)
 
void operator() (const set_global_t &op)
 
template<typename Op >
void * pop_memop_addr (const Op &op)
 
void operator() (const i32_load_t &op)
 
void operator() (const i32_load8_s_t &op)
 
void operator() (const i32_load16_s_t &op)
 
void operator() (const i32_load8_u_t &op)
 
void operator() (const i32_load16_u_t &op)
 
void operator() (const i64_load_t &op)
 
void operator() (const i64_load8_s_t &op)
 
void operator() (const i64_load16_s_t &op)
 
void operator() (const i64_load32_s_t &op)
 
void operator() (const i64_load8_u_t &op)
 
void operator() (const i64_load16_u_t &op)
 
void operator() (const i64_load32_u_t &op)
 
void operator() (const f32_load_t &op)
 
void operator() (const f64_load_t &op)
 
void operator() (const i32_store_t &op)
 
void operator() (const i32_store8_t &op)
 
void operator() (const i32_store16_t &op)
 
void operator() (const i64_store_t &op)
 
void operator() (const i64_store8_t &op)
 
void operator() (const i64_store16_t &op)
 
void operator() (const i64_store32_t &op)
 
void operator() (const f32_store_t &op)
 
void operator() (const f64_store_t &op)
 
void operator() (const current_memory_t &op)
 
void operator() (const grow_memory_t &op)
 
void operator() (const i32_const_t &op)
 
void operator() (const i64_const_t &op)
 
void operator() (const f32_const_t &op)
 
void operator() (const f64_const_t &op)
 
void operator() (const i32_eqz_t &op)
 
void operator() (const i32_eq_t &op)
 
void operator() (const i32_ne_t &op)
 
void operator() (const i32_lt_s_t &op)
 
void operator() (const i32_lt_u_t &op)
 
void operator() (const i32_le_s_t &op)
 
void operator() (const i32_le_u_t &op)
 
void operator() (const i32_gt_s_t &op)
 
void operator() (const i32_gt_u_t &op)
 
void operator() (const i32_ge_s_t &op)
 
void operator() (const i32_ge_u_t &op)
 
void operator() (const i64_eqz_t &op)
 
void operator() (const i64_eq_t &op)
 
void operator() (const i64_ne_t &op)
 
void operator() (const i64_lt_s_t &op)
 
void operator() (const i64_lt_u_t &op)
 
void operator() (const i64_le_s_t &op)
 
void operator() (const i64_le_u_t &op)
 
void operator() (const i64_gt_s_t &op)
 
void operator() (const i64_gt_u_t &op)
 
void operator() (const i64_ge_s_t &op)
 
void operator() (const i64_ge_u_t &op)
 
void operator() (const f32_eq_t &op)
 
void operator() (const f32_ne_t &op)
 
void operator() (const f32_lt_t &op)
 
void operator() (const f32_gt_t &op)
 
void operator() (const f32_le_t &op)
 
void operator() (const f32_ge_t &op)
 
void operator() (const f64_eq_t &op)
 
void operator() (const f64_ne_t &op)
 
void operator() (const f64_lt_t &op)
 
void operator() (const f64_gt_t &op)
 
void operator() (const f64_le_t &op)
 
void operator() (const f64_ge_t &op)
 
void operator() (const i32_clz_t &op)
 
void operator() (const i32_ctz_t &op)
 
void operator() (const i32_popcnt_t &op)
 
void operator() (const i32_add_t &op)
 
void operator() (const i32_sub_t &op)
 
void operator() (const i32_mul_t &op)
 
void operator() (const i32_div_s_t &op)
 
void operator() (const i32_div_u_t &op)
 
void operator() (const i32_rem_s_t &op)
 
void operator() (const i32_rem_u_t &op)
 
void operator() (const i32_and_t &op)
 
void operator() (const i32_or_t &op)
 
void operator() (const i32_xor_t &op)
 
void operator() (const i32_shl_t &op)
 
void operator() (const i32_shr_s_t &op)
 
void operator() (const i32_shr_u_t &op)
 
void operator() (const i32_rotl_t &op)
 
void operator() (const i32_rotr_t &op)
 
void operator() (const i64_clz_t &op)
 
void operator() (const i64_ctz_t &op)
 
void operator() (const i64_popcnt_t &op)
 
void operator() (const i64_add_t &op)
 
void operator() (const i64_sub_t &op)
 
void operator() (const i64_mul_t &op)
 
void operator() (const i64_div_s_t &op)
 
void operator() (const i64_div_u_t &op)
 
void operator() (const i64_rem_s_t &op)
 
void operator() (const i64_rem_u_t &op)
 
void operator() (const i64_and_t &op)
 
void operator() (const i64_or_t &op)
 
void operator() (const i64_xor_t &op)
 
void operator() (const i64_shl_t &op)
 
void operator() (const i64_shr_s_t &op)
 
void operator() (const i64_shr_u_t &op)
 
void operator() (const i64_rotl_t &op)
 
void operator() (const i64_rotr_t &op)
 
void operator() (const f32_abs_t &op)
 
void operator() (const f32_neg_t &op)
 
void operator() (const f32_ceil_t &op)
 
void operator() (const f32_floor_t &op)
 
void operator() (const f32_trunc_t &op)
 
void operator() (const f32_nearest_t &op)
 
void operator() (const f32_sqrt_t &op)
 
void operator() (const f32_add_t &op)
 
void operator() (const f32_sub_t &op)
 
void operator() (const f32_mul_t &op)
 
void operator() (const f32_div_t &op)
 
void operator() (const f32_min_t &op)
 
void operator() (const f32_max_t &op)
 
void operator() (const f32_copysign_t &op)
 
void operator() (const f64_abs_t &op)
 
void operator() (const f64_neg_t &op)
 
void operator() (const f64_ceil_t &op)
 
void operator() (const f64_floor_t &op)
 
void operator() (const f64_trunc_t &op)
 
void operator() (const f64_nearest_t &op)
 
void operator() (const f64_sqrt_t &op)
 
void operator() (const f64_add_t &op)
 
void operator() (const f64_sub_t &op)
 
void operator() (const f64_mul_t &op)
 
void operator() (const f64_div_t &op)
 
void operator() (const f64_min_t &op)
 
void operator() (const f64_max_t &op)
 
void operator() (const f64_copysign_t &op)
 
void operator() (const i32_wrap_i64_t &op)
 
void operator() (const i32_trunc_s_f32_t &op)
 
void operator() (const i32_trunc_u_f32_t &op)
 
void operator() (const i32_trunc_s_f64_t &op)
 
void operator() (const i32_trunc_u_f64_t &op)
 
void operator() (const i64_extend_s_i32_t &op)
 
void operator() (const i64_extend_u_i32_t &op)
 
void operator() (const i64_trunc_s_f32_t &op)
 
void operator() (const i64_trunc_u_f32_t &op)
 
void operator() (const i64_trunc_s_f64_t &op)
 
void operator() (const i64_trunc_u_f64_t &op)
 
void operator() (const f32_convert_s_i32_t &op)
 
void operator() (const f32_convert_u_i32_t &op)
 
void operator() (const f32_convert_s_i64_t &op)
 
void operator() (const f32_convert_u_i64_t &op)
 
void operator() (const f32_demote_f64_t &op)
 
void operator() (const f64_convert_s_i32_t &op)
 
void operator() (const f64_convert_u_i32_t &op)
 
void operator() (const f64_convert_s_i64_t &op)
 
void operator() (const f64_convert_u_i64_t &op)
 
void operator() (const f64_promote_f32_t &op)
 
void operator() (const i32_reinterpret_f32_t &op)
 
void operator() (const i64_reinterpret_f64_t &op)
 
void operator() (const f32_reinterpret_i32_t &op)
 
void operator() (const f64_reinterpret_i64_t &op)
 
 interpret_visitor (ExecutionContext &ec)
 
ExecutionContext & get_context ()
 
void operator() (const unreachable_t &op)
 
void operator() (const nop_t &op)
 
void operator() (const end_t &op)
 
void operator() (const return_t &op)
 
void operator() (const block_t &op)
 
void operator() (const loop_t &op)
 
void operator() (const if_t &op)
 
void operator() (const else_t &op)
 
void operator() (const br_t &op)
 
void operator() (const br_if_t &op)
 
void operator() (const br_table_data_t &op)
 
void operator() (const br_table_t &op)
 
void operator() (const call_t &op)
 
void operator() (const call_indirect_t &op)
 
void operator() (const drop_t &op)
 
void operator() (const select_t &op)
 
void operator() (const get_local_t &op)
 
void operator() (const set_local_t &op)
 
void operator() (const tee_local_t &op)
 
void operator() (const get_global_t &op)
 
void operator() (const set_global_t &op)
 
template<typename Op >
void * pop_memop_addr (const Op &op)
 
void operator() (const i32_load_t &op)
 
void operator() (const i32_load8_s_t &op)
 
void operator() (const i32_load16_s_t &op)
 
void operator() (const i32_load8_u_t &op)
 
void operator() (const i32_load16_u_t &op)
 
void operator() (const i64_load_t &op)
 
void operator() (const i64_load8_s_t &op)
 
void operator() (const i64_load16_s_t &op)
 
void operator() (const i64_load32_s_t &op)
 
void operator() (const i64_load8_u_t &op)
 
void operator() (const i64_load16_u_t &op)
 
void operator() (const i64_load32_u_t &op)
 
void operator() (const f32_load_t &op)
 
void operator() (const f64_load_t &op)
 
void operator() (const i32_store_t &op)
 
void operator() (const i32_store8_t &op)
 
void operator() (const i32_store16_t &op)
 
void operator() (const i64_store_t &op)
 
void operator() (const i64_store8_t &op)
 
void operator() (const i64_store16_t &op)
 
void operator() (const i64_store32_t &op)
 
void operator() (const f32_store_t &op)
 
void operator() (const f64_store_t &op)
 
void operator() (const current_memory_t &op)
 
void operator() (const grow_memory_t &op)
 
void operator() (const i32_const_t &op)
 
void operator() (const i64_const_t &op)
 
void operator() (const f32_const_t &op)
 
void operator() (const f64_const_t &op)
 
void operator() (const i32_eqz_t &op)
 
void operator() (const i32_eq_t &op)
 
void operator() (const i32_ne_t &op)
 
void operator() (const i32_lt_s_t &op)
 
void operator() (const i32_lt_u_t &op)
 
void operator() (const i32_le_s_t &op)
 
void operator() (const i32_le_u_t &op)
 
void operator() (const i32_gt_s_t &op)
 
void operator() (const i32_gt_u_t &op)
 
void operator() (const i32_ge_s_t &op)
 
void operator() (const i32_ge_u_t &op)
 
void operator() (const i64_eqz_t &op)
 
void operator() (const i64_eq_t &op)
 
void operator() (const i64_ne_t &op)
 
void operator() (const i64_lt_s_t &op)
 
void operator() (const i64_lt_u_t &op)
 
void operator() (const i64_le_s_t &op)
 
void operator() (const i64_le_u_t &op)
 
void operator() (const i64_gt_s_t &op)
 
void operator() (const i64_gt_u_t &op)
 
void operator() (const i64_ge_s_t &op)
 
void operator() (const i64_ge_u_t &op)
 
void operator() (const f32_eq_t &op)
 
void operator() (const f32_ne_t &op)
 
void operator() (const f32_lt_t &op)
 
void operator() (const f32_gt_t &op)
 
void operator() (const f32_le_t &op)
 
void operator() (const f32_ge_t &op)
 
void operator() (const f64_eq_t &op)
 
void operator() (const f64_ne_t &op)
 
void operator() (const f64_lt_t &op)
 
void operator() (const f64_gt_t &op)
 
void operator() (const f64_le_t &op)
 
void operator() (const f64_ge_t &op)
 
void operator() (const i32_clz_t &op)
 
void operator() (const i32_ctz_t &op)
 
void operator() (const i32_popcnt_t &op)
 
void operator() (const i32_add_t &op)
 
void operator() (const i32_sub_t &op)
 
void operator() (const i32_mul_t &op)
 
void operator() (const i32_div_s_t &op)
 
void operator() (const i32_div_u_t &op)
 
void operator() (const i32_rem_s_t &op)
 
void operator() (const i32_rem_u_t &op)
 
void operator() (const i32_and_t &op)
 
void operator() (const i32_or_t &op)
 
void operator() (const i32_xor_t &op)
 
void operator() (const i32_shl_t &op)
 
void operator() (const i32_shr_s_t &op)
 
void operator() (const i32_shr_u_t &op)
 
void operator() (const i32_rotl_t &op)
 
void operator() (const i32_rotr_t &op)
 
void operator() (const i64_clz_t &op)
 
void operator() (const i64_ctz_t &op)
 
void operator() (const i64_popcnt_t &op)
 
void operator() (const i64_add_t &op)
 
void operator() (const i64_sub_t &op)
 
void operator() (const i64_mul_t &op)
 
void operator() (const i64_div_s_t &op)
 
void operator() (const i64_div_u_t &op)
 
void operator() (const i64_rem_s_t &op)
 
void operator() (const i64_rem_u_t &op)
 
void operator() (const i64_and_t &op)
 
void operator() (const i64_or_t &op)
 
void operator() (const i64_xor_t &op)
 
void operator() (const i64_shl_t &op)
 
void operator() (const i64_shr_s_t &op)
 
void operator() (const i64_shr_u_t &op)
 
void operator() (const i64_rotl_t &op)
 
void operator() (const i64_rotr_t &op)
 
void operator() (const f32_abs_t &op)
 
void operator() (const f32_neg_t &op)
 
void operator() (const f32_ceil_t &op)
 
void operator() (const f32_floor_t &op)
 
void operator() (const f32_trunc_t &op)
 
void operator() (const f32_nearest_t &op)
 
void operator() (const f32_sqrt_t &op)
 
void operator() (const f32_add_t &op)
 
void operator() (const f32_sub_t &op)
 
void operator() (const f32_mul_t &op)
 
void operator() (const f32_div_t &op)
 
void operator() (const f32_min_t &op)
 
void operator() (const f32_max_t &op)
 
void operator() (const f32_copysign_t &op)
 
void operator() (const f64_abs_t &op)
 
void operator() (const f64_neg_t &op)
 
void operator() (const f64_ceil_t &op)
 
void operator() (const f64_floor_t &op)
 
void operator() (const f64_trunc_t &op)
 
void operator() (const f64_nearest_t &op)
 
void operator() (const f64_sqrt_t &op)
 
void operator() (const f64_add_t &op)
 
void operator() (const f64_sub_t &op)
 
void operator() (const f64_mul_t &op)
 
void operator() (const f64_div_t &op)
 
void operator() (const f64_min_t &op)
 
void operator() (const f64_max_t &op)
 
void operator() (const f64_copysign_t &op)
 
void operator() (const i32_wrap_i64_t &op)
 
void operator() (const i32_trunc_s_f32_t &op)
 
void operator() (const i32_trunc_u_f32_t &op)
 
void operator() (const i32_trunc_s_f64_t &op)
 
void operator() (const i32_trunc_u_f64_t &op)
 
void operator() (const i64_extend_s_i32_t &op)
 
void operator() (const i64_extend_u_i32_t &op)
 
void operator() (const i64_trunc_s_f32_t &op)
 
void operator() (const i64_trunc_u_f32_t &op)
 
void operator() (const i64_trunc_s_f64_t &op)
 
void operator() (const i64_trunc_u_f64_t &op)
 
void operator() (const f32_convert_s_i32_t &op)
 
void operator() (const f32_convert_u_i32_t &op)
 
void operator() (const f32_convert_s_i64_t &op)
 
void operator() (const f32_convert_u_i64_t &op)
 
void operator() (const f32_demote_f64_t &op)
 
void operator() (const f64_convert_s_i32_t &op)
 
void operator() (const f64_convert_u_i32_t &op)
 
void operator() (const f64_convert_s_i64_t &op)
 
void operator() (const f64_convert_u_i64_t &op)
 
void operator() (const f64_promote_f32_t &op)
 
void operator() (const i32_reinterpret_f32_t &op)
 
void operator() (const i64_reinterpret_f64_t &op)
 
void operator() (const f32_reinterpret_i32_t &op)
 
void operator() (const f64_reinterpret_i64_t &op)
 
- Public Member Functions inherited from sysio::vm::base_visitor
void operator() (const unreachable_t &)
 
void operator() (const nop_t &)
 
void operator() (const exit_t &)
 
void operator() (const end_t &)
 
void operator() (const return_t &)
 
void operator() (const block_t &)
 
void operator() (const loop_t &)
 
void operator() (const if_t &)
 
void operator() (const else_t &)
 
void operator() (const br_t &)
 
void operator() (const br_if_t &)
 
void operator() (const br_table_t &)
 
void operator() (const call_t &)
 
void operator() (const call_indirect_t &)
 
void operator() (const drop_t &)
 
void operator() (const select_t &)
 
void operator() (const get_local_t &)
 
void operator() (const set_local_t &)
 
void operator() (const tee_local_t &)
 
void operator() (const get_global_t &)
 
void operator() (const set_global_t &)
 
void operator() (const i32_load_t &)
 
void operator() (const i32_load8_s_t &)
 
void operator() (const i32_load16_s_t &)
 
void operator() (const i32_load8_u_t &)
 
void operator() (const i32_load16_u_t &)
 
void operator() (const i64_load_t &)
 
void operator() (const i64_load8_s_t &)
 
void operator() (const i64_load16_s_t &)
 
void operator() (const i64_load32_s_t &)
 
void operator() (const i64_load8_u_t &)
 
void operator() (const i64_load16_u_t &)
 
void operator() (const i64_load32_u_t &)
 
void operator() (const f32_load_t &)
 
void operator() (const f64_load_t &)
 
void operator() (const i32_store_t &)
 
void operator() (const i32_store8_t &)
 
void operator() (const i32_store16_t &)
 
void operator() (const i64_store_t &)
 
void operator() (const i64_store8_t &)
 
void operator() (const i64_store16_t &)
 
void operator() (const i64_store32_t &)
 
void operator() (const f32_store_t &)
 
void operator() (const f64_store_t &)
 
void operator() (const current_memory_t &)
 
void operator() (const grow_memory_t &)
 
void operator() (const i32_const_t &)
 
void operator() (const i64_const_t &)
 
void operator() (const f32_const_t &)
 
void operator() (const f64_const_t &)
 
void operator() (const i32_eqz_t &)
 
void operator() (const i32_eq_t &)
 
void operator() (const i32_ne_t &)
 
void operator() (const i32_lt_s_t &)
 
void operator() (const i32_lt_u_t &)
 
void operator() (const i32_le_s_t &)
 
void operator() (const i32_le_u_t &)
 
void operator() (const i32_gt_s_t &)
 
void operator() (const i32_gt_u_t &)
 
void operator() (const i32_ge_s_t &)
 
void operator() (const i32_ge_u_t &)
 
void operator() (const i64_eqz_t &)
 
void operator() (const i64_eq_t &)
 
void operator() (const i64_ne_t &)
 
void operator() (const i64_lt_s_t &)
 
void operator() (const i64_lt_u_t &)
 
void operator() (const i64_le_s_t &)
 
void operator() (const i64_le_u_t &)
 
void operator() (const i64_gt_s_t &)
 
void operator() (const i64_gt_u_t &)
 
void operator() (const i64_ge_s_t &)
 
void operator() (const i64_ge_u_t &)
 
void operator() (const f32_eq_t &)
 
void operator() (const f32_ne_t &)
 
void operator() (const f32_lt_t &)
 
void operator() (const f32_gt_t &)
 
void operator() (const f32_le_t &)
 
void operator() (const f32_ge_t &)
 
void operator() (const f64_eq_t &)
 
void operator() (const f64_ne_t &)
 
void operator() (const f64_lt_t &)
 
void operator() (const f64_gt_t &)
 
void operator() (const f64_le_t &)
 
void operator() (const f64_ge_t &)
 
void operator() (const i32_clz_t &)
 
void operator() (const i32_ctz_t &)
 
void operator() (const i32_popcnt_t &)
 
void operator() (const i32_add_t &)
 
void operator() (const i32_sub_t &)
 
void operator() (const i32_mul_t &)
 
void operator() (const i32_div_s_t &)
 
void operator() (const i32_div_u_t &)
 
void operator() (const i32_rem_s_t &)
 
void operator() (const i32_rem_u_t &)
 
void operator() (const i32_and_t &)
 
void operator() (const i32_or_t &)
 
void operator() (const i32_xor_t &)
 
void operator() (const i32_shl_t &)
 
void operator() (const i32_shr_s_t &)
 
void operator() (const i32_shr_u_t &)
 
void operator() (const i32_rotl_t &)
 
void operator() (const i32_rotr_t &)
 
void operator() (const i64_clz_t &)
 
void operator() (const i64_ctz_t &)
 
void operator() (const i64_popcnt_t &)
 
void operator() (const i64_add_t &)
 
void operator() (const i64_sub_t &)
 
void operator() (const i64_mul_t &)
 
void operator() (const i64_div_s_t &)
 
void operator() (const i64_div_u_t &)
 
void operator() (const i64_rem_s_t &)
 
void operator() (const i64_rem_u_t &)
 
void operator() (const i64_and_t &)
 
void operator() (const i64_or_t &)
 
void operator() (const i64_xor_t &)
 
void operator() (const i64_shl_t &)
 
void operator() (const i64_shr_s_t &)
 
void operator() (const i64_shr_u_t &)
 
void operator() (const i64_rotl_t &)
 
void operator() (const i64_rotr_t &)
 
void operator() (const f32_abs_t &)
 
void operator() (const f32_neg_t &)
 
void operator() (const f32_ceil_t &)
 
void operator() (const f32_floor_t &)
 
void operator() (const f32_trunc_t &)
 
void operator() (const f32_nearest_t &)
 
void operator() (const f32_sqrt_t &)
 
void operator() (const f32_add_t &)
 
void operator() (const f32_sub_t &)
 
void operator() (const f32_mul_t &)
 
void operator() (const f32_div_t &)
 
void operator() (const f32_min_t &)
 
void operator() (const f32_max_t &)
 
void operator() (const f32_copysign_t &)
 
void operator() (const f64_abs_t &)
 
void operator() (const f64_neg_t &)
 
void operator() (const f64_ceil_t &)
 
void operator() (const f64_floor_t &)
 
void operator() (const f64_trunc_t &)
 
void operator() (const f64_nearest_t &)
 
void operator() (const f64_sqrt_t &)
 
void operator() (const f64_add_t &)
 
void operator() (const f64_sub_t &)
 
void operator() (const f64_mul_t &)
 
void operator() (const f64_div_t &)
 
void operator() (const f64_min_t &)
 
void operator() (const f64_max_t &)
 
void operator() (const f64_copysign_t &)
 
void operator() (const i32_wrap_i64_t &)
 
void operator() (const i32_trunc_s_f32_t &)
 
void operator() (const i32_trunc_u_f32_t &)
 
void operator() (const i32_trunc_s_f64_t &)
 
void operator() (const i32_trunc_u_f64_t &)
 
void operator() (const i64_extend_s_i32_t &)
 
void operator() (const i64_extend_u_i32_t &)
 
void operator() (const i64_trunc_s_f32_t &)
 
void operator() (const i64_trunc_u_f32_t &)
 
void operator() (const i64_trunc_s_f64_t &)
 
void operator() (const i64_trunc_u_f64_t &)
 
void operator() (const f32_convert_s_i32_t &)
 
void operator() (const f32_convert_u_i32_t &)
 
void operator() (const f32_convert_s_i64_t &)
 
void operator() (const f32_convert_u_i64_t &)
 
void operator() (const f32_demote_f64_t &)
 
void operator() (const f64_convert_s_i32_t &)
 
void operator() (const f64_convert_u_i32_t &)
 
void operator() (const f64_convert_s_i64_t &)
 
void operator() (const f64_convert_u_i64_t &)
 
void operator() (const f64_promote_f32_t &)
 
void operator() (const i32_reinterpret_f32_t &)
 
void operator() (const i64_reinterpret_f64_t &)
 
void operator() (const f32_reinterpret_i32_t &)
 
void operator() (const f64_reinterpret_i64_t &)
 
template<typename T >
void operator() (T val)
 
void operator() (const unreachable_t &)
 
void operator() (const nop_t &)
 
void operator() (const exit_t &)
 
void operator() (const end_t &)
 
void operator() (const return_t &)
 
void operator() (const block_t &)
 
void operator() (const loop_t &)
 
void operator() (const if_t &)
 
void operator() (const else_t &)
 
void operator() (const br_t &)
 
void operator() (const br_if_t &)
 
void operator() (const br_table_t &)
 
void operator() (const call_t &)
 
void operator() (const call_indirect_t &)
 
void operator() (const drop_t &)
 
void operator() (const select_t &)
 
void operator() (const get_local_t &)
 
void operator() (const set_local_t &)
 
void operator() (const tee_local_t &)
 
void operator() (const get_global_t &)
 
void operator() (const set_global_t &)
 
void operator() (const i32_load_t &)
 
void operator() (const i32_load8_s_t &)
 
void operator() (const i32_load16_s_t &)
 
void operator() (const i32_load8_u_t &)
 
void operator() (const i32_load16_u_t &)
 
void operator() (const i64_load_t &)
 
void operator() (const i64_load8_s_t &)
 
void operator() (const i64_load16_s_t &)
 
void operator() (const i64_load32_s_t &)
 
void operator() (const i64_load8_u_t &)
 
void operator() (const i64_load16_u_t &)
 
void operator() (const i64_load32_u_t &)
 
void operator() (const f32_load_t &)
 
void operator() (const f64_load_t &)
 
void operator() (const i32_store_t &)
 
void operator() (const i32_store8_t &)
 
void operator() (const i32_store16_t &)
 
void operator() (const i64_store_t &)
 
void operator() (const i64_store8_t &)
 
void operator() (const i64_store16_t &)
 
void operator() (const i64_store32_t &)
 
void operator() (const f32_store_t &)
 
void operator() (const f64_store_t &)
 
void operator() (const current_memory_t &)
 
void operator() (const grow_memory_t &)
 
void operator() (const i32_const_t &)
 
void operator() (const i64_const_t &)
 
void operator() (const f32_const_t &)
 
void operator() (const f64_const_t &)
 
void operator() (const i32_eqz_t &)
 
void operator() (const i32_eq_t &)
 
void operator() (const i32_ne_t &)
 
void operator() (const i32_lt_s_t &)
 
void operator() (const i32_lt_u_t &)
 
void operator() (const i32_le_s_t &)
 
void operator() (const i32_le_u_t &)
 
void operator() (const i32_gt_s_t &)
 
void operator() (const i32_gt_u_t &)
 
void operator() (const i32_ge_s_t &)
 
void operator() (const i32_ge_u_t &)
 
void operator() (const i64_eqz_t &)
 
void operator() (const i64_eq_t &)
 
void operator() (const i64_ne_t &)
 
void operator() (const i64_lt_s_t &)
 
void operator() (const i64_lt_u_t &)
 
void operator() (const i64_le_s_t &)
 
void operator() (const i64_le_u_t &)
 
void operator() (const i64_gt_s_t &)
 
void operator() (const i64_gt_u_t &)
 
void operator() (const i64_ge_s_t &)
 
void operator() (const i64_ge_u_t &)
 
void operator() (const f32_eq_t &)
 
void operator() (const f32_ne_t &)
 
void operator() (const f32_lt_t &)
 
void operator() (const f32_gt_t &)
 
void operator() (const f32_le_t &)
 
void operator() (const f32_ge_t &)
 
void operator() (const f64_eq_t &)
 
void operator() (const f64_ne_t &)
 
void operator() (const f64_lt_t &)
 
void operator() (const f64_gt_t &)
 
void operator() (const f64_le_t &)
 
void operator() (const f64_ge_t &)
 
void operator() (const i32_clz_t &)
 
void operator() (const i32_ctz_t &)
 
void operator() (const i32_popcnt_t &)
 
void operator() (const i32_add_t &)
 
void operator() (const i32_sub_t &)
 
void operator() (const i32_mul_t &)
 
void operator() (const i32_div_s_t &)
 
void operator() (const i32_div_u_t &)
 
void operator() (const i32_rem_s_t &)
 
void operator() (const i32_rem_u_t &)
 
void operator() (const i32_and_t &)
 
void operator() (const i32_or_t &)
 
void operator() (const i32_xor_t &)
 
void operator() (const i32_shl_t &)
 
void operator() (const i32_shr_s_t &)
 
void operator() (const i32_shr_u_t &)
 
void operator() (const i32_rotl_t &)
 
void operator() (const i32_rotr_t &)
 
void operator() (const i64_clz_t &)
 
void operator() (const i64_ctz_t &)
 
void operator() (const i64_popcnt_t &)
 
void operator() (const i64_add_t &)
 
void operator() (const i64_sub_t &)
 
void operator() (const i64_mul_t &)
 
void operator() (const i64_div_s_t &)
 
void operator() (const i64_div_u_t &)
 
void operator() (const i64_rem_s_t &)
 
void operator() (const i64_rem_u_t &)
 
void operator() (const i64_and_t &)
 
void operator() (const i64_or_t &)
 
void operator() (const i64_xor_t &)
 
void operator() (const i64_shl_t &)
 
void operator() (const i64_shr_s_t &)
 
void operator() (const i64_shr_u_t &)
 
void operator() (const i64_rotl_t &)
 
void operator() (const i64_rotr_t &)
 
void operator() (const f32_abs_t &)
 
void operator() (const f32_neg_t &)
 
void operator() (const f32_ceil_t &)
 
void operator() (const f32_floor_t &)
 
void operator() (const f32_trunc_t &)
 
void operator() (const f32_nearest_t &)
 
void operator() (const f32_sqrt_t &)
 
void operator() (const f32_add_t &)
 
void operator() (const f32_sub_t &)
 
void operator() (const f32_mul_t &)
 
void operator() (const f32_div_t &)
 
void operator() (const f32_min_t &)
 
void operator() (const f32_max_t &)
 
void operator() (const f32_copysign_t &)
 
void operator() (const f64_abs_t &)
 
void operator() (const f64_neg_t &)
 
void operator() (const f64_ceil_t &)
 
void operator() (const f64_floor_t &)
 
void operator() (const f64_trunc_t &)
 
void operator() (const f64_nearest_t &)
 
void operator() (const f64_sqrt_t &)
 
void operator() (const f64_add_t &)
 
void operator() (const f64_sub_t &)
 
void operator() (const f64_mul_t &)
 
void operator() (const f64_div_t &)
 
void operator() (const f64_min_t &)
 
void operator() (const f64_max_t &)
 
void operator() (const f64_copysign_t &)
 
void operator() (const i32_wrap_i64_t &)
 
void operator() (const i32_trunc_s_f32_t &)
 
void operator() (const i32_trunc_u_f32_t &)
 
void operator() (const i32_trunc_s_f64_t &)
 
void operator() (const i32_trunc_u_f64_t &)
 
void operator() (const i64_extend_s_i32_t &)
 
void operator() (const i64_extend_u_i32_t &)
 
void operator() (const i64_trunc_s_f32_t &)
 
void operator() (const i64_trunc_u_f32_t &)
 
void operator() (const i64_trunc_s_f64_t &)
 
void operator() (const i64_trunc_u_f64_t &)
 
void operator() (const f32_convert_s_i32_t &)
 
void operator() (const f32_convert_u_i32_t &)
 
void operator() (const f32_convert_s_i64_t &)
 
void operator() (const f32_convert_u_i64_t &)
 
void operator() (const f32_demote_f64_t &)
 
void operator() (const f64_convert_s_i32_t &)
 
void operator() (const f64_convert_u_i32_t &)
 
void operator() (const f64_convert_s_i64_t &)
 
void operator() (const f64_convert_u_i64_t &)
 
void operator() (const f64_promote_f32_t &)
 
void operator() (const i32_reinterpret_f32_t &)
 
void operator() (const i64_reinterpret_f64_t &)
 
void operator() (const f32_reinterpret_i32_t &)
 
void operator() (const f64_reinterpret_i64_t &)
 
template<typename T >
void operator() (T val)
 

Static Public Member Functions

static constexpr void * align_address (void *addr, size_t align_amt)
 
template<typename T >
static T read_unaligned (const void *addr)
 
template<typename T >
static void write_unaligned (void *addr, T value)
 
static constexpr void * align_address (void *addr, size_t align_amt)
 
template<typename T >
static T read_unaligned (const void *addr)
 
template<typename T >
static void write_unaligned (void *addr, T value)
 

Public Attributes

ExecutionContext & context
 

Detailed Description

template<typename ExecutionContext>
struct sysio::vm::interpret_visitor< ExecutionContext >

Definition at line 20 of file interpret_visitor.hpp.

Constructor & Destructor Documentation

◆ interpret_visitor() [1/2]

template<typename ExecutionContext >
sysio::vm::interpret_visitor< ExecutionContext >::interpret_visitor ( ExecutionContext & ec)
inline

Definition at line 22 of file interpret_visitor.hpp.

22: context(ec) {}

◆ interpret_visitor() [2/2]

template<typename ExecutionContext >
sysio::vm::interpret_visitor< ExecutionContext >::interpret_visitor ( ExecutionContext & ec)
inline

Definition at line 22 of file interpret_visitor.hpp.

22: context(ec) {}

Member Function Documentation

◆ align_address() [1/2]

template<typename ExecutionContext >
static constexpr void * sysio::vm::interpret_visitor< ExecutionContext >::align_address ( void * addr,
size_t align_amt )
inlinestaticconstexpr

Definition at line 27 of file interpret_visitor.hpp.

27 {
28 if constexpr (should_align_memory_ops) {
29 addr = (void*)(((uintptr_t)addr + (1 << align_amt) - 1) & ~((1 << align_amt) - 1));
30 return addr;
31 } else {
32 return addr;
33 }
34 }
constexpr bool should_align_memory_ops
Definition config.hpp:9
_W64 unsigned int uintptr_t
Definition stdint.h:165
Here is the caller graph for this function:

◆ align_address() [2/2]

template<typename ExecutionContext >
static constexpr void * sysio::vm::interpret_visitor< ExecutionContext >::align_address ( void * addr,
size_t align_amt )
inlinestaticconstexpr

Definition at line 27 of file interpret_visitor.hpp.

27 {
28 if constexpr (should_align_memory_ops) {
29 addr = (void*)(((uintptr_t)addr + (1 << align_amt) - 1) & ~((1 << align_amt) - 1));
30 return addr;
31 } else {
32 return addr;
33 }
34 }

◆ get_context() [1/2]

template<typename ExecutionContext >
ExecutionContext & sysio::vm::interpret_visitor< ExecutionContext >::get_context ( )
inline

Definition at line 25 of file interpret_visitor.hpp.

25{ return context; }
Here is the caller graph for this function:

◆ get_context() [2/2]

template<typename ExecutionContext >
ExecutionContext & sysio::vm::interpret_visitor< ExecutionContext >::get_context ( )
inline

Definition at line 25 of file interpret_visitor.hpp.

25{ return context; }

◆ operator()() [1/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const block_t & op)
inline

Definition at line 55 of file interpret_visitor.hpp.

55{ context.inc_pc(); }

◆ operator()() [2/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const block_t & op)
inline

Definition at line 55 of file interpret_visitor.hpp.

55{ context.inc_pc(); }

◆ operator()() [3/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const br_if_t & op)
inline

Definition at line 66 of file interpret_visitor.hpp.

66 {
67 const auto& val = context.pop_operand();
68 if (context.is_true(val)) {
69 context.jump(op.data, op.pc);
70 } else {
71 context.inc_pc();
72 }
73 }

◆ operator()() [4/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const br_if_t & op)
inline

Definition at line 66 of file interpret_visitor.hpp.

66 {
67 const auto& val = context.pop_operand();
68 if (context.is_true(val)) {
69 context.jump(op.data, op.pc);
70 } else {
71 context.inc_pc();
72 }
73 }

◆ operator()() [5/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const br_t & op)
inline

Definition at line 65 of file interpret_visitor.hpp.

65{ context.jump(op.data, op.pc); }

◆ operator()() [6/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const br_t & op)
inline

Definition at line 65 of file interpret_visitor.hpp.

65{ context.jump(op.data, op.pc); }

◆ operator()() [7/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const br_table_data_t & op)
inline

Definition at line 75 of file interpret_visitor.hpp.

75 {
76 context.inc_pc(op.index);
77 }

◆ operator()() [8/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const br_table_data_t & op)
inline

Definition at line 75 of file interpret_visitor.hpp.

75 {
76 context.inc_pc(op.index);
77 }

◆ operator()() [9/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const br_table_t & op)
inline

Definition at line 78 of file interpret_visitor.hpp.

78 {
79 const auto& in = context.pop_operand().to_ui32();
80 const auto& entry = op.table[std::min(in, op.size)];
81 context.jump(entry.stack_pop, entry.pc);
82 }

◆ operator()() [10/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const br_table_t & op)
inline

Definition at line 78 of file interpret_visitor.hpp.

78 {
79 const auto& in = context.pop_operand().to_ui32();
80 const auto& entry = op.table[std::min(in, op.size)];
81 context.jump(entry.stack_pop, entry.pc);
82 }

◆ operator()() [11/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const call_indirect_t & op)
inline

Definition at line 86 of file interpret_visitor.hpp.

86 {
87 const auto& index = context.pop_operand().to_ui32();
88 uint32_t fn = context.table_elem(index);
89 const auto& expected_type = context.get_module().types.at(op.index);
90 const auto& actual_type = context.get_module().get_function_type(fn);
91 SYS_VM_ASSERT(actual_type == expected_type, wasm_interpreter_exception, "bad call_indirect type");
92 context.call(fn);
93 }
unsigned int uint32_t
Definition stdint.h:126
#define SYS_VM_ASSERT(expr, exc_type, msg)
Definition exceptions.hpp:8

◆ operator()() [12/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const call_indirect_t & op)
inline

Definition at line 86 of file interpret_visitor.hpp.

86 {
87 const auto& index = context.pop_operand().to_ui32();
88 uint32_t fn = context.table_elem(index);
89 const auto& expected_type = context.get_module().types.at(op.index);
90 const auto& actual_type = context.get_module().get_function_type(fn);
91 SYS_VM_ASSERT(actual_type == expected_type, wasm_interpreter_exception, "bad call_indirect type");
92 context.call(fn);
93 }

◆ operator()() [13/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const call_t & op)
inline

Definition at line 83 of file interpret_visitor.hpp.

83 {
84 context.call(op.index);
85 }

◆ operator()() [14/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const call_t & op)
inline

Definition at line 83 of file interpret_visitor.hpp.

83 {
84 context.call(op.index);
85 }

◆ operator()() [15/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const current_memory_t & op)
inline

Definition at line 259 of file interpret_visitor.hpp.

259 {
260 context.inc_pc();
261 context.push_operand(i32_const_t{ context.current_linear_memory() });
262 }

◆ operator()() [16/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const current_memory_t & op)
inline

Definition at line 259 of file interpret_visitor.hpp.

259 {
260 context.inc_pc();
261 context.push_operand(i32_const_t{ context.current_linear_memory() });
262 }

◆ operator()() [17/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const drop_t & op)
inline

Definition at line 94 of file interpret_visitor.hpp.

94 {
95 context.pop_operand();
96 context.inc_pc();
97 }

◆ operator()() [18/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const drop_t & op)
inline

Definition at line 94 of file interpret_visitor.hpp.

94 {
95 context.pop_operand();
96 context.inc_pc();
97 }

◆ operator()() [19/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const else_t & op)
inline

Definition at line 64 of file interpret_visitor.hpp.

64{ context.set_relative_pc(op.pc); }

◆ operator()() [20/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const else_t & op)
inline

Definition at line 64 of file interpret_visitor.hpp.

64{ context.set_relative_pc(op.pc); }

◆ operator()() [21/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const end_t & op)
inline

Definition at line 53 of file interpret_visitor.hpp.

53{ context.inc_pc(); }

◆ operator()() [22/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const end_t & op)
inline

Definition at line 53 of file interpret_visitor.hpp.

53{ context.inc_pc(); }

◆ operator()() [23/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_abs_t & op)
inline

Definition at line 774 of file interpret_visitor.hpp.

774 {
775 context.inc_pc();
776 auto& oper = context.peek_operand().to_f32();
777 if constexpr (use_softfloat)
778 oper = _sysio_f32_abs(oper);
779 else
780 oper = __builtin_fabsf(oper);
781 }
constexpr bool use_softfloat
Definition config.hpp:16

◆ operator()() [24/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_abs_t & op)
inline

Definition at line 774 of file interpret_visitor.hpp.

774 {
775 context.inc_pc();
776 auto& oper = context.peek_operand().to_f32();
777 if constexpr (use_softfloat)
778 oper = _sysio_f32_abs(oper);
779 else
780 oper = __builtin_fabsf(oper);
781 }

◆ operator()() [25/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_add_t & op)
inline

Definition at line 830 of file interpret_visitor.hpp.

830 {
831 context.inc_pc();
832 const auto& rhs = context.pop_operand();
833 auto& lhs = context.peek_operand().to_f32();
834 if constexpr (use_softfloat)
835 lhs = _sysio_f32_add(lhs, rhs.to_f32());
836 else
837 lhs += rhs.to_f32();
838 }

◆ operator()() [26/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_add_t & op)
inline

Definition at line 830 of file interpret_visitor.hpp.

830 {
831 context.inc_pc();
832 const auto& rhs = context.pop_operand();
833 auto& lhs = context.peek_operand().to_f32();
834 if constexpr (use_softfloat)
835 lhs = _sysio_f32_add(lhs, rhs.to_f32());
836 else
837 lhs += rhs.to_f32();
838 }

◆ operator()() [27/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_ceil_t & op)
inline

Definition at line 790 of file interpret_visitor.hpp.

790 {
791 context.inc_pc();
792 auto& oper = context.peek_operand().to_f32();
793 if constexpr (use_softfloat)
794 oper = _sysio_f32_ceil(oper);
795 else
796 oper = __builtin_ceilf(oper);
797 }

◆ operator()() [28/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_ceil_t & op)
inline

Definition at line 790 of file interpret_visitor.hpp.

790 {
791 context.inc_pc();
792 auto& oper = context.peek_operand().to_f32();
793 if constexpr (use_softfloat)
794 oper = _sysio_f32_ceil(oper);
795 else
796 oper = __builtin_ceilf(oper);
797 }

◆ operator()() [29/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_const_t & op)
inline

Definition at line 276 of file interpret_visitor.hpp.

276 {
277 context.inc_pc();
278 context.push_operand(op);
279 }

◆ operator()() [30/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_const_t & op)
inline

Definition at line 276 of file interpret_visitor.hpp.

276 {
277 context.inc_pc();
278 context.push_operand(op);
279 }

◆ operator()() [31/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_convert_s_i32_t & op)
inline

Definition at line 1124 of file interpret_visitor.hpp.

1124 {
1125 context.inc_pc();
1126 auto& oper = context.peek_operand();
1127 if constexpr (use_softfloat) {
1128 oper = f32_const_t{ _sysio_i32_to_f32(oper.to_i32()) };
1129 } else {
1130 oper = f32_const_t{ static_cast<float>(oper.to_i32()) };
1131 }
1132 }

◆ operator()() [32/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_convert_s_i32_t & op)
inline

Definition at line 1124 of file interpret_visitor.hpp.

1124 {
1125 context.inc_pc();
1126 auto& oper = context.peek_operand();
1127 if constexpr (use_softfloat) {
1128 oper = f32_const_t{ _sysio_i32_to_f32(oper.to_i32()) };
1129 } else {
1130 oper = f32_const_t{ static_cast<float>(oper.to_i32()) };
1131 }
1132 }

◆ operator()() [33/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_convert_s_i64_t & op)
inline

Definition at line 1142 of file interpret_visitor.hpp.

1142 {
1143 context.inc_pc();
1144 auto& oper = context.peek_operand();
1145 if constexpr (use_softfloat) {
1146 oper = f32_const_t{ _sysio_i64_to_f32(oper.to_i64()) };
1147 } else {
1148 oper = f32_const_t{ static_cast<float>(oper.to_i64()) };
1149 }
1150 }

◆ operator()() [34/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_convert_s_i64_t & op)
inline

Definition at line 1142 of file interpret_visitor.hpp.

1142 {
1143 context.inc_pc();
1144 auto& oper = context.peek_operand();
1145 if constexpr (use_softfloat) {
1146 oper = f32_const_t{ _sysio_i64_to_f32(oper.to_i64()) };
1147 } else {
1148 oper = f32_const_t{ static_cast<float>(oper.to_i64()) };
1149 }
1150 }

◆ operator()() [35/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_convert_u_i32_t & op)
inline

Definition at line 1133 of file interpret_visitor.hpp.

1133 {
1134 context.inc_pc();
1135 auto& oper = context.peek_operand();
1136 if constexpr (use_softfloat) {
1137 oper = f32_const_t{ _sysio_ui32_to_f32(oper.to_ui32()) };
1138 } else {
1139 oper = f32_const_t{ static_cast<float>(oper.to_ui32()) };
1140 }
1141 }

◆ operator()() [36/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_convert_u_i32_t & op)
inline

Definition at line 1133 of file interpret_visitor.hpp.

1133 {
1134 context.inc_pc();
1135 auto& oper = context.peek_operand();
1136 if constexpr (use_softfloat) {
1137 oper = f32_const_t{ _sysio_ui32_to_f32(oper.to_ui32()) };
1138 } else {
1139 oper = f32_const_t{ static_cast<float>(oper.to_ui32()) };
1140 }
1141 }

◆ operator()() [37/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_convert_u_i64_t & op)
inline

Definition at line 1151 of file interpret_visitor.hpp.

1151 {
1152 context.inc_pc();
1153 auto& oper = context.peek_operand();
1154 if constexpr (use_softfloat) {
1155 oper = f32_const_t{ _sysio_ui64_to_f32(oper.to_ui64()) };
1156 } else {
1157 oper = f32_const_t{ static_cast<float>(oper.to_ui64()) };
1158 }
1159 }

◆ operator()() [38/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_convert_u_i64_t & op)
inline

Definition at line 1151 of file interpret_visitor.hpp.

1151 {
1152 context.inc_pc();
1153 auto& oper = context.peek_operand();
1154 if constexpr (use_softfloat) {
1155 oper = f32_const_t{ _sysio_ui64_to_f32(oper.to_ui64()) };
1156 } else {
1157 oper = f32_const_t{ static_cast<float>(oper.to_ui64()) };
1158 }
1159 }

◆ operator()() [39/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_copysign_t & op)
inline

Definition at line 884 of file interpret_visitor.hpp.

884 {
885 context.inc_pc();
886 const auto& rhs = context.pop_operand();
887 auto& lhs = context.peek_operand().to_f32();
888 if constexpr (use_softfloat)
889 lhs = _sysio_f32_copysign(lhs, rhs.to_f32());
890 else
891 lhs = __builtin_copysignf(lhs, rhs.to_f32());
892 }

◆ operator()() [40/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_copysign_t & op)
inline

Definition at line 884 of file interpret_visitor.hpp.

884 {
885 context.inc_pc();
886 const auto& rhs = context.pop_operand();
887 auto& lhs = context.peek_operand().to_f32();
888 if constexpr (use_softfloat)
889 lhs = _sysio_f32_copysign(lhs, rhs.to_f32());
890 else
891 lhs = __builtin_copysignf(lhs, rhs.to_f32());
892 }

◆ operator()() [41/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_demote_f64_t & op)
inline

Definition at line 1160 of file interpret_visitor.hpp.

1160 {
1161 context.inc_pc();
1162 auto& oper = context.peek_operand();
1163 if constexpr (use_softfloat) {
1164 oper = f32_const_t{ _sysio_f64_demote(oper.to_f64()) };
1165 } else {
1166 oper = f32_const_t{ static_cast<float>(oper.to_f64()) };
1167 }
1168 }

◆ operator()() [42/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_demote_f64_t & op)
inline

Definition at line 1160 of file interpret_visitor.hpp.

1160 {
1161 context.inc_pc();
1162 auto& oper = context.peek_operand();
1163 if constexpr (use_softfloat) {
1164 oper = f32_const_t{ _sysio_f64_demote(oper.to_f64()) };
1165 } else {
1166 oper = f32_const_t{ static_cast<float>(oper.to_f64()) };
1167 }
1168 }

◆ operator()() [43/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_div_t & op)
inline

Definition at line 857 of file interpret_visitor.hpp.

857 {
858 context.inc_pc();
859 const auto& rhs = context.pop_operand();
860 auto& lhs = context.peek_operand().to_f32();
861 if constexpr (use_softfloat)
862 lhs = _sysio_f32_div(lhs, rhs.to_f32());
863 else
864 lhs /= rhs.to_f32();
865 }

◆ operator()() [44/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_div_t & op)
inline

Definition at line 857 of file interpret_visitor.hpp.

857 {
858 context.inc_pc();
859 const auto& rhs = context.pop_operand();
860 auto& lhs = context.peek_operand().to_f32();
861 if constexpr (use_softfloat)
862 lhs = _sysio_f32_div(lhs, rhs.to_f32());
863 else
864 lhs /= rhs.to_f32();
865 }

◆ operator()() [45/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_eq_t & op)
inline

Definition at line 414 of file interpret_visitor.hpp.

414 {
415 context.inc_pc();
416 const auto& rhs = context.pop_operand().to_f32();
417 auto& lhs = context.peek_operand();
418 if constexpr (use_softfloat)
419 lhs = i32_const_t{ (uint32_t)_sysio_f32_eq(lhs.to_f32(), rhs) };
420 else
421 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() == rhs) };
422 }

◆ operator()() [46/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_eq_t & op)
inline

Definition at line 414 of file interpret_visitor.hpp.

414 {
415 context.inc_pc();
416 const auto& rhs = context.pop_operand().to_f32();
417 auto& lhs = context.peek_operand();
418 if constexpr (use_softfloat)
419 lhs = i32_const_t{ (uint32_t)_sysio_f32_eq(lhs.to_f32(), rhs) };
420 else
421 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() == rhs) };
422 }

◆ operator()() [47/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_floor_t & op)
inline

Definition at line 798 of file interpret_visitor.hpp.

798 {
799 context.inc_pc();
800 auto& oper = context.peek_operand().to_f32();
801 if constexpr (use_softfloat)
802 oper = _sysio_f32_floor(oper);
803 else
804 oper = __builtin_floorf(oper);
805 }

◆ operator()() [48/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_floor_t & op)
inline

Definition at line 798 of file interpret_visitor.hpp.

798 {
799 context.inc_pc();
800 auto& oper = context.peek_operand().to_f32();
801 if constexpr (use_softfloat)
802 oper = _sysio_f32_floor(oper);
803 else
804 oper = __builtin_floorf(oper);
805 }

◆ operator()() [49/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_ge_t & op)
inline

Definition at line 459 of file interpret_visitor.hpp.

459 {
460 context.inc_pc();
461 const auto& rhs = context.pop_operand().to_f32();
462 auto& lhs = context.peek_operand();
463 if constexpr (use_softfloat)
464 lhs = i32_const_t{ (uint32_t)_sysio_f32_ge(lhs.to_f32(), rhs) };
465 else
466 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() >= rhs) };
467 }

◆ operator()() [50/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_ge_t & op)
inline

Definition at line 459 of file interpret_visitor.hpp.

459 {
460 context.inc_pc();
461 const auto& rhs = context.pop_operand().to_f32();
462 auto& lhs = context.peek_operand();
463 if constexpr (use_softfloat)
464 lhs = i32_const_t{ (uint32_t)_sysio_f32_ge(lhs.to_f32(), rhs) };
465 else
466 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() >= rhs) };
467 }

◆ operator()() [51/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_gt_t & op)
inline

Definition at line 441 of file interpret_visitor.hpp.

441 {
442 context.inc_pc();
443 const auto& rhs = context.pop_operand().to_f32();
444 auto& lhs = context.peek_operand();
445 if constexpr (use_softfloat)
446 lhs = i32_const_t{ (uint32_t)_sysio_f32_gt(lhs.to_f32(), rhs) };
447 else
448 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() > rhs) };
449 }

◆ operator()() [52/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_gt_t & op)
inline

Definition at line 441 of file interpret_visitor.hpp.

441 {
442 context.inc_pc();
443 const auto& rhs = context.pop_operand().to_f32();
444 auto& lhs = context.peek_operand();
445 if constexpr (use_softfloat)
446 lhs = i32_const_t{ (uint32_t)_sysio_f32_gt(lhs.to_f32(), rhs) };
447 else
448 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() > rhs) };
449 }

◆ operator()() [53/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_le_t & op)
inline

Definition at line 450 of file interpret_visitor.hpp.

450 {
451 context.inc_pc();
452 const auto& rhs = context.pop_operand().to_f32();
453 auto& lhs = context.peek_operand();
454 if constexpr (use_softfloat)
455 lhs = i32_const_t{ (uint32_t)_sysio_f32_le(lhs.to_f32(), rhs) };
456 else
457 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() <= rhs) };
458 }

◆ operator()() [54/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_le_t & op)
inline

Definition at line 450 of file interpret_visitor.hpp.

450 {
451 context.inc_pc();
452 const auto& rhs = context.pop_operand().to_f32();
453 auto& lhs = context.peek_operand();
454 if constexpr (use_softfloat)
455 lhs = i32_const_t{ (uint32_t)_sysio_f32_le(lhs.to_f32(), rhs) };
456 else
457 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() <= rhs) };
458 }

◆ operator()() [55/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_load_t & op)
inline

Definition at line 195 of file interpret_visitor.hpp.

195 {
196 context.inc_pc();
197 void* _ptr = pop_memop_addr(op);
198 context.push_operand(f32_const_t{ read_unaligned<uint32_t>(_ptr) });
199 }
static T read_unaligned(const void *addr)
void * pop_memop_addr(const Op &op)
Here is the call graph for this function:

◆ operator()() [56/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_load_t & op)
inline

Definition at line 195 of file interpret_visitor.hpp.

195 {
196 context.inc_pc();
197 void* _ptr = pop_memop_addr(op);
198 context.push_operand(f32_const_t{ read_unaligned<uint32_t>(_ptr) });
199 }
Here is the call graph for this function:

◆ operator()() [57/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_lt_t & op)
inline

Definition at line 432 of file interpret_visitor.hpp.

432 {
433 context.inc_pc();
434 const auto& rhs = context.pop_operand().to_f32();
435 auto& lhs = context.peek_operand();
436 if constexpr (use_softfloat)
437 lhs = i32_const_t{ (uint32_t)_sysio_f32_lt(lhs.to_f32(), rhs) };
438 else
439 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() < rhs) };
440 }

◆ operator()() [58/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_lt_t & op)
inline

Definition at line 432 of file interpret_visitor.hpp.

432 {
433 context.inc_pc();
434 const auto& rhs = context.pop_operand().to_f32();
435 auto& lhs = context.peek_operand();
436 if constexpr (use_softfloat)
437 lhs = i32_const_t{ (uint32_t)_sysio_f32_lt(lhs.to_f32(), rhs) };
438 else
439 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() < rhs) };
440 }

◆ operator()() [59/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_max_t & op)
inline

Definition at line 875 of file interpret_visitor.hpp.

875 {
876 context.inc_pc();
877 const auto& rhs = context.pop_operand();
878 auto& lhs = context.peek_operand().to_f32();
879 if constexpr (use_softfloat)
880 lhs = _sysio_f32_max(lhs, rhs.to_f32());
881 else
882 lhs = __builtin_fmaxf(lhs, rhs.to_f32());
883 }

◆ operator()() [60/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_max_t & op)
inline

Definition at line 875 of file interpret_visitor.hpp.

875 {
876 context.inc_pc();
877 const auto& rhs = context.pop_operand();
878 auto& lhs = context.peek_operand().to_f32();
879 if constexpr (use_softfloat)
880 lhs = _sysio_f32_max(lhs, rhs.to_f32());
881 else
882 lhs = __builtin_fmaxf(lhs, rhs.to_f32());
883 }

◆ operator()() [61/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_min_t & op)
inline

Definition at line 866 of file interpret_visitor.hpp.

866 {
867 context.inc_pc();
868 const auto& rhs = context.pop_operand();
869 auto& lhs = context.peek_operand().to_f32();
870 if constexpr (use_softfloat)
871 lhs = _sysio_f32_min(lhs, rhs.to_f32());
872 else
873 lhs = __builtin_fminf(lhs, rhs.to_f32());
874 }

◆ operator()() [62/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_min_t & op)
inline

Definition at line 866 of file interpret_visitor.hpp.

866 {
867 context.inc_pc();
868 const auto& rhs = context.pop_operand();
869 auto& lhs = context.peek_operand().to_f32();
870 if constexpr (use_softfloat)
871 lhs = _sysio_f32_min(lhs, rhs.to_f32());
872 else
873 lhs = __builtin_fminf(lhs, rhs.to_f32());
874 }

◆ operator()() [63/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_mul_t & op)
inline

Definition at line 848 of file interpret_visitor.hpp.

848 {
849 context.inc_pc();
850 const auto& rhs = context.pop_operand();
851 auto& lhs = context.peek_operand().to_f32();
852 if constexpr (use_softfloat) {
853 lhs = _sysio_f32_mul(lhs, rhs.to_f32());
854 } else
855 lhs *= rhs.to_f32();
856 }

◆ operator()() [64/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_mul_t & op)
inline

Definition at line 848 of file interpret_visitor.hpp.

848 {
849 context.inc_pc();
850 const auto& rhs = context.pop_operand();
851 auto& lhs = context.peek_operand().to_f32();
852 if constexpr (use_softfloat) {
853 lhs = _sysio_f32_mul(lhs, rhs.to_f32());
854 } else
855 lhs *= rhs.to_f32();
856 }

◆ operator()() [65/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_ne_t & op)
inline

Definition at line 423 of file interpret_visitor.hpp.

423 {
424 context.inc_pc();
425 const auto& rhs = context.pop_operand().to_f32();
426 auto& lhs = context.peek_operand();
427 if constexpr (use_softfloat)
428 lhs = i32_const_t{ (uint32_t)_sysio_f32_ne(lhs.to_f32(), rhs) };
429 else
430 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() != rhs) };
431 }

◆ operator()() [66/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_ne_t & op)
inline

Definition at line 423 of file interpret_visitor.hpp.

423 {
424 context.inc_pc();
425 const auto& rhs = context.pop_operand().to_f32();
426 auto& lhs = context.peek_operand();
427 if constexpr (use_softfloat)
428 lhs = i32_const_t{ (uint32_t)_sysio_f32_ne(lhs.to_f32(), rhs) };
429 else
430 lhs = i32_const_t{ (uint32_t)(lhs.to_f32() != rhs) };
431 }

◆ operator()() [67/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_nearest_t & op)
inline

Definition at line 814 of file interpret_visitor.hpp.

814 {
815 context.inc_pc();
816 auto& oper = context.peek_operand().to_f32();
817 if constexpr (use_softfloat)
818 oper = _sysio_f32_nearest(oper);
819 else
820 oper = __builtin_nearbyintf(oper);
821 }

◆ operator()() [68/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_nearest_t & op)
inline

Definition at line 814 of file interpret_visitor.hpp.

814 {
815 context.inc_pc();
816 auto& oper = context.peek_operand().to_f32();
817 if constexpr (use_softfloat)
818 oper = _sysio_f32_nearest(oper);
819 else
820 oper = __builtin_nearbyintf(oper);
821 }

◆ operator()() [69/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_neg_t & op)
inline

Definition at line 782 of file interpret_visitor.hpp.

782 {
783 context.inc_pc();
784 auto& oper = context.peek_operand().to_f32();
785 if constexpr (use_softfloat)
786 oper = _sysio_f32_neg(oper);
787 else
788 oper = -oper;
789 }

◆ operator()() [70/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_neg_t & op)
inline

Definition at line 782 of file interpret_visitor.hpp.

782 {
783 context.inc_pc();
784 auto& oper = context.peek_operand().to_f32();
785 if constexpr (use_softfloat)
786 oper = _sysio_f32_neg(oper);
787 else
788 oper = -oper;
789 }

◆ operator()() [71/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_reinterpret_i32_t & op)
inline

Definition at line 1224 of file interpret_visitor.hpp.

1224 {
1225 context.inc_pc();
1226 auto& oper = context.peek_operand();
1227 oper = f32_const_t{ oper.to_ui32() };
1228 }

◆ operator()() [72/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_reinterpret_i32_t & op)
inline

Definition at line 1224 of file interpret_visitor.hpp.

1224 {
1225 context.inc_pc();
1226 auto& oper = context.peek_operand();
1227 oper = f32_const_t{ oper.to_ui32() };
1228 }

◆ operator()() [73/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_sqrt_t & op)
inline

Definition at line 822 of file interpret_visitor.hpp.

822 {
823 context.inc_pc();
824 auto& oper = context.peek_operand().to_f32();
825 if constexpr (use_softfloat)
826 oper = _sysio_f32_sqrt(oper);
827 else
828 oper = __builtin_sqrtf(oper);
829 }

◆ operator()() [74/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_sqrt_t & op)
inline

Definition at line 822 of file interpret_visitor.hpp.

822 {
823 context.inc_pc();
824 auto& oper = context.peek_operand().to_f32();
825 if constexpr (use_softfloat)
826 oper = _sysio_f32_sqrt(oper);
827 else
828 oper = __builtin_sqrtf(oper);
829 }

◆ operator()() [75/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_store_t & op)
inline

Definition at line 247 of file interpret_visitor.hpp.

247 {
248 context.inc_pc();
249 const auto& val = context.pop_operand();
250 void* store_loc = pop_memop_addr(op);
251 write_unaligned(store_loc, static_cast<uint32_t>(val.to_fui32()));
252 }
static void write_unaligned(void *addr, T value)
Here is the call graph for this function:

◆ operator()() [76/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_store_t & op)
inline

Definition at line 247 of file interpret_visitor.hpp.

247 {
248 context.inc_pc();
249 const auto& val = context.pop_operand();
250 void* store_loc = pop_memop_addr(op);
251 write_unaligned(store_loc, static_cast<uint32_t>(val.to_fui32()));
252 }
Here is the call graph for this function:

◆ operator()() [77/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_sub_t & op)
inline

Definition at line 839 of file interpret_visitor.hpp.

839 {
840 context.inc_pc();
841 const auto& rhs = context.pop_operand();
842 auto& lhs = context.peek_operand().to_f32();
843 if constexpr (use_softfloat)
844 lhs = _sysio_f32_sub(lhs, rhs.to_f32());
845 else
846 lhs -= rhs.to_f32();
847 }

◆ operator()() [78/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_sub_t & op)
inline

Definition at line 839 of file interpret_visitor.hpp.

839 {
840 context.inc_pc();
841 const auto& rhs = context.pop_operand();
842 auto& lhs = context.peek_operand().to_f32();
843 if constexpr (use_softfloat)
844 lhs = _sysio_f32_sub(lhs, rhs.to_f32());
845 else
846 lhs -= rhs.to_f32();
847 }

◆ operator()() [79/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_trunc_t & op)
inline

Definition at line 806 of file interpret_visitor.hpp.

806 {
807 context.inc_pc();
808 auto& oper = context.peek_operand().to_f32();
809 if constexpr (use_softfloat)
810 oper = _sysio_f32_trunc(oper);
811 else
812 oper = __builtin_trunc(oper);
813 }

◆ operator()() [80/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f32_trunc_t & op)
inline

Definition at line 806 of file interpret_visitor.hpp.

806 {
807 context.inc_pc();
808 auto& oper = context.peek_operand().to_f32();
809 if constexpr (use_softfloat)
810 oper = _sysio_f32_trunc(oper);
811 else
812 oper = __builtin_trunc(oper);
813 }

◆ operator()() [81/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_abs_t & op)
inline

Definition at line 893 of file interpret_visitor.hpp.

893 {
894 context.inc_pc();
895 auto& oper = context.peek_operand().to_f64();
896 if constexpr (use_softfloat)
897 oper = _sysio_f64_abs(oper);
898 else
899 oper = __builtin_fabs(oper);
900 }

◆ operator()() [82/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_abs_t & op)
inline

Definition at line 893 of file interpret_visitor.hpp.

893 {
894 context.inc_pc();
895 auto& oper = context.peek_operand().to_f64();
896 if constexpr (use_softfloat)
897 oper = _sysio_f64_abs(oper);
898 else
899 oper = __builtin_fabs(oper);
900 }

◆ operator()() [83/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_add_t & op)
inline

Definition at line 950 of file interpret_visitor.hpp.

950 {
951 context.inc_pc();
952 const auto& rhs = context.pop_operand();
953 auto& lhs = context.peek_operand().to_f64();
954 if constexpr (use_softfloat)
955 lhs = _sysio_f64_add(lhs, rhs.to_f64());
956 else
957 lhs += rhs.to_f64();
958 }

◆ operator()() [84/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_add_t & op)
inline

Definition at line 950 of file interpret_visitor.hpp.

950 {
951 context.inc_pc();
952 const auto& rhs = context.pop_operand();
953 auto& lhs = context.peek_operand().to_f64();
954 if constexpr (use_softfloat)
955 lhs = _sysio_f64_add(lhs, rhs.to_f64());
956 else
957 lhs += rhs.to_f64();
958 }

◆ operator()() [85/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_ceil_t & op)
inline

Definition at line 909 of file interpret_visitor.hpp.

909 {
910
911 context.inc_pc();
912 auto& oper = context.peek_operand().to_f64();
913 if constexpr (use_softfloat)
914 oper = _sysio_f64_ceil(oper);
915 else
916 oper = __builtin_ceil(oper);
917 }

◆ operator()() [86/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_ceil_t & op)
inline

Definition at line 909 of file interpret_visitor.hpp.

909 {
910
911 context.inc_pc();
912 auto& oper = context.peek_operand().to_f64();
913 if constexpr (use_softfloat)
914 oper = _sysio_f64_ceil(oper);
915 else
916 oper = __builtin_ceil(oper);
917 }

◆ operator()() [87/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_const_t & op)
inline

Definition at line 280 of file interpret_visitor.hpp.

280 {
281 context.inc_pc();
282 context.push_operand(op);
283 }

◆ operator()() [88/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_const_t & op)
inline

Definition at line 280 of file interpret_visitor.hpp.

280 {
281 context.inc_pc();
282 context.push_operand(op);
283 }

◆ operator()() [89/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_convert_s_i32_t & op)
inline

Definition at line 1169 of file interpret_visitor.hpp.

1169 {
1170 context.inc_pc();
1171 auto& oper = context.peek_operand();
1172 if constexpr (use_softfloat) {
1173 oper = f64_const_t{ _sysio_i32_to_f64(oper.to_i32()) };
1174 } else {
1175 oper = f64_const_t{ static_cast<double>(oper.to_i32()) };
1176 }
1177 }

◆ operator()() [90/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_convert_s_i32_t & op)
inline

Definition at line 1169 of file interpret_visitor.hpp.

1169 {
1170 context.inc_pc();
1171 auto& oper = context.peek_operand();
1172 if constexpr (use_softfloat) {
1173 oper = f64_const_t{ _sysio_i32_to_f64(oper.to_i32()) };
1174 } else {
1175 oper = f64_const_t{ static_cast<double>(oper.to_i32()) };
1176 }
1177 }

◆ operator()() [91/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_convert_s_i64_t & op)
inline

Definition at line 1187 of file interpret_visitor.hpp.

1187 {
1188 context.inc_pc();
1189 auto& oper = context.peek_operand();
1190 if constexpr (use_softfloat) {
1191 oper = f64_const_t{ _sysio_i64_to_f64(oper.to_i64()) };
1192 } else {
1193 oper = f64_const_t{ static_cast<double>(oper.to_i64()) };
1194 }
1195 }

◆ operator()() [92/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_convert_s_i64_t & op)
inline

Definition at line 1187 of file interpret_visitor.hpp.

1187 {
1188 context.inc_pc();
1189 auto& oper = context.peek_operand();
1190 if constexpr (use_softfloat) {
1191 oper = f64_const_t{ _sysio_i64_to_f64(oper.to_i64()) };
1192 } else {
1193 oper = f64_const_t{ static_cast<double>(oper.to_i64()) };
1194 }
1195 }

◆ operator()() [93/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_convert_u_i32_t & op)
inline

Definition at line 1178 of file interpret_visitor.hpp.

1178 {
1179 context.inc_pc();
1180 auto& oper = context.peek_operand();
1181 if constexpr (use_softfloat) {
1182 oper = f64_const_t{ _sysio_ui32_to_f64(oper.to_ui32()) };
1183 } else {
1184 oper = f64_const_t{ static_cast<double>(oper.to_ui32()) };
1185 }
1186 }

◆ operator()() [94/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_convert_u_i32_t & op)
inline

Definition at line 1178 of file interpret_visitor.hpp.

1178 {
1179 context.inc_pc();
1180 auto& oper = context.peek_operand();
1181 if constexpr (use_softfloat) {
1182 oper = f64_const_t{ _sysio_ui32_to_f64(oper.to_ui32()) };
1183 } else {
1184 oper = f64_const_t{ static_cast<double>(oper.to_ui32()) };
1185 }
1186 }

◆ operator()() [95/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_convert_u_i64_t & op)
inline

Definition at line 1196 of file interpret_visitor.hpp.

1196 {
1197 context.inc_pc();
1198 auto& oper = context.peek_operand();
1199 if constexpr (use_softfloat) {
1200 oper = f64_const_t{ _sysio_ui64_to_f64(oper.to_ui64()) };
1201 } else {
1202 oper = f64_const_t{ static_cast<double>(oper.to_ui64()) };
1203 }
1204 }

◆ operator()() [96/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_convert_u_i64_t & op)
inline

Definition at line 1196 of file interpret_visitor.hpp.

1196 {
1197 context.inc_pc();
1198 auto& oper = context.peek_operand();
1199 if constexpr (use_softfloat) {
1200 oper = f64_const_t{ _sysio_ui64_to_f64(oper.to_ui64()) };
1201 } else {
1202 oper = f64_const_t{ static_cast<double>(oper.to_ui64()) };
1203 }
1204 }

◆ operator()() [97/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_copysign_t & op)
inline

Definition at line 1004 of file interpret_visitor.hpp.

1004 {
1005 context.inc_pc();
1006 const auto& rhs = context.pop_operand();
1007 auto& lhs = context.peek_operand().to_f64();
1008 if constexpr (use_softfloat)
1009 lhs = _sysio_f64_copysign(lhs, rhs.to_f64());
1010 else
1011 lhs = __builtin_copysign(lhs, rhs.to_f64());
1012 }

◆ operator()() [98/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_copysign_t & op)
inline

Definition at line 1004 of file interpret_visitor.hpp.

1004 {
1005 context.inc_pc();
1006 const auto& rhs = context.pop_operand();
1007 auto& lhs = context.peek_operand().to_f64();
1008 if constexpr (use_softfloat)
1009 lhs = _sysio_f64_copysign(lhs, rhs.to_f64());
1010 else
1011 lhs = __builtin_copysign(lhs, rhs.to_f64());
1012 }

◆ operator()() [99/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_div_t & op)
inline

Definition at line 977 of file interpret_visitor.hpp.

977 {
978 context.inc_pc();
979 const auto& rhs = context.pop_operand();
980 auto& lhs = context.peek_operand().to_f64();
981 if constexpr (use_softfloat)
982 lhs = _sysio_f64_div(lhs, rhs.to_f64());
983 else
984 lhs /= rhs.to_f64();
985 }

◆ operator()() [100/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_div_t & op)
inline

Definition at line 977 of file interpret_visitor.hpp.

977 {
978 context.inc_pc();
979 const auto& rhs = context.pop_operand();
980 auto& lhs = context.peek_operand().to_f64();
981 if constexpr (use_softfloat)
982 lhs = _sysio_f64_div(lhs, rhs.to_f64());
983 else
984 lhs /= rhs.to_f64();
985 }

◆ operator()() [101/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_eq_t & op)
inline

Definition at line 468 of file interpret_visitor.hpp.

468 {
469 context.inc_pc();
470 const auto& rhs = context.pop_operand().to_f64();
471 auto& lhs = context.peek_operand();
472 if constexpr (use_softfloat)
473 lhs = i32_const_t{ (uint32_t)_sysio_f64_eq(lhs.to_f64(), rhs) };
474 else
475 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() == rhs) };
476 }

◆ operator()() [102/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_eq_t & op)
inline

Definition at line 468 of file interpret_visitor.hpp.

468 {
469 context.inc_pc();
470 const auto& rhs = context.pop_operand().to_f64();
471 auto& lhs = context.peek_operand();
472 if constexpr (use_softfloat)
473 lhs = i32_const_t{ (uint32_t)_sysio_f64_eq(lhs.to_f64(), rhs) };
474 else
475 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() == rhs) };
476 }

◆ operator()() [103/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_floor_t & op)
inline

Definition at line 918 of file interpret_visitor.hpp.

918 {
919 context.inc_pc();
920 auto& oper = context.peek_operand().to_f64();
921 if constexpr (use_softfloat)
922 oper = _sysio_f64_floor(oper);
923 else
924 oper = __builtin_floor(oper);
925 }

◆ operator()() [104/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_floor_t & op)
inline

Definition at line 918 of file interpret_visitor.hpp.

918 {
919 context.inc_pc();
920 auto& oper = context.peek_operand().to_f64();
921 if constexpr (use_softfloat)
922 oper = _sysio_f64_floor(oper);
923 else
924 oper = __builtin_floor(oper);
925 }

◆ operator()() [105/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_ge_t & op)
inline

Definition at line 513 of file interpret_visitor.hpp.

513 {
514 context.inc_pc();
515 const auto& rhs = context.pop_operand().to_f64();
516 auto& lhs = context.peek_operand();
517 if constexpr (use_softfloat)
518 lhs = i32_const_t{ (uint32_t)_sysio_f64_ge(lhs.to_f64(), rhs) };
519 else
520 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() >= rhs) };
521 }

◆ operator()() [106/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_ge_t & op)
inline

Definition at line 513 of file interpret_visitor.hpp.

513 {
514 context.inc_pc();
515 const auto& rhs = context.pop_operand().to_f64();
516 auto& lhs = context.peek_operand();
517 if constexpr (use_softfloat)
518 lhs = i32_const_t{ (uint32_t)_sysio_f64_ge(lhs.to_f64(), rhs) };
519 else
520 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() >= rhs) };
521 }

◆ operator()() [107/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_gt_t & op)
inline

Definition at line 495 of file interpret_visitor.hpp.

495 {
496 context.inc_pc();
497 const auto& rhs = context.pop_operand().to_f64();
498 auto& lhs = context.peek_operand();
499 if constexpr (use_softfloat)
500 lhs = i32_const_t{ (uint32_t)_sysio_f64_gt(lhs.to_f64(), rhs) };
501 else
502 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() > rhs) };
503 }

◆ operator()() [108/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_gt_t & op)
inline

Definition at line 495 of file interpret_visitor.hpp.

495 {
496 context.inc_pc();
497 const auto& rhs = context.pop_operand().to_f64();
498 auto& lhs = context.peek_operand();
499 if constexpr (use_softfloat)
500 lhs = i32_const_t{ (uint32_t)_sysio_f64_gt(lhs.to_f64(), rhs) };
501 else
502 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() > rhs) };
503 }

◆ operator()() [109/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_le_t & op)
inline

Definition at line 504 of file interpret_visitor.hpp.

504 {
505 context.inc_pc();
506 const auto& rhs = context.pop_operand().to_f64();
507 auto& lhs = context.peek_operand();
508 if constexpr (use_softfloat)
509 lhs = i32_const_t{ (uint32_t)_sysio_f64_le(lhs.to_f64(), rhs) };
510 else
511 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() <= rhs) };
512 }

◆ operator()() [110/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_le_t & op)
inline

Definition at line 504 of file interpret_visitor.hpp.

504 {
505 context.inc_pc();
506 const auto& rhs = context.pop_operand().to_f64();
507 auto& lhs = context.peek_operand();
508 if constexpr (use_softfloat)
509 lhs = i32_const_t{ (uint32_t)_sysio_f64_le(lhs.to_f64(), rhs) };
510 else
511 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() <= rhs) };
512 }

◆ operator()() [111/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_load_t & op)
inline

Definition at line 200 of file interpret_visitor.hpp.

200 {
201 context.inc_pc();
202 void* _ptr = pop_memop_addr(op);
203 context.push_operand(f64_const_t{ read_unaligned<uint64_t>(_ptr) });
204 }
Here is the call graph for this function:

◆ operator()() [112/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_load_t & op)
inline

Definition at line 200 of file interpret_visitor.hpp.

200 {
201 context.inc_pc();
202 void* _ptr = pop_memop_addr(op);
203 context.push_operand(f64_const_t{ read_unaligned<uint64_t>(_ptr) });
204 }
Here is the call graph for this function:

◆ operator()() [113/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_lt_t & op)
inline

Definition at line 486 of file interpret_visitor.hpp.

486 {
487 context.inc_pc();
488 const auto& rhs = context.pop_operand().to_f64();
489 auto& lhs = context.peek_operand();
490 if constexpr (use_softfloat)
491 lhs = i32_const_t{ (uint32_t)_sysio_f64_lt(lhs.to_f64(), rhs) };
492 else
493 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() < rhs) };
494 }

◆ operator()() [114/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_lt_t & op)
inline

Definition at line 486 of file interpret_visitor.hpp.

486 {
487 context.inc_pc();
488 const auto& rhs = context.pop_operand().to_f64();
489 auto& lhs = context.peek_operand();
490 if constexpr (use_softfloat)
491 lhs = i32_const_t{ (uint32_t)_sysio_f64_lt(lhs.to_f64(), rhs) };
492 else
493 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() < rhs) };
494 }

◆ operator()() [115/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_max_t & op)
inline

Definition at line 995 of file interpret_visitor.hpp.

995 {
996 context.inc_pc();
997 const auto& rhs = context.pop_operand();
998 auto& lhs = context.peek_operand().to_f64();
999 if constexpr (use_softfloat)
1000 lhs = _sysio_f64_max(lhs, rhs.to_f64());
1001 else
1002 lhs = __builtin_fmax(lhs, rhs.to_f64());
1003 }

◆ operator()() [116/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_max_t & op)
inline

Definition at line 995 of file interpret_visitor.hpp.

995 {
996 context.inc_pc();
997 const auto& rhs = context.pop_operand();
998 auto& lhs = context.peek_operand().to_f64();
999 if constexpr (use_softfloat)
1000 lhs = _sysio_f64_max(lhs, rhs.to_f64());
1001 else
1002 lhs = __builtin_fmax(lhs, rhs.to_f64());
1003 }

◆ operator()() [117/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_min_t & op)
inline

Definition at line 986 of file interpret_visitor.hpp.

986 {
987 context.inc_pc();
988 const auto& rhs = context.pop_operand();
989 auto& lhs = context.peek_operand().to_f64();
990 if constexpr (use_softfloat)
991 lhs = _sysio_f64_min(lhs, rhs.to_f64());
992 else
993 lhs = __builtin_fmin(lhs, rhs.to_f64());
994 }

◆ operator()() [118/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_min_t & op)
inline

Definition at line 986 of file interpret_visitor.hpp.

986 {
987 context.inc_pc();
988 const auto& rhs = context.pop_operand();
989 auto& lhs = context.peek_operand().to_f64();
990 if constexpr (use_softfloat)
991 lhs = _sysio_f64_min(lhs, rhs.to_f64());
992 else
993 lhs = __builtin_fmin(lhs, rhs.to_f64());
994 }

◆ operator()() [119/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_mul_t & op)
inline

Definition at line 968 of file interpret_visitor.hpp.

968 {
969 context.inc_pc();
970 const auto& rhs = context.pop_operand();
971 auto& lhs = context.peek_operand().to_f64();
972 if constexpr (use_softfloat)
973 lhs = _sysio_f64_mul(lhs, rhs.to_f64());
974 else
975 lhs *= rhs.to_f64();
976 }

◆ operator()() [120/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_mul_t & op)
inline

Definition at line 968 of file interpret_visitor.hpp.

968 {
969 context.inc_pc();
970 const auto& rhs = context.pop_operand();
971 auto& lhs = context.peek_operand().to_f64();
972 if constexpr (use_softfloat)
973 lhs = _sysio_f64_mul(lhs, rhs.to_f64());
974 else
975 lhs *= rhs.to_f64();
976 }

◆ operator()() [121/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_ne_t & op)
inline

Definition at line 477 of file interpret_visitor.hpp.

477 {
478 context.inc_pc();
479 const auto& rhs = context.pop_operand().to_f64();
480 auto& lhs = context.peek_operand();
481 if constexpr (use_softfloat)
482 lhs = i32_const_t{ (uint32_t)_sysio_f64_ne(lhs.to_f64(), rhs) };
483 else
484 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() != rhs) };
485 }

◆ operator()() [122/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_ne_t & op)
inline

Definition at line 477 of file interpret_visitor.hpp.

477 {
478 context.inc_pc();
479 const auto& rhs = context.pop_operand().to_f64();
480 auto& lhs = context.peek_operand();
481 if constexpr (use_softfloat)
482 lhs = i32_const_t{ (uint32_t)_sysio_f64_ne(lhs.to_f64(), rhs) };
483 else
484 lhs = i32_const_t{ (uint32_t)(lhs.to_f64() != rhs) };
485 }

◆ operator()() [123/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_nearest_t & op)
inline

Definition at line 934 of file interpret_visitor.hpp.

934 {
935 context.inc_pc();
936 auto& oper = context.peek_operand().to_f64();
937 if constexpr (use_softfloat)
938 oper = _sysio_f64_nearest(oper);
939 else
940 oper = __builtin_nearbyint(oper);
941 }

◆ operator()() [124/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_nearest_t & op)
inline

Definition at line 934 of file interpret_visitor.hpp.

934 {
935 context.inc_pc();
936 auto& oper = context.peek_operand().to_f64();
937 if constexpr (use_softfloat)
938 oper = _sysio_f64_nearest(oper);
939 else
940 oper = __builtin_nearbyint(oper);
941 }

◆ operator()() [125/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_neg_t & op)
inline

Definition at line 901 of file interpret_visitor.hpp.

901 {
902 context.inc_pc();
903 auto& oper = context.peek_operand().to_f64();
904 if constexpr (use_softfloat)
905 oper = _sysio_f64_neg(oper);
906 else
907 oper = -oper;
908 }

◆ operator()() [126/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_neg_t & op)
inline

Definition at line 901 of file interpret_visitor.hpp.

901 {
902 context.inc_pc();
903 auto& oper = context.peek_operand().to_f64();
904 if constexpr (use_softfloat)
905 oper = _sysio_f64_neg(oper);
906 else
907 oper = -oper;
908 }

◆ operator()() [127/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_promote_f32_t & op)
inline

Definition at line 1205 of file interpret_visitor.hpp.

1205 {
1206 context.inc_pc();
1207 auto& oper = context.peek_operand();
1208 if constexpr (use_softfloat) {
1209 oper = f64_const_t{ _sysio_f32_promote(oper.to_f32()) };
1210 } else {
1211 oper = f64_const_t{ static_cast<double>(oper.to_f32()) };
1212 }
1213 }

◆ operator()() [128/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_promote_f32_t & op)
inline

Definition at line 1205 of file interpret_visitor.hpp.

1205 {
1206 context.inc_pc();
1207 auto& oper = context.peek_operand();
1208 if constexpr (use_softfloat) {
1209 oper = f64_const_t{ _sysio_f32_promote(oper.to_f32()) };
1210 } else {
1211 oper = f64_const_t{ static_cast<double>(oper.to_f32()) };
1212 }
1213 }

◆ operator()() [129/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_reinterpret_i64_t & op)
inline

Definition at line 1229 of file interpret_visitor.hpp.

1229 {
1230 context.inc_pc();
1231 auto& oper = context.peek_operand();
1232 oper = f64_const_t{ oper.to_ui64() };
1233 }

◆ operator()() [130/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_reinterpret_i64_t & op)
inline

Definition at line 1229 of file interpret_visitor.hpp.

1229 {
1230 context.inc_pc();
1231 auto& oper = context.peek_operand();
1232 oper = f64_const_t{ oper.to_ui64() };
1233 }

◆ operator()() [131/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_sqrt_t & op)
inline

Definition at line 942 of file interpret_visitor.hpp.

942 {
943 context.inc_pc();
944 auto& oper = context.peek_operand().to_f64();
945 if constexpr (use_softfloat)
946 oper = _sysio_f64_sqrt(oper);
947 else
948 oper = __builtin_sqrt(oper);
949 }

◆ operator()() [132/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_sqrt_t & op)
inline

Definition at line 942 of file interpret_visitor.hpp.

942 {
943 context.inc_pc();
944 auto& oper = context.peek_operand().to_f64();
945 if constexpr (use_softfloat)
946 oper = _sysio_f64_sqrt(oper);
947 else
948 oper = __builtin_sqrt(oper);
949 }

◆ operator()() [133/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_store_t & op)
inline

Definition at line 253 of file interpret_visitor.hpp.

253 {
254 context.inc_pc();
255 const auto& val = context.pop_operand();
256 void* store_loc = pop_memop_addr(op);
257 write_unaligned(store_loc, static_cast<uint64_t>(val.to_fui64()));
258 }
unsigned __int64 uint64_t
Definition stdint.h:136
Here is the call graph for this function:

◆ operator()() [134/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_store_t & op)
inline

Definition at line 253 of file interpret_visitor.hpp.

253 {
254 context.inc_pc();
255 const auto& val = context.pop_operand();
256 void* store_loc = pop_memop_addr(op);
257 write_unaligned(store_loc, static_cast<uint64_t>(val.to_fui64()));
258 }
Here is the call graph for this function:

◆ operator()() [135/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_sub_t & op)
inline

Definition at line 959 of file interpret_visitor.hpp.

959 {
960 context.inc_pc();
961 const auto& rhs = context.pop_operand();
962 auto& lhs = context.peek_operand().to_f64();
963 if constexpr (use_softfloat)
964 lhs = _sysio_f64_sub(lhs, rhs.to_f64());
965 else
966 lhs -= rhs.to_f64();
967 }

◆ operator()() [136/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_sub_t & op)
inline

Definition at line 959 of file interpret_visitor.hpp.

959 {
960 context.inc_pc();
961 const auto& rhs = context.pop_operand();
962 auto& lhs = context.peek_operand().to_f64();
963 if constexpr (use_softfloat)
964 lhs = _sysio_f64_sub(lhs, rhs.to_f64());
965 else
966 lhs -= rhs.to_f64();
967 }

◆ operator()() [137/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_trunc_t & op)
inline

Definition at line 926 of file interpret_visitor.hpp.

926 {
927 context.inc_pc();
928 auto& oper = context.peek_operand().to_f64();
929 if constexpr (use_softfloat)
930 oper = _sysio_f64_trunc(oper);
931 else
932 oper = __builtin_trunc(oper);
933 }

◆ operator()() [138/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const f64_trunc_t & op)
inline

Definition at line 926 of file interpret_visitor.hpp.

926 {
927 context.inc_pc();
928 auto& oper = context.peek_operand().to_f64();
929 if constexpr (use_softfloat)
930 oper = _sysio_f64_trunc(oper);
931 else
932 oper = __builtin_trunc(oper);
933 }

◆ operator()() [139/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const get_global_t & op)
inline

Definition at line 120 of file interpret_visitor.hpp.

120 {
121 context.inc_pc();
122 const auto& gl = context.get_global(op.index);
123 context.push_operand(gl);
124 }

◆ operator()() [140/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const get_global_t & op)
inline

Definition at line 120 of file interpret_visitor.hpp.

120 {
121 context.inc_pc();
122 const auto& gl = context.get_global(op.index);
123 context.push_operand(gl);
124 }

◆ operator()() [141/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const get_local_t & op)
inline

Definition at line 106 of file interpret_visitor.hpp.

106 {
107 context.inc_pc();
108 context.push_operand(context.get_operand(op.index));
109 }

◆ operator()() [142/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const get_local_t & op)
inline

Definition at line 106 of file interpret_visitor.hpp.

106 {
107 context.inc_pc();
108 context.push_operand(context.get_operand(op.index));
109 }

◆ operator()() [143/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const grow_memory_t & op)
inline

Definition at line 263 of file interpret_visitor.hpp.

263 {
264 context.inc_pc();
265 auto& oper = context.peek_operand().to_ui32();
266 oper = context.grow_linear_memory(oper);
267 }

◆ operator()() [144/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const grow_memory_t & op)
inline

Definition at line 263 of file interpret_visitor.hpp.

263 {
264 context.inc_pc();
265 auto& oper = context.peek_operand().to_ui32();
266 oper = context.grow_linear_memory(oper);
267 }

◆ operator()() [145/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_add_t & op)
inline

Definition at line 540 of file interpret_visitor.hpp.

540 {
541 context.inc_pc();
542 const auto& rhs = context.pop_operand().to_ui32();
543 auto& lhs = context.peek_operand().to_ui32();
544 lhs += rhs;
545 }

◆ operator()() [146/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_add_t & op)
inline

Definition at line 540 of file interpret_visitor.hpp.

540 {
541 context.inc_pc();
542 const auto& rhs = context.pop_operand().to_ui32();
543 auto& lhs = context.peek_operand().to_ui32();
544 lhs += rhs;
545 }

◆ operator()() [147/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_and_t & op)
inline

Definition at line 591 of file interpret_visitor.hpp.

591 {
592 context.inc_pc();
593 const auto& rhs = context.pop_operand().to_ui32();
594 auto& lhs = context.peek_operand().to_ui32();
595 lhs &= rhs;
596 }

◆ operator()() [148/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_and_t & op)
inline

Definition at line 591 of file interpret_visitor.hpp.

591 {
592 context.inc_pc();
593 const auto& rhs = context.pop_operand().to_ui32();
594 auto& lhs = context.peek_operand().to_ui32();
595 lhs &= rhs;
596 }

◆ operator()() [149/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_clz_t & op)
inline

Definition at line 522 of file interpret_visitor.hpp.

522 {
523 context.inc_pc();
524 auto& oper = context.peek_operand().to_ui32();
525 // __builtin_clz(0) is undefined
526 oper = oper == 0 ? 32 : __builtin_clz(oper);
527 }

◆ operator()() [150/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_clz_t & op)
inline

Definition at line 522 of file interpret_visitor.hpp.

522 {
523 context.inc_pc();
524 auto& oper = context.peek_operand().to_ui32();
525 // __builtin_clz(0) is undefined
526 oper = oper == 0 ? 32 : __builtin_clz(oper);
527 }

◆ operator()() [151/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_const_t & op)
inline

Definition at line 268 of file interpret_visitor.hpp.

268 {
269 context.inc_pc();
270 context.push_operand(op);
271 }

◆ operator()() [152/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_const_t & op)
inline

Definition at line 268 of file interpret_visitor.hpp.

268 {
269 context.inc_pc();
270 context.push_operand(op);
271 }

◆ operator()() [153/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_ctz_t & op)
inline

Definition at line 528 of file interpret_visitor.hpp.

528 {
529 context.inc_pc();
530 auto& oper = context.peek_operand().to_ui32();
531
532 // __builtin_ctz(0) is undefined
533 oper = oper == 0 ? 32 : __builtin_ctz(oper);
534 }

◆ operator()() [154/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_ctz_t & op)
inline

Definition at line 528 of file interpret_visitor.hpp.

528 {
529 context.inc_pc();
530 auto& oper = context.peek_operand().to_ui32();
531
532 // __builtin_ctz(0) is undefined
533 oper = oper == 0 ? 32 : __builtin_ctz(oper);
534 }

◆ operator()() [155/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_div_s_t & op)
inline

Definition at line 558 of file interpret_visitor.hpp.

558 {
559 context.inc_pc();
560 const auto& rhs = context.pop_operand().to_i32();
561 auto& lhs = context.peek_operand().to_i32();
562 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i32.div_s divide by zero");
563 SYS_VM_ASSERT(!(lhs == std::numeric_limits<int32_t>::min() && rhs == -1), wasm_interpreter_exception,
564 "i32.div_s traps when I32_MAX/-1");
565 lhs /= rhs;
566 }

◆ operator()() [156/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_div_s_t & op)
inline

Definition at line 558 of file interpret_visitor.hpp.

558 {
559 context.inc_pc();
560 const auto& rhs = context.pop_operand().to_i32();
561 auto& lhs = context.peek_operand().to_i32();
562 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i32.div_s divide by zero");
563 SYS_VM_ASSERT(!(lhs == std::numeric_limits<int32_t>::min() && rhs == -1), wasm_interpreter_exception,
564 "i32.div_s traps when I32_MAX/-1");
565 lhs /= rhs;
566 }

◆ operator()() [157/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_div_u_t & op)
inline

Definition at line 567 of file interpret_visitor.hpp.

567 {
568 context.inc_pc();
569 const auto& rhs = context.pop_operand().to_ui32();
570 auto& lhs = context.peek_operand().to_ui32();
571 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i32.div_u divide by zero");
572 lhs /= rhs;
573 }

◆ operator()() [158/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_div_u_t & op)
inline

Definition at line 567 of file interpret_visitor.hpp.

567 {
568 context.inc_pc();
569 const auto& rhs = context.pop_operand().to_ui32();
570 auto& lhs = context.peek_operand().to_ui32();
571 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i32.div_u divide by zero");
572 lhs /= rhs;
573 }

◆ operator()() [159/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_eq_t & op)
inline

Definition at line 289 of file interpret_visitor.hpp.

289 {
290 context.inc_pc();
291 const auto& rhs = context.pop_operand().to_ui32();
292 auto& lhs = context.peek_operand().to_ui32();
293 lhs = lhs == rhs;
294 }

◆ operator()() [160/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_eq_t & op)
inline

Definition at line 289 of file interpret_visitor.hpp.

289 {
290 context.inc_pc();
291 const auto& rhs = context.pop_operand().to_ui32();
292 auto& lhs = context.peek_operand().to_ui32();
293 lhs = lhs == rhs;
294 }

◆ operator()() [161/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_eqz_t & op)
inline

Definition at line 284 of file interpret_visitor.hpp.

284 {
285 context.inc_pc();
286 auto& t = context.peek_operand().to_ui32();
287 t = t == 0;
288 }

◆ operator()() [162/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_eqz_t & op)
inline

Definition at line 284 of file interpret_visitor.hpp.

284 {
285 context.inc_pc();
286 auto& t = context.peek_operand().to_ui32();
287 t = t == 0;
288 }

◆ operator()() [163/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_ge_s_t & op)
inline

Definition at line 337 of file interpret_visitor.hpp.

337 {
338 context.inc_pc();
339 const auto& rhs = context.pop_operand().to_i32();
340 auto& lhs = context.peek_operand().to_i32();
341 lhs = lhs >= rhs;
342 }

◆ operator()() [164/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_ge_s_t & op)
inline

Definition at line 337 of file interpret_visitor.hpp.

337 {
338 context.inc_pc();
339 const auto& rhs = context.pop_operand().to_i32();
340 auto& lhs = context.peek_operand().to_i32();
341 lhs = lhs >= rhs;
342 }

◆ operator()() [165/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_ge_u_t & op)
inline

Definition at line 343 of file interpret_visitor.hpp.

343 {
344 context.inc_pc();
345 const auto& rhs = context.pop_operand().to_ui32();
346 auto& lhs = context.peek_operand().to_ui32();
347 lhs = lhs >= rhs;
348 }

◆ operator()() [166/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_ge_u_t & op)
inline

Definition at line 343 of file interpret_visitor.hpp.

343 {
344 context.inc_pc();
345 const auto& rhs = context.pop_operand().to_ui32();
346 auto& lhs = context.peek_operand().to_ui32();
347 lhs = lhs >= rhs;
348 }

◆ operator()() [167/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_gt_s_t & op)
inline

Definition at line 325 of file interpret_visitor.hpp.

325 {
326 context.inc_pc();
327 const auto& rhs = context.pop_operand().to_i32();
328 auto& lhs = context.peek_operand().to_i32();
329 lhs = lhs > rhs;
330 }

◆ operator()() [168/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_gt_s_t & op)
inline

Definition at line 325 of file interpret_visitor.hpp.

325 {
326 context.inc_pc();
327 const auto& rhs = context.pop_operand().to_i32();
328 auto& lhs = context.peek_operand().to_i32();
329 lhs = lhs > rhs;
330 }

◆ operator()() [169/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_gt_u_t & op)
inline

Definition at line 331 of file interpret_visitor.hpp.

331 {
332 context.inc_pc();
333 const auto& rhs = context.pop_operand().to_ui32();
334 auto& lhs = context.peek_operand().to_ui32();
335 lhs = lhs > rhs;
336 }

◆ operator()() [170/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_gt_u_t & op)
inline

Definition at line 331 of file interpret_visitor.hpp.

331 {
332 context.inc_pc();
333 const auto& rhs = context.pop_operand().to_ui32();
334 auto& lhs = context.peek_operand().to_ui32();
335 lhs = lhs > rhs;
336 }

◆ operator()() [171/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_le_s_t & op)
inline

Definition at line 313 of file interpret_visitor.hpp.

313 {
314 context.inc_pc();
315 const auto& rhs = context.pop_operand().to_i32();
316 auto& lhs = context.peek_operand().to_i32();
317 lhs = lhs <= rhs;
318 }

◆ operator()() [172/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_le_s_t & op)
inline

Definition at line 313 of file interpret_visitor.hpp.

313 {
314 context.inc_pc();
315 const auto& rhs = context.pop_operand().to_i32();
316 auto& lhs = context.peek_operand().to_i32();
317 lhs = lhs <= rhs;
318 }

◆ operator()() [173/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_le_u_t & op)
inline

Definition at line 319 of file interpret_visitor.hpp.

319 {
320 context.inc_pc();
321 const auto& rhs = context.pop_operand().to_ui32();
322 auto& lhs = context.peek_operand().to_ui32();
323 lhs = lhs <= rhs;
324 }

◆ operator()() [174/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_le_u_t & op)
inline

Definition at line 319 of file interpret_visitor.hpp.

319 {
320 context.inc_pc();
321 const auto& rhs = context.pop_operand().to_ui32();
322 auto& lhs = context.peek_operand().to_ui32();
323 lhs = lhs <= rhs;
324 }

◆ operator()() [175/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load16_s_t & op)
inline

Definition at line 145 of file interpret_visitor.hpp.

145 {
146 context.inc_pc();
147 void* _ptr = pop_memop_addr(op);
148 context.push_operand(i32_const_t{ static_cast<int32_t>( read_unaligned<int16_t>(_ptr) ) });
149 }
signed int int32_t
Definition stdint.h:123
Here is the call graph for this function:

◆ operator()() [176/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load16_s_t & op)
inline

Definition at line 145 of file interpret_visitor.hpp.

145 {
146 context.inc_pc();
147 void* _ptr = pop_memop_addr(op);
148 context.push_operand(i32_const_t{ static_cast<int32_t>( read_unaligned<int16_t>(_ptr) ) });
149 }
Here is the call graph for this function:

◆ operator()() [177/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load16_u_t & op)
inline

Definition at line 155 of file interpret_visitor.hpp.

155 {
156 context.inc_pc();
157 void* _ptr = pop_memop_addr(op);
158 context.push_operand(i32_const_t{ static_cast<uint32_t>( read_unaligned<uint16_t>(_ptr) ) });
159 }
Here is the call graph for this function:

◆ operator()() [178/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load16_u_t & op)
inline

Definition at line 155 of file interpret_visitor.hpp.

155 {
156 context.inc_pc();
157 void* _ptr = pop_memop_addr(op);
158 context.push_operand(i32_const_t{ static_cast<uint32_t>( read_unaligned<uint16_t>(_ptr) ) });
159 }
Here is the call graph for this function:

◆ operator()() [179/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load8_s_t & op)
inline

Definition at line 140 of file interpret_visitor.hpp.

140 {
141 context.inc_pc();
142 void* _ptr = pop_memop_addr(op);
143 context.push_operand(i32_const_t{ static_cast<int32_t>(read_unaligned<int8_t>(_ptr) ) });
144 }
Here is the call graph for this function:

◆ operator()() [180/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load8_s_t & op)
inline

Definition at line 140 of file interpret_visitor.hpp.

140 {
141 context.inc_pc();
142 void* _ptr = pop_memop_addr(op);
143 context.push_operand(i32_const_t{ static_cast<int32_t>(read_unaligned<int8_t>(_ptr) ) });
144 }
Here is the call graph for this function:

◆ operator()() [181/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load8_u_t & op)
inline

Definition at line 150 of file interpret_visitor.hpp.

150 {
151 context.inc_pc();
152 void* _ptr = pop_memop_addr(op);
153 context.push_operand(i32_const_t{ static_cast<uint32_t>( read_unaligned<uint8_t>(_ptr) ) });
154 }
Here is the call graph for this function:

◆ operator()() [182/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load8_u_t & op)
inline

Definition at line 150 of file interpret_visitor.hpp.

150 {
151 context.inc_pc();
152 void* _ptr = pop_memop_addr(op);
153 context.push_operand(i32_const_t{ static_cast<uint32_t>( read_unaligned<uint8_t>(_ptr) ) });
154 }
Here is the call graph for this function:

◆ operator()() [183/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load_t & op)
inline

Definition at line 135 of file interpret_visitor.hpp.

135 {
136 context.inc_pc();
137 void* _ptr = pop_memop_addr(op);
138 context.push_operand(i32_const_t{ read_unaligned<uint32_t>(_ptr) });
139 }
Here is the call graph for this function:

◆ operator()() [184/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_load_t & op)
inline

Definition at line 135 of file interpret_visitor.hpp.

135 {
136 context.inc_pc();
137 void* _ptr = pop_memop_addr(op);
138 context.push_operand(i32_const_t{ read_unaligned<uint32_t>(_ptr) });
139 }
Here is the call graph for this function:

◆ operator()() [185/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_lt_s_t & op)
inline

Definition at line 301 of file interpret_visitor.hpp.

301 {
302 context.inc_pc();
303 const auto& rhs = context.pop_operand().to_i32();
304 auto& lhs = context.peek_operand().to_i32();
305 lhs = lhs < rhs;
306 }

◆ operator()() [186/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_lt_s_t & op)
inline

Definition at line 301 of file interpret_visitor.hpp.

301 {
302 context.inc_pc();
303 const auto& rhs = context.pop_operand().to_i32();
304 auto& lhs = context.peek_operand().to_i32();
305 lhs = lhs < rhs;
306 }

◆ operator()() [187/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_lt_u_t & op)
inline

Definition at line 307 of file interpret_visitor.hpp.

307 {
308 context.inc_pc();
309 const auto& rhs = context.pop_operand().to_ui32();
310 auto& lhs = context.peek_operand().to_ui32();
311 lhs = lhs < rhs;
312 }

◆ operator()() [188/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_lt_u_t & op)
inline

Definition at line 307 of file interpret_visitor.hpp.

307 {
308 context.inc_pc();
309 const auto& rhs = context.pop_operand().to_ui32();
310 auto& lhs = context.peek_operand().to_ui32();
311 lhs = lhs < rhs;
312 }

◆ operator()() [189/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_mul_t & op)
inline

Definition at line 552 of file interpret_visitor.hpp.

552 {
553 context.inc_pc();
554 const auto& rhs = context.pop_operand().to_ui32();
555 auto& lhs = context.peek_operand().to_ui32();
556 lhs *= rhs;
557 }

◆ operator()() [190/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_mul_t & op)
inline

Definition at line 552 of file interpret_visitor.hpp.

552 {
553 context.inc_pc();
554 const auto& rhs = context.pop_operand().to_ui32();
555 auto& lhs = context.peek_operand().to_ui32();
556 lhs *= rhs;
557 }

◆ operator()() [191/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_ne_t & op)
inline

Definition at line 295 of file interpret_visitor.hpp.

295 {
296 context.inc_pc();
297 const auto& rhs = context.pop_operand().to_ui32();
298 auto& lhs = context.peek_operand().to_ui32();
299 lhs = lhs != rhs;
300 }

◆ operator()() [192/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_ne_t & op)
inline

Definition at line 295 of file interpret_visitor.hpp.

295 {
296 context.inc_pc();
297 const auto& rhs = context.pop_operand().to_ui32();
298 auto& lhs = context.peek_operand().to_ui32();
299 lhs = lhs != rhs;
300 }

◆ operator()() [193/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_or_t & op)
inline

Definition at line 597 of file interpret_visitor.hpp.

597 {
598 context.inc_pc();
599 const auto& rhs = context.pop_operand().to_ui32();
600 auto& lhs = context.peek_operand().to_ui32();
601 lhs |= rhs;
602 }

◆ operator()() [194/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_or_t & op)
inline

Definition at line 597 of file interpret_visitor.hpp.

597 {
598 context.inc_pc();
599 const auto& rhs = context.pop_operand().to_ui32();
600 auto& lhs = context.peek_operand().to_ui32();
601 lhs |= rhs;
602 }

◆ operator()() [195/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_popcnt_t & op)
inline

Definition at line 535 of file interpret_visitor.hpp.

535 {
536 context.inc_pc();
537 auto& oper = context.peek_operand().to_ui32();
538 oper = __builtin_popcount(oper);
539 }

◆ operator()() [196/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_popcnt_t & op)
inline

Definition at line 535 of file interpret_visitor.hpp.

535 {
536 context.inc_pc();
537 auto& oper = context.peek_operand().to_ui32();
538 oper = __builtin_popcount(oper);
539 }

◆ operator()() [197/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_reinterpret_f32_t & op)
inline

Definition at line 1214 of file interpret_visitor.hpp.

1214 {
1215 context.inc_pc();
1216 auto& oper = context.peek_operand();
1217 oper = i32_const_t{ oper.to_fui32() };
1218 }

◆ operator()() [198/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_reinterpret_f32_t & op)
inline

Definition at line 1214 of file interpret_visitor.hpp.

1214 {
1215 context.inc_pc();
1216 auto& oper = context.peek_operand();
1217 oper = i32_const_t{ oper.to_fui32() };
1218 }

◆ operator()() [199/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_rem_s_t & op)
inline

Definition at line 574 of file interpret_visitor.hpp.

574 {
575 context.inc_pc();
576 const auto& rhs = context.pop_operand().to_i32();
577 auto& lhs = context.peek_operand().to_i32();
578 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i32.rem_s divide by zero");
579 if (UNLIKELY(lhs == std::numeric_limits<int32_t>::min() && rhs == -1))
580 lhs = 0;
581 else
582 lhs %= rhs;
583 }
#define UNLIKELY(x)

◆ operator()() [200/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_rem_s_t & op)
inline

Definition at line 574 of file interpret_visitor.hpp.

574 {
575 context.inc_pc();
576 const auto& rhs = context.pop_operand().to_i32();
577 auto& lhs = context.peek_operand().to_i32();
578 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i32.rem_s divide by zero");
579 if (UNLIKELY(lhs == std::numeric_limits<int32_t>::min() && rhs == -1))
580 lhs = 0;
581 else
582 lhs %= rhs;
583 }

◆ operator()() [201/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_rem_u_t & op)
inline

Definition at line 584 of file interpret_visitor.hpp.

584 {
585 context.inc_pc();
586 const auto& rhs = context.pop_operand().to_ui32();
587 auto& lhs = context.peek_operand().to_ui32();
588 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i32.rem_u divide by zero");
589 lhs %= rhs;
590 }

◆ operator()() [202/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_rem_u_t & op)
inline

Definition at line 584 of file interpret_visitor.hpp.

584 {
585 context.inc_pc();
586 const auto& rhs = context.pop_operand().to_ui32();
587 auto& lhs = context.peek_operand().to_ui32();
588 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i32.rem_u divide by zero");
589 lhs %= rhs;
590 }

◆ operator()() [203/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_rotl_t & op)
inline

Definition at line 630 of file interpret_visitor.hpp.

630 {
631
632 context.inc_pc();
633 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
634 const auto& rhs = context.pop_operand().to_ui32();
635 auto& lhs = context.peek_operand().to_ui32();
636 uint32_t c = rhs;
637 c &= mask;
638 lhs = (lhs << c) | (lhs >> ((-c) & mask));
639 }

◆ operator()() [204/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_rotl_t & op)
inline

Definition at line 630 of file interpret_visitor.hpp.

630 {
631
632 context.inc_pc();
633 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
634 const auto& rhs = context.pop_operand().to_ui32();
635 auto& lhs = context.peek_operand().to_ui32();
636 uint32_t c = rhs;
637 c &= mask;
638 lhs = (lhs << c) | (lhs >> ((-c) & mask));
639 }

◆ operator()() [205/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_rotr_t & op)
inline

Definition at line 640 of file interpret_visitor.hpp.

640 {
641 context.inc_pc();
642 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
643 const auto& rhs = context.pop_operand().to_ui32();
644 auto& lhs = context.peek_operand().to_ui32();
645 uint32_t c = rhs;
646 c &= mask;
647 lhs = (lhs >> c) | (lhs << ((-c) & mask));
648 }

◆ operator()() [206/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_rotr_t & op)
inline

Definition at line 640 of file interpret_visitor.hpp.

640 {
641 context.inc_pc();
642 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
643 const auto& rhs = context.pop_operand().to_ui32();
644 auto& lhs = context.peek_operand().to_ui32();
645 uint32_t c = rhs;
646 c &= mask;
647 lhs = (lhs >> c) | (lhs << ((-c) & mask));
648 }

◆ operator()() [207/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_shl_t & op)
inline

Definition at line 609 of file interpret_visitor.hpp.

609 {
610 context.inc_pc();
611 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
612 const auto& rhs = context.pop_operand().to_ui32();
613 auto& lhs = context.peek_operand().to_ui32();
614 lhs <<= (rhs & mask);
615 }

◆ operator()() [208/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_shl_t & op)
inline

Definition at line 609 of file interpret_visitor.hpp.

609 {
610 context.inc_pc();
611 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
612 const auto& rhs = context.pop_operand().to_ui32();
613 auto& lhs = context.peek_operand().to_ui32();
614 lhs <<= (rhs & mask);
615 }

◆ operator()() [209/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_shr_s_t & op)
inline

Definition at line 616 of file interpret_visitor.hpp.

616 {
617 context.inc_pc();
618 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
619 const auto& rhs = context.pop_operand().to_ui32();
620 auto& lhs = context.peek_operand().to_i32();
621 lhs >>= (rhs & mask);
622 }

◆ operator()() [210/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_shr_s_t & op)
inline

Definition at line 616 of file interpret_visitor.hpp.

616 {
617 context.inc_pc();
618 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
619 const auto& rhs = context.pop_operand().to_ui32();
620 auto& lhs = context.peek_operand().to_i32();
621 lhs >>= (rhs & mask);
622 }

◆ operator()() [211/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_shr_u_t & op)
inline

Definition at line 623 of file interpret_visitor.hpp.

623 {
624 context.inc_pc();
625 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
626 const auto& rhs = context.pop_operand().to_ui32();
627 auto& lhs = context.peek_operand().to_ui32();
628 lhs >>= (rhs & mask);
629 }

◆ operator()() [212/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_shr_u_t & op)
inline

Definition at line 623 of file interpret_visitor.hpp.

623 {
624 context.inc_pc();
625 static constexpr uint32_t mask = (8 * sizeof(uint32_t) - 1);
626 const auto& rhs = context.pop_operand().to_ui32();
627 auto& lhs = context.peek_operand().to_ui32();
628 lhs >>= (rhs & mask);
629 }

◆ operator()() [213/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_store16_t & op)
inline

Definition at line 217 of file interpret_visitor.hpp.

217 {
218 context.inc_pc();
219 const auto& val = context.pop_operand();
220 void* store_loc = pop_memop_addr(op);
221 write_unaligned(store_loc, static_cast<uint16_t>(val.to_ui32()));
222 }
unsigned short uint16_t
Definition stdint.h:125
Here is the call graph for this function:

◆ operator()() [214/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_store16_t & op)
inline

Definition at line 217 of file interpret_visitor.hpp.

217 {
218 context.inc_pc();
219 const auto& val = context.pop_operand();
220 void* store_loc = pop_memop_addr(op);
221 write_unaligned(store_loc, static_cast<uint16_t>(val.to_ui32()));
222 }
Here is the call graph for this function:

◆ operator()() [215/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_store8_t & op)
inline

Definition at line 211 of file interpret_visitor.hpp.

211 {
212 context.inc_pc();
213 const auto& val = context.pop_operand();
214 void* store_loc = pop_memop_addr(op);
215 write_unaligned(store_loc, static_cast<uint8_t>(val.to_ui32()));
216 }
unsigned char uint8_t
Definition stdint.h:124
Here is the call graph for this function:

◆ operator()() [216/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_store8_t & op)
inline

Definition at line 211 of file interpret_visitor.hpp.

211 {
212 context.inc_pc();
213 const auto& val = context.pop_operand();
214 void* store_loc = pop_memop_addr(op);
215 write_unaligned(store_loc, static_cast<uint8_t>(val.to_ui32()));
216 }
Here is the call graph for this function:

◆ operator()() [217/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_store_t & op)
inline

Definition at line 205 of file interpret_visitor.hpp.

205 {
206 context.inc_pc();
207 const auto& val = context.pop_operand();
208 void* store_loc = pop_memop_addr(op);
209 write_unaligned(store_loc, val.to_ui32());
210 }
Here is the call graph for this function:

◆ operator()() [218/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_store_t & op)
inline

Definition at line 205 of file interpret_visitor.hpp.

205 {
206 context.inc_pc();
207 const auto& val = context.pop_operand();
208 void* store_loc = pop_memop_addr(op);
209 write_unaligned(store_loc, val.to_ui32());
210 }
Here is the call graph for this function:

◆ operator()() [219/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_sub_t & op)
inline

Definition at line 546 of file interpret_visitor.hpp.

546 {
547 context.inc_pc();
548 const auto& rhs = context.pop_operand().to_ui32();
549 auto& lhs = context.peek_operand().to_ui32();
550 lhs -= rhs;
551 }

◆ operator()() [220/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_sub_t & op)
inline

Definition at line 546 of file interpret_visitor.hpp.

546 {
547 context.inc_pc();
548 const auto& rhs = context.pop_operand().to_ui32();
549 auto& lhs = context.peek_operand().to_ui32();
550 lhs -= rhs;
551 }

◆ operator()() [221/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_trunc_s_f32_t & op)
inline

Definition at line 1018 of file interpret_visitor.hpp.

1018 {
1019 context.inc_pc();
1020 auto& oper = context.peek_operand();
1021 if constexpr (use_softfloat) {
1022 oper = i32_const_t{ _sysio_f32_trunc_i32s(oper.to_f32()) };
1023 } else {
1024 float af = oper.to_f32();
1025 SYS_VM_ASSERT(!((af >= 2147483648.0f) || (af < -2147483648.0f)), wasm_interpreter_exception, "Error, f32.trunc_s/i32 overflow" );
1026 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f32.trunc_s/i32 unrepresentable");
1027 oper = i32_const_t{ static_cast<int32_t>(af) };
1028 }
1029 }

◆ operator()() [222/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_trunc_s_f32_t & op)
inline

Definition at line 1018 of file interpret_visitor.hpp.

1018 {
1019 context.inc_pc();
1020 auto& oper = context.peek_operand();
1021 if constexpr (use_softfloat) {
1022 oper = i32_const_t{ _sysio_f32_trunc_i32s(oper.to_f32()) };
1023 } else {
1024 float af = oper.to_f32();
1025 SYS_VM_ASSERT(!((af >= 2147483648.0f) || (af < -2147483648.0f)), wasm_interpreter_exception, "Error, f32.trunc_s/i32 overflow" );
1026 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f32.trunc_s/i32 unrepresentable");
1027 oper = i32_const_t{ static_cast<int32_t>(af) };
1028 }
1029 }

◆ operator()() [223/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_trunc_s_f64_t & op)
inline

Definition at line 1042 of file interpret_visitor.hpp.

1042 {
1043 context.inc_pc();
1044 auto& oper = context.peek_operand();
1045 if constexpr (use_softfloat) {
1046 oper = i32_const_t{ _sysio_f64_trunc_i32s(oper.to_f64()) };
1047 } else {
1048 double af = oper.to_f64();
1049 SYS_VM_ASSERT(!((af >= 2147483648.0) || (af < -2147483648.0)), wasm_interpreter_exception, "Error, f64.trunc_s/i32 overflow");
1050 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f64.trunc_s/i32 unrepresentable");
1051 oper = i32_const_t{ static_cast<int32_t>(af) };
1052 }
1053 }

◆ operator()() [224/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_trunc_s_f64_t & op)
inline

Definition at line 1042 of file interpret_visitor.hpp.

1042 {
1043 context.inc_pc();
1044 auto& oper = context.peek_operand();
1045 if constexpr (use_softfloat) {
1046 oper = i32_const_t{ _sysio_f64_trunc_i32s(oper.to_f64()) };
1047 } else {
1048 double af = oper.to_f64();
1049 SYS_VM_ASSERT(!((af >= 2147483648.0) || (af < -2147483648.0)), wasm_interpreter_exception, "Error, f64.trunc_s/i32 overflow");
1050 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f64.trunc_s/i32 unrepresentable");
1051 oper = i32_const_t{ static_cast<int32_t>(af) };
1052 }
1053 }

◆ operator()() [225/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_trunc_u_f32_t & op)
inline

Definition at line 1030 of file interpret_visitor.hpp.

1030 {
1031 context.inc_pc();
1032 auto& oper = context.peek_operand();
1033 if constexpr (use_softfloat) {
1034 oper = i32_const_t{ _sysio_f32_trunc_i32u(oper.to_f32()) };
1035 } else {
1036 float af = oper.to_f32();
1037 SYS_VM_ASSERT(!((af >= 4294967296.0f) || (af <= -1.0f)),wasm_interpreter_exception, "Error, f32.trunc_u/i32 overflow");
1038 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f32.trunc_u/i32 unrepresentable");
1039 oper = i32_const_t{ static_cast<uint32_t>(af) };
1040 }
1041 }

◆ operator()() [226/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_trunc_u_f32_t & op)
inline

Definition at line 1030 of file interpret_visitor.hpp.

1030 {
1031 context.inc_pc();
1032 auto& oper = context.peek_operand();
1033 if constexpr (use_softfloat) {
1034 oper = i32_const_t{ _sysio_f32_trunc_i32u(oper.to_f32()) };
1035 } else {
1036 float af = oper.to_f32();
1037 SYS_VM_ASSERT(!((af >= 4294967296.0f) || (af <= -1.0f)),wasm_interpreter_exception, "Error, f32.trunc_u/i32 overflow");
1038 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f32.trunc_u/i32 unrepresentable");
1039 oper = i32_const_t{ static_cast<uint32_t>(af) };
1040 }
1041 }

◆ operator()() [227/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_trunc_u_f64_t & op)
inline

Definition at line 1054 of file interpret_visitor.hpp.

1054 {
1055 context.inc_pc();
1056 auto& oper = context.peek_operand();
1057 if constexpr (use_softfloat) {
1058 oper = i32_const_t{ _sysio_f64_trunc_i32u(oper.to_f64()) };
1059 } else {
1060 double af = oper.to_f64();
1061 SYS_VM_ASSERT(!((af >= 4294967296.0) || (af <= -1.0)), wasm_interpreter_exception, "Error, f64.trunc_u/i32 overflow");
1062 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f64.trunc_u/i32 unrepresentable");
1063 oper = i32_const_t{ static_cast<uint32_t>(af) };
1064 }
1065 }

◆ operator()() [228/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_trunc_u_f64_t & op)
inline

Definition at line 1054 of file interpret_visitor.hpp.

1054 {
1055 context.inc_pc();
1056 auto& oper = context.peek_operand();
1057 if constexpr (use_softfloat) {
1058 oper = i32_const_t{ _sysio_f64_trunc_i32u(oper.to_f64()) };
1059 } else {
1060 double af = oper.to_f64();
1061 SYS_VM_ASSERT(!((af >= 4294967296.0) || (af <= -1.0)), wasm_interpreter_exception, "Error, f64.trunc_u/i32 overflow");
1062 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f64.trunc_u/i32 unrepresentable");
1063 oper = i32_const_t{ static_cast<uint32_t>(af) };
1064 }
1065 }

◆ operator()() [229/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_wrap_i64_t & op)
inline

Definition at line 1013 of file interpret_visitor.hpp.

1013 {
1014 context.inc_pc();
1015 auto& oper = context.peek_operand();
1016 oper = i32_const_t{ static_cast<int32_t>(oper.to_i64()) };
1017 }

◆ operator()() [230/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_wrap_i64_t & op)
inline

Definition at line 1013 of file interpret_visitor.hpp.

1013 {
1014 context.inc_pc();
1015 auto& oper = context.peek_operand();
1016 oper = i32_const_t{ static_cast<int32_t>(oper.to_i64()) };
1017 }

◆ operator()() [231/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_xor_t & op)
inline

Definition at line 603 of file interpret_visitor.hpp.

603 {
604 context.inc_pc();
605 const auto& rhs = context.pop_operand().to_ui32();
606 auto& lhs = context.peek_operand().to_ui32();
607 lhs ^= rhs;
608 }

◆ operator()() [232/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i32_xor_t & op)
inline

Definition at line 603 of file interpret_visitor.hpp.

603 {
604 context.inc_pc();
605 const auto& rhs = context.pop_operand().to_ui32();
606 auto& lhs = context.peek_operand().to_ui32();
607 lhs ^= rhs;
608 }

◆ operator()() [233/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_add_t & op)
inline

Definition at line 666 of file interpret_visitor.hpp.

666 {
667 context.inc_pc();
668 const auto& rhs = context.pop_operand().to_ui64();
669 auto& lhs = context.peek_operand().to_ui64();
670 lhs += rhs;
671 }

◆ operator()() [234/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_add_t & op)
inline

Definition at line 666 of file interpret_visitor.hpp.

666 {
667 context.inc_pc();
668 const auto& rhs = context.pop_operand().to_ui64();
669 auto& lhs = context.peek_operand().to_ui64();
670 lhs += rhs;
671 }

◆ operator()() [235/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_and_t & op)
inline

Definition at line 717 of file interpret_visitor.hpp.

717 {
718 context.inc_pc();
719 const auto& rhs = context.pop_operand().to_ui64();
720 auto& lhs = context.peek_operand().to_ui64();
721 lhs &= rhs;
722 }

◆ operator()() [236/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_and_t & op)
inline

Definition at line 717 of file interpret_visitor.hpp.

717 {
718 context.inc_pc();
719 const auto& rhs = context.pop_operand().to_ui64();
720 auto& lhs = context.peek_operand().to_ui64();
721 lhs &= rhs;
722 }

◆ operator()() [237/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_clz_t & op)
inline

Definition at line 649 of file interpret_visitor.hpp.

649 {
650 context.inc_pc();
651 auto& oper = context.peek_operand().to_ui64();
652 // __builtin_clzll(0) is undefined
653 oper = oper == 0 ? 64 : __builtin_clzll(oper);
654 }

◆ operator()() [238/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_clz_t & op)
inline

Definition at line 649 of file interpret_visitor.hpp.

649 {
650 context.inc_pc();
651 auto& oper = context.peek_operand().to_ui64();
652 // __builtin_clzll(0) is undefined
653 oper = oper == 0 ? 64 : __builtin_clzll(oper);
654 }

◆ operator()() [239/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_const_t & op)
inline

Definition at line 272 of file interpret_visitor.hpp.

272 {
273 context.inc_pc();
274 context.push_operand(op);
275 }

◆ operator()() [240/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_const_t & op)
inline

Definition at line 272 of file interpret_visitor.hpp.

272 {
273 context.inc_pc();
274 context.push_operand(op);
275 }

◆ operator()() [241/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_ctz_t & op)
inline

Definition at line 655 of file interpret_visitor.hpp.

655 {
656 context.inc_pc();
657 auto& oper = context.peek_operand().to_ui64();
658 // __builtin_clzll(0) is undefined
659 oper = oper == 0 ? 64 : __builtin_ctzll(oper);
660 }

◆ operator()() [242/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_ctz_t & op)
inline

Definition at line 655 of file interpret_visitor.hpp.

655 {
656 context.inc_pc();
657 auto& oper = context.peek_operand().to_ui64();
658 // __builtin_clzll(0) is undefined
659 oper = oper == 0 ? 64 : __builtin_ctzll(oper);
660 }

◆ operator()() [243/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_div_s_t & op)
inline

Definition at line 684 of file interpret_visitor.hpp.

684 {
685 context.inc_pc();
686 const auto& rhs = context.pop_operand().to_i64();
687 auto& lhs = context.peek_operand().to_i64();
688 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i64.div_s divide by zero");
689 SYS_VM_ASSERT(!(lhs == std::numeric_limits<int64_t>::min() && rhs == -1), wasm_interpreter_exception,
690 "i64.div_s traps when I64_MAX/-1");
691 lhs /= rhs;
692 }

◆ operator()() [244/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_div_s_t & op)
inline

Definition at line 684 of file interpret_visitor.hpp.

684 {
685 context.inc_pc();
686 const auto& rhs = context.pop_operand().to_i64();
687 auto& lhs = context.peek_operand().to_i64();
688 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i64.div_s divide by zero");
689 SYS_VM_ASSERT(!(lhs == std::numeric_limits<int64_t>::min() && rhs == -1), wasm_interpreter_exception,
690 "i64.div_s traps when I64_MAX/-1");
691 lhs /= rhs;
692 }

◆ operator()() [245/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_div_u_t & op)
inline

Definition at line 693 of file interpret_visitor.hpp.

693 {
694 context.inc_pc();
695 const auto& rhs = context.pop_operand().to_ui64();
696 auto& lhs = context.peek_operand().to_ui64();
697 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i64.div_u divide by zero");
698 lhs /= rhs;
699 }

◆ operator()() [246/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_div_u_t & op)
inline

Definition at line 693 of file interpret_visitor.hpp.

693 {
694 context.inc_pc();
695 const auto& rhs = context.pop_operand().to_ui64();
696 auto& lhs = context.peek_operand().to_ui64();
697 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i64.div_u divide by zero");
698 lhs /= rhs;
699 }

◆ operator()() [247/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_eq_t & op)
inline

Definition at line 354 of file interpret_visitor.hpp.

354 {
355 context.inc_pc();
356 const auto& rhs = context.pop_operand().to_ui64();
357 auto& lhs = context.peek_operand();
358 lhs = i32_const_t{ lhs.to_ui64() == rhs };
359 }

◆ operator()() [248/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_eq_t & op)
inline

Definition at line 354 of file interpret_visitor.hpp.

354 {
355 context.inc_pc();
356 const auto& rhs = context.pop_operand().to_ui64();
357 auto& lhs = context.peek_operand();
358 lhs = i32_const_t{ lhs.to_ui64() == rhs };
359 }

◆ operator()() [249/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_eqz_t & op)
inline

Definition at line 349 of file interpret_visitor.hpp.

349 {
350 context.inc_pc();
351 auto& oper = context.peek_operand();
352 oper = i32_const_t{ oper.to_ui64() == 0 };
353 }

◆ operator()() [250/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_eqz_t & op)
inline

Definition at line 349 of file interpret_visitor.hpp.

349 {
350 context.inc_pc();
351 auto& oper = context.peek_operand();
352 oper = i32_const_t{ oper.to_ui64() == 0 };
353 }

◆ operator()() [251/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_extend_s_i32_t & op)
inline

Definition at line 1066 of file interpret_visitor.hpp.

1066 {
1067 context.inc_pc();
1068 auto& oper = context.peek_operand();
1069 oper = i64_const_t{ static_cast<int64_t>(oper.to_i32()) };
1070 }
signed __int64 int64_t
Definition stdint.h:135

◆ operator()() [252/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_extend_s_i32_t & op)
inline

Definition at line 1066 of file interpret_visitor.hpp.

1066 {
1067 context.inc_pc();
1068 auto& oper = context.peek_operand();
1069 oper = i64_const_t{ static_cast<int64_t>(oper.to_i32()) };
1070 }

◆ operator()() [253/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_extend_u_i32_t & op)
inline

Definition at line 1071 of file interpret_visitor.hpp.

1071 {
1072 context.inc_pc();
1073 auto& oper = context.peek_operand();
1074 oper = i64_const_t{ static_cast<uint64_t>(oper.to_ui32()) };
1075 }

◆ operator()() [254/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_extend_u_i32_t & op)
inline

Definition at line 1071 of file interpret_visitor.hpp.

1071 {
1072 context.inc_pc();
1073 auto& oper = context.peek_operand();
1074 oper = i64_const_t{ static_cast<uint64_t>(oper.to_ui32()) };
1075 }

◆ operator()() [255/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_ge_s_t & op)
inline

Definition at line 402 of file interpret_visitor.hpp.

402 {
403 context.inc_pc();
404 const auto& rhs = context.pop_operand().to_i64();
405 auto& lhs = context.peek_operand();
406 lhs = i32_const_t{ lhs.to_i64() >= rhs };
407 }

◆ operator()() [256/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_ge_s_t & op)
inline

Definition at line 402 of file interpret_visitor.hpp.

402 {
403 context.inc_pc();
404 const auto& rhs = context.pop_operand().to_i64();
405 auto& lhs = context.peek_operand();
406 lhs = i32_const_t{ lhs.to_i64() >= rhs };
407 }

◆ operator()() [257/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_ge_u_t & op)
inline

Definition at line 408 of file interpret_visitor.hpp.

408 {
409 context.inc_pc();
410 const auto& rhs = context.pop_operand().to_ui64();
411 auto& lhs = context.peek_operand();
412 lhs = i32_const_t{ lhs.to_ui64() >= rhs };
413 }

◆ operator()() [258/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_ge_u_t & op)
inline

Definition at line 408 of file interpret_visitor.hpp.

408 {
409 context.inc_pc();
410 const auto& rhs = context.pop_operand().to_ui64();
411 auto& lhs = context.peek_operand();
412 lhs = i32_const_t{ lhs.to_ui64() >= rhs };
413 }

◆ operator()() [259/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_gt_s_t & op)
inline

Definition at line 390 of file interpret_visitor.hpp.

390 {
391 context.inc_pc();
392 const auto& rhs = context.pop_operand().to_i64();
393 auto& lhs = context.peek_operand();
394 lhs = i32_const_t{ lhs.to_i64() > rhs };
395 }

◆ operator()() [260/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_gt_s_t & op)
inline

Definition at line 390 of file interpret_visitor.hpp.

390 {
391 context.inc_pc();
392 const auto& rhs = context.pop_operand().to_i64();
393 auto& lhs = context.peek_operand();
394 lhs = i32_const_t{ lhs.to_i64() > rhs };
395 }

◆ operator()() [261/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_gt_u_t & op)
inline

Definition at line 396 of file interpret_visitor.hpp.

396 {
397 context.inc_pc();
398 const auto& rhs = context.pop_operand().to_ui64();
399 auto& lhs = context.peek_operand();
400 lhs = i32_const_t{ lhs.to_ui64() > rhs };
401 }

◆ operator()() [262/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_gt_u_t & op)
inline

Definition at line 396 of file interpret_visitor.hpp.

396 {
397 context.inc_pc();
398 const auto& rhs = context.pop_operand().to_ui64();
399 auto& lhs = context.peek_operand();
400 lhs = i32_const_t{ lhs.to_ui64() > rhs };
401 }

◆ operator()() [263/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_le_s_t & op)
inline

Definition at line 378 of file interpret_visitor.hpp.

378 {
379 context.inc_pc();
380 const auto& rhs = context.pop_operand().to_i64();
381 auto& lhs = context.peek_operand();
382 lhs = i32_const_t{ lhs.to_i64() <= rhs };
383 }

◆ operator()() [264/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_le_s_t & op)
inline

Definition at line 378 of file interpret_visitor.hpp.

378 {
379 context.inc_pc();
380 const auto& rhs = context.pop_operand().to_i64();
381 auto& lhs = context.peek_operand();
382 lhs = i32_const_t{ lhs.to_i64() <= rhs };
383 }

◆ operator()() [265/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_le_u_t & op)
inline

Definition at line 384 of file interpret_visitor.hpp.

384 {
385 context.inc_pc();
386 const auto& rhs = context.pop_operand().to_ui64();
387 auto& lhs = context.peek_operand();
388 lhs = i32_const_t{ lhs.to_ui64() <= rhs };
389 }

◆ operator()() [266/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_le_u_t & op)
inline

Definition at line 384 of file interpret_visitor.hpp.

384 {
385 context.inc_pc();
386 const auto& rhs = context.pop_operand().to_ui64();
387 auto& lhs = context.peek_operand();
388 lhs = i32_const_t{ lhs.to_ui64() <= rhs };
389 }

◆ operator()() [267/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load16_s_t & op)
inline

Definition at line 170 of file interpret_visitor.hpp.

170 {
171 context.inc_pc();
172 void* _ptr = pop_memop_addr(op);
173 context.push_operand(i64_const_t{ static_cast<int64_t>( read_unaligned<int16_t>(_ptr) ) });
174 }
Here is the call graph for this function:

◆ operator()() [268/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load16_s_t & op)
inline

Definition at line 170 of file interpret_visitor.hpp.

170 {
171 context.inc_pc();
172 void* _ptr = pop_memop_addr(op);
173 context.push_operand(i64_const_t{ static_cast<int64_t>( read_unaligned<int16_t>(_ptr) ) });
174 }
Here is the call graph for this function:

◆ operator()() [269/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load16_u_t & op)
inline

Definition at line 185 of file interpret_visitor.hpp.

185 {
186 context.inc_pc();
187 void* _ptr = pop_memop_addr(op);
188 context.push_operand(i64_const_t{ static_cast<uint64_t>( read_unaligned<uint16_t>(_ptr) ) });
189 }
Here is the call graph for this function:

◆ operator()() [270/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load16_u_t & op)
inline

Definition at line 185 of file interpret_visitor.hpp.

185 {
186 context.inc_pc();
187 void* _ptr = pop_memop_addr(op);
188 context.push_operand(i64_const_t{ static_cast<uint64_t>( read_unaligned<uint16_t>(_ptr) ) });
189 }
Here is the call graph for this function:

◆ operator()() [271/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load32_s_t & op)
inline

Definition at line 175 of file interpret_visitor.hpp.

175 {
176 context.inc_pc();
177 void* _ptr = pop_memop_addr(op);
178 context.push_operand(i64_const_t{ static_cast<int64_t>( read_unaligned<int32_t>(_ptr) ) });
179 }
Here is the call graph for this function:

◆ operator()() [272/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load32_s_t & op)
inline

Definition at line 175 of file interpret_visitor.hpp.

175 {
176 context.inc_pc();
177 void* _ptr = pop_memop_addr(op);
178 context.push_operand(i64_const_t{ static_cast<int64_t>( read_unaligned<int32_t>(_ptr) ) });
179 }
Here is the call graph for this function:

◆ operator()() [273/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load32_u_t & op)
inline

Definition at line 190 of file interpret_visitor.hpp.

190 {
191 context.inc_pc();
192 void* _ptr = pop_memop_addr(op);
193 context.push_operand(i64_const_t{ static_cast<uint64_t>( read_unaligned<uint32_t>(_ptr) ) });
194 }
Here is the call graph for this function:

◆ operator()() [274/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load32_u_t & op)
inline

Definition at line 190 of file interpret_visitor.hpp.

190 {
191 context.inc_pc();
192 void* _ptr = pop_memop_addr(op);
193 context.push_operand(i64_const_t{ static_cast<uint64_t>( read_unaligned<uint32_t>(_ptr) ) });
194 }
Here is the call graph for this function:

◆ operator()() [275/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load8_s_t & op)
inline

Definition at line 165 of file interpret_visitor.hpp.

165 {
166 context.inc_pc();
167 void* _ptr = pop_memop_addr(op);
168 context.push_operand(i64_const_t{ static_cast<int64_t>( read_unaligned<int8_t>(_ptr) ) });
169 }
Here is the call graph for this function:

◆ operator()() [276/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load8_s_t & op)
inline

Definition at line 165 of file interpret_visitor.hpp.

165 {
166 context.inc_pc();
167 void* _ptr = pop_memop_addr(op);
168 context.push_operand(i64_const_t{ static_cast<int64_t>( read_unaligned<int8_t>(_ptr) ) });
169 }
Here is the call graph for this function:

◆ operator()() [277/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load8_u_t & op)
inline

Definition at line 180 of file interpret_visitor.hpp.

180 {
181 context.inc_pc();
182 void* _ptr = pop_memop_addr(op);
183 context.push_operand(i64_const_t{ static_cast<uint64_t>( read_unaligned<uint8_t>(_ptr) ) });
184 }
Here is the call graph for this function:

◆ operator()() [278/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load8_u_t & op)
inline

Definition at line 180 of file interpret_visitor.hpp.

180 {
181 context.inc_pc();
182 void* _ptr = pop_memop_addr(op);
183 context.push_operand(i64_const_t{ static_cast<uint64_t>( read_unaligned<uint8_t>(_ptr) ) });
184 }
Here is the call graph for this function:

◆ operator()() [279/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load_t & op)
inline

Definition at line 160 of file interpret_visitor.hpp.

160 {
161 context.inc_pc();
162 void* _ptr = pop_memop_addr(op);
163 context.push_operand(i64_const_t{ static_cast<uint64_t>( read_unaligned<uint64_t>(_ptr) ) });
164 }
Here is the call graph for this function:

◆ operator()() [280/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_load_t & op)
inline

Definition at line 160 of file interpret_visitor.hpp.

160 {
161 context.inc_pc();
162 void* _ptr = pop_memop_addr(op);
163 context.push_operand(i64_const_t{ static_cast<uint64_t>( read_unaligned<uint64_t>(_ptr) ) });
164 }
Here is the call graph for this function:

◆ operator()() [281/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_lt_s_t & op)
inline

Definition at line 366 of file interpret_visitor.hpp.

366 {
367 context.inc_pc();
368 const auto& rhs = context.pop_operand().to_i64();
369 auto& lhs = context.peek_operand();
370 lhs = i32_const_t{ lhs.to_i64() < rhs };
371 }

◆ operator()() [282/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_lt_s_t & op)
inline

Definition at line 366 of file interpret_visitor.hpp.

366 {
367 context.inc_pc();
368 const auto& rhs = context.pop_operand().to_i64();
369 auto& lhs = context.peek_operand();
370 lhs = i32_const_t{ lhs.to_i64() < rhs };
371 }

◆ operator()() [283/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_lt_u_t & op)
inline

Definition at line 372 of file interpret_visitor.hpp.

372 {
373 context.inc_pc();
374 const auto& rhs = context.pop_operand().to_ui64();
375 auto& lhs = context.peek_operand();
376 lhs = i32_const_t{ lhs.to_ui64() < rhs };
377 }

◆ operator()() [284/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_lt_u_t & op)
inline

Definition at line 372 of file interpret_visitor.hpp.

372 {
373 context.inc_pc();
374 const auto& rhs = context.pop_operand().to_ui64();
375 auto& lhs = context.peek_operand();
376 lhs = i32_const_t{ lhs.to_ui64() < rhs };
377 }

◆ operator()() [285/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_mul_t & op)
inline

Definition at line 678 of file interpret_visitor.hpp.

678 {
679 context.inc_pc();
680 const auto& rhs = context.pop_operand().to_ui64();
681 auto& lhs = context.peek_operand().to_ui64();
682 lhs *= rhs;
683 }

◆ operator()() [286/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_mul_t & op)
inline

Definition at line 678 of file interpret_visitor.hpp.

678 {
679 context.inc_pc();
680 const auto& rhs = context.pop_operand().to_ui64();
681 auto& lhs = context.peek_operand().to_ui64();
682 lhs *= rhs;
683 }

◆ operator()() [287/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_ne_t & op)
inline

Definition at line 360 of file interpret_visitor.hpp.

360 {
361 context.inc_pc();
362 const auto& rhs = context.pop_operand().to_ui64();
363 auto& lhs = context.peek_operand();
364 lhs = i32_const_t{ lhs.to_ui64() != rhs };
365 }

◆ operator()() [288/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_ne_t & op)
inline

Definition at line 360 of file interpret_visitor.hpp.

360 {
361 context.inc_pc();
362 const auto& rhs = context.pop_operand().to_ui64();
363 auto& lhs = context.peek_operand();
364 lhs = i32_const_t{ lhs.to_ui64() != rhs };
365 }

◆ operator()() [289/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_or_t & op)
inline

Definition at line 723 of file interpret_visitor.hpp.

723 {
724 context.inc_pc();
725 const auto& rhs = context.pop_operand().to_ui64();
726 auto& lhs = context.peek_operand().to_ui64();
727 lhs |= rhs;
728 }

◆ operator()() [290/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_or_t & op)
inline

Definition at line 723 of file interpret_visitor.hpp.

723 {
724 context.inc_pc();
725 const auto& rhs = context.pop_operand().to_ui64();
726 auto& lhs = context.peek_operand().to_ui64();
727 lhs |= rhs;
728 }

◆ operator()() [291/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_popcnt_t & op)
inline

Definition at line 661 of file interpret_visitor.hpp.

661 {
662 context.inc_pc();
663 auto& oper = context.peek_operand().to_ui64();
664 oper = __builtin_popcountll(oper);
665 }

◆ operator()() [292/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_popcnt_t & op)
inline

Definition at line 661 of file interpret_visitor.hpp.

661 {
662 context.inc_pc();
663 auto& oper = context.peek_operand().to_ui64();
664 oper = __builtin_popcountll(oper);
665 }

◆ operator()() [293/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_reinterpret_f64_t & op)
inline

Definition at line 1219 of file interpret_visitor.hpp.

1219 {
1220 context.inc_pc();
1221 auto& oper = context.peek_operand();
1222 oper = i64_const_t{ oper.to_fui64() };
1223 }

◆ operator()() [294/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_reinterpret_f64_t & op)
inline

Definition at line 1219 of file interpret_visitor.hpp.

1219 {
1220 context.inc_pc();
1221 auto& oper = context.peek_operand();
1222 oper = i64_const_t{ oper.to_fui64() };
1223 }

◆ operator()() [295/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_rem_s_t & op)
inline

Definition at line 700 of file interpret_visitor.hpp.

700 {
701 context.inc_pc();
702 const auto& rhs = context.pop_operand().to_i64();
703 auto& lhs = context.peek_operand().to_i64();
704 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i64.rem_s divide by zero");
705 if (UNLIKELY(lhs == std::numeric_limits<int64_t>::min() && rhs == -1))
706 lhs = 0;
707 else
708 lhs %= rhs;
709 }

◆ operator()() [296/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_rem_s_t & op)
inline

Definition at line 700 of file interpret_visitor.hpp.

700 {
701 context.inc_pc();
702 const auto& rhs = context.pop_operand().to_i64();
703 auto& lhs = context.peek_operand().to_i64();
704 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i64.rem_s divide by zero");
705 if (UNLIKELY(lhs == std::numeric_limits<int64_t>::min() && rhs == -1))
706 lhs = 0;
707 else
708 lhs %= rhs;
709 }

◆ operator()() [297/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_rem_u_t & op)
inline

Definition at line 710 of file interpret_visitor.hpp.

710 {
711 context.inc_pc();
712 const auto& rhs = context.pop_operand().to_ui64();
713 auto& lhs = context.peek_operand().to_ui64();
714 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i64.rem_s divide by zero");
715 lhs %= rhs;
716 }

◆ operator()() [298/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_rem_u_t & op)
inline

Definition at line 710 of file interpret_visitor.hpp.

710 {
711 context.inc_pc();
712 const auto& rhs = context.pop_operand().to_ui64();
713 auto& lhs = context.peek_operand().to_ui64();
714 SYS_VM_ASSERT(rhs != 0, wasm_interpreter_exception, "i64.rem_s divide by zero");
715 lhs %= rhs;
716 }

◆ operator()() [299/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_rotl_t & op)
inline

Definition at line 756 of file interpret_visitor.hpp.

756 {
757 context.inc_pc();
758 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
759 const auto& rhs = context.pop_operand().to_ui64();
760 auto& lhs = context.peek_operand().to_ui64();
761 uint32_t c = rhs;
762 c &= mask;
763 lhs = (lhs << c) | (lhs >> (-c & mask));
764 }

◆ operator()() [300/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_rotl_t & op)
inline

Definition at line 756 of file interpret_visitor.hpp.

756 {
757 context.inc_pc();
758 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
759 const auto& rhs = context.pop_operand().to_ui64();
760 auto& lhs = context.peek_operand().to_ui64();
761 uint32_t c = rhs;
762 c &= mask;
763 lhs = (lhs << c) | (lhs >> (-c & mask));
764 }

◆ operator()() [301/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_rotr_t & op)
inline

Definition at line 765 of file interpret_visitor.hpp.

765 {
766 context.inc_pc();
767 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
768 const auto& rhs = context.pop_operand().to_ui64();
769 auto& lhs = context.peek_operand().to_ui64();
770 uint32_t c = rhs;
771 c &= mask;
772 lhs = (lhs >> c) | (lhs << (-c & mask));
773 }

◆ operator()() [302/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_rotr_t & op)
inline

Definition at line 765 of file interpret_visitor.hpp.

765 {
766 context.inc_pc();
767 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
768 const auto& rhs = context.pop_operand().to_ui64();
769 auto& lhs = context.peek_operand().to_ui64();
770 uint32_t c = rhs;
771 c &= mask;
772 lhs = (lhs >> c) | (lhs << (-c & mask));
773 }

◆ operator()() [303/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_shl_t & op)
inline

Definition at line 735 of file interpret_visitor.hpp.

735 {
736 context.inc_pc();
737 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
738 const auto& rhs = context.pop_operand().to_ui64();
739 auto& lhs = context.peek_operand().to_ui64();
740 lhs <<= (rhs & mask);
741 }

◆ operator()() [304/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_shl_t & op)
inline

Definition at line 735 of file interpret_visitor.hpp.

735 {
736 context.inc_pc();
737 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
738 const auto& rhs = context.pop_operand().to_ui64();
739 auto& lhs = context.peek_operand().to_ui64();
740 lhs <<= (rhs & mask);
741 }

◆ operator()() [305/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_shr_s_t & op)
inline

Definition at line 742 of file interpret_visitor.hpp.

742 {
743 context.inc_pc();
744 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
745 const auto& rhs = context.pop_operand().to_ui64();
746 auto& lhs = context.peek_operand().to_i64();
747 lhs >>= (rhs & mask);
748 }

◆ operator()() [306/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_shr_s_t & op)
inline

Definition at line 742 of file interpret_visitor.hpp.

742 {
743 context.inc_pc();
744 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
745 const auto& rhs = context.pop_operand().to_ui64();
746 auto& lhs = context.peek_operand().to_i64();
747 lhs >>= (rhs & mask);
748 }

◆ operator()() [307/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_shr_u_t & op)
inline

Definition at line 749 of file interpret_visitor.hpp.

749 {
750 context.inc_pc();
751 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
752 const auto& rhs = context.pop_operand().to_ui64();
753 auto& lhs = context.peek_operand().to_ui64();
754 lhs >>= (rhs & mask);
755 }

◆ operator()() [308/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_shr_u_t & op)
inline

Definition at line 749 of file interpret_visitor.hpp.

749 {
750 context.inc_pc();
751 static constexpr uint64_t mask = (8 * sizeof(uint64_t) - 1);
752 const auto& rhs = context.pop_operand().to_ui64();
753 auto& lhs = context.peek_operand().to_ui64();
754 lhs >>= (rhs & mask);
755 }

◆ operator()() [309/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_store16_t & op)
inline

Definition at line 235 of file interpret_visitor.hpp.

235 {
236 context.inc_pc();
237 const auto& val = context.pop_operand();
238 void* store_loc = pop_memop_addr(op);
239 write_unaligned(store_loc, static_cast<uint16_t>(val.to_ui64()));
240 }
Here is the call graph for this function:

◆ operator()() [310/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_store16_t & op)
inline

Definition at line 235 of file interpret_visitor.hpp.

235 {
236 context.inc_pc();
237 const auto& val = context.pop_operand();
238 void* store_loc = pop_memop_addr(op);
239 write_unaligned(store_loc, static_cast<uint16_t>(val.to_ui64()));
240 }
Here is the call graph for this function:

◆ operator()() [311/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_store32_t & op)
inline

Definition at line 241 of file interpret_visitor.hpp.

241 {
242 context.inc_pc();
243 const auto& val = context.pop_operand();
244 void* store_loc = pop_memop_addr(op);
245 write_unaligned(store_loc, static_cast<uint32_t>(val.to_ui64()));
246 }
Here is the call graph for this function:

◆ operator()() [312/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_store32_t & op)
inline

Definition at line 241 of file interpret_visitor.hpp.

241 {
242 context.inc_pc();
243 const auto& val = context.pop_operand();
244 void* store_loc = pop_memop_addr(op);
245 write_unaligned(store_loc, static_cast<uint32_t>(val.to_ui64()));
246 }
Here is the call graph for this function:

◆ operator()() [313/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_store8_t & op)
inline

Definition at line 229 of file interpret_visitor.hpp.

229 {
230 context.inc_pc();
231 const auto& val = context.pop_operand();
232 void* store_loc = pop_memop_addr(op);
233 write_unaligned(store_loc, static_cast<uint8_t>(val.to_ui64()));
234 }
Here is the call graph for this function:

◆ operator()() [314/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_store8_t & op)
inline

Definition at line 229 of file interpret_visitor.hpp.

229 {
230 context.inc_pc();
231 const auto& val = context.pop_operand();
232 void* store_loc = pop_memop_addr(op);
233 write_unaligned(store_loc, static_cast<uint8_t>(val.to_ui64()));
234 }
Here is the call graph for this function:

◆ operator()() [315/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_store_t & op)
inline

Definition at line 223 of file interpret_visitor.hpp.

223 {
224 context.inc_pc();
225 const auto& val = context.pop_operand();
226 void* store_loc = pop_memop_addr(op);
227 write_unaligned(store_loc, static_cast<uint64_t>(val.to_ui64()));
228 }
Here is the call graph for this function:

◆ operator()() [316/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_store_t & op)
inline

Definition at line 223 of file interpret_visitor.hpp.

223 {
224 context.inc_pc();
225 const auto& val = context.pop_operand();
226 void* store_loc = pop_memop_addr(op);
227 write_unaligned(store_loc, static_cast<uint64_t>(val.to_ui64()));
228 }
Here is the call graph for this function:

◆ operator()() [317/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_sub_t & op)
inline

Definition at line 672 of file interpret_visitor.hpp.

672 {
673 context.inc_pc();
674 const auto& rhs = context.pop_operand().to_ui64();
675 auto& lhs = context.peek_operand().to_ui64();
676 lhs -= rhs;
677 }

◆ operator()() [318/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_sub_t & op)
inline

Definition at line 672 of file interpret_visitor.hpp.

672 {
673 context.inc_pc();
674 const auto& rhs = context.pop_operand().to_ui64();
675 auto& lhs = context.peek_operand().to_ui64();
676 lhs -= rhs;
677 }

◆ operator()() [319/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_trunc_s_f32_t & op)
inline

Definition at line 1076 of file interpret_visitor.hpp.

1076 {
1077 context.inc_pc();
1078 auto& oper = context.peek_operand();
1079 if constexpr (use_softfloat) {
1080 oper = i64_const_t{ _sysio_f32_trunc_i64s(oper.to_f32()) };
1081 } else {
1082 float af = oper.to_f32();
1083 SYS_VM_ASSERT(!((af >= 9223372036854775808.0f) || (af < -9223372036854775808.0f)), wasm_interpreter_exception, "Error, f32.trunc_s/i64 overflow");
1084 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f32.trunc_s/i64 unrepresentable");
1085 oper = i64_const_t{ static_cast<int64_t>(af) };
1086 }
1087 }

◆ operator()() [320/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_trunc_s_f32_t & op)
inline

Definition at line 1076 of file interpret_visitor.hpp.

1076 {
1077 context.inc_pc();
1078 auto& oper = context.peek_operand();
1079 if constexpr (use_softfloat) {
1080 oper = i64_const_t{ _sysio_f32_trunc_i64s(oper.to_f32()) };
1081 } else {
1082 float af = oper.to_f32();
1083 SYS_VM_ASSERT(!((af >= 9223372036854775808.0f) || (af < -9223372036854775808.0f)), wasm_interpreter_exception, "Error, f32.trunc_s/i64 overflow");
1084 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f32.trunc_s/i64 unrepresentable");
1085 oper = i64_const_t{ static_cast<int64_t>(af) };
1086 }
1087 }

◆ operator()() [321/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_trunc_s_f64_t & op)
inline

Definition at line 1100 of file interpret_visitor.hpp.

1100 {
1101 context.inc_pc();
1102 auto& oper = context.peek_operand();
1103 if constexpr (use_softfloat) {
1104 oper = i64_const_t{ _sysio_f64_trunc_i64s(oper.to_f64()) };
1105 } else {
1106 double af = oper.to_f64();
1107 SYS_VM_ASSERT(!((af >= 9223372036854775808.0) || (af < -9223372036854775808.0)), wasm_interpreter_exception, "Error, f64.trunc_s/i64 overflow");
1108 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f64.trunc_s/i64 unrepresentable");
1109 oper = i64_const_t{ static_cast<int64_t>(af) };
1110 }
1111 }

◆ operator()() [322/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_trunc_s_f64_t & op)
inline

Definition at line 1100 of file interpret_visitor.hpp.

1100 {
1101 context.inc_pc();
1102 auto& oper = context.peek_operand();
1103 if constexpr (use_softfloat) {
1104 oper = i64_const_t{ _sysio_f64_trunc_i64s(oper.to_f64()) };
1105 } else {
1106 double af = oper.to_f64();
1107 SYS_VM_ASSERT(!((af >= 9223372036854775808.0) || (af < -9223372036854775808.0)), wasm_interpreter_exception, "Error, f64.trunc_s/i64 overflow");
1108 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f64.trunc_s/i64 unrepresentable");
1109 oper = i64_const_t{ static_cast<int64_t>(af) };
1110 }
1111 }

◆ operator()() [323/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_trunc_u_f32_t & op)
inline

Definition at line 1088 of file interpret_visitor.hpp.

1088 {
1089 context.inc_pc();
1090 auto& oper = context.peek_operand();
1091 if constexpr (use_softfloat) {
1092 oper = i64_const_t{ _sysio_f32_trunc_i64u(oper.to_f32()) };
1093 } else {
1094 float af = oper.to_f32();
1095 SYS_VM_ASSERT(!((af >= 18446744073709551616.0f) || (af <= -1.0f)), wasm_interpreter_exception, "Error, f32.trunc_u/i64 overflow");
1096 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f32.trunc_u/i64 unrepresentable");
1097 oper = i64_const_t{ static_cast<uint64_t>(af) };
1098 }
1099 }

◆ operator()() [324/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_trunc_u_f32_t & op)
inline

Definition at line 1088 of file interpret_visitor.hpp.

1088 {
1089 context.inc_pc();
1090 auto& oper = context.peek_operand();
1091 if constexpr (use_softfloat) {
1092 oper = i64_const_t{ _sysio_f32_trunc_i64u(oper.to_f32()) };
1093 } else {
1094 float af = oper.to_f32();
1095 SYS_VM_ASSERT(!((af >= 18446744073709551616.0f) || (af <= -1.0f)), wasm_interpreter_exception, "Error, f32.trunc_u/i64 overflow");
1096 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f32.trunc_u/i64 unrepresentable");
1097 oper = i64_const_t{ static_cast<uint64_t>(af) };
1098 }
1099 }

◆ operator()() [325/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_trunc_u_f64_t & op)
inline

Definition at line 1112 of file interpret_visitor.hpp.

1112 {
1113 context.inc_pc();
1114 auto& oper = context.peek_operand();
1115 if constexpr (use_softfloat) {
1116 oper = i64_const_t{ _sysio_f64_trunc_i64u(oper.to_f64()) };
1117 } else {
1118 double af = oper.to_f64();
1119 SYS_VM_ASSERT(!((af >= 18446744073709551616.0) || (af <= -1.0)), wasm_interpreter_exception, "Error, f64.trunc_u/i64 overflow");
1120 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f64.trunc_u/i64 unrepresentable");
1121 oper = i64_const_t{ static_cast<uint64_t>(af) };
1122 }
1123 }

◆ operator()() [326/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_trunc_u_f64_t & op)
inline

Definition at line 1112 of file interpret_visitor.hpp.

1112 {
1113 context.inc_pc();
1114 auto& oper = context.peek_operand();
1115 if constexpr (use_softfloat) {
1116 oper = i64_const_t{ _sysio_f64_trunc_i64u(oper.to_f64()) };
1117 } else {
1118 double af = oper.to_f64();
1119 SYS_VM_ASSERT(!((af >= 18446744073709551616.0) || (af <= -1.0)), wasm_interpreter_exception, "Error, f64.trunc_u/i64 overflow");
1120 SYS_VM_ASSERT(!__builtin_isnan(af), wasm_interpreter_exception, "Error, f64.trunc_u/i64 unrepresentable");
1121 oper = i64_const_t{ static_cast<uint64_t>(af) };
1122 }
1123 }

◆ operator()() [327/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_xor_t & op)
inline

Definition at line 729 of file interpret_visitor.hpp.

729 {
730 context.inc_pc();
731 const auto& rhs = context.pop_operand().to_ui64();
732 auto& lhs = context.peek_operand().to_ui64();
733 lhs ^= rhs;
734 }

◆ operator()() [328/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const i64_xor_t & op)
inline

Definition at line 729 of file interpret_visitor.hpp.

729 {
730 context.inc_pc();
731 const auto& rhs = context.pop_operand().to_ui64();
732 auto& lhs = context.peek_operand().to_ui64();
733 lhs ^= rhs;
734 }

◆ operator()() [329/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const if_t & op)
inline

Definition at line 57 of file interpret_visitor.hpp.

57 {
58 context.inc_pc();
59 const auto& oper = context.pop_operand();
60 if (!oper.to_ui32()) {
61 context.set_relative_pc(op.pc);
62 }
63 }

◆ operator()() [330/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const if_t & op)
inline

Definition at line 57 of file interpret_visitor.hpp.

57 {
58 context.inc_pc();
59 const auto& oper = context.pop_operand();
60 if (!oper.to_ui32()) {
61 context.set_relative_pc(op.pc);
62 }
63 }

◆ operator()() [331/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const loop_t & op)
inline

Definition at line 56 of file interpret_visitor.hpp.

56{ context.inc_pc(); }

◆ operator()() [332/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const loop_t & op)
inline

Definition at line 56 of file interpret_visitor.hpp.

56{ context.inc_pc(); }

◆ operator()() [333/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const nop_t & op)
inline

Definition at line 51 of file interpret_visitor.hpp.

51{ context.inc_pc(); }

◆ operator()() [334/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const nop_t & op)
inline

Definition at line 51 of file interpret_visitor.hpp.

51{ context.inc_pc(); }

◆ operator()() [335/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const return_t & op)
inline

Definition at line 54 of file interpret_visitor.hpp.

54{ context.apply_pop_call(op.data, op.pc); }

◆ operator()() [336/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const return_t & op)
inline

Definition at line 54 of file interpret_visitor.hpp.

54{ context.apply_pop_call(op.data, op.pc); }

◆ operator()() [337/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const select_t & op)
inline

Definition at line 98 of file interpret_visitor.hpp.

98 {
99 const auto& c = context.pop_operand();
100 const auto& v2 = context.pop_operand();
101 if (c.to_ui32() == 0) {
102 context.peek_operand() = v2;
103 }
104 context.inc_pc();
105 }

◆ operator()() [338/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const select_t & op)
inline

Definition at line 98 of file interpret_visitor.hpp.

98 {
99 const auto& c = context.pop_operand();
100 const auto& v2 = context.pop_operand();
101 if (c.to_ui32() == 0) {
102 context.peek_operand() = v2;
103 }
104 context.inc_pc();
105 }

◆ operator()() [339/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const set_global_t & op)
inline

Definition at line 125 of file interpret_visitor.hpp.

125 {
126 context.inc_pc();
127 const auto& oper = context.pop_operand();
128 context.set_global(op.index, oper);
129 }

◆ operator()() [340/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const set_global_t & op)
inline

Definition at line 125 of file interpret_visitor.hpp.

125 {
126 context.inc_pc();
127 const auto& oper = context.pop_operand();
128 context.set_global(op.index, oper);
129 }

◆ operator()() [341/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const set_local_t & op)
inline

Definition at line 110 of file interpret_visitor.hpp.

110 {
111 context.inc_pc();
112 context.set_operand(op.index, context.pop_operand());
113 }

◆ operator()() [342/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const set_local_t & op)
inline

Definition at line 110 of file interpret_visitor.hpp.

110 {
111 context.inc_pc();
112 context.set_operand(op.index, context.pop_operand());
113 }

◆ operator()() [343/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const tee_local_t & op)
inline

Definition at line 114 of file interpret_visitor.hpp.

114 {
115 context.inc_pc();
116 const auto& oper = context.pop_operand();
117 context.set_operand(op.index, oper);
118 context.push_operand(oper);
119 }

◆ operator()() [344/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const tee_local_t & op)
inline

Definition at line 114 of file interpret_visitor.hpp.

114 {
115 context.inc_pc();
116 const auto& oper = context.pop_operand();
117 context.set_operand(op.index, oper);
118 context.push_operand(oper);
119 }

◆ operator()() [345/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const unreachable_t & op)
inline

Definition at line 46 of file interpret_visitor.hpp.

46 {
47 context.inc_pc();
48 throw wasm_interpreter_exception{ "unreachable" };
49 }

◆ operator()() [346/346]

template<typename ExecutionContext >
void sysio::vm::interpret_visitor< ExecutionContext >::operator() ( const unreachable_t & op)
inline

Definition at line 46 of file interpret_visitor.hpp.

46 {
47 context.inc_pc();
48 throw wasm_interpreter_exception{ "unreachable" };
49 }

◆ pop_memop_addr() [1/2]

template<typename ExecutionContext >
template<typename Op >
void * sysio::vm::interpret_visitor< ExecutionContext >::pop_memop_addr ( const Op & op)
inline

Definition at line 131 of file interpret_visitor.hpp.

131 {
132 const auto& ptr = context.pop_operand();
133 return align_address((context.linear_memory() + op.offset + ptr.to_ui32()), op.flags_align);
134 }
static constexpr void * align_address(void *addr, size_t align_amt)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pop_memop_addr() [2/2]

template<typename ExecutionContext >
template<typename Op >
void * sysio::vm::interpret_visitor< ExecutionContext >::pop_memop_addr ( const Op & op)
inline

Definition at line 131 of file interpret_visitor.hpp.

131 {
132 const auto& ptr = context.pop_operand();
133 return align_address((context.linear_memory() + op.offset + ptr.to_ui32()), op.flags_align);
134 }
Here is the call graph for this function:

◆ read_unaligned() [1/2]

template<typename ExecutionContext >
template<typename T >
static T sysio::vm::interpret_visitor< ExecutionContext >::read_unaligned ( const void * addr)
inlinestatic

Definition at line 36 of file interpret_visitor.hpp.

36 {
37 T result;
38 std::memcpy(&result, addr, sizeof(T));
39 return result;
40 }
#define T(meth, val, expected)
Here is the caller graph for this function:

◆ read_unaligned() [2/2]

template<typename ExecutionContext >
template<typename T >
static T sysio::vm::interpret_visitor< ExecutionContext >::read_unaligned ( const void * addr)
inlinestatic

Definition at line 36 of file interpret_visitor.hpp.

36 {
37 T result;
38 std::memcpy(&result, addr, sizeof(T));
39 return result;
40 }

◆ write_unaligned() [1/2]

template<typename ExecutionContext >
template<typename T >
static void sysio::vm::interpret_visitor< ExecutionContext >::write_unaligned ( void * addr,
T value )
inlinestatic

Definition at line 42 of file interpret_visitor.hpp.

42 {
43 std::memcpy(addr, &value, sizeof(T));
44 }
#define value
Definition pkcs11.h:157
Here is the caller graph for this function:

◆ write_unaligned() [2/2]

template<typename ExecutionContext >
template<typename T >
static void sysio::vm::interpret_visitor< ExecutionContext >::write_unaligned ( void * addr,
T value )
inlinestatic

Definition at line 42 of file interpret_visitor.hpp.

42 {
43 std::memcpy(addr, &value, sizeof(T));
44 }

Member Data Documentation

◆ context

template<typename ExecutionContext >
ExecutionContext & sysio::vm::interpret_visitor< ExecutionContext >::context

Definition at line 23 of file interpret_visitor.hpp.


The documentation for this struct was generated from the following files: