9#include <sysio/vm/allocator.hpp>
10#include <sysio/vm/stack_elem.hpp>
11#include <sysio/vm/utils.hpp>
34template<
typename T,
typename U>
36 static_assert(
sizeof(
T) ==
sizeof(
U),
"bitcast requires identical sizes.");
38 std::memcpy(&result, &u,
sizeof(
T));
43inline bool check_nan(
const std::optional<sysio::vm::operand_stack_elem>& v) {
45 [](sysio::vm::i64_const_t){
return false; },
46 [](sysio::vm::f32_const_t
f) {
return std::isnan(
f.data.f); },
47 [](sysio::vm::f64_const_t
f) {
return std::isnan(
f.data.f); }}, *v);
56#define BACKEND_TEST_CASE(name, tags) \
57 TEMPLATE_TEST_CASE(name, tags, sysio::vm::interpreter, sysio::vm::jit)
59#define BACKEND_TEST_CASE(name, tags) \
60 TEMPLATE_TEST_CASE(name, tags, sysio::vm::interpreter)
#define T(meth, val, expected)
unsigned __int64 uint64_t
type_converter32(uint32_t n)
union type_converter32::@70 _data
type_converter64(uint64_t n)
union type_converter64::@71 _data
bool check_nan(const std::optional< sysio::vm::operand_stack_elem > &v)
sysio::vm::wasm_allocator * get_wasm_allocator()