Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
float_exprs_tests.cpp File Reference
#include <algorithm>
#include <vector>
#include <iostream>
#include <iterator>
#include <cmath>
#include <cstdlib>
#include <catch2/catch.hpp>
#include <utils.hpp>
#include <wasm_config.hpp>
#include <sysio/vm/backend.hpp>
Include dependency graph for float_exprs_tests.cpp:

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Testing wasm <float_exprs_0_wasm>", "[float_exprs_0_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_1_wasm>", "[float_exprs_1_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_10_wasm>", "[float_exprs_10_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_11_wasm>", "[float_exprs_11_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_12_wasm>", "[float_exprs_12_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_13_wasm>", "[float_exprs_13_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_14_wasm>", "[float_exprs_14_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_15_wasm>", "[float_exprs_15_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_16_wasm>", "[float_exprs_16_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_17_wasm>", "[float_exprs_17_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_18_wasm>", "[float_exprs_18_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_19_wasm>", "[float_exprs_19_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_2_wasm>", "[float_exprs_2_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_20_wasm>", "[float_exprs_20_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_21_wasm>", "[float_exprs_21_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_22_wasm>", "[float_exprs_22_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_23_wasm>", "[float_exprs_23_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_24_wasm>", "[float_exprs_24_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_25_wasm>", "[float_exprs_25_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_26_wasm>", "[float_exprs_26_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_27_wasm>", "[float_exprs_27_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_28_wasm>", "[float_exprs_28_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_29_wasm>", "[float_exprs_29_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_3_wasm>", "[float_exprs_3_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_30_wasm>", "[float_exprs_30_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_31_wasm>", "[float_exprs_31_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_32_wasm>", "[float_exprs_32_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_33_wasm>", "[float_exprs_33_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_34_wasm>", "[float_exprs_34_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_35_wasm>", "[float_exprs_35_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_36_wasm>", "[float_exprs_36_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_37_wasm>", "[float_exprs_37_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_38_wasm>", "[float_exprs_38_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_39_wasm>", "[float_exprs_39_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_4_wasm>", "[float_exprs_4_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_40_wasm>", "[float_exprs_40_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_41_wasm>", "[float_exprs_41_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_42_wasm>", "[float_exprs_42_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_43_wasm>", "[float_exprs_43_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_44_wasm>", "[float_exprs_44_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_45_wasm>", "[float_exprs_45_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_46_wasm>", "[float_exprs_46_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_47_wasm>", "[float_exprs_47_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_48_wasm>", "[float_exprs_48_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_49_wasm>", "[float_exprs_49_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_5_wasm>", "[float_exprs_5_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_50_wasm>", "[float_exprs_50_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_51_wasm>", "[float_exprs_51_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_52_wasm>", "[float_exprs_52_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_53_wasm>", "[float_exprs_53_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_54_wasm>", "[float_exprs_54_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_55_wasm>", "[float_exprs_55_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_56_wasm>", "[float_exprs_56_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_57_wasm>", "[float_exprs_57_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_58_wasm>", "[float_exprs_58_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_59_wasm>", "[float_exprs_59_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_6_wasm>", "[float_exprs_6_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_60_wasm>", "[float_exprs_60_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_61_wasm>", "[float_exprs_61_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_62_wasm>", "[float_exprs_62_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_63_wasm>", "[float_exprs_63_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_64_wasm>", "[float_exprs_64_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_65_wasm>", "[float_exprs_65_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_66_wasm>", "[float_exprs_66_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_67_wasm>", "[float_exprs_67_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_68_wasm>", "[float_exprs_68_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_69_wasm>", "[float_exprs_69_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_7_wasm>", "[float_exprs_7_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_70_wasm>", "[float_exprs_70_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_71_wasm>", "[float_exprs_71_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_72_wasm>", "[float_exprs_72_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_73_wasm>", "[float_exprs_73_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_74_wasm>", "[float_exprs_74_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_75_wasm>", "[float_exprs_75_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_76_wasm>", "[float_exprs_76_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_77_wasm>", "[float_exprs_77_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_78_wasm>", "[float_exprs_78_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_79_wasm>", "[float_exprs_79_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_8_wasm>", "[float_exprs_8_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_80_wasm>", "[float_exprs_80_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_81_wasm>", "[float_exprs_81_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_82_wasm>", "[float_exprs_82_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_83_wasm>", "[float_exprs_83_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_84_wasm>", "[float_exprs_84_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_85_wasm>", "[float_exprs_85_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_86_wasm>", "[float_exprs_86_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_87_wasm>", "[float_exprs_87_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_88_wasm>", "[float_exprs_88_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_89_wasm>", "[float_exprs_89_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_9_wasm>", "[float_exprs_9_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_90_wasm>", "[float_exprs_90_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_91_wasm>", "[float_exprs_91_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_92_wasm>", "[float_exprs_92_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_93_wasm>", "[float_exprs_93_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_94_wasm>", "[float_exprs_94_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <float_exprs_95_wasm>", "[float_exprs_95_wasm_tests]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_0_wasm>" ,
"" [float_exprs_0_wasm_tests] )

Definition at line 18 of file float_exprs_tests.cpp.

18 {
20 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.0.wasm");
21 backend_t bkend( code, &wa );
22
23 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_contraction", bit_cast<double>(UINT64_C(13369472591878845359)), bit_cast<double>(UINT64_C(7598224971858294334)), bit_cast<double>(UINT64_C(7009968021366006149)))->to_f64()) == UINT64_C(16360919150252594323));
24 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_contraction", bit_cast<double>(UINT64_C(4845207016438394692)), bit_cast<double>(UINT64_C(3163224970157846858)), bit_cast<double>(UINT64_C(3251145870828527841)))->to_f64()) == UINT64_C(3401457070760597396));
25 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_contraction", bit_cast<double>(UINT64_C(11159707324127586240)), bit_cast<double>(UINT64_C(7011538096610110295)), bit_cast<double>(UINT64_C(4140382893275160737)))->to_f64()) == UINT64_C(13564076370790560102));
26 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_contraction", bit_cast<double>(UINT64_C(4300281701552927458)), bit_cast<double>(UINT64_C(13379479906516703876)), bit_cast<double>(UINT64_C(3629658278272971302)))->to_f64()) == UINT64_C(13072631228492738408));
27 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_contraction", bit_cast<double>(UINT64_C(9554523352352050493)), bit_cast<double>(UINT64_C(18042841594766434431)), bit_cast<double>(UINT64_C(4368037109959396445)))->to_f64()) == UINT64_C(4544162191519938727));
28}
auto call_with_return(host_t &host, const std::string_view &mod, const std::string_view &func, Args... args)
Definition backend.hpp:178
#define CHECK(cond)
Definition util.h:80
wasm_allocator wa
Definition main.cpp:10
backend_t bkend(hello_wasm, ehm, &wa)
std::vector< uint8_t > read_wasm(const std::string &fname)
Definition utils.hpp:30
#define UINT64_C(val)
Definition stdint.h:284
T bit_cast(const U &u)
Definition utils.hpp:35
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [2/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_10_wasm>" ,
"" [float_exprs_10_wasm_tests] )

Definition at line 47 of file float_exprs_tests.cpp.

47 {
49 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.10.wasm");
50 backend_t bkend( code, &wa );
51
52 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_neg0_sub", bit_cast<float>(UINT32_C(2141192192)))));
53 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_neg0_sub", bit_cast<double>(UINT64_C(9219994337134247936)))));
54}
#define UINT32_C(val)
Definition stdint.h:283
bool check_nan(const std::optional< sysio::vm::operand_stack_elem > &v)
Definition utils.hpp:43
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [3/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_11_wasm>" ,
"" [float_exprs_11_wasm_tests] )

Definition at line 56 of file float_exprs_tests.cpp.

56 {
58 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.11.wasm");
59 backend_t bkend( code, &wa );
60
61 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_neg1_mul", bit_cast<float>(UINT32_C(2141192192)))));
62 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_neg1_mul", bit_cast<double>(UINT64_C(9219994337134247936)))));
63}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [4/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_12_wasm>" ,
"" [float_exprs_12_wasm_tests] )

Definition at line 65 of file float_exprs_tests.cpp.

65 {
67 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.12.wasm");
68 backend_t bkend( code, &wa );
69
70 CHECK(bkend.call_with_return("env", "f32.no_fold_eq_self", bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(0));
71 CHECK(bkend.call_with_return("env", "f64.no_fold_eq_self", bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(0));
72}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [5/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_13_wasm>" ,
"" [float_exprs_13_wasm_tests] )

Definition at line 74 of file float_exprs_tests.cpp.

74 {
76 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.13.wasm");
77 backend_t bkend( code, &wa );
78
79 CHECK(bkend.call_with_return("env", "f32.no_fold_ne_self", bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(1));
80 CHECK(bkend.call_with_return("env", "f64.no_fold_ne_self", bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(1));
81}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [6/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_14_wasm>" ,
"" [float_exprs_14_wasm_tests] )

Definition at line 83 of file float_exprs_tests.cpp.

83 {
85 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.14.wasm");
86 backend_t bkend( code, &wa );
87
88 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_sub_self", bit_cast<float>(UINT32_C(2139095040)))));
89 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_sub_self", bit_cast<float>(UINT32_C(2143289344)))));
90 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_sub_self", bit_cast<double>(UINT64_C(9218868437227405312)))));
91 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_sub_self", bit_cast<double>(UINT64_C(9221120237041090560)))));
92}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [7/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_15_wasm>" ,
"" [float_exprs_15_wasm_tests] )

Definition at line 94 of file float_exprs_tests.cpp.

94 {
96 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.15.wasm");
97 backend_t bkend( code, &wa );
98
99 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_self", bit_cast<float>(UINT32_C(2139095040)))));
100 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_self", bit_cast<float>(UINT32_C(2143289344)))));
101 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_self", bit_cast<float>(UINT32_C(0)))));
102 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_self", bit_cast<float>(UINT32_C(2147483648)))));
103 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_self", bit_cast<double>(UINT64_C(9218868437227405312)))));
104 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_self", bit_cast<double>(UINT64_C(9221120237041090560)))));
105 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_self", bit_cast<double>(UINT64_C(0)))));
106 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_self", bit_cast<double>(UINT64_C(9223372036854775808)))));
107}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [8/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_16_wasm>" ,
"" [float_exprs_16_wasm_tests] )

Definition at line 109 of file float_exprs_tests.cpp.

109 {
111 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.16.wasm");
112 backend_t bkend( code, &wa );
113
114 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_3", bit_cast<float>(UINT32_C(3634023955)))->to_f32()) == UINT32_C(3620628505));
115 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_3", bit_cast<float>(UINT32_C(4000459555)))->to_f32()) == UINT32_C(3986780695));
116 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_3", bit_cast<float>(UINT32_C(2517965963)))->to_f32()) == UINT32_C(2504446137));
117 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_3", bit_cast<float>(UINT32_C(2173683100)))->to_f32()) == UINT32_C(2160046629));
118 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_3", bit_cast<float>(UINT32_C(2750097330)))->to_f32()) == UINT32_C(2736571681));
119 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_3", bit_cast<double>(UINT64_C(16679796490173820099)))->to_f64()) == UINT64_C(16672802667330368301));
120 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_3", bit_cast<double>(UINT64_C(13081777497422760306)))->to_f64()) == UINT64_C(13074664638073319671));
121 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_3", bit_cast<double>(UINT64_C(674365394458900388)))->to_f64()) == UINT64_C(667250911628840899));
122 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_3", bit_cast<double>(UINT64_C(18365700772251870524)))->to_f64()) == UINT64_C(18358201936817915643));
123 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_3", bit_cast<double>(UINT64_C(6476267216527259981)))->to_f64()) == UINT64_C(6468791534604471399));
124}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [9/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_17_wasm>" ,
"" [float_exprs_17_wasm_tests] )

Definition at line 126 of file float_exprs_tests.cpp.

126 {
128 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.17.wasm");
129 backend_t bkend( code, &wa );
130
131 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_factor", bit_cast<float>(UINT32_C(3550941609)), bit_cast<float>(UINT32_C(3628209942)), bit_cast<float>(UINT32_C(1568101121)))->to_f32()) == UINT32_C(4131116008));
132 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_factor", bit_cast<float>(UINT32_C(3168433147)), bit_cast<float>(UINT32_C(1028017286)), bit_cast<float>(UINT32_C(3141035521)))->to_f32()) == UINT32_C(3095417249));
133 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_factor", bit_cast<float>(UINT32_C(2869115159)), bit_cast<float>(UINT32_C(536308199)), bit_cast<float>(UINT32_C(2100177580)))->to_f32()) == UINT32_C(3904015703));
134 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_factor", bit_cast<float>(UINT32_C(2684117842)), bit_cast<float>(UINT32_C(369386499)), bit_cast<float>(UINT32_C(2061166438)))->to_f32()) == UINT32_C(3679965352));
135 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_factor", bit_cast<float>(UINT32_C(2510116111)), bit_cast<float>(UINT32_C(476277495)), bit_cast<float>(UINT32_C(1237750930)))->to_f32()) == UINT32_C(649094375));
136 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_factor", bit_cast<double>(UINT64_C(2698691837980592503)), bit_cast<double>(UINT64_C(2529920934327896545)), bit_cast<double>(UINT64_C(12819783413251458936)))->to_f64()) == UINT64_C(10911876679403600666));
137 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_factor", bit_cast<double>(UINT64_C(1626864102540432200)), bit_cast<double>(UINT64_C(9287829620889669687)), bit_cast<double>(UINT64_C(9524500187773169472)))->to_f64()) == UINT64_C(0));
138 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_factor", bit_cast<double>(UINT64_C(12326480769054961745)), bit_cast<double>(UINT64_C(12563546453737163926)), bit_cast<double>(UINT64_C(15990519985875741037)))->to_f64()) == UINT64_C(5500432744005058080));
139 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_factor", bit_cast<double>(UINT64_C(12532477544855171977)), bit_cast<double>(UINT64_C(3439526350000314825)), bit_cast<double>(UINT64_C(12694541248380731909)))->to_f64()) == UINT64_C(11527035460272583044));
140 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_factor", bit_cast<double>(UINT64_C(1871759566187673434)), bit_cast<double>(UINT64_C(2002968319587025494)), bit_cast<double>(UINT64_C(16033202089880281080)))->to_f64()) == UINT64_C(13429277897969282899));
141}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [10/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_18_wasm>" ,
"" [float_exprs_18_wasm_tests] )

Definition at line 143 of file float_exprs_tests.cpp.

143 {
145 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.18.wasm");
146 backend_t bkend( code, &wa );
147
148 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_distribute", bit_cast<float>(UINT32_C(3550941609)), bit_cast<float>(UINT32_C(3628209942)), bit_cast<float>(UINT32_C(1568101121)))->to_f32()) == UINT32_C(4131116009));
149 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_distribute", bit_cast<float>(UINT32_C(3168433147)), bit_cast<float>(UINT32_C(1028017286)), bit_cast<float>(UINT32_C(3141035521)))->to_f32()) == UINT32_C(3095417248));
150 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_distribute", bit_cast<float>(UINT32_C(2869115159)), bit_cast<float>(UINT32_C(536308199)), bit_cast<float>(UINT32_C(2100177580)))->to_f32()) == UINT32_C(3904015704));
151 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_distribute", bit_cast<float>(UINT32_C(2684117842)), bit_cast<float>(UINT32_C(369386499)), bit_cast<float>(UINT32_C(2061166438)))->to_f32()) == UINT32_C(3679965351));
152 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_distribute", bit_cast<float>(UINT32_C(2510116111)), bit_cast<float>(UINT32_C(476277495)), bit_cast<float>(UINT32_C(1237750930)))->to_f32()) == UINT32_C(649094374));
153 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_distribute", bit_cast<double>(UINT64_C(2698691837980592503)), bit_cast<double>(UINT64_C(2529920934327896545)), bit_cast<double>(UINT64_C(12819783413251458936)))->to_f64()) == UINT64_C(10911876679403600667));
154 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_distribute", bit_cast<double>(UINT64_C(1626864102540432200)), bit_cast<double>(UINT64_C(9287829620889669687)), bit_cast<double>(UINT64_C(9524500187773169472)))->to_f64()) == UINT64_C(9223372036854775808));
155 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_distribute", bit_cast<double>(UINT64_C(12326480769054961745)), bit_cast<double>(UINT64_C(12563546453737163926)), bit_cast<double>(UINT64_C(15990519985875741037)))->to_f64()) == UINT64_C(5500432744005058079));
156 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_distribute", bit_cast<double>(UINT64_C(12532477544855171977)), bit_cast<double>(UINT64_C(3439526350000314825)), bit_cast<double>(UINT64_C(12694541248380731909)))->to_f64()) == UINT64_C(11527035460272583043));
157 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_distribute", bit_cast<double>(UINT64_C(1871759566187673434)), bit_cast<double>(UINT64_C(2002968319587025494)), bit_cast<double>(UINT64_C(16033202089880281080)))->to_f64()) == UINT64_C(13429277897969282898));
158}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [11/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_19_wasm>" ,
"" [float_exprs_19_wasm_tests] )

Definition at line 160 of file float_exprs_tests.cpp.

160 {
162 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.19.wasm");
163 backend_t bkend( code, &wa );
164
165 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_div_mul", bit_cast<float>(UINT32_C(2249624147)), bit_cast<float>(UINT32_C(2678828342)), bit_cast<float>(UINT32_C(95319815)))->to_f32()) == UINT32_C(538190437));
166 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_div_mul", bit_cast<float>(UINT32_C(3978470300)), bit_cast<float>(UINT32_C(2253997363)), bit_cast<float>(UINT32_C(3824852100)))->to_f32()) == UINT32_C(2147483648));
167 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_div_mul", bit_cast<float>(UINT32_C(3350590135)), bit_cast<float>(UINT32_C(3042588643)), bit_cast<float>(UINT32_C(2186448635)))->to_f32()) == UINT32_C(4206661932));
168 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_div_mul", bit_cast<float>(UINT32_C(2430706172)), bit_cast<float>(UINT32_C(1685220483)), bit_cast<float>(UINT32_C(1642018044)))->to_f32()) == UINT32_C(2473922297));
169 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_div_mul", bit_cast<float>(UINT32_C(2011387707)), bit_cast<float>(UINT32_C(1274956446)), bit_cast<float>(UINT32_C(3811596788)))->to_f32()) == UINT32_C(3768838261));
170 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_div_mul", bit_cast<double>(UINT64_C(2703215631877943472)), bit_cast<double>(UINT64_C(13295603997208052007)), bit_cast<double>(UINT64_C(1719211436532588593)))->to_f64()) == UINT64_C(14279677686886620461));
171 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_div_mul", bit_cast<double>(UINT64_C(6126139291059848917)), bit_cast<double>(UINT64_C(2596039250849921421)), bit_cast<double>(UINT64_C(17423258659719899654)))->to_f64()) == UINT64_C(9223372036854775808));
172 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_div_mul", bit_cast<double>(UINT64_C(2451868557331674239)), bit_cast<double>(UINT64_C(8672326445062988097)), bit_cast<double>(UINT64_C(2593279393835739385)))->to_f64()) == UINT64_C(9218868437227405312));
173 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_div_mul", bit_cast<double>(UINT64_C(15994259208199847538)), bit_cast<double>(UINT64_C(16584156163346075677)), bit_cast<double>(UINT64_C(17596923907238870430)))->to_f64()) == UINT64_C(14981548491626301009));
174 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_div_mul", bit_cast<double>(UINT64_C(1912002771029783751)), bit_cast<double>(UINT64_C(655387110450354003)), bit_cast<double>(UINT64_C(10060746190138762841)))->to_f64()) == UINT64_C(10953754119023888080));
175}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [12/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_1_wasm>" ,
"" [float_exprs_1_wasm_tests] )

Definition at line 30 of file float_exprs_tests.cpp.

30 {
32 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.1.wasm");
33 backend_t bkend( code, &wa );
34
35 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fma", bit_cast<float>(UINT32_C(2111029761)), bit_cast<float>(UINT32_C(879215268)), bit_cast<float>(UINT32_C(1967953261)))->to_f32()) == UINT32_C(1968345878));
36 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fma", bit_cast<float>(UINT32_C(838240978)), bit_cast<float>(UINT32_C(2796592697)), bit_cast<float>(UINT32_C(329493464)))->to_f32()) == UINT32_C(2569667420));
37 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fma", bit_cast<float>(UINT32_C(1381446097)), bit_cast<float>(UINT32_C(962187981)), bit_cast<float>(UINT32_C(1155576972)))->to_f32()) == UINT32_C(1278680110));
38 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fma", bit_cast<float>(UINT32_C(999635965)), bit_cast<float>(UINT32_C(3403528619)), bit_cast<float>(UINT32_C(3222888213)))->to_f32()) == UINT32_C(3338748778));
39 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fma", bit_cast<float>(UINT32_C(2123679707)), bit_cast<float>(UINT32_C(2625733638)), bit_cast<float>(UINT32_C(3500197619)))->to_f32()) == UINT32_C(3684076259));
40 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fma", bit_cast<double>(UINT64_C(7118716943724900052)), bit_cast<double>(UINT64_C(6546073043412611735)), bit_cast<double>(UINT64_C(18275705786238687882)))->to_f64()) == UINT64_C(9054581441422375136));
41 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fma", bit_cast<double>(UINT64_C(7984371788751700236)), bit_cast<double>(UINT64_C(4021745400549737956)), bit_cast<double>(UINT64_C(7188568268293775252)))->to_f64()) == UINT64_C(7398962198428541884));
42 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fma", bit_cast<double>(UINT64_C(1362668175782178275)), bit_cast<double>(UINT64_C(18385570095786966502)), bit_cast<double>(UINT64_C(5677031731722859914)))->to_f64()) == UINT64_C(15141616602947129037));
43 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fma", bit_cast<double>(UINT64_C(12093403956019835987)), bit_cast<double>(UINT64_C(15826077508588652458)), bit_cast<double>(UINT64_C(4856562394320338043)))->to_f64()) == UINT64_C(4867219230351674394));
44 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fma", bit_cast<double>(UINT64_C(4843589256781277081)), bit_cast<double>(UINT64_C(7695653093478086834)), bit_cast<double>(UINT64_C(16938438850771988744)))->to_f64()) == UINT64_C(7932313162666085329));
45}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [13/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_20_wasm>" ,
"" [float_exprs_20_wasm_tests] )

Definition at line 188 of file float_exprs_tests.cpp.

188 {
190 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.20.wasm");
191 backend_t bkend( code, &wa );
192
193 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_mul_div", bit_cast<float>(UINT32_C(2249624147)), bit_cast<float>(UINT32_C(2678828342)), bit_cast<float>(UINT32_C(95319815)))->to_f32()) == UINT32_C(0));
194 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_mul_div", bit_cast<float>(UINT32_C(3978470300)), bit_cast<float>(UINT32_C(2253997363)), bit_cast<float>(UINT32_C(3824852100)))->to_f32()) == UINT32_C(2408382580));
195 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_mul_div", bit_cast<float>(UINT32_C(3350590135)), bit_cast<float>(UINT32_C(3042588643)), bit_cast<float>(UINT32_C(2186448635)))->to_f32()) == UINT32_C(4206661933));
196 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_mul_div", bit_cast<float>(UINT32_C(2430706172)), bit_cast<float>(UINT32_C(1685220483)), bit_cast<float>(UINT32_C(1642018044)))->to_f32()) == UINT32_C(2473922298));
197 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_regroup_mul_div", bit_cast<float>(UINT32_C(2011387707)), bit_cast<float>(UINT32_C(1274956446)), bit_cast<float>(UINT32_C(3811596788)))->to_f32()) == UINT32_C(4286578688));
198 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_mul_div", bit_cast<double>(UINT64_C(2703215631877943472)), bit_cast<double>(UINT64_C(13295603997208052007)), bit_cast<double>(UINT64_C(1719211436532588593)))->to_f64()) == UINT64_C(14279677686886620462));
199 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_mul_div", bit_cast<double>(UINT64_C(6126139291059848917)), bit_cast<double>(UINT64_C(2596039250849921421)), bit_cast<double>(UINT64_C(17423258659719899654)))->to_f64()) == UINT64_C(9746029336072872080));
200 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_mul_div", bit_cast<double>(UINT64_C(2451868557331674239)), bit_cast<double>(UINT64_C(8672326445062988097)), bit_cast<double>(UINT64_C(2593279393835739385)))->to_f64()) == UINT64_C(8531093589128288889));
201 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_mul_div", bit_cast<double>(UINT64_C(15994259208199847538)), bit_cast<double>(UINT64_C(16584156163346075677)), bit_cast<double>(UINT64_C(17596923907238870430)))->to_f64()) == UINT64_C(18442240474082181120));
202 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_regroup_mul_div", bit_cast<double>(UINT64_C(1912002771029783751)), bit_cast<double>(UINT64_C(655387110450354003)), bit_cast<double>(UINT64_C(10060746190138762841)))->to_f64()) == UINT64_C(9223372036854775808));
203}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [14/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_21_wasm>" ,
"" [float_exprs_21_wasm_tests] )

Definition at line 205 of file float_exprs_tests.cpp.

205 {
207 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.21.wasm");
208 backend_t bkend( code, &wa );
209
210 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_add", bit_cast<float>(UINT32_C(3585064686)), bit_cast<float>(UINT32_C(1354934024)), bit_cast<float>(UINT32_C(3612934982)), bit_cast<float>(UINT32_C(3557837641)))->to_f32()) == UINT32_C(3614520891));
211 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_add", bit_cast<float>(UINT32_C(997006780)), bit_cast<float>(UINT32_C(3156314493)), bit_cast<float>(UINT32_C(1031916275)), bit_cast<float>(UINT32_C(3157700435)))->to_f32()) == UINT32_C(1027365261));
212 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_add", bit_cast<float>(UINT32_C(3506363549)), bit_cast<float>(UINT32_C(3562765939)), bit_cast<float>(UINT32_C(1440782572)), bit_cast<float>(UINT32_C(1388583643)))->to_f32()) == UINT32_C(1439168977));
213 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_add", bit_cast<float>(UINT32_C(1460378878)), bit_cast<float>(UINT32_C(1481791683)), bit_cast<float>(UINT32_C(3506843934)), bit_cast<float>(UINT32_C(1493913729)))->to_f32()) == UINT32_C(1497931771));
214 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_add", bit_cast<float>(UINT32_C(1975099005)), bit_cast<float>(UINT32_C(4120668550)), bit_cast<float>(UINT32_C(1947708458)), bit_cast<float>(UINT32_C(4008073260)))->to_f32()) == UINT32_C(1958779787));
215 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_add", bit_cast<double>(UINT64_C(17619937326421449126)), bit_cast<double>(UINT64_C(8424880666975634327)), bit_cast<double>(UINT64_C(8461713040394112626)), bit_cast<double>(UINT64_C(17692076622886930107)))->to_f64()) == UINT64_C(17689770886425413754));
216 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_add", bit_cast<double>(UINT64_C(2161744272815763681)), bit_cast<double>(UINT64_C(2160815018984030177)), bit_cast<double>(UINT64_C(11389452991481170854)), bit_cast<double>(UINT64_C(11158554735757873927)))->to_f64()) == UINT64_C(11367213592018398582));
217 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_add", bit_cast<double>(UINT64_C(15816220208145029204)), bit_cast<double>(UINT64_C(6443786499090728432)), bit_cast<double>(UINT64_C(15798639273395365185)), bit_cast<double>(UINT64_C(6395820899158300605)))->to_f64()) == UINT64_C(15816713260997571051));
218 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_add", bit_cast<double>(UINT64_C(12406188505172681730)), bit_cast<double>(UINT64_C(3227622722685619614)), bit_cast<double>(UINT64_C(12653209142287077985)), bit_cast<double>(UINT64_C(3439058911346459774)))->to_f64()) == UINT64_C(3437283564188778523));
219 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_add", bit_cast<double>(UINT64_C(16720963389015391005)), bit_cast<double>(UINT64_C(16597092572968550980)), bit_cast<double>(UINT64_C(7518944085377596897)), bit_cast<double>(UINT64_C(16733407756820198530)))->to_f64()) == UINT64_C(7516931113564586278));
220}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [15/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_22_wasm>" ,
"" [float_exprs_22_wasm_tests] )

Definition at line 222 of file float_exprs_tests.cpp.

222 {
224 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.22.wasm");
225 backend_t bkend( code, &wa );
226
227 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_mul", bit_cast<float>(UINT32_C(97158612)), bit_cast<float>(UINT32_C(796388711)), bit_cast<float>(UINT32_C(4071607776)), bit_cast<float>(UINT32_C(603464324)))->to_f32()) == UINT32_C(2373950135));
228 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_mul", bit_cast<float>(UINT32_C(598526039)), bit_cast<float>(UINT32_C(4072603010)), bit_cast<float>(UINT32_C(2166864805)), bit_cast<float>(UINT32_C(3802968051)))->to_f32()) == UINT32_C(3152274558));
229 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_mul", bit_cast<float>(UINT32_C(666201298)), bit_cast<float>(UINT32_C(3678968917)), bit_cast<float>(UINT32_C(2879732647)), bit_cast<float>(UINT32_C(1703934016)))->to_f32()) == UINT32_C(1439591542));
230 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_mul", bit_cast<float>(UINT32_C(191948150)), bit_cast<float>(UINT32_C(1717012201)), bit_cast<float>(UINT32_C(3682645872)), bit_cast<float>(UINT32_C(3713382507)))->to_f32()) == UINT32_C(1814709127));
231 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_reassociate_mul", bit_cast<float>(UINT32_C(2384301792)), bit_cast<float>(UINT32_C(656878874)), bit_cast<float>(UINT32_C(3239861549)), bit_cast<float>(UINT32_C(1564466295)))->to_f32()) == UINT32_C(355327948));
232 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_mul", bit_cast<double>(UINT64_C(10830726381612138752)), bit_cast<double>(UINT64_C(18293529276079591087)), bit_cast<double>(UINT64_C(12137662286027993114)), bit_cast<double>(UINT64_C(16821646709291069775)))->to_f64()) == UINT64_C(7368793799369880819));
233 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_mul", bit_cast<double>(UINT64_C(6653164799371160764)), bit_cast<double>(UINT64_C(2285295038358358170)), bit_cast<double>(UINT64_C(9783304669150272403)), bit_cast<double>(UINT64_C(16266005085991502709)))->to_f64()) == UINT64_C(2720645287366687760));
234 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_mul", bit_cast<double>(UINT64_C(2352911459797566465)), bit_cast<double>(UINT64_C(17379873157362463143)), bit_cast<double>(UINT64_C(1179129869275935356)), bit_cast<double>(UINT64_C(14228398113747850351)))->to_f64()) == UINT64_C(2873103656912958703));
235 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_mul", bit_cast<double>(UINT64_C(7724499817746503804)), bit_cast<double>(UINT64_C(2704005046640722176)), bit_cast<double>(UINT64_C(5612860422806321751)), bit_cast<double>(UINT64_C(13727818095548724091)))->to_f64()) == UINT64_C(15948568678460814092));
236 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_reassociate_mul", bit_cast<double>(UINT64_C(3553622953022765407)), bit_cast<double>(UINT64_C(1044040287824900408)), bit_cast<double>(UINT64_C(17112762794520509437)), bit_cast<double>(UINT64_C(11134095486440145773)))->to_f64()) == UINT64_C(576919682754813073));
237}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [16/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_23_wasm>" ,
"" [float_exprs_23_wasm_tests] )

Definition at line 239 of file float_exprs_tests.cpp.

239 {
241 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.23.wasm");
242 backend_t bkend( code, &wa );
243
244 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_0", bit_cast<float>(UINT32_C(1065353216)))->to_f32()) == UINT32_C(2139095040));
245 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_0", bit_cast<float>(UINT32_C(3212836864)))->to_f32()) == UINT32_C(4286578688));
246 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_0", bit_cast<float>(UINT32_C(2139095040)))->to_f32()) == UINT32_C(2139095040));
247 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_0", bit_cast<float>(UINT32_C(4286578688)))->to_f32()) == UINT32_C(4286578688));
248 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_0", bit_cast<float>(UINT32_C(0)))));
249 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_0", bit_cast<float>(UINT32_C(2147483648)))));
250 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_0", bit_cast<float>(UINT32_C(2141192192)))));
251 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_0", bit_cast<float>(UINT32_C(2143289344)))));
252 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_0", bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(9218868437227405312));
253 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_0", bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(18442240474082181120));
254 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_0", bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(9218868437227405312));
255 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_0", bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(18442240474082181120));
256 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_0", bit_cast<double>(UINT64_C(0)))));
257 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_0", bit_cast<double>(UINT64_C(9223372036854775808)))));
258 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_0", bit_cast<double>(UINT64_C(9221120237041090560)))));
259 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_0", bit_cast<double>(UINT64_C(9219994337134247936)))));
260}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [17/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_24_wasm>" ,
"" [float_exprs_24_wasm_tests] )

Definition at line 262 of file float_exprs_tests.cpp.

262 {
264 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.24.wasm");
265 backend_t bkend( code, &wa );
266
267 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_neg0", bit_cast<float>(UINT32_C(1065353216)))->to_f32()) == UINT32_C(4286578688));
268 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_neg0", bit_cast<float>(UINT32_C(3212836864)))->to_f32()) == UINT32_C(2139095040));
269 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_neg0", bit_cast<float>(UINT32_C(2139095040)))->to_f32()) == UINT32_C(4286578688));
270 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_neg0", bit_cast<float>(UINT32_C(4286578688)))->to_f32()) == UINT32_C(2139095040));
271 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_neg0", bit_cast<float>(UINT32_C(0)))));
272 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_neg0", bit_cast<float>(UINT32_C(2147483648)))));
273 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_neg0", bit_cast<float>(UINT32_C(2141192192)))));
274 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_neg0", bit_cast<float>(UINT32_C(2143289344)))));
275 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_neg0", bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(18442240474082181120));
276 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_neg0", bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(9218868437227405312));
277 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_neg0", bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(18442240474082181120));
278 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_neg0", bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(9218868437227405312));
279 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_neg0", bit_cast<double>(UINT64_C(0)))));
280 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_neg0", bit_cast<double>(UINT64_C(9223372036854775808)))));
281 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_neg0", bit_cast<double>(UINT64_C(9221120237041090560)))));
282 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_neg0", bit_cast<double>(UINT64_C(9219994337134247936)))));
283}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [18/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_25_wasm>" ,
"" [float_exprs_25_wasm_tests] )

Definition at line 285 of file float_exprs_tests.cpp.

285 {
287 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.25.wasm");
288 backend_t bkend( code, &wa );
289
290 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_to_hypot", bit_cast<float>(UINT32_C(392264092)), bit_cast<float>(UINT32_C(497028527)))->to_f32()) == UINT32_C(497028710));
291 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_to_hypot", bit_cast<float>(UINT32_C(2623653512)), bit_cast<float>(UINT32_C(2317012712)))->to_f32()) == UINT32_C(476165425));
292 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_to_hypot", bit_cast<float>(UINT32_C(2261577829)), bit_cast<float>(UINT32_C(2641790518)))->to_f32()) == UINT32_C(494307108));
293 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_to_hypot", bit_cast<float>(UINT32_C(3255678581)), bit_cast<float>(UINT32_C(1210720351)))->to_f32()) == UINT32_C(1210720352));
294 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_to_hypot", bit_cast<float>(UINT32_C(432505039)), bit_cast<float>(UINT32_C(2618036612)))->to_f32()) == UINT32_C(470544734));
295 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_to_hypot", bit_cast<double>(UINT64_C(1743351192697472785)), bit_cast<double>(UINT64_C(2202602366606243153)))->to_f64()) == UINT64_C(2202599296765198670));
296 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_to_hypot", bit_cast<double>(UINT64_C(6389333765198869657)), bit_cast<double>(UINT64_C(15677343373020056630)))->to_f64()) == UINT64_C(6453971336171062178));
297 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_to_hypot", bit_cast<double>(UINT64_C(2195337108264055819)), bit_cast<double>(UINT64_C(10384237061545402288)))->to_f64()) == UINT64_C(2195504818343116800));
298 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_to_hypot", bit_cast<double>(UINT64_C(11486582223361829725)), bit_cast<double>(UINT64_C(1308532122426122043)))->to_f64()) == UINT64_C(2263210186506929210));
299 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_to_hypot", bit_cast<double>(UINT64_C(1591440107418864392)), bit_cast<double>(UINT64_C(11515806374387309036)))->to_f64()) == UINT64_C(2292434337532533215));
300}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [19/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_26_wasm>" ,
"" [float_exprs_26_wasm_tests] )

Definition at line 302 of file float_exprs_tests.cpp.

302 {
304 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.26.wasm");
305 backend_t bkend( code, &wa );
306
307 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal", bit_cast<float>(UINT32_C(3130294363)))->to_f32()) == UINT32_C(3294406762));
308 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal", bit_cast<float>(UINT32_C(2138280080)))->to_f32()) == UINT32_C(2204223));
309 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal", bit_cast<float>(UINT32_C(2434880051)))->to_f32()) == UINT32_C(3989512051));
310 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal", bit_cast<float>(UINT32_C(1705936409)))->to_f32()) == UINT32_C(423346609));
311 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal", bit_cast<float>(UINT32_C(2528120561)))->to_f32()) == UINT32_C(3896123071));
312}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [20/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_27_wasm>" ,
"" [float_exprs_27_wasm_tests] )

Definition at line 314 of file float_exprs_tests.cpp.

314 {
316 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.27.wasm");
317 backend_t bkend( code, &wa );
318
319 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal_sqrt", bit_cast<float>(UINT32_C(708147349)))->to_f32()) == UINT32_C(1243088746));
320 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal_sqrt", bit_cast<float>(UINT32_C(1005852643)))->to_f32()) == UINT32_C(1094279611));
321 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal_sqrt", bit_cast<float>(UINT32_C(517799246)))->to_f32()) == UINT32_C(1338168541));
322 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal_sqrt", bit_cast<float>(UINT32_C(704281251)))->to_f32()) == UINT32_C(1245118689));
323 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_reciprocal_sqrt", bit_cast<float>(UINT32_C(347001813)))->to_f32()) == UINT32_C(1423641701));
324 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fuse_reciprocal_sqrt", bit_cast<double>(UINT64_C(8611259114887405475)))->to_f64()) == UINT64_C(2604695339663988000));
325 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fuse_reciprocal_sqrt", bit_cast<double>(UINT64_C(6008428610859539631)))->to_f64()) == UINT64_C(3906084647186679832));
326 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fuse_reciprocal_sqrt", bit_cast<double>(UINT64_C(5077495674931581012)))->to_f64()) == UINT64_C(4371518865190387497));
327 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fuse_reciprocal_sqrt", bit_cast<double>(UINT64_C(7616219057857077123)))->to_f64()) == UINT64_C(3102407657946187309));
328 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fuse_reciprocal_sqrt", bit_cast<double>(UINT64_C(5267858027841559467)))->to_f64()) == UINT64_C(4276321761661248681));
329}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [21/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_28_wasm>" ,
"" [float_exprs_28_wasm_tests] )

Definition at line 331 of file float_exprs_tests.cpp.

331 {
333 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.28.wasm");
334 backend_t bkend( code, &wa );
335
336 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_sqrt_reciprocal", bit_cast<float>(UINT32_C(1574069443)))->to_f32()) == UINT32_C(810003811));
337 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_sqrt_reciprocal", bit_cast<float>(UINT32_C(992487567)))->to_f32()) == UINT32_C(1100869283));
338 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_sqrt_reciprocal", bit_cast<float>(UINT32_C(1644769121)))->to_f32()) == UINT32_C(774822585));
339 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_sqrt_reciprocal", bit_cast<float>(UINT32_C(1180509736)))->to_f32()) == UINT32_C(1007269771));
340 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_approximate_sqrt_reciprocal", bit_cast<float>(UINT32_C(1940205041)))->to_f32()) == UINT32_C(627137240));
341}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [22/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_29_wasm>" ,
"" [float_exprs_29_wasm_tests] )

Definition at line 343 of file float_exprs_tests.cpp.

343 {
345 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.29.wasm");
346 backend_t bkend( code, &wa );
347
348 CHECK(bkend.call_with_return("env", "i32.no_fold_f32_s", UINT32_C(16777216))->to_ui32() == UINT32_C(16777216));
349 CHECK(bkend.call_with_return("env", "i32.no_fold_f32_s", UINT32_C(16777217))->to_ui32() == UINT32_C(16777216));
350 CHECK(bkend.call_with_return("env", "i32.no_fold_f32_s", UINT32_C(4026531856))->to_ui32() == UINT32_C(4026531856));
351 CHECK(bkend.call_with_return("env", "i32.no_fold_f32_u", UINT32_C(16777216))->to_ui32() == UINT32_C(16777216));
352 CHECK(bkend.call_with_return("env", "i32.no_fold_f32_u", UINT32_C(16777217))->to_ui32() == UINT32_C(16777216));
353 CHECK(bkend.call_with_return("env", "i32.no_fold_f32_u", UINT32_C(4026531856))->to_ui32() == UINT32_C(4026531840));
354 CHECK(bkend.call_with_return("env", "i64.no_fold_f64_s", UINT64_C(9007199254740992))->to_ui64() == UINT32_C(9007199254740992));
355 CHECK(bkend.call_with_return("env", "i64.no_fold_f64_s", UINT64_C(9007199254740993))->to_ui64() == UINT32_C(9007199254740992));
356 CHECK(bkend.call_with_return("env", "i64.no_fold_f64_s", UINT64_C(17293822569102705664))->to_ui64() == UINT32_C(17293822569102705664));
357 CHECK(bkend.call_with_return("env", "i64.no_fold_f64_u", UINT64_C(9007199254740992))->to_ui64() == UINT32_C(9007199254740992));
358 CHECK(bkend.call_with_return("env", "i64.no_fold_f64_u", UINT64_C(9007199254740993))->to_ui64() == UINT32_C(9007199254740992));
359 CHECK(bkend.call_with_return("env", "i64.no_fold_f64_u", UINT64_C(17293822569102705664))->to_ui64() == UINT32_C(17293822569102704640));
360}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [23/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_2_wasm>" ,
"" [float_exprs_2_wasm_tests] )

Definition at line 177 of file float_exprs_tests.cpp.

177 {
179 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.2.wasm");
180 backend_t bkend( code, &wa );
181
182 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_zero", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
183 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_zero", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
184 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_add_zero", bit_cast<float>(UINT32_C(2141192192)))));
185 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_add_zero", bit_cast<double>(UINT64_C(9219994337134247936)))));
186}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [24/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_30_wasm>" ,
"" [float_exprs_30_wasm_tests] )

Definition at line 373 of file float_exprs_tests.cpp.

373 {
375 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.30.wasm");
376 backend_t bkend( code, &wa );
377
378 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_sub", bit_cast<float>(UINT32_C(677030386)), bit_cast<float>(UINT32_C(2998136214)))->to_f32()) == UINT32_C(677380096));
379 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_sub", bit_cast<float>(UINT32_C(3025420904)), bit_cast<float>(UINT32_C(913921807)))->to_f32()) == UINT32_C(3025420912));
380 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_sub", bit_cast<float>(UINT32_C(3908960888)), bit_cast<float>(UINT32_C(4063404061)))->to_f32()) == UINT32_C(3909091328));
381 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_sub", bit_cast<float>(UINT32_C(415467473)), bit_cast<float>(UINT32_C(602055819)))->to_f32()) == UINT32_C(415236096));
382 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_sub", bit_cast<float>(UINT32_C(2307650739)), bit_cast<float>(UINT32_C(2511328013)))->to_f32()) == UINT32_C(2315255808));
383 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_sub", bit_cast<double>(UINT64_C(9894695622864460712)), bit_cast<double>(UINT64_C(747900745977727688)))->to_f64()) == UINT64_C(9894695622864404480));
384 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_sub", bit_cast<double>(UINT64_C(2152218683357821298)), bit_cast<double>(UINT64_C(2238360073507307376)))->to_f64()) == UINT64_C(2152218683357790208));
385 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_sub", bit_cast<double>(UINT64_C(13697521605206502242)), bit_cast<double>(UINT64_C(13818850255013161909)))->to_f64()) == UINT64_C(13697521605247238144));
386 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_sub", bit_cast<double>(UINT64_C(12298280617237492384)), bit_cast<double>(UINT64_C(3233965342858558382)))->to_f64()) == UINT64_C(12298280617463775232));
387 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_sub", bit_cast<double>(UINT64_C(11043298296128683688)), bit_cast<double>(UINT64_C(11182857345495207592)))->to_f64()) == UINT64_C(11043298296775835648));
388}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [25/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_31_wasm>" ,
"" [float_exprs_31_wasm_tests] )

Definition at line 390 of file float_exprs_tests.cpp.

390 {
392 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.31.wasm");
393 backend_t bkend( code, &wa );
394
395 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sub_add", bit_cast<float>(UINT32_C(3291029084)), bit_cast<float>(UINT32_C(1137280182)))->to_f32()) == UINT32_C(3291029085));
396 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sub_add", bit_cast<float>(UINT32_C(2287045896)), bit_cast<float>(UINT32_C(272248696)))->to_f32()) == UINT32_C(2287075328));
397 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sub_add", bit_cast<float>(UINT32_C(1285466516)), bit_cast<float>(UINT32_C(1361849144)))->to_f32()) == UINT32_C(1285466624));
398 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sub_add", bit_cast<float>(UINT32_C(740009747)), bit_cast<float>(UINT32_C(2989707904)))->to_f32()) == UINT32_C(740007936));
399 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sub_add", bit_cast<float>(UINT32_C(1041827798)), bit_cast<float>(UINT32_C(3335914317)))->to_f32()) == UINT32_C(1041891328));
400 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sub_add", bit_cast<double>(UINT64_C(5758126085282503565)), bit_cast<double>(UINT64_C(14997141603873875659)))->to_f64()) == UINT64_C(5758126085282503568));
401 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sub_add", bit_cast<double>(UINT64_C(1609380455481879691)), bit_cast<double>(UINT64_C(1695875689930159213)))->to_f64()) == UINT64_C(1609380455482130432));
402 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sub_add", bit_cast<double>(UINT64_C(5738179408840599949)), bit_cast<double>(UINT64_C(15186085143903012996)))->to_f64()) == UINT64_C(5738148875223433216));
403 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sub_add", bit_cast<double>(UINT64_C(4492841470376833908)), bit_cast<double>(UINT64_C(13773869588765591068)))->to_f64()) == UINT64_C(4492841470376837120));
404 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sub_add", bit_cast<double>(UINT64_C(2955729038738127538)), bit_cast<double>(UINT64_C(12208627806665035010)))->to_f64()) == UINT64_C(2955729038738127552));
405}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [26/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_32_wasm>" ,
"" [float_exprs_32_wasm_tests] )

Definition at line 407 of file float_exprs_tests.cpp.

407 {
409 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.32.wasm");
410 backend_t bkend( code, &wa );
411
412 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_div", bit_cast<float>(UINT32_C(3672556237)), bit_cast<float>(UINT32_C(674649243)))->to_f32()) == UINT32_C(3672556236));
413 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_div", bit_cast<float>(UINT32_C(2995104604)), bit_cast<float>(UINT32_C(178524966)))->to_f32()) == UINT32_C(2995104594));
414 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_div", bit_cast<float>(UINT32_C(2817764014)), bit_cast<float>(UINT32_C(3620253920)))->to_f32()) == UINT32_C(2817764013));
415 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_div", bit_cast<float>(UINT32_C(1507152519)), bit_cast<float>(UINT32_C(3723483599)))->to_f32()) == UINT32_C(1507152518));
416 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_div", bit_cast<float>(UINT32_C(2442510077)), bit_cast<float>(UINT32_C(2906531411)))->to_f32()) == UINT32_C(2442510079));
417 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_div", bit_cast<double>(UINT64_C(10062123074470382106)), bit_cast<double>(UINT64_C(12910565991996555404)))->to_f64()) == UINT64_C(10062123074470422078));
418 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_div", bit_cast<double>(UINT64_C(6340937764684870564)), bit_cast<double>(UINT64_C(7244253720027059594)))->to_f64()) == UINT64_C(6340937764684870565));
419 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_div", bit_cast<double>(UINT64_C(14905228263410157971)), bit_cast<double>(UINT64_C(11346251643264732732)))->to_f64()) == UINT64_C(14905228263410157970));
420 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_div", bit_cast<double>(UINT64_C(3862352046163709780)), bit_cast<double>(UINT64_C(531112307488385734)))->to_f64()) == UINT64_C(3862079437827029803));
421 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_div", bit_cast<double>(UINT64_C(16807035693954817236)), bit_cast<double>(UINT64_C(12360222454864961326)))->to_f64()) == UINT64_C(16807035693954817237));
422}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [27/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_33_wasm>" ,
"" [float_exprs_33_wasm_tests] )

Definition at line 424 of file float_exprs_tests.cpp.

424 {
426 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.33.wasm");
427 backend_t bkend( code, &wa );
428
429 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_mul", bit_cast<float>(UINT32_C(3538825650)), bit_cast<float>(UINT32_C(1315641462)))->to_f32()) == UINT32_C(3538825649));
430 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_mul", bit_cast<float>(UINT32_C(2777664539)), bit_cast<float>(UINT32_C(3062588018)))->to_f32()) == UINT32_C(2777664540));
431 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_mul", bit_cast<float>(UINT32_C(14863254)), bit_cast<float>(UINT32_C(3278582479)))->to_f32()) == UINT32_C(14863367));
432 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_mul", bit_cast<float>(UINT32_C(2593594703)), bit_cast<float>(UINT32_C(3709508810)))->to_f32()) == UINT32_C(2593594656));
433 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_mul", bit_cast<float>(UINT32_C(250394049)), bit_cast<float>(UINT32_C(1296755844)))->to_f32()) == UINT32_C(250394050));
434 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_mul", bit_cast<double>(UINT64_C(665690489208775809)), bit_cast<double>(UINT64_C(14660005164454413124)))->to_f64()) == UINT64_C(665690577722002880));
435 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_mul", bit_cast<double>(UINT64_C(10617267697387344269)), bit_cast<double>(UINT64_C(4370684778829606254)))->to_f64()) == UINT64_C(10617267697387344270));
436 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_mul", bit_cast<double>(UINT64_C(13179336828827425934)), bit_cast<double>(UINT64_C(6536345148565138764)))->to_f64()) == UINT64_C(13179336828827425933));
437 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_mul", bit_cast<double>(UINT64_C(12582623625647949669)), bit_cast<double>(UINT64_C(15106746174896642041)))->to_f64()) == UINT64_C(12582623625647949668));
438 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_mul", bit_cast<double>(UINT64_C(16624217782795067216)), bit_cast<double>(UINT64_C(9062205521150975866)))->to_f64()) == UINT64_C(16624217782795067215));
439}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [28/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_34_wasm>" ,
"" [float_exprs_34_wasm_tests] )

Definition at line 441 of file float_exprs_tests.cpp.

441 {
443 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.34.wasm");
444 backend_t bkend( code, &wa );
445
446 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div2_mul2", bit_cast<float>(UINT32_C(16777215)))->to_f32()) == UINT32_C(16777216));
447 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div2_mul2", bit_cast<double>(UINT64_C(9007199254740991)))->to_f64()) == UINT64_C(9007199254740992));
448}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [29/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_35_wasm>" ,
"" [float_exprs_35_wasm_tests] )

Definition at line 450 of file float_exprs_tests.cpp.

450 {
452 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.35.wasm");
453 backend_t bkend( code, &wa );
454
455 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "no_fold_demote_promote", bit_cast<double>(UINT64_C(13235495337234861917)))->to_f64()) == UINT64_C(13235495326728585216));
456 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "no_fold_demote_promote", bit_cast<double>(UINT64_C(13448204151038380655)))->to_f64()) == UINT64_C(13448204151146151936));
457 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "no_fold_demote_promote", bit_cast<double>(UINT64_C(5090364081358261697)))->to_f64()) == UINT64_C(5090364081378951168));
458 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "no_fold_demote_promote", bit_cast<double>(UINT64_C(13436295269174285872)))->to_f64()) == UINT64_C(13436295269301878784));
459 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "no_fold_demote_promote", bit_cast<double>(UINT64_C(5076240020598306430)))->to_f64()) == UINT64_C(5076240020759642112));
460}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [30/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_36_wasm>" ,
"" [float_exprs_36_wasm_tests] )

Definition at line 462 of file float_exprs_tests.cpp.

462 {
464 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.36.wasm");
465 backend_t bkend( code, &wa );
466
467 CHECK(check_nan(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(2141192192)))));
468 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
469 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
470 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(1)))->to_f32()) == UINT32_C(1));
471 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(2147483649)))->to_f32()) == UINT32_C(2147483649));
472 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(8388607)))->to_f32()) == UINT32_C(8388607));
473 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(2155872255)))->to_f32()) == UINT32_C(2155872255));
474 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(8388608)))->to_f32()) == UINT32_C(8388608));
475 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(2155872256)))->to_f32()) == UINT32_C(2155872256));
476 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(2139095039)))->to_f32()) == UINT32_C(2139095039));
477 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(4286578687)))->to_f32()) == UINT32_C(4286578687));
478 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(2139095040)))->to_f32()) == UINT32_C(2139095040));
479 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_fold_promote_demote", bit_cast<float>(UINT32_C(4286578688)))->to_f32()) == UINT32_C(4286578688));
480}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [31/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_37_wasm>" ,
"" [float_exprs_37_wasm_tests] )

Definition at line 482 of file float_exprs_tests.cpp.

482 {
484 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.37.wasm");
485 backend_t bkend( code, &wa );
486
487 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add", bit_cast<double>(UINT64_C(4183652368636204281)), bit_cast<float>(UINT32_C(69183310)))->to_f32()) == UINT32_C(276467023));
488 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add", bit_cast<double>(UINT64_C(4773927428111915216)), bit_cast<float>(UINT32_C(1387972204)))->to_f32()) == UINT32_C(1392270651));
489 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add", bit_cast<double>(UINT64_C(4072985553596038423)), bit_cast<float>(UINT32_C(2202918851)))->to_f32()) == UINT32_C(66813087));
490 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add", bit_cast<double>(UINT64_C(13740716732336801211)), bit_cast<float>(UINT32_C(822392741)))->to_f32()) == UINT32_C(3045484077));
491 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add", bit_cast<double>(UINT64_C(13742514716462174325)), bit_cast<float>(UINT32_C(2870112826)))->to_f32()) == UINT32_C(3048850075));
492 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add_commuted", bit_cast<float>(UINT32_C(69183310)), bit_cast<double>(UINT64_C(4183652368636204281)))->to_f32()) == UINT32_C(276467023));
493 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add_commuted", bit_cast<float>(UINT32_C(1387972204)), bit_cast<double>(UINT64_C(4773927428111915216)))->to_f32()) == UINT32_C(1392270651));
494 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add_commuted", bit_cast<float>(UINT32_C(2202918851)), bit_cast<double>(UINT64_C(4072985553596038423)))->to_f32()) == UINT32_C(66813087));
495 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add_commuted", bit_cast<float>(UINT32_C(822392741)), bit_cast<double>(UINT64_C(13740716732336801211)))->to_f32()) == UINT32_C(3045484077));
496 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_add_commuted", bit_cast<float>(UINT32_C(2870112826)), bit_cast<double>(UINT64_C(13742514716462174325)))->to_f32()) == UINT32_C(3048850075));
497}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [32/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_38_wasm>" ,
"" [float_exprs_38_wasm_tests] )

Definition at line 499 of file float_exprs_tests.cpp.

499 {
501 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.38.wasm");
502 backend_t bkend( code, &wa );
503
504 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_sub", bit_cast<double>(UINT64_C(4979303437048015281)), bit_cast<float>(UINT32_C(1583535740)))->to_f32()) == UINT32_C(1758482618));
505 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_sub", bit_cast<double>(UINT64_C(13967600632962086462)), bit_cast<float>(UINT32_C(1214924370)))->to_f32()) == UINT32_C(3468107136));
506 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_sub", bit_cast<double>(UINT64_C(13860263758943608426)), bit_cast<float>(UINT32_C(969848030)))->to_f32()) == UINT32_C(3268174805));
507 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_sub", bit_cast<double>(UINT64_C(4364064588997139903)), bit_cast<float>(UINT32_C(472962692)))->to_f32()) == UINT32_C(612510881));
508 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "no_demote_mixed_sub", bit_cast<double>(UINT64_C(4673175763235896759)), bit_cast<float>(UINT32_C(1198952676)))->to_f32()) == UINT32_C(3339501185));
509}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [33/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_39_wasm>" ,
"" [float_exprs_39_wasm_tests] )

Definition at line 511 of file float_exprs_tests.cpp.

511 {
513 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.39.wasm");
514 backend_t bkend( code, &wa );
515
516 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i32.no_fold_trunc_s_convert_s", bit_cast<float>(UINT32_C(1069547520)))->to_f32()) == UINT32_C(1065353216));
517 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i32.no_fold_trunc_s_convert_s", bit_cast<float>(UINT32_C(3217031168)))->to_f32()) == UINT32_C(3212836864));
518 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i32.no_fold_trunc_u_convert_s", bit_cast<float>(UINT32_C(1069547520)))->to_f32()) == UINT32_C(1065353216));
519 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i32.no_fold_trunc_u_convert_s", bit_cast<float>(UINT32_C(3204448256)))->to_f32()) == UINT32_C(0));
520 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i32.no_fold_trunc_s_convert_u", bit_cast<float>(UINT32_C(1069547520)))->to_f32()) == UINT32_C(1065353216));
521 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i32.no_fold_trunc_s_convert_u", bit_cast<float>(UINT32_C(3217031168)))->to_f32()) == UINT32_C(1333788672));
522 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i32.no_fold_trunc_u_convert_u", bit_cast<float>(UINT32_C(1069547520)))->to_f32()) == UINT32_C(1065353216));
523 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i32.no_fold_trunc_u_convert_u", bit_cast<float>(UINT32_C(3204448256)))->to_f32()) == UINT32_C(0));
524 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i32.no_fold_trunc_s_convert_s", bit_cast<double>(UINT64_C(4609434218613702656)))->to_f64()) == UINT64_C(4607182418800017408));
525 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i32.no_fold_trunc_s_convert_s", bit_cast<double>(UINT64_C(13832806255468478464)))->to_f64()) == UINT64_C(13830554455654793216));
526 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i32.no_fold_trunc_u_convert_s", bit_cast<double>(UINT64_C(4609434218613702656)))->to_f64()) == UINT64_C(4607182418800017408));
527 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i32.no_fold_trunc_u_convert_s", bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(0));
528 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i32.no_fold_trunc_s_convert_u", bit_cast<double>(UINT64_C(4609434218613702656)))->to_f64()) == UINT64_C(4607182418800017408));
529 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i32.no_fold_trunc_s_convert_u", bit_cast<double>(UINT64_C(13832806255468478464)))->to_f64()) == UINT64_C(4751297606873776128));
530 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i32.no_fold_trunc_u_convert_u", bit_cast<double>(UINT64_C(4609434218613702656)))->to_f64()) == UINT64_C(4607182418800017408));
531 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i32.no_fold_trunc_u_convert_u", bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(0));
532 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i64.no_fold_trunc_s_convert_s", bit_cast<float>(UINT32_C(1069547520)))->to_f32()) == UINT32_C(1065353216));
533 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i64.no_fold_trunc_s_convert_s", bit_cast<float>(UINT32_C(3217031168)))->to_f32()) == UINT32_C(3212836864));
534 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i64.no_fold_trunc_u_convert_s", bit_cast<float>(UINT32_C(1069547520)))->to_f32()) == UINT32_C(1065353216));
535 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i64.no_fold_trunc_u_convert_s", bit_cast<float>(UINT32_C(3204448256)))->to_f32()) == UINT32_C(0));
536 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i64.no_fold_trunc_s_convert_u", bit_cast<float>(UINT32_C(1069547520)))->to_f32()) == UINT32_C(1065353216));
537 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i64.no_fold_trunc_s_convert_u", bit_cast<float>(UINT32_C(3217031168)))->to_f32()) == UINT32_C(1602224128));
538 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i64.no_fold_trunc_u_convert_u", bit_cast<float>(UINT32_C(1069547520)))->to_f32()) == UINT32_C(1065353216));
539 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.i64.no_fold_trunc_u_convert_u", bit_cast<float>(UINT32_C(3204448256)))->to_f32()) == UINT32_C(0));
540 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i64.no_fold_trunc_s_convert_s", bit_cast<double>(UINT64_C(4609434218613702656)))->to_f64()) == UINT64_C(4607182418800017408));
541 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i64.no_fold_trunc_s_convert_s", bit_cast<double>(UINT64_C(13832806255468478464)))->to_f64()) == UINT64_C(13830554455654793216));
542 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i64.no_fold_trunc_u_convert_s", bit_cast<double>(UINT64_C(4609434218613702656)))->to_f64()) == UINT64_C(4607182418800017408));
543 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i64.no_fold_trunc_u_convert_s", bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(0));
544 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i64.no_fold_trunc_s_convert_u", bit_cast<double>(UINT64_C(4609434218613702656)))->to_f64()) == UINT64_C(4607182418800017408));
545 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i64.no_fold_trunc_s_convert_u", bit_cast<double>(UINT64_C(13832806255468478464)))->to_f64()) == UINT64_C(4895412794951729152));
546 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i64.no_fold_trunc_u_convert_u", bit_cast<double>(UINT64_C(4609434218613702656)))->to_f64()) == UINT64_C(4607182418800017408));
547 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.i64.no_fold_trunc_u_convert_u", bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(0));
548}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [34/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_3_wasm>" ,
"" [float_exprs_3_wasm_tests] )

Definition at line 362 of file float_exprs_tests.cpp.

362 {
364 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.3.wasm");
365 backend_t bkend( code, &wa );
366
367 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_zero_sub", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
368 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_zero_sub", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
369 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_zero_sub", bit_cast<float>(UINT32_C(2141192192)))));
370 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_zero_sub", bit_cast<double>(UINT64_C(9219994337134247936)))));
371}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [35/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_40_wasm>" ,
"" [float_exprs_40_wasm_tests] )

Definition at line 559 of file float_exprs_tests.cpp.

559 {
561 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.40.wasm");
562 backend_t bkend( code, &wa );
563
564bkend("env", "init", UINT32_C(0), bit_cast<float>(UINT32_C(1097963930)));
565bkend("env", "init", UINT32_C(4), bit_cast<float>(UINT32_C(1098068787)));
566bkend("env", "init", UINT32_C(8), bit_cast<float>(UINT32_C(1098173645)));
567bkend("env", "init", UINT32_C(12), bit_cast<float>(UINT32_C(1098278502)));
568 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "check", UINT32_C(0))->to_f32()) == UINT32_C(1097963930));
569 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "check", UINT32_C(4))->to_f32()) == UINT32_C(1098068787));
570 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "check", UINT32_C(8))->to_f32()) == UINT32_C(1098173645));
571 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "check", UINT32_C(12))->to_f32()) == UINT32_C(1098278502));
572bkend("env", "run", UINT32_C(16), bit_cast<float>(UINT32_C(1077936128)));
573 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "check", UINT32_C(0))->to_f32()) == UINT32_C(1084297489));
574 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "check", UINT32_C(4))->to_f32()) == UINT32_C(1084367394));
575 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "check", UINT32_C(8))->to_f32()) == UINT32_C(1084437299));
576 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "check", UINT32_C(12))->to_f32()) == UINT32_C(1084507204));
577}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [36/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_41_wasm>" ,
"" [float_exprs_41_wasm_tests] )

Definition at line 579 of file float_exprs_tests.cpp.

579 {
581 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.41.wasm");
582 backend_t bkend( code, &wa );
583
584bkend("env", "init", UINT32_C(0), bit_cast<double>(UINT64_C(4624690162351420211)));
585bkend("env", "init", UINT32_C(8), bit_cast<double>(UINT64_C(4624746457346762342)));
586bkend("env", "init", UINT32_C(16), bit_cast<double>(UINT64_C(4624802752342104474)));
587bkend("env", "init", UINT32_C(24), bit_cast<double>(UINT64_C(4624859047337446605)));
588 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "check", UINT32_C(0))->to_f64()) == UINT64_C(4624690162351420211));
589 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "check", UINT32_C(8))->to_f64()) == UINT64_C(4624746457346762342));
590 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "check", UINT32_C(16))->to_f64()) == UINT64_C(4624802752342104474));
591 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "check", UINT32_C(24))->to_f64()) == UINT64_C(4624859047337446605));
592bkend("env", "run", UINT32_C(32), bit_cast<double>(UINT64_C(4613937818241073152)));
593 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "check", UINT32_C(0))->to_f64()) == UINT64_C(4617353047958495778));
594 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "check", UINT32_C(8))->to_f64()) == UINT64_C(4617390577955390532));
595 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "check", UINT32_C(16))->to_f64()) == UINT64_C(4617428107952285287));
596 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "check", UINT32_C(24))->to_f64()) == UINT64_C(4617465637949180041));
597}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [37/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_42_wasm>" ,
"" [float_exprs_42_wasm_tests] )

Definition at line 599 of file float_exprs_tests.cpp.

599 {
601 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.42.wasm");
602 backend_t bkend( code, &wa );
603
604 CHECK(bkend.call_with_return("env", "f32.ult", bit_cast<float>(UINT32_C(1077936128)), bit_cast<float>(UINT32_C(1073741824)))->to_ui32() == UINT32_C(0));
605 CHECK(bkend.call_with_return("env", "f32.ult", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1073741824)))->to_ui32() == UINT32_C(0));
606 CHECK(bkend.call_with_return("env", "f32.ult", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1077936128)))->to_ui32() == UINT32_C(1));
607 CHECK(bkend.call_with_return("env", "f32.ult", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(1));
608 CHECK(bkend.call_with_return("env", "f32.ule", bit_cast<float>(UINT32_C(1077936128)), bit_cast<float>(UINT32_C(1073741824)))->to_ui32() == UINT32_C(0));
609 CHECK(bkend.call_with_return("env", "f32.ule", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1073741824)))->to_ui32() == UINT32_C(1));
610 CHECK(bkend.call_with_return("env", "f32.ule", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1077936128)))->to_ui32() == UINT32_C(1));
611 CHECK(bkend.call_with_return("env", "f32.ule", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(1));
612 CHECK(bkend.call_with_return("env", "f32.ugt", bit_cast<float>(UINT32_C(1077936128)), bit_cast<float>(UINT32_C(1073741824)))->to_ui32() == UINT32_C(1));
613 CHECK(bkend.call_with_return("env", "f32.ugt", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1073741824)))->to_ui32() == UINT32_C(0));
614 CHECK(bkend.call_with_return("env", "f32.ugt", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1077936128)))->to_ui32() == UINT32_C(0));
615 CHECK(bkend.call_with_return("env", "f32.ugt", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(1));
616 CHECK(bkend.call_with_return("env", "f32.uge", bit_cast<float>(UINT32_C(1077936128)), bit_cast<float>(UINT32_C(1073741824)))->to_ui32() == UINT32_C(1));
617 CHECK(bkend.call_with_return("env", "f32.uge", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1073741824)))->to_ui32() == UINT32_C(1));
618 CHECK(bkend.call_with_return("env", "f32.uge", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1077936128)))->to_ui32() == UINT32_C(0));
619 CHECK(bkend.call_with_return("env", "f32.uge", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(1));
620 CHECK(bkend.call_with_return("env", "f64.ult", bit_cast<double>(UINT64_C(4613937818241073152)), bit_cast<double>(UINT64_C(4611686018427387904)))->to_ui32() == UINT32_C(0));
621 CHECK(bkend.call_with_return("env", "f64.ult", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4611686018427387904)))->to_ui32() == UINT32_C(0));
622 CHECK(bkend.call_with_return("env", "f64.ult", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_ui32() == UINT32_C(1));
623 CHECK(bkend.call_with_return("env", "f64.ult", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(1));
624 CHECK(bkend.call_with_return("env", "f64.ule", bit_cast<double>(UINT64_C(4613937818241073152)), bit_cast<double>(UINT64_C(4611686018427387904)))->to_ui32() == UINT32_C(0));
625 CHECK(bkend.call_with_return("env", "f64.ule", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4611686018427387904)))->to_ui32() == UINT32_C(1));
626 CHECK(bkend.call_with_return("env", "f64.ule", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_ui32() == UINT32_C(1));
627 CHECK(bkend.call_with_return("env", "f64.ule", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(1));
628 CHECK(bkend.call_with_return("env", "f64.ugt", bit_cast<double>(UINT64_C(4613937818241073152)), bit_cast<double>(UINT64_C(4611686018427387904)))->to_ui32() == UINT32_C(1));
629 CHECK(bkend.call_with_return("env", "f64.ugt", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4611686018427387904)))->to_ui32() == UINT32_C(0));
630 CHECK(bkend.call_with_return("env", "f64.ugt", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_ui32() == UINT32_C(0));
631 CHECK(bkend.call_with_return("env", "f64.ugt", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(1));
632 CHECK(bkend.call_with_return("env", "f64.uge", bit_cast<double>(UINT64_C(4613937818241073152)), bit_cast<double>(UINT64_C(4611686018427387904)))->to_ui32() == UINT32_C(1));
633 CHECK(bkend.call_with_return("env", "f64.uge", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4611686018427387904)))->to_ui32() == UINT32_C(1));
634 CHECK(bkend.call_with_return("env", "f64.uge", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_ui32() == UINT32_C(0));
635 CHECK(bkend.call_with_return("env", "f64.uge", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(1));
636}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [38/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_43_wasm>" ,
"" [float_exprs_43_wasm_tests] )

Definition at line 638 of file float_exprs_tests.cpp.

638 {
640 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.43.wasm");
641 backend_t bkend( code, &wa );
642
643 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_select", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_f32()) == UINT32_C(2143289344));
644 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_select", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
645 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_select", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
646 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_select", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
647 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_select", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_f32()) == UINT32_C(2143289344));
648 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_select", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
649 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_select", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
650 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_select", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
651 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_select", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_f32()) == UINT32_C(2143289344));
652 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_select", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
653 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_select", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
654 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_select", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
655 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_select", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_f32()) == UINT32_C(2143289344));
656 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_select", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
657 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_select", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
658 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_select", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
659 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_select", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
660 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_select", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
661 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_select", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
662 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_select", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
663 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_select", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
664 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_select", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
665 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_select", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
666 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_select", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
667 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_select", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
668 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_select", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
669 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_select", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
670 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_select", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
671 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_select", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
672 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_select", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
673 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_select", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
674 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_select", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
675}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [39/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_44_wasm>" ,
"" [float_exprs_44_wasm_tests] )

Definition at line 677 of file float_exprs_tests.cpp.

677 {
679 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.44.wasm");
680 backend_t bkend( code, &wa );
681
682 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_if", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_f32()) == UINT32_C(2143289344));
683 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_if", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
684 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_if", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
685 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_if", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
686 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_if", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_f32()) == UINT32_C(2143289344));
687 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_if", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
688 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_if", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
689 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_if", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
690 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_if", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_f32()) == UINT32_C(2143289344));
691 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_if", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
692 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_if", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
693 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_if", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
694 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_if", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_f32()) == UINT32_C(2143289344));
695 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_if", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
696 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_if", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
697 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_if", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
698 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_if", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
699 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_if", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
700 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_if", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
701 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_if", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
702 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_if", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
703 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_if", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
704 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_if", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
705 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_if", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
706 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_if", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
707 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_if", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
708 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_if", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
709 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_if", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
710 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_if", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
711 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_if", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
712 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_if", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
713 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_if", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
714}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [40/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_45_wasm>" ,
"" [float_exprs_45_wasm_tests] )

Definition at line 716 of file float_exprs_tests.cpp.

716 {
718 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.45.wasm");
719 backend_t bkend( code, &wa );
720
721 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_select_to_abs", bit_cast<float>(UINT32_C(2141192192)))->to_f32()) == UINT32_C(2141192192));
722 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_select_to_abs", bit_cast<float>(UINT32_C(4290772992)))->to_f32()) == UINT32_C(4290772992));
723 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_select_to_abs", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
724 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_select_to_abs", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
725 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_select_to_abs", bit_cast<float>(UINT32_C(2141192192)))->to_f32()) == UINT32_C(2141192192));
726 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_select_to_abs", bit_cast<float>(UINT32_C(4290772992)))->to_f32()) == UINT32_C(4290772992));
727 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_select_to_abs", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
728 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_select_to_abs", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
729 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_select_to_abs", bit_cast<float>(UINT32_C(2141192192)))->to_f32()) == UINT32_C(4288675840));
730 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_select_to_abs", bit_cast<float>(UINT32_C(4290772992)))->to_f32()) == UINT32_C(2143289344));
731 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_select_to_abs", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
732 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_select_to_abs", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
733 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_select_to_abs", bit_cast<float>(UINT32_C(2141192192)))->to_f32()) == UINT32_C(4288675840));
734 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_select_to_abs", bit_cast<float>(UINT32_C(4290772992)))->to_f32()) == UINT32_C(2143289344));
735 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_select_to_abs", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
736 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_select_to_abs", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
737 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_select_to_abs", bit_cast<double>(UINT64_C(9219994337134247936)))->to_f64()) == UINT64_C(9219994337134247936));
738 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_select_to_abs", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18444492273895866368));
739 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_select_to_abs", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
740 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_select_to_abs", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
741 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_select_to_abs", bit_cast<double>(UINT64_C(9219994337134247936)))->to_f64()) == UINT64_C(9219994337134247936));
742 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_select_to_abs", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18444492273895866368));
743 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_select_to_abs", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
744 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_select_to_abs", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
745 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_select_to_abs", bit_cast<double>(UINT64_C(9219994337134247936)))->to_f64()) == UINT64_C(18443366373989023744));
746 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_select_to_abs", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9221120237041090560));
747 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_select_to_abs", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
748 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_select_to_abs", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
749 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_select_to_abs", bit_cast<double>(UINT64_C(9219994337134247936)))->to_f64()) == UINT64_C(18443366373989023744));
750 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_select_to_abs", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9221120237041090560));
751 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_select_to_abs", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
752 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_select_to_abs", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
753}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [41/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_46_wasm>" ,
"" [float_exprs_46_wasm_tests] )

Definition at line 755 of file float_exprs_tests.cpp.

755 {
757 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.46.wasm");
758 backend_t bkend( code, &wa );
759
760 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_if_to_abs", bit_cast<float>(UINT32_C(2141192192)))->to_f32()) == UINT32_C(2141192192));
761 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_if_to_abs", bit_cast<float>(UINT32_C(4290772992)))->to_f32()) == UINT32_C(4290772992));
762 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_if_to_abs", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
763 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_lt_if_to_abs", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
764 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_if_to_abs", bit_cast<float>(UINT32_C(2141192192)))->to_f32()) == UINT32_C(2141192192));
765 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_if_to_abs", bit_cast<float>(UINT32_C(4290772992)))->to_f32()) == UINT32_C(4290772992));
766 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_if_to_abs", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
767 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_le_if_to_abs", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
768 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_if_to_abs", bit_cast<float>(UINT32_C(2141192192)))->to_f32()) == UINT32_C(4288675840));
769 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_if_to_abs", bit_cast<float>(UINT32_C(4290772992)))->to_f32()) == UINT32_C(2143289344));
770 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_if_to_abs", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
771 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_gt_if_to_abs", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
772 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_if_to_abs", bit_cast<float>(UINT32_C(2141192192)))->to_f32()) == UINT32_C(4288675840));
773 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_if_to_abs", bit_cast<float>(UINT32_C(4290772992)))->to_f32()) == UINT32_C(2143289344));
774 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_if_to_abs", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
775 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_ge_if_to_abs", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
776 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_if_to_abs", bit_cast<double>(UINT64_C(9219994337134247936)))->to_f64()) == UINT64_C(9219994337134247936));
777 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_if_to_abs", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18444492273895866368));
778 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_if_to_abs", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
779 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_lt_if_to_abs", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
780 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_if_to_abs", bit_cast<double>(UINT64_C(9219994337134247936)))->to_f64()) == UINT64_C(9219994337134247936));
781 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_if_to_abs", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18444492273895866368));
782 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_if_to_abs", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
783 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_le_if_to_abs", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
784 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_if_to_abs", bit_cast<double>(UINT64_C(9219994337134247936)))->to_f64()) == UINT64_C(18443366373989023744));
785 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_if_to_abs", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9221120237041090560));
786 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_if_to_abs", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
787 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_gt_if_to_abs", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
788 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_if_to_abs", bit_cast<double>(UINT64_C(9219994337134247936)))->to_f64()) == UINT64_C(18443366373989023744));
789 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_if_to_abs", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9221120237041090560));
790 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_if_to_abs", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
791 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_ge_if_to_abs", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
792}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [42/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_47_wasm>" ,
"" [float_exprs_47_wasm_tests] )

Definition at line 794 of file float_exprs_tests.cpp.

794 {
796 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.47.wasm");
797 backend_t bkend( code, &wa );
798
799 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.incorrect_correction")->to_f32()) == UINT32_C(872415232));
800 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.incorrect_correction")->to_f64()) == UINT64_C(13596367275031527424));
801}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [43/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_48_wasm>" ,
"" [float_exprs_48_wasm_tests] )

Definition at line 803 of file float_exprs_tests.cpp.

803 {
805 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.48.wasm");
806 backend_t bkend( code, &wa );
807
808 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "calculate")->to_f32()) == UINT32_C(3286857379));
809}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [44/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_49_wasm>" ,
"" [float_exprs_49_wasm_tests] )

Definition at line 811 of file float_exprs_tests.cpp.

811 {
813 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.49.wasm");
814 backend_t bkend( code, &wa );
815
816 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "calculate")->to_f64()) == UINT64_C(13870293918930799763));
817}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [45/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_4_wasm>" ,
"" [float_exprs_4_wasm_tests] )

Definition at line 550 of file float_exprs_tests.cpp.

550 {
552 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.4.wasm");
553 backend_t bkend( code, &wa );
554
555 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_sub_zero", bit_cast<float>(UINT32_C(2141192192)))));
556 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_sub_zero", bit_cast<double>(UINT64_C(9219994337134247936)))));
557}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [46/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_50_wasm>" ,
"" [float_exprs_50_wasm_tests] )

Definition at line 834 of file float_exprs_tests.cpp.

834 {
836 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.50.wasm");
837 backend_t bkend( code, &wa );
838
839 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "llvm_pr26746", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
840}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [47/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_51_wasm>" ,
"" [float_exprs_51_wasm_tests] )

Definition at line 842 of file float_exprs_tests.cpp.

842 {
844 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.51.wasm");
845 backend_t bkend( code, &wa );
846
847 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "llvm_pr27153", UINT32_C(33554434))->to_f32()) == UINT32_C(1270874112));
848}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [48/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_52_wasm>" ,
"" [float_exprs_52_wasm_tests] )

Definition at line 850 of file float_exprs_tests.cpp.

850 {
852 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.52.wasm");
853 backend_t bkend( code, &wa );
854
855 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "llvm_pr27036", UINT32_C(4269932491), UINT32_C(14942208))->to_f32()) == UINT32_C(3407478836));
856}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [49/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_53_wasm>" ,
"" [float_exprs_53_wasm_tests] )

Definition at line 858 of file float_exprs_tests.cpp.

858 {
860 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.53.wasm");
861 backend_t bkend( code, &wa );
862
863 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "thepast0", bit_cast<double>(UINT64_C(9007199254740992)), bit_cast<double>(UINT64_C(4607182418800017407)), bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(9007199254740991));
864 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "thepast1", bit_cast<double>(UINT64_C(4363988038922010624)), bit_cast<double>(UINT64_C(4607182418800017407)), bit_cast<double>(UINT64_C(4363988038922010624)))->to_f64()) == UINT64_C(13348669295526150144));
865 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "thepast2", bit_cast<float>(UINT32_C(16777216)), bit_cast<float>(UINT32_C(1056964608)), bit_cast<float>(UINT32_C(1065353216)))->to_f32()) == UINT32_C(8388608));
866}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [50/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_54_wasm>" ,
"" [float_exprs_54_wasm_tests] )

Definition at line 868 of file float_exprs_tests.cpp.

868 {
870 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.54.wasm");
871 backend_t bkend( code, &wa );
872
873 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "inverse", bit_cast<float>(UINT32_C(1119879168)))->to_f32()) == UINT32_C(1009429163));
874}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [51/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_55_wasm>" ,
"" [float_exprs_55_wasm_tests] )

Definition at line 876 of file float_exprs_tests.cpp.

876 {
878 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.55.wasm");
879 backend_t bkend( code, &wa );
880
881 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32_sqrt_minus_2", bit_cast<float>(UINT32_C(1082130432)))->to_f32()) == UINT32_C(0));
882 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64_sqrt_minus_2", bit_cast<double>(UINT64_C(4616189618054758400)))->to_f64()) == UINT64_C(0));
883}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [52/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_56_wasm>" ,
"" [float_exprs_56_wasm_tests] )

Definition at line 885 of file float_exprs_tests.cpp.

885 {
887 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.56.wasm");
888 backend_t bkend( code, &wa );
889
890 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_recip_recip", bit_cast<float>(UINT32_C(3765723020)))->to_f32()) == UINT32_C(3765723019));
891 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_recip_recip", bit_cast<float>(UINT32_C(426844452)))->to_f32()) == UINT32_C(426844451));
892 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_recip_recip", bit_cast<float>(UINT32_C(535132276)))->to_f32()) == UINT32_C(535132277));
893 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_recip_recip", bit_cast<float>(UINT32_C(3253941441)))->to_f32()) == UINT32_C(3253941442));
894 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_recip_recip", bit_cast<float>(UINT32_C(1660734603)))->to_f32()) == UINT32_C(1660734602));
895 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_recip_recip", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
896 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_recip_recip", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
897 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_recip_recip", bit_cast<float>(UINT32_C(4286578688)))->to_f32()) == UINT32_C(4286578688));
898 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_recip_recip", bit_cast<float>(UINT32_C(2139095040)))->to_f32()) == UINT32_C(2139095040));
899 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_recip_recip", bit_cast<double>(UINT64_C(14500888369201570768)))->to_f64()) == UINT64_C(14500888369201570769));
900 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_recip_recip", bit_cast<double>(UINT64_C(14132092565459057123)))->to_f64()) == UINT64_C(14132092565459057122));
901 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_recip_recip", bit_cast<double>(UINT64_C(5359183527603521526)))->to_f64()) == UINT64_C(5359183527603521525));
902 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_recip_recip", bit_cast<double>(UINT64_C(1521566147669375634)))->to_f64()) == UINT64_C(1521566147669375633));
903 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_recip_recip", bit_cast<double>(UINT64_C(8671785631545870379)))->to_f64()) == UINT64_C(8671785631545870378));
904 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_recip_recip", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
905 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_recip_recip", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
906 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_recip_recip", bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(18442240474082181120));
907 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_recip_recip", bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(9218868437227405312));
908}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [53/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_57_wasm>" ,
"" [float_exprs_57_wasm_tests] )

Definition at line 910 of file float_exprs_tests.cpp.

910 {
912 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.57.wasm");
913 backend_t bkend( code, &wa );
914
915 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(2759308231)), bit_cast<float>(UINT32_C(618704988)))->to_f32()) == UINT32_C(2315864577));
916 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(3415653214)), bit_cast<float>(UINT32_C(1274676302)))->to_f32()) == UINT32_C(3625675853));
917 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(1446924633)), bit_cast<float>(UINT32_C(3607373982)))->to_f32()) == UINT32_C(4000155759));
918 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(1212067608)), bit_cast<float>(UINT32_C(3278094810)))->to_f32()) == UINT32_C(1359874131));
919 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(3278732464)), bit_cast<float>(UINT32_C(3379389272)))->to_f32()) == UINT32_C(3546030359));
920 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(2467435761933928117)), bit_cast<double>(UINT64_C(2526113756828458004)))->to_f64()) == UINT64_C(9668435399096543331));
921 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(2911983657790464931)), bit_cast<double>(UINT64_C(2814431682419759911)))->to_f64()) == UINT64_C(1217162942843921803));
922 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(12131637044948792058)), bit_cast<double>(UINT64_C(12170782965730311956)))->to_f64()) == UINT64_C(10511676135434922533));
923 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(14639789466354372633)), bit_cast<double>(UINT64_C(5456963169336729236)))->to_f64()) == UINT64_C(15530333405173431543));
924 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(5121779675912507154)), bit_cast<double>(UINT64_C(14237286623175920791)))->to_f64()) == UINT64_C(5636689734063865714));
925}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [54/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_58_wasm>" ,
"" [float_exprs_58_wasm_tests] )

Definition at line 927 of file float_exprs_tests.cpp.

927 {
929 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.58.wasm");
930 backend_t bkend( code, &wa );
931
932 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(684135946)), bit_cast<float>(UINT32_C(744319693)))->to_f32()) == UINT32_C(2571075368));
933 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(3560929481)), bit_cast<float>(UINT32_C(3496840229)))->to_f32()) == UINT32_C(1762604185));
934 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(968841772)), bit_cast<float>(UINT32_C(3106497100)))->to_f32()) == UINT32_C(870712803));
935 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(697514723)), bit_cast<float>(UINT32_C(2834753933)))->to_f32()) == UINT32_C(327914662));
936 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_algebraic_factoring", bit_cast<float>(UINT32_C(1498230729)), bit_cast<float>(UINT32_C(3650453580)))->to_f32()) == UINT32_C(4080583891));
937 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(6212515167506370409)), bit_cast<double>(UINT64_C(15348474890798978273)))->to_f64()) == UINT64_C(7818515589337550196));
938 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(15222970140370015722)), bit_cast<double>(UINT64_C(15325207139996136125)))->to_f64()) == UINT64_C(16819892485880140289));
939 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(4797439202963874050)), bit_cast<double>(UINT64_C(14009643534571442918)))->to_f64()) == UINT64_C(4987747999326390045));
940 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(14653559129294038194)), bit_cast<double>(UINT64_C(14581996260169223461)))->to_f64()) == UINT64_C(6253339631158964222));
941 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_algebraic_factoring", bit_cast<double>(UINT64_C(12768321634751930140)), bit_cast<double>(UINT64_C(12767602092732820937)))->to_f64()) == UINT64_C(2473652960990319032));
942}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [55/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_59_wasm>" ,
"" [float_exprs_59_wasm_tests] )

Definition at line 944 of file float_exprs_tests.cpp.

944 {
946 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.59.wasm");
947 backend_t bkend( code, &wa );
948
949 CHECK(!bkend.call_with_return("env", "f32.simple_x4_sum", UINT32_C(0), UINT32_C(16), UINT32_C(32)));
950 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.load", UINT32_C(32))->to_f32()) == UINT32_C(2));
951 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.load", UINT32_C(36))->to_f32()) == UINT32_C(0));
952 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.load", UINT32_C(40))->to_f32()) == UINT32_C(1));
953 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.load", UINT32_C(44))->to_f32()) == UINT32_C(2147483649));
954}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [56/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_5_wasm>" ,
"" [float_exprs_5_wasm_tests] )

Definition at line 819 of file float_exprs_tests.cpp.

819 {
821 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.5.wasm");
822 backend_t bkend( code, &wa );
823
824 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_zero", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
825 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_zero", bit_cast<float>(UINT32_C(3212836864)))->to_f32()) == UINT32_C(2147483648));
826 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_zero", bit_cast<float>(UINT32_C(3221225472)))->to_f32()) == UINT32_C(2147483648));
827 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_mul_zero", bit_cast<float>(UINT32_C(2141192192)))));
828 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_zero", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
829 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_zero", bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(9223372036854775808));
830 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_zero", bit_cast<double>(UINT64_C(13835058055282163712)))->to_f64()) == UINT64_C(9223372036854775808));
831 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_mul_zero", bit_cast<double>(UINT64_C(9219994337134247936)))));
832}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [57/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_60_wasm>" ,
"" [float_exprs_60_wasm_tests] )

Definition at line 965 of file float_exprs_tests.cpp.

965 {
967 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.60.wasm");
968 backend_t bkend( code, &wa );
969
970 CHECK(!bkend.call_with_return("env", "f64.simple_x4_sum", UINT32_C(0), UINT32_C(32), UINT32_C(64)));
971 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.load", UINT32_C(64))->to_f64()) == UINT64_C(2));
972 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.load", UINT32_C(72))->to_f64()) == UINT64_C(0));
973 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.load", UINT32_C(80))->to_f64()) == UINT64_C(1));
974 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.load", UINT32_C(88))->to_f64()) == UINT64_C(9223372036854775809));
975}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [58/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_61_wasm>" ,
"" [float_exprs_61_wasm_tests] )

Definition at line 977 of file float_exprs_tests.cpp.

977 {
979 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.61.wasm");
980 backend_t bkend( code, &wa );
981
982 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.kahan_sum", UINT32_C(0), UINT32_C(256))->to_f32()) == UINT32_C(4085779725));
983 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.plain_sum", UINT32_C(0), UINT32_C(256))->to_f32()) == UINT32_C(4082113053));
984}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [59/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_62_wasm>" ,
"" [float_exprs_62_wasm_tests] )

Definition at line 986 of file float_exprs_tests.cpp.

986 {
988 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.62.wasm");
989 backend_t bkend( code, &wa );
990
991 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.kahan_sum", UINT32_C(0), UINT32_C(256))->to_f64()) == UINT64_C(9105671289202277512));
992 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.plain_sum", UINT32_C(0), UINT32_C(256))->to_f64()) == UINT64_C(9105671289202539655));
993}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [60/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_63_wasm>" ,
"" [float_exprs_63_wasm_tests] )

Definition at line 995 of file float_exprs_tests.cpp.

995 {
997 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.63.wasm");
998 backend_t bkend( code, &wa );
999
1000 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_neg_sub", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
1001 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_neg_sub", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
1002 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_neg_sub", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
1003 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_neg_sub", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
1004 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_neg_sub", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
1005 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_neg_sub", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
1006 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_neg_sub", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
1007 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_neg_sub", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
1008}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [61/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_64_wasm>" ,
"" [float_exprs_64_wasm_tests] )

Definition at line 1010 of file float_exprs_tests.cpp.

1010 {
1012 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.64.wasm");
1013 backend_t bkend( code, &wa );
1014
1015 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_neg_add", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
1016 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_neg_add", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(2147483648));
1017 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_neg_add", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
1018 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_neg_add", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
1019 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_neg_add", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
1020 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_neg_add", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
1021 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_neg_add", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
1022 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_neg_add", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
1023}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [62/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_65_wasm>" ,
"" [float_exprs_65_wasm_tests] )

Definition at line 1025 of file float_exprs_tests.cpp.

1025 {
1027 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.65.wasm");
1028 backend_t bkend( code, &wa );
1029
1030 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_neg_neg", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
1031 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_neg_neg", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
1032 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_neg_neg", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
1033 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_neg_neg", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(2147483648));
1034 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_neg_neg", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
1035 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_neg_neg", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
1036 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_neg_neg", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
1037 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_neg_neg", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
1038}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [63/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_66_wasm>" ,
"" [float_exprs_66_wasm_tests] )

Definition at line 1040 of file float_exprs_tests.cpp.

1040 {
1042 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.66.wasm");
1043 backend_t bkend( code, &wa );
1044
1045 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_neg", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(0));
1046 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_neg", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
1047 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_add_neg", bit_cast<float>(UINT32_C(2139095040)))));
1048 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_add_neg", bit_cast<float>(UINT32_C(4286578688)))));
1049 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_neg", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
1050 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_neg", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
1051 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_add_neg", bit_cast<double>(UINT64_C(9218868437227405312)))));
1052 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_add_neg", bit_cast<double>(UINT64_C(18442240474082181120)))));
1053}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [64/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_67_wasm>" ,
"" [float_exprs_67_wasm_tests] )

Definition at line 1055 of file float_exprs_tests.cpp.

1055 {
1057 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.67.wasm");
1058 backend_t bkend( code, &wa );
1059
1060 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_6x_via_add", bit_cast<float>(UINT32_C(4046243078)))->to_f32()) == UINT32_C(4068578245));
1061 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_6x_via_add", bit_cast<float>(UINT32_C(2573857750)))->to_f32()) == UINT32_C(2595190497));
1062 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_6x_via_add", bit_cast<float>(UINT32_C(419462401)))->to_f32()) == UINT32_C(440449921));
1063 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_6x_via_add", bit_cast<float>(UINT32_C(2955475482)))->to_f32()) == UINT32_C(2977789734));
1064 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_6x_via_add", bit_cast<float>(UINT32_C(3883931973)))->to_f32()) == UINT32_C(3904906727));
1065 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_6x_via_add", bit_cast<double>(UINT64_C(14137662215323058150)))->to_f64()) == UINT64_C(14149352706895019994));
1066 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_6x_via_add", bit_cast<double>(UINT64_C(11424134044545165748)))->to_f64()) == UINT64_C(11435767596137037638));
1067 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_6x_via_add", bit_cast<double>(UINT64_C(15055410132664937138)))->to_f64()) == UINT64_C(15066699987142021125));
1068 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_6x_via_add", bit_cast<double>(UINT64_C(7991451501228919438)))->to_f64()) == UINT64_C(8003319959635773419));
1069 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_6x_via_add", bit_cast<double>(UINT64_C(14886926859367497770)))->to_f64()) == UINT64_C(14898679235615764511));
1070}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [65/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_68_wasm>" ,
"" [float_exprs_68_wasm_tests] )

Definition at line 1072 of file float_exprs_tests.cpp.

1072 {
1074 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.68.wasm");
1075 backend_t bkend( code, &wa );
1076
1077 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_div", bit_cast<float>(UINT32_C(3875242260)), bit_cast<float>(UINT32_C(3086869257)), bit_cast<float>(UINT32_C(3301317576)))->to_f32()) == UINT32_C(3911440926));
1078 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_div", bit_cast<float>(UINT32_C(485052055)), bit_cast<float>(UINT32_C(1996083391)), bit_cast<float>(UINT32_C(2276616712)))->to_f32()) == UINT32_C(2147483648));
1079 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_div", bit_cast<float>(UINT32_C(1430470604)), bit_cast<float>(UINT32_C(186144382)), bit_cast<float>(UINT32_C(1953564780)))->to_f32()) == UINT32_C(2139095040));
1080 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_div", bit_cast<float>(UINT32_C(3101818893)), bit_cast<float>(UINT32_C(4258133430)), bit_cast<float>(UINT32_C(2855958950)))->to_f32()) == UINT32_C(2411777082));
1081 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_div", bit_cast<float>(UINT32_C(1458407223)), bit_cast<float>(UINT32_C(1537931089)), bit_cast<float>(UINT32_C(4260989344)))->to_f32()) == UINT32_C(2147507000));
1082 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_div", bit_cast<double>(UINT64_C(6128077243319875447)), bit_cast<double>(UINT64_C(7240092044185667120)), bit_cast<double>(UINT64_C(10312472494987686942)))->to_f64()) == UINT64_C(16236150182064455170));
1083 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_div", bit_cast<double>(UINT64_C(17395933367696573535)), bit_cast<double>(UINT64_C(4478922858584402707)), bit_cast<double>(UINT64_C(6032094754408482817)))->to_f64()) == UINT64_C(16098470347548634769));
1084 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_div", bit_cast<double>(UINT64_C(13843263185226986279)), bit_cast<double>(UINT64_C(17796742619038211051)), bit_cast<double>(UINT64_C(5375701731263473827)))->to_f64()) == UINT64_C(44472927));
1085 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_div", bit_cast<double>(UINT64_C(17547288444310957340)), bit_cast<double>(UINT64_C(911654786857739111)), bit_cast<double>(UINT64_C(8937284546802896640)))->to_f64()) == UINT64_C(18442240474082181120));
1086 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_div", bit_cast<double>(UINT64_C(9835707468114203513)), bit_cast<double>(UINT64_C(1924400690116523912)), bit_cast<double>(UINT64_C(13208934041167870811)))->to_f64()) == UINT64_C(3916014548332337260));
1087}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [66/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_69_wasm>" ,
"" [float_exprs_69_wasm_tests] )

Definition at line 1089 of file float_exprs_tests.cpp.

1089 {
1091 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.69.wasm");
1092 backend_t bkend( code, &wa );
1093
1094 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_divs", bit_cast<float>(UINT32_C(2304917983)), bit_cast<float>(UINT32_C(301403678)), bit_cast<float>(UINT32_C(331350955)), bit_cast<float>(UINT32_C(3251297465)))->to_f32()) == UINT32_C(148760966));
1095 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_divs", bit_cast<float>(UINT32_C(4068974897)), bit_cast<float>(UINT32_C(1276265036)), bit_cast<float>(UINT32_C(930821438)), bit_cast<float>(UINT32_C(1044692964)))->to_f32()) == UINT32_C(3742862674));
1096 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_divs", bit_cast<float>(UINT32_C(3496980369)), bit_cast<float>(UINT32_C(3548280607)), bit_cast<float>(UINT32_C(3461305482)), bit_cast<float>(UINT32_C(3298174616)))->to_f32()) == UINT32_C(1176926862));
1097 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_divs", bit_cast<float>(UINT32_C(4135236702)), bit_cast<float>(UINT32_C(787270424)), bit_cast<float>(UINT32_C(932959293)), bit_cast<float>(UINT32_C(1724950821)))->to_f32()) == UINT32_C(4286578688));
1098 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_divs", bit_cast<float>(UINT32_C(622783177)), bit_cast<float>(UINT32_C(2677642769)), bit_cast<float>(UINT32_C(307759154)), bit_cast<float>(UINT32_C(768171421)))->to_f32()) == UINT32_C(2844661464));
1099 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_divs", bit_cast<double>(UINT64_C(10143060558527560466)), bit_cast<double>(UINT64_C(11745059379675007839)), bit_cast<double>(UINT64_C(16295837305232663584)), bit_cast<double>(UINT64_C(5444961058358534642)))->to_f64()) == UINT64_C(13856326607560224491));
1100 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_divs", bit_cast<double>(UINT64_C(14349445329289351080)), bit_cast<double>(UINT64_C(468238185841254727)), bit_cast<double>(UINT64_C(15463559257629249878)), bit_cast<double>(UINT64_C(15937497686185055572)))->to_f64()) == UINT64_C(18442240474082181120));
1101 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_divs", bit_cast<double>(UINT64_C(15220380342429201729)), bit_cast<double>(UINT64_C(14697937818549468616)), bit_cast<double>(UINT64_C(13203624158275174657)), bit_cast<double>(UINT64_C(17131104131485469546)))->to_f64()) == UINT64_C(1202126128702318245));
1102 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_divs", bit_cast<double>(UINT64_C(14414969397981384765)), bit_cast<double>(UINT64_C(12269327994486371199)), bit_cast<double>(UINT64_C(298707625567048656)), bit_cast<double>(UINT64_C(5613107161545919917)))->to_f64()) == UINT64_C(0));
1103 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_divs", bit_cast<double>(UINT64_C(4529089342618677929)), bit_cast<double>(UINT64_C(3361245300043094097)), bit_cast<double>(UINT64_C(1815899012046749567)), bit_cast<double>(UINT64_C(15418396504351552390)))->to_f64()) == UINT64_C(10619033301585441215));
1104}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [67/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_6_wasm>" ,
"" [float_exprs_6_wasm_tests] )

Definition at line 956 of file float_exprs_tests.cpp.

956 {
958 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.6.wasm");
959 backend_t bkend( code, &wa );
960
961 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_mul_one", bit_cast<float>(UINT32_C(2141192192)))));
962 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_mul_one", bit_cast<double>(UINT64_C(9219994337134247936)))));
963}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [68/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_70_wasm>" ,
"" [float_exprs_70_wasm_tests] )

Definition at line 1121 of file float_exprs_tests.cpp.

1121 {
1123 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.70.wasm");
1124 backend_t bkend( code, &wa );
1125
1126 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_divs", bit_cast<float>(UINT32_C(1136439096)), bit_cast<float>(UINT32_C(3173274359)), bit_cast<float>(UINT32_C(4274852390)))->to_f32()) == UINT32_C(2221638875));
1127 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_divs", bit_cast<float>(UINT32_C(2690073844)), bit_cast<float>(UINT32_C(2809448479)), bit_cast<float>(UINT32_C(3608905030)))->to_f32()) == UINT32_C(264862203));
1128 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_divs", bit_cast<float>(UINT32_C(2830184964)), bit_cast<float>(UINT32_C(530019033)), bit_cast<float>(UINT32_C(3623253973)))->to_f32()) == UINT32_C(272108594));
1129 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_divs", bit_cast<float>(UINT32_C(2365787800)), bit_cast<float>(UINT32_C(245111369)), bit_cast<float>(UINT32_C(3952003433)))->to_f32()) == UINT32_C(0));
1130 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_add_divs", bit_cast<float>(UINT32_C(982471119)), bit_cast<float>(UINT32_C(1045692415)), bit_cast<float>(UINT32_C(37216954)))->to_f32()) == UINT32_C(2073319791));
1131 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_divs", bit_cast<double>(UINT64_C(15770585325769044278)), bit_cast<double>(UINT64_C(6564157675451289455)), bit_cast<double>(UINT64_C(8712254759989822359)))->to_f64()) == UINT64_C(2458462832069881218));
1132 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_divs", bit_cast<double>(UINT64_C(14069844870254671283)), bit_cast<double>(UINT64_C(4634122757084803708)), bit_cast<double>(UINT64_C(9524897388132352235)))->to_f64()) == UINT64_C(9152039358940941283));
1133 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_divs", bit_cast<double>(UINT64_C(9479648703296052622)), bit_cast<double>(UINT64_C(214573661502224386)), bit_cast<double>(UINT64_C(6877551490107761946)))->to_f64()) == UINT64_C(0));
1134 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_divs", bit_cast<double>(UINT64_C(6019502660029506228)), bit_cast<double>(UINT64_C(15316513033818836241)), bit_cast<double>(UINT64_C(4039967192182502935)))->to_f64()) == UINT64_C(15883525310425977300));
1135 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_add_divs", bit_cast<double>(UINT64_C(10555667216821129841)), bit_cast<double>(UINT64_C(1207418919037494573)), bit_cast<double>(UINT64_C(4296330408727545598)))->to_f64()) == UINT64_C(10866511466898347555));
1136}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [69/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_71_wasm>" ,
"" [float_exprs_71_wasm_tests] )

Definition at line 1138 of file float_exprs_tests.cpp.

1138 {
1140 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.71.wasm");
1141 backend_t bkend( code, &wa );
1142
1143 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sqrt_square", bit_cast<float>(UINT32_C(2662226315)))->to_f32()) == UINT32_C(514742673));
1144 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sqrt_square", bit_cast<float>(UINT32_C(2606267634)))->to_f32()) == UINT32_C(458819801));
1145 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sqrt_square", bit_cast<float>(UINT32_C(2624528574)))->to_f32()) == UINT32_C(477049564));
1146 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sqrt_square", bit_cast<float>(UINT32_C(347235385)))->to_f32()) == UINT32_C(0));
1147 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sqrt_square", bit_cast<float>(UINT32_C(1978715378)))->to_f32()) == UINT32_C(2139095040));
1148 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sqrt_square", bit_cast<double>(UINT64_C(2225189009770021885)))->to_f64()) == UINT64_C(2225189011649283571));
1149 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sqrt_square", bit_cast<double>(UINT64_C(11517048459773840771)))->to_f64()) == UINT64_C(2293676422919064961));
1150 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sqrt_square", bit_cast<double>(UINT64_C(11484764485761855006)))->to_f64()) == UINT64_C(2261392448906973069));
1151 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sqrt_square", bit_cast<double>(UINT64_C(11056484744549647728)))->to_f64()) == UINT64_C(0));
1152 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sqrt_square", bit_cast<double>(UINT64_C(8465406758332488378)))->to_f64()) == UINT64_C(9218868437227405312));
1153}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [70/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_72_wasm>" ,
"" [float_exprs_72_wasm_tests] )

Definition at line 1155 of file float_exprs_tests.cpp.

1155 {
1157 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.72.wasm");
1158 backend_t bkend( code, &wa );
1159
1160 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_mul_sqrts", bit_cast<float>(UINT32_C(24047316)), bit_cast<float>(UINT32_C(2517821717)))));
1161 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_sqrts", bit_cast<float>(UINT32_C(295749258)), bit_cast<float>(UINT32_C(803416494)))->to_f32()) == UINT32_C(549395357));
1162 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_sqrts", bit_cast<float>(UINT32_C(329708528)), bit_cast<float>(UINT32_C(1120042892)))->to_f32()) == UINT32_C(724841268));
1163 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_sqrts", bit_cast<float>(UINT32_C(1916535951)), bit_cast<float>(UINT32_C(994115420)))->to_f32()) == UINT32_C(1455324620));
1164 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_sqrts", bit_cast<float>(UINT32_C(598482176)), bit_cast<float>(UINT32_C(990534933)))->to_f32()) == UINT32_C(794443079));
1165 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_mul_sqrts", bit_cast<double>(UINT64_C(10974446854152441278)), bit_cast<double>(UINT64_C(13797896470155574122)))));
1166 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_sqrts", bit_cast<double>(UINT64_C(1712959863583927241)), bit_cast<double>(UINT64_C(2792003944717853898)))->to_f64()) == UINT64_C(2252469008297979510));
1167 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_sqrts", bit_cast<double>(UINT64_C(4208351758938831157)), bit_cast<double>(UINT64_C(497361189565243603)))->to_f64()) == UINT64_C(2352856462697312748));
1168 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_sqrts", bit_cast<double>(UINT64_C(2976792199849816182)), bit_cast<double>(UINT64_C(2030444188042608984)))->to_f64()) == UINT64_C(2503613111125550255));
1169 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_sqrts", bit_cast<double>(UINT64_C(4717634334691577101)), bit_cast<double>(UINT64_C(6919598687070693285)))->to_f64()) == UINT64_C(5818898567902921651));
1170}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [71/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_73_wasm>" ,
"" [float_exprs_73_wasm_tests] )

Definition at line 1172 of file float_exprs_tests.cpp.

1172 {
1174 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.73.wasm");
1175 backend_t bkend( code, &wa );
1176
1177 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_sqrts", bit_cast<float>(UINT32_C(3428799709)), bit_cast<float>(UINT32_C(2733489079)))));
1178 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_sqrts", bit_cast<float>(UINT32_C(1339867611)), bit_cast<float>(UINT32_C(1296568207)))->to_f32()) == UINT32_C(1086203643));
1179 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_sqrts", bit_cast<float>(UINT32_C(65679161)), bit_cast<float>(UINT32_C(1196795110)))->to_f32()) == UINT32_C(498959746));
1180 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_sqrts", bit_cast<float>(UINT32_C(1566143010)), bit_cast<float>(UINT32_C(816694667)))->to_f32()) == UINT32_C(1439333972));
1181 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_div_sqrts", bit_cast<float>(UINT32_C(130133331)), bit_cast<float>(UINT32_C(208189588)))->to_f32()) == UINT32_C(1025844032));
1182 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_sqrts", bit_cast<double>(UINT64_C(10629913473787695463)), bit_cast<double>(UINT64_C(12991130264919696663)))));
1183 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_sqrts", bit_cast<double>(UINT64_C(1966780663211935584)), bit_cast<double>(UINT64_C(7043916066229883379)))->to_f64()) == UINT64_C(2068364230648818889));
1184 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_sqrts", bit_cast<double>(UINT64_C(6965599900716272009)), bit_cast<double>(UINT64_C(4118781927977980600)))->to_f64()) == UINT64_C(6030491425828883991));
1185 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_sqrts", bit_cast<double>(UINT64_C(962551478168675351)), bit_cast<double>(UINT64_C(5918292176617055751)))->to_f64()) == UINT64_C(2129092583060403799));
1186 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_div_sqrts", bit_cast<double>(UINT64_C(1056821405580891413)), bit_cast<double>(UINT64_C(8865548665903786673)))->to_f64()) == UINT64_C(702724841785532050));
1187}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [72/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_74_wasm>" ,
"" [float_exprs_74_wasm_tests] )

Definition at line 1189 of file float_exprs_tests.cpp.

1189 {
1191 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.74.wasm");
1192 backend_t bkend( code, &wa );
1193
1194 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_sqrt_div", bit_cast<float>(UINT32_C(3900330981)), bit_cast<float>(UINT32_C(1843416431)))->to_f32()) == UINT32_C(4286578688));
1195 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_sqrt_div", bit_cast<float>(UINT32_C(2210946958)), bit_cast<float>(UINT32_C(256302916)))->to_f32()) == UINT32_C(2147483648));
1196 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_sqrt_div", bit_cast<float>(UINT32_C(1312995444)), bit_cast<float>(UINT32_C(2371494)))->to_f32()) == UINT32_C(1849105549));
1197 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_sqrt_div", bit_cast<float>(UINT32_C(3576537897)), bit_cast<float>(UINT32_C(2010442638)))->to_f32()) == UINT32_C(3104219421));
1198 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_mul_sqrt_div", bit_cast<float>(UINT32_C(3284697858)), bit_cast<float>(UINT32_C(1124488329)))->to_f32()) == UINT32_C(3255461622));
1199 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_sqrt_div", bit_cast<double>(UINT64_C(7751219282814906463)), bit_cast<double>(UINT64_C(8023732701704228537)))->to_f64()) == UINT64_C(9218868437227405312));
1200 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_sqrt_div", bit_cast<double>(UINT64_C(10108528314069607083)), bit_cast<double>(UINT64_C(1595930056995453707)))->to_f64()) == UINT64_C(9223372036854775808));
1201 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_sqrt_div", bit_cast<double>(UINT64_C(2695209648295623224)), bit_cast<double>(UINT64_C(7133480874314061811)))->to_f64()) == UINT64_C(1432338140829931582));
1202 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_sqrt_div", bit_cast<double>(UINT64_C(15416524255949334213)), bit_cast<double>(UINT64_C(2434442666062773630)))->to_f64()) == UINT64_C(16502590179898118478));
1203 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_mul_sqrt_div", bit_cast<double>(UINT64_C(5076901024782455083)), bit_cast<double>(UINT64_C(8399438310541178654)))->to_f64()) == UINT64_C(3180744754328846996));
1204}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [73/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_75_wasm>" ,
"" [float_exprs_75_wasm_tests] )

Definition at line 1206 of file float_exprs_tests.cpp.

1206 {
1208 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.75.wasm");
1209 backend_t bkend( code, &wa );
1210
1211 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_flush_intermediate_subnormal", bit_cast<float>(UINT32_C(8388608)), bit_cast<float>(UINT32_C(872415232)), bit_cast<float>(UINT32_C(1258291200)))->to_f32()) == UINT32_C(8388608));
1212 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_flush_intermediate_subnormal", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(4372995238176751616)), bit_cast<double>(UINT64_C(4841369599423283200)))->to_f64()) == UINT64_C(4503599627370496));
1213}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [74/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_76_wasm>" ,
"" [float_exprs_76_wasm_tests] )

Definition at line 1215 of file float_exprs_tests.cpp.

1215 {
1217 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.76.wasm");
1218 backend_t bkend( code, &wa );
1219
1220 CHECK(bkend.call_with_return("env", "f32.recoding_eq", bit_cast<float>(UINT32_C(4286578688)), bit_cast<float>(UINT32_C(1077936128)))->to_ui32() == UINT32_C(1));
1221 CHECK(bkend.call_with_return("env", "f32.recoding_le", bit_cast<float>(UINT32_C(4286578688)), bit_cast<float>(UINT32_C(1077936128)))->to_ui32() == UINT32_C(1));
1222 CHECK(bkend.call_with_return("env", "f32.recoding_lt", bit_cast<float>(UINT32_C(4286578688)), bit_cast<float>(UINT32_C(1077936128)))->to_ui32() == UINT32_C(0));
1223 CHECK(bkend.call_with_return("env", "f32.recoding_eq", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(1065353216)))->to_ui32() == UINT32_C(1));
1224 CHECK(bkend.call_with_return("env", "f32.recoding_le", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(1065353216)))->to_ui32() == UINT32_C(1));
1225 CHECK(bkend.call_with_return("env", "f32.recoding_lt", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(1065353216)))->to_ui32() == UINT32_C(0));
1226 CHECK(bkend.call_with_return("env", "f64.recoding_eq", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_ui32() == UINT32_C(1));
1227 CHECK(bkend.call_with_return("env", "f64.recoding_le", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_ui32() == UINT32_C(1));
1228 CHECK(bkend.call_with_return("env", "f64.recoding_lt", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_ui32() == UINT32_C(0));
1229 CHECK(bkend.call_with_return("env", "f64.recoding_eq", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_ui32() == UINT32_C(1));
1230 CHECK(bkend.call_with_return("env", "f64.recoding_le", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_ui32() == UINT32_C(1));
1231 CHECK(bkend.call_with_return("env", "f64.recoding_lt", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_ui32() == UINT32_C(0));
1232 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "recoding_demote", bit_cast<double>(UINT64_C(4014054135371399168)), bit_cast<float>(UINT32_C(1150853120)))->to_f32()) == UINT32_C(46548238));
1233}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [75/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_77_wasm>" ,
"" [float_exprs_77_wasm_tests] )

Definition at line 1235 of file float_exprs_tests.cpp.

1235 {
1237 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.77.wasm");
1238 backend_t bkend( code, &wa );
1239
1240 CHECK(bkend.call_with_return("env", "f32.no_extended_precision_div", bit_cast<float>(UINT32_C(1077936128)), bit_cast<float>(UINT32_C(1088421888)), bit_cast<float>(UINT32_C(1054567863)))->to_ui32() == UINT32_C(1));
1241 CHECK(bkend.call_with_return("env", "f64.no_extended_precision_div", bit_cast<double>(UINT64_C(4613937818241073152)), bit_cast<double>(UINT64_C(4619567317775286272)), bit_cast<double>(UINT64_C(4601392076421969627)))->to_ui32() == UINT32_C(1));
1242}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [76/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_78_wasm>" ,
"" [float_exprs_78_wasm_tests] )

Definition at line 1244 of file float_exprs_tests.cpp.

1244 {
1246 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.78.wasm");
1247 backend_t bkend( code, &wa );
1248
1249 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_distribute_exact", bit_cast<float>(UINT32_C(2147483648)))->to_f32()) == UINT32_C(0));
1250 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_distribute_exact", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
1251}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [77/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_79_wasm>" ,
"" [float_exprs_79_wasm_tests] )

Definition at line 1253 of file float_exprs_tests.cpp.

1253 {
1255 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.79.wasm");
1256 backend_t bkend( code, &wa );
1257
1258 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.sqrt", bit_cast<float>(UINT32_C(1073741824)))->to_f32()) == UINT32_C(1068827891));
1259 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.xkcd_sqrt_2", bit_cast<float>(UINT32_C(1077936128)), bit_cast<float>(UINT32_C(1084227584)), bit_cast<float>(UINT32_C(1078530011)), bit_cast<float>(UINT32_C(1088421888)))->to_f32()) == UINT32_C(1068827946));
1260 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.sqrt", bit_cast<float>(UINT32_C(1077936128)))->to_f32()) == UINT32_C(1071494103));
1261 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.xkcd_sqrt_3", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1076754516)), bit_cast<float>(UINT32_C(1078530011)))->to_f32()) == UINT32_C(1071481194));
1262 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.sqrt", bit_cast<float>(UINT32_C(1084227584)))->to_f32()) == UINT32_C(1074731965));
1263 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.xkcd_sqrt_5", bit_cast<float>(UINT32_C(1073741824)), bit_cast<float>(UINT32_C(1076754516)), bit_cast<float>(UINT32_C(1077936128)))->to_f32()) == UINT32_C(1074730668));
1264 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.xkcd_better_sqrt_5", bit_cast<float>(UINT32_C(1095761920)), bit_cast<float>(UINT32_C(1082130432)), bit_cast<float>(UINT32_C(1078530011)), bit_cast<float>(UINT32_C(1103101952)))->to_f32()) == UINT32_C(1074731965));
1265 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.sqrt", bit_cast<double>(UINT64_C(4611686018427387904)))->to_f64()) == UINT64_C(4609047870845172685));
1266 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.xkcd_sqrt_2", bit_cast<double>(UINT64_C(4613937818241073152)), bit_cast<double>(UINT64_C(4617315517961601024)), bit_cast<double>(UINT64_C(4614256656552045848)), bit_cast<double>(UINT64_C(4619567317775286272)))->to_f64()) == UINT64_C(4609047900099118431));
1267 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.sqrt", bit_cast<double>(UINT64_C(4613937818241073152)))->to_f64()) == UINT64_C(4610479282544200874));
1268 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.xkcd_sqrt_3", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4613303445314885481)), bit_cast<double>(UINT64_C(4614256656552045848)))->to_f64()) == UINT64_C(4610472352185749397));
1269 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.sqrt", bit_cast<double>(UINT64_C(4617315517961601024)))->to_f64()) == UINT64_C(4612217596255138984));
1270 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.xkcd_sqrt_5", bit_cast<double>(UINT64_C(4611686018427387904)), bit_cast<double>(UINT64_C(4613303445314885481)), bit_cast<double>(UINT64_C(4613937818241073152)))->to_f64()) == UINT64_C(4612216900234722254));
1271 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.xkcd_better_sqrt_5", bit_cast<double>(UINT64_C(4623507967449235456)), bit_cast<double>(UINT64_C(4616189618054758400)), bit_cast<double>(UINT64_C(4614256656552045848)), bit_cast<double>(UINT64_C(4627448617123184640)))->to_f64()) == UINT64_C(4612217595876713891));
1272}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [78/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_7_wasm>" ,
"" [float_exprs_7_wasm_tests] )

Definition at line 1106 of file float_exprs_tests.cpp.

1106 {
1108 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.7.wasm");
1109 backend_t bkend( code, &wa );
1110
1111 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_zero_div", bit_cast<float>(UINT32_C(0)))));
1112 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_zero_div", bit_cast<float>(UINT32_C(2147483648)))));
1113 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_zero_div", bit_cast<float>(UINT32_C(2143289344)))));
1114 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_zero_div", bit_cast<float>(UINT32_C(2141192192)))));
1115 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_zero_div", bit_cast<double>(UINT64_C(0)))));
1116 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_zero_div", bit_cast<double>(UINT64_C(9223372036854775808)))));
1117 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_zero_div", bit_cast<double>(UINT64_C(9221120237041090560)))));
1118 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_zero_div", bit_cast<double>(UINT64_C(9219994337134247936)))));
1119}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [79/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_80_wasm>" ,
"" [float_exprs_80_wasm_tests] )

Definition at line 1283 of file float_exprs_tests.cpp.

1283 {
1285 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.80.wasm");
1286 backend_t bkend( code, &wa );
1287
1288 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.compute_radix", bit_cast<float>(UINT32_C(1065353216)), bit_cast<float>(UINT32_C(1065353216)))->to_f32()) == UINT32_C(1073741824));
1289 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.compute_radix", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4611686018427387904));
1290}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [80/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_81_wasm>" ,
"" [float_exprs_81_wasm_tests] )

Definition at line 1292 of file float_exprs_tests.cpp.

1292 {
1294 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.81.wasm");
1295 backend_t bkend( code, &wa );
1296
1297 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_sub1_mul_add", bit_cast<float>(UINT32_C(796917760)), bit_cast<float>(UINT32_C(1065353216)))->to_f32()) == UINT32_C(0));
1298 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_sub1_mul_add", bit_cast<double>(UINT64_C(4318952042648305664)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(0));
1299}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [81/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_82_wasm>" ,
"" [float_exprs_82_wasm_tests] )

Definition at line 1301 of file float_exprs_tests.cpp.

1301 {
1303 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.82.wasm");
1304 backend_t bkend( code, &wa );
1305
1306 CHECK(bkend.call_with_return("env", "f32.no_fold_add_le_monotonicity", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(0));
1307 CHECK(bkend.call_with_return("env", "f32.no_fold_add_le_monotonicity", bit_cast<float>(UINT32_C(2139095040)), bit_cast<float>(UINT32_C(4286578688)), bit_cast<float>(UINT32_C(2139095040)))->to_ui32() == UINT32_C(0));
1308 CHECK(bkend.call_with_return("env", "f64.no_fold_add_le_monotonicity", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(0));
1309 CHECK(bkend.call_with_return("env", "f64.no_fold_add_le_monotonicity", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_ui32() == UINT32_C(0));
1310}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [82/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_83_wasm>" ,
"" [float_exprs_83_wasm_tests] )

Definition at line 1312 of file float_exprs_tests.cpp.

1312 {
1314 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.83.wasm");
1315 backend_t bkend( code, &wa );
1316
1317 CHECK(bkend.call_with_return("env", "f32.not_lt", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_ui32() == UINT32_C(1));
1318 CHECK(bkend.call_with_return("env", "f32.not_le", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_ui32() == UINT32_C(1));
1319 CHECK(bkend.call_with_return("env", "f32.not_gt", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_ui32() == UINT32_C(1));
1320 CHECK(bkend.call_with_return("env", "f32.not_ge", bit_cast<float>(UINT32_C(2143289344)), bit_cast<float>(UINT32_C(0)))->to_ui32() == UINT32_C(1));
1321 CHECK(bkend.call_with_return("env", "f64.not_lt", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_ui32() == UINT32_C(1));
1322 CHECK(bkend.call_with_return("env", "f64.not_le", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_ui32() == UINT32_C(1));
1323 CHECK(bkend.call_with_return("env", "f64.not_gt", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_ui32() == UINT32_C(1));
1324 CHECK(bkend.call_with_return("env", "f64.not_ge", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_ui32() == UINT32_C(1));
1325}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [83/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_84_wasm>" ,
"" [float_exprs_84_wasm_tests] )

Definition at line 1327 of file float_exprs_tests.cpp.

1327 {
1329 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.84.wasm");
1330 backend_t bkend( code, &wa );
1331
1332 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.epsilon")->to_f32()) == UINT32_C(3019898880));
1333 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.epsilon")->to_f64()) == UINT64_C(4372995238176751616));
1334}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [84/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_85_wasm>" ,
"" [float_exprs_85_wasm_tests] )

Definition at line 1336 of file float_exprs_tests.cpp.

1336 {
1338 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.85.wasm");
1339 backend_t bkend( code, &wa );
1340
1341 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.epsilon")->to_f32()) == UINT32_C(872415232));
1342 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.epsilon")->to_f64()) == UINT64_C(4372995238176751616));
1343}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [85/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_86_wasm>" ,
"" [float_exprs_86_wasm_tests] )

Definition at line 1345 of file float_exprs_tests.cpp.

1345 {
1347 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.86.wasm");
1348 backend_t bkend( code, &wa );
1349
1350 CHECK(bkend.call_with_return("env", "f32.no_trichotomy_lt", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(0));
1351 CHECK(bkend.call_with_return("env", "f32.no_trichotomy_le", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(0));
1352 CHECK(bkend.call_with_return("env", "f32.no_trichotomy_gt", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(0));
1353 CHECK(bkend.call_with_return("env", "f32.no_trichotomy_ge", bit_cast<float>(UINT32_C(0)), bit_cast<float>(UINT32_C(2143289344)))->to_ui32() == UINT32_C(0));
1354 CHECK(bkend.call_with_return("env", "f64.no_trichotomy_lt", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(0));
1355 CHECK(bkend.call_with_return("env", "f64.no_trichotomy_le", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(0));
1356 CHECK(bkend.call_with_return("env", "f64.no_trichotomy_gt", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(0));
1357 CHECK(bkend.call_with_return("env", "f64.no_trichotomy_ge", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_ui32() == UINT32_C(0));
1358}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [86/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_87_wasm>" ,
"" [float_exprs_87_wasm_tests] )

Definition at line 1360 of file float_exprs_tests.cpp.

1360 {
1362 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.87.wasm");
1363 backend_t bkend( code, &wa );
1364
1365 CHECK(bkend.call_with_return("env", "f32.arithmetic_nan_bitpattern", UINT32_C(2139107856), UINT32_C(2139107856))->to_ui32() == UINT32_C(2143289344));
1366 CHECK(bkend.call_with_return("env", "f32.canonical_nan_bitpattern", UINT32_C(0), UINT32_C(0))->to_ui32() == UINT32_C(2143289344));
1367 CHECK(bkend.call_with_return("env", "f32.canonical_nan_bitpattern", UINT32_C(2143289344), UINT32_C(2143289344))->to_ui32() == UINT32_C(2143289344));
1368 CHECK(bkend.call_with_return("env", "f32.canonical_nan_bitpattern", UINT32_C(4290772992), UINT32_C(2143289344))->to_ui32() == UINT32_C(2143289344));
1369 CHECK(bkend.call_with_return("env", "f32.canonical_nan_bitpattern", UINT32_C(2143289344), UINT32_C(4290772992))->to_ui32() == UINT32_C(2143289344));
1370 CHECK(bkend.call_with_return("env", "f32.canonical_nan_bitpattern", UINT32_C(4290772992), UINT32_C(4290772992))->to_ui32() == UINT32_C(2143289344));
1371 CHECK(bkend.call_with_return("env", "f32.nonarithmetic_nan_bitpattern", UINT32_C(2143302160))->to_ui32() == UINT32_C(4290785808));
1372 CHECK(bkend.call_with_return("env", "f32.nonarithmetic_nan_bitpattern", UINT32_C(4290785808))->to_ui32() == UINT32_C(2143302160));
1373 CHECK(bkend.call_with_return("env", "f32.nonarithmetic_nan_bitpattern", UINT32_C(2139107856))->to_ui32() == UINT32_C(4286591504));
1374 CHECK(bkend.call_with_return("env", "f32.nonarithmetic_nan_bitpattern", UINT32_C(4286591504))->to_ui32() == UINT32_C(2139107856));
1375 CHECK(bkend.call_with_return("env", "f64.arithmetic_nan_bitpattern", UINT64_C(9218868437227418128), UINT64_C(9218868437227418128))->to_ui64() == UINT32_C(9221120237041090560));
1376 CHECK(bkend.call_with_return("env", "f64.canonical_nan_bitpattern", UINT64_C(0), UINT64_C(0))->to_ui64() == UINT32_C(9221120237041090560));
1377 CHECK(bkend.call_with_return("env", "f64.canonical_nan_bitpattern", UINT64_C(9221120237041090560), UINT64_C(9221120237041090560))->to_ui64() == UINT32_C(9221120237041090560));
1378 CHECK(bkend.call_with_return("env", "f64.canonical_nan_bitpattern", UINT64_C(18444492273895866368), UINT64_C(9221120237041090560))->to_ui64() == UINT32_C(9221120237041090560));
1379 CHECK(bkend.call_with_return("env", "f64.canonical_nan_bitpattern", UINT64_C(9221120237041090560), UINT64_C(18444492273895866368))->to_ui64() == UINT32_C(9221120237041090560));
1380 CHECK(bkend.call_with_return("env", "f64.canonical_nan_bitpattern", UINT64_C(18444492273895866368), UINT64_C(18444492273895866368))->to_ui64() == UINT32_C(9221120237041090560));
1381 CHECK(bkend.call_with_return("env", "f64.nonarithmetic_nan_bitpattern", UINT64_C(9221120237041103376))->to_ui64() == UINT32_C(18444492273895879184));
1382 CHECK(bkend.call_with_return("env", "f64.nonarithmetic_nan_bitpattern", UINT64_C(18444492273895879184))->to_ui64() == UINT32_C(9221120237041103376));
1383 CHECK(bkend.call_with_return("env", "f64.nonarithmetic_nan_bitpattern", UINT64_C(9218868437227418128))->to_ui64() == UINT32_C(18442240474082193936));
1384 CHECK(bkend.call_with_return("env", "f64.nonarithmetic_nan_bitpattern", UINT64_C(18442240474082193936))->to_ui64() == UINT32_C(9218868437227418128));
1385 CHECK(bkend.call_with_return("env", "f32.no_fold_sub_zero", UINT32_C(2141192192))->to_ui32() == UINT32_C(2143289344));
1386 CHECK(bkend.call_with_return("env", "f32.no_fold_neg0_sub", UINT32_C(2141192192))->to_ui32() == UINT32_C(2143289344));
1387 CHECK(bkend.call_with_return("env", "f32.no_fold_mul_one", UINT32_C(2141192192))->to_ui32() == UINT32_C(2143289344));
1388 CHECK(bkend.call_with_return("env", "f32.no_fold_neg1_mul", UINT32_C(2141192192))->to_ui32() == UINT32_C(2143289344));
1389 CHECK(bkend.call_with_return("env", "f32.no_fold_div_one", UINT32_C(2141192192))->to_ui32() == UINT32_C(2143289344));
1390 CHECK(bkend.call_with_return("env", "f32.no_fold_div_neg1", UINT32_C(2141192192))->to_ui32() == UINT32_C(2143289344));
1391 CHECK(bkend.call_with_return("env", "f64.no_fold_sub_zero", UINT64_C(9219994337134247936))->to_ui64() == UINT32_C(9221120237041090560));
1392 CHECK(bkend.call_with_return("env", "f64.no_fold_neg0_sub", UINT64_C(9219994337134247936))->to_ui64() == UINT32_C(9221120237041090560));
1393 CHECK(bkend.call_with_return("env", "f64.no_fold_mul_one", UINT64_C(9219994337134247936))->to_ui64() == UINT32_C(9221120237041090560));
1394 CHECK(bkend.call_with_return("env", "f64.no_fold_neg1_mul", UINT64_C(9219994337134247936))->to_ui64() == UINT32_C(9221120237041090560));
1395 CHECK(bkend.call_with_return("env", "f64.no_fold_div_one", UINT64_C(9219994337134247936))->to_ui64() == UINT32_C(9221120237041090560));
1396 CHECK(bkend.call_with_return("env", "f64.no_fold_div_neg1", UINT64_C(9219994337134247936))->to_ui64() == UINT32_C(9221120237041090560));
1397 CHECK(bkend.call_with_return("env", "no_fold_promote_demote", UINT32_C(2141192192))->to_ui32() == UINT32_C(2143289344));
1398}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [87/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_88_wasm>" ,
"" [float_exprs_88_wasm_tests] )

Definition at line 1400 of file float_exprs_tests.cpp.

1400 {
1402 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.88.wasm");
1403 backend_t bkend( code, &wa );
1404
1405 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "dot_product_example", bit_cast<double>(UINT64_C(4719355144821538816)), bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(4725141118604279808)), bit_cast<double>(UINT64_C(4720637518976909312)), bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(13938223582048944128)))->to_f64()) == UINT64_C(4611686018427387904));
1406 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "with_binary_sum_collapse", bit_cast<double>(UINT64_C(4719355144821538816)), bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(4725141118604279808)), bit_cast<double>(UINT64_C(4720637518976909312)), bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(13938223582048944128)))->to_f64()) == UINT64_C(4611686018427387904));
1407}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [88/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_89_wasm>" ,
"" [float_exprs_89_wasm_tests] )

Definition at line 1409 of file float_exprs_tests.cpp.

1409 {
1411 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.89.wasm");
1412 backend_t bkend( code, &wa );
1413
1414 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.contract2fma", bit_cast<float>(UINT32_C(1065353216)), bit_cast<float>(UINT32_C(1065353216)))->to_f32()) == UINT32_C(0));
1415 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.contract2fma", bit_cast<float>(UINT32_C(1066192077)), bit_cast<float>(UINT32_C(1066192077)))->to_f32()) == UINT32_C(0));
1416 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.contract2fma", bit_cast<float>(UINT32_C(1067030937)), bit_cast<float>(UINT32_C(1067030937)))->to_f32()) == UINT32_C(0));
1417 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.contract2fma", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(0));
1418 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.contract2fma", bit_cast<double>(UINT64_C(4607632778762754458)), bit_cast<double>(UINT64_C(4607632778762754458)))->to_f64()) == UINT64_C(0));
1419 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.contract2fma", bit_cast<double>(UINT64_C(4608083138725491507)), bit_cast<double>(UINT64_C(4608083138725491507)))->to_f64()) == UINT64_C(0));
1420}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [89/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_8_wasm>" ,
"" [float_exprs_8_wasm_tests] )

Definition at line 1274 of file float_exprs_tests.cpp.

1274 {
1276 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.8.wasm");
1277 backend_t bkend( code, &wa );
1278
1279 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_one", bit_cast<float>(UINT32_C(2141192192)))));
1280 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_one", bit_cast<double>(UINT64_C(9219994337134247936)))));
1281}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [90/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_90_wasm>" ,
"" [float_exprs_90_wasm_tests] )

Definition at line 1431 of file float_exprs_tests.cpp.

1431 {
1433 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.90.wasm");
1434 backend_t bkend( code, &wa );
1435
1436 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.division_by_small_number", bit_cast<float>(UINT32_C(1289068416)), bit_cast<float>(UINT32_C(1203982336)), bit_cast<float>(UINT32_C(980151802)))->to_f32()) == UINT32_C(1230570368));
1437 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.division_by_small_number", bit_cast<double>(UINT64_C(4727288602252279808)), bit_cast<double>(UINT64_C(4681608360884174848)), bit_cast<double>(UINT64_C(4561440258104740754)))->to_f64()) == UINT64_C(4695882709507797376));
1438}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [91/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_91_wasm>" ,
"" [float_exprs_91_wasm_tests] )

Definition at line 1440 of file float_exprs_tests.cpp.

1440 {
1442 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.91.wasm");
1443 backend_t bkend( code, &wa );
1444
1445 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.golden_ratio", bit_cast<float>(UINT32_C(1056964608)), bit_cast<float>(UINT32_C(1065353216)), bit_cast<float>(UINT32_C(1084227584)))->to_f32()) == UINT32_C(1070537661));
1446 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.golden_ratio", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(4617315517961601024)))->to_f64()) == UINT64_C(4609965796441453736));
1447}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [92/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_92_wasm>" ,
"" [float_exprs_92_wasm_tests] )

Definition at line 1449 of file float_exprs_tests.cpp.

1449 {
1451 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.92.wasm");
1452 backend_t bkend( code, &wa );
1453
1454 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.silver_means", bit_cast<float>(UINT32_C(0)))->to_f32()) == UINT32_C(1065353216));
1455 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.silver_means", bit_cast<float>(UINT32_C(1065353216)))->to_f32()) == UINT32_C(1070537661));
1456 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.silver_means", bit_cast<float>(UINT32_C(1073741824)))->to_f32()) == UINT32_C(1075479162));
1457 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.silver_means", bit_cast<float>(UINT32_C(1077936128)))->to_f32()) == UINT32_C(1079206061));
1458 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.silver_means", bit_cast<float>(UINT32_C(1082130432)))->to_f32()) == UINT32_C(1082625502));
1459 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.silver_means", bit_cast<float>(UINT32_C(1084227584)))->to_f32()) == UINT32_C(1084631458));
1460 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.silver_means", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4607182418800017408));
1461 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.silver_means", bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4609965796441453736));
1462 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.silver_means", bit_cast<double>(UINT64_C(4611686018427387904)))->to_f64()) == UINT64_C(4612618744449965542));
1463 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.silver_means", bit_cast<double>(UINT64_C(4613937818241073152)))->to_f64()) == UINT64_C(4614619608365706490));
1464 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.silver_means", bit_cast<double>(UINT64_C(4616189618054758400)))->to_f64()) == UINT64_C(4616455406968633940));
1465 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.silver_means", bit_cast<double>(UINT64_C(4617315517961601024)))->to_f64()) == UINT64_C(4617532346471836922));
1466}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [93/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_93_wasm>" ,
"" [float_exprs_93_wasm_tests] )

Definition at line 1468 of file float_exprs_tests.cpp.

1468 {
1470 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.93.wasm");
1471 backend_t bkend( code, &wa );
1472
1473 CHECK(bkend.call_with_return("env", "point_four", bit_cast<double>(UINT64_C(4616189618054758400)), bit_cast<double>(UINT64_C(4621819117588971520)))->to_ui32() == UINT32_C(0));
1474}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [94/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_94_wasm>" ,
"" [float_exprs_94_wasm_tests] )

Definition at line 1476 of file float_exprs_tests.cpp.

1476 {
1478 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.94.wasm");
1479 backend_t bkend( code, &wa );
1480
1481 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "tau", UINT32_C(10))->to_f64()) == UINT64_C(4618760256179416340));
1482 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "tau", UINT32_C(11))->to_f64()) == UINT64_C(4618760256179416344));
1483}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [95/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_95_wasm>" ,
"" [float_exprs_95_wasm_tests] )

Definition at line 1485 of file float_exprs_tests.cpp.

1485 {
1487 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.95.wasm");
1488 backend_t bkend( code, &wa );
1489
1490 CHECK(bit_cast<uint32_t>(bkend.call_with_return("env", "f32.no_fold_conditional_inc", bit_cast<float>(UINT32_C(2147483648)), bit_cast<float>(UINT32_C(3212836864)))->to_f32()) == UINT32_C(2147483648));
1491 CHECK(bit_cast<uint64_t>(bkend.call_with_return("env", "f64.no_fold_conditional_inc", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(9223372036854775808));
1492}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [96/96]

BACKEND_TEST_CASE ( "Testing wasm <float_exprs_9_wasm>" ,
"" [float_exprs_9_wasm_tests] )

Definition at line 1422 of file float_exprs_tests.cpp.

1422 {
1424 auto code = read_wasm( std::string(wasm_directory) + "float_exprs.9.wasm");
1425 backend_t bkend( code, &wa );
1426
1427 CHECK(check_nan(bkend.call_with_return("env", "f32.no_fold_div_neg1", bit_cast<float>(UINT32_C(2141192192)))));
1428 CHECK(check_nan(bkend.call_with_return("env", "f64.no_fold_div_neg1", bit_cast<double>(UINT64_C(9219994337134247936)))));
1429}
Here is the call graph for this function:

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.