Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
int_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 int_exprs_tests.cpp:

Go to the source code of this file.

Functions

 BACKEND_TEST_CASE ("Testing wasm <int_exprs_0_wasm>", "[int_exprs_0_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_1_wasm>", "[int_exprs_1_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_10_wasm>", "[int_exprs_10_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_11_wasm>", "[int_exprs_11_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_12_wasm>", "[int_exprs_12_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_13_wasm>", "[int_exprs_13_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_14_wasm>", "[int_exprs_14_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_15_wasm>", "[int_exprs_15_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_16_wasm>", "[int_exprs_16_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_17_wasm>", "[int_exprs_17_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_18_wasm>", "[int_exprs_18_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_2_wasm>", "[int_exprs_2_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_3_wasm>", "[int_exprs_3_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_4_wasm>", "[int_exprs_4_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_5_wasm>", "[int_exprs_5_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_6_wasm>", "[int_exprs_6_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_7_wasm>", "[int_exprs_7_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_8_wasm>", "[int_exprs_8_wasm_tests]")
 
 BACKEND_TEST_CASE ("Testing wasm <int_exprs_9_wasm>", "[int_exprs_9_wasm_tests]")
 

Variables

wasm_allocator wa
 

Function Documentation

◆ BACKEND_TEST_CASE() [1/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_0_wasm>" ,
"" [int_exprs_0_wasm_tests] )

Definition at line 18 of file int_exprs_tests.cpp.

18 {
20 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.0.wasm");
21 backend_t bkend( code, &wa );
22
23 CHECK(bkend.call_with_return("env", "i32.no_fold_cmp_s_offset", UINT32_C(2147483647), UINT32_C(0))->to_ui32() == UINT32_C(1));
24 CHECK(bkend.call_with_return("env", "i32.no_fold_cmp_u_offset", UINT32_C(4294967295), UINT32_C(0))->to_ui32() == UINT32_C(1));
25 CHECK(bkend.call_with_return("env", "i64.no_fold_cmp_s_offset", UINT64_C(9223372036854775807), UINT64_C(0))->to_ui32() == UINT32_C(1));
26 CHECK(bkend.call_with_return("env", "i64.no_fold_cmp_u_offset", UINT64_C(18446744073709551615), UINT64_C(0))->to_ui32() == UINT32_C(1));
27}
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
backend_t bkend(hello_wasm, ehm, &wa)
wasm_allocator wa
Definition main.cpp:10
std::vector< uint8_t > read_wasm(const std::string &fname)
Definition utils.hpp:30
#define UINT32_C(val)
Definition stdint.h:283
#define UINT64_C(val)
Definition stdint.h:284
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [2/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_10_wasm>" ,
"" [int_exprs_10_wasm_tests] )

Definition at line 38 of file int_exprs_tests.cpp.

38 {
40 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.10.wasm");
41 backend_t bkend( code, &wa );
42
43 CHECK(bkend.call_with_return("env", "i32.no_fold_rem_s_2", UINT32_C(4294967285))->to_ui32() == UINT32_C(4294967295));
44 CHECK(bkend.call_with_return("env", "i64.no_fold_rem_s_2", UINT64_C(18446744073709551605))->to_ui64() == UINT32_C(18446744073709551615));
45}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [3/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_11_wasm>" ,
"" [int_exprs_11_wasm_tests] )

Definition at line 47 of file int_exprs_tests.cpp.

47 {
49 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.11.wasm");
50 backend_t bkend( code, &wa );
51
52 CHECK_THROWS_AS(bkend("env", "i32.div_s_0", UINT32_C(71)), std::exception);
53 CHECK_THROWS_AS(bkend("env", "i32.div_u_0", UINT32_C(71)), std::exception);
54 CHECK_THROWS_AS(bkend("env", "i64.div_s_0", UINT64_C(71)), std::exception);
55 CHECK_THROWS_AS(bkend("env", "i64.div_u_0", UINT64_C(71)), std::exception);
56}
#define CHECK_THROWS_AS(expr, exceptionType)
Definition catch.hpp:203
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [4/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_12_wasm>" ,
"" [int_exprs_12_wasm_tests] )

Definition at line 58 of file int_exprs_tests.cpp.

58 {
60 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.12.wasm");
61 backend_t bkend( code, &wa );
62
63 CHECK(bkend.call_with_return("env", "i32.div_s_3", UINT32_C(71))->to_ui32() == UINT32_C(23));
64 CHECK(bkend.call_with_return("env", "i32.div_s_3", UINT32_C(1610612736))->to_ui32() == UINT32_C(536870912));
65 CHECK(bkend.call_with_return("env", "i32.div_u_3", UINT32_C(71))->to_ui32() == UINT32_C(23));
66 CHECK(bkend.call_with_return("env", "i32.div_u_3", UINT32_C(3221225472))->to_ui32() == UINT32_C(1073741824));
67 CHECK(bkend.call_with_return("env", "i64.div_s_3", UINT64_C(71))->to_ui64() == UINT32_C(23));
68 CHECK(bkend.call_with_return("env", "i64.div_s_3", UINT64_C(3458764513820540928))->to_ui64() == UINT32_C(1152921504606846976));
69 CHECK(bkend.call_with_return("env", "i64.div_u_3", UINT64_C(71))->to_ui64() == UINT32_C(23));
70 CHECK(bkend.call_with_return("env", "i64.div_u_3", UINT64_C(13835058055282163712))->to_ui64() == UINT32_C(4611686018427387904));
71}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [5/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_13_wasm>" ,
"" [int_exprs_13_wasm_tests] )

Definition at line 73 of file int_exprs_tests.cpp.

73 {
75 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.13.wasm");
76 backend_t bkend( code, &wa );
77
78 CHECK(bkend.call_with_return("env", "i32.div_s_5", UINT32_C(71))->to_ui32() == UINT32_C(14));
79 CHECK(bkend.call_with_return("env", "i32.div_s_5", UINT32_C(1342177280))->to_ui32() == UINT32_C(268435456));
80 CHECK(bkend.call_with_return("env", "i32.div_u_5", UINT32_C(71))->to_ui32() == UINT32_C(14));
81 CHECK(bkend.call_with_return("env", "i32.div_u_5", UINT32_C(2684354560))->to_ui32() == UINT32_C(536870912));
82 CHECK(bkend.call_with_return("env", "i64.div_s_5", UINT64_C(71))->to_ui64() == UINT32_C(14));
83 CHECK(bkend.call_with_return("env", "i64.div_s_5", UINT64_C(5764607523034234880))->to_ui64() == UINT32_C(1152921504606846976));
84 CHECK(bkend.call_with_return("env", "i64.div_u_5", UINT64_C(71))->to_ui64() == UINT32_C(14));
85 CHECK(bkend.call_with_return("env", "i64.div_u_5", UINT64_C(11529215046068469760))->to_ui64() == UINT32_C(2305843009213693952));
86}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [6/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_14_wasm>" ,
"" [int_exprs_14_wasm_tests] )

Definition at line 88 of file int_exprs_tests.cpp.

88 {
90 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.14.wasm");
91 backend_t bkend( code, &wa );
92
93 CHECK(bkend.call_with_return("env", "i32.div_s_7", UINT32_C(71))->to_ui32() == UINT32_C(10));
94 CHECK(bkend.call_with_return("env", "i32.div_s_7", UINT32_C(1879048192))->to_ui32() == UINT32_C(268435456));
95 CHECK(bkend.call_with_return("env", "i32.div_u_7", UINT32_C(71))->to_ui32() == UINT32_C(10));
96 CHECK(bkend.call_with_return("env", "i32.div_u_7", UINT32_C(3758096384))->to_ui32() == UINT32_C(536870912));
97 CHECK(bkend.call_with_return("env", "i64.div_s_7", UINT64_C(71))->to_ui64() == UINT32_C(10));
98 CHECK(bkend.call_with_return("env", "i64.div_s_7", UINT64_C(8070450532247928832))->to_ui64() == UINT32_C(1152921504606846976));
99 CHECK(bkend.call_with_return("env", "i64.div_u_7", UINT64_C(71))->to_ui64() == UINT32_C(10));
100 CHECK(bkend.call_with_return("env", "i64.div_u_7", UINT64_C(16140901064495857664))->to_ui64() == UINT32_C(2305843009213693952));
101}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [7/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_15_wasm>" ,
"" [int_exprs_15_wasm_tests] )

Definition at line 103 of file int_exprs_tests.cpp.

103 {
105 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.15.wasm");
106 backend_t bkend( code, &wa );
107
108 CHECK(bkend.call_with_return("env", "i32.rem_s_3", UINT32_C(71))->to_ui32() == UINT32_C(2));
109 CHECK(bkend.call_with_return("env", "i32.rem_s_3", UINT32_C(1610612736))->to_ui32() == UINT32_C(0));
110 CHECK(bkend.call_with_return("env", "i32.rem_u_3", UINT32_C(71))->to_ui32() == UINT32_C(2));
111 CHECK(bkend.call_with_return("env", "i32.rem_u_3", UINT32_C(3221225472))->to_ui32() == UINT32_C(0));
112 CHECK(bkend.call_with_return("env", "i64.rem_s_3", UINT64_C(71))->to_ui64() == UINT32_C(2));
113 CHECK(bkend.call_with_return("env", "i64.rem_s_3", UINT64_C(3458764513820540928))->to_ui64() == UINT32_C(0));
114 CHECK(bkend.call_with_return("env", "i64.rem_u_3", UINT64_C(71))->to_ui64() == UINT32_C(2));
115 CHECK(bkend.call_with_return("env", "i64.rem_u_3", UINT64_C(13835058055282163712))->to_ui64() == UINT32_C(0));
116}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [8/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_16_wasm>" ,
"" [int_exprs_16_wasm_tests] )

Definition at line 118 of file int_exprs_tests.cpp.

118 {
120 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.16.wasm");
121 backend_t bkend( code, &wa );
122
123 CHECK(bkend.call_with_return("env", "i32.rem_s_5", UINT32_C(71))->to_ui32() == UINT32_C(1));
124 CHECK(bkend.call_with_return("env", "i32.rem_s_5", UINT32_C(1342177280))->to_ui32() == UINT32_C(0));
125 CHECK(bkend.call_with_return("env", "i32.rem_u_5", UINT32_C(71))->to_ui32() == UINT32_C(1));
126 CHECK(bkend.call_with_return("env", "i32.rem_u_5", UINT32_C(2684354560))->to_ui32() == UINT32_C(0));
127 CHECK(bkend.call_with_return("env", "i64.rem_s_5", UINT64_C(71))->to_ui64() == UINT32_C(1));
128 CHECK(bkend.call_with_return("env", "i64.rem_s_5", UINT64_C(5764607523034234880))->to_ui64() == UINT32_C(0));
129 CHECK(bkend.call_with_return("env", "i64.rem_u_5", UINT64_C(71))->to_ui64() == UINT32_C(1));
130 CHECK(bkend.call_with_return("env", "i64.rem_u_5", UINT64_C(11529215046068469760))->to_ui64() == UINT32_C(0));
131}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [9/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_17_wasm>" ,
"" [int_exprs_17_wasm_tests] )

Definition at line 133 of file int_exprs_tests.cpp.

133 {
135 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.17.wasm");
136 backend_t bkend( code, &wa );
137
138 CHECK(bkend.call_with_return("env", "i32.rem_s_7", UINT32_C(71))->to_ui32() == UINT32_C(1));
139 CHECK(bkend.call_with_return("env", "i32.rem_s_7", UINT32_C(1879048192))->to_ui32() == UINT32_C(0));
140 CHECK(bkend.call_with_return("env", "i32.rem_u_7", UINT32_C(71))->to_ui32() == UINT32_C(1));
141 CHECK(bkend.call_with_return("env", "i32.rem_u_7", UINT32_C(3758096384))->to_ui32() == UINT32_C(0));
142 CHECK(bkend.call_with_return("env", "i64.rem_s_7", UINT64_C(71))->to_ui64() == UINT32_C(1));
143 CHECK(bkend.call_with_return("env", "i64.rem_s_7", UINT64_C(8070450532247928832))->to_ui64() == UINT32_C(0));
144 CHECK(bkend.call_with_return("env", "i64.rem_u_7", UINT64_C(71))->to_ui64() == UINT32_C(1));
145 CHECK(bkend.call_with_return("env", "i64.rem_u_7", UINT64_C(16140901064495857664))->to_ui64() == UINT32_C(0));
146}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [10/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_18_wasm>" ,
"" [int_exprs_18_wasm_tests] )

Definition at line 148 of file int_exprs_tests.cpp.

148 {
150 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.18.wasm");
151 backend_t bkend( code, &wa );
152
153 CHECK_THROWS_AS(bkend("env", "i32.no_fold_div_neg1", UINT32_C(2147483648)), std::exception);
154 CHECK_THROWS_AS(bkend("env", "i64.no_fold_div_neg1", UINT64_C(9223372036854775808)), std::exception);
155}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [11/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_1_wasm>" ,
"" [int_exprs_1_wasm_tests] )

Definition at line 29 of file int_exprs_tests.cpp.

29 {
31 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.1.wasm");
32 backend_t bkend( code, &wa );
33
34 CHECK(bkend.call_with_return("env", "i64.no_fold_wrap_extend_s", UINT64_C(4538991236898928))->to_ui64() == UINT32_C(1079009392));
35 CHECK(bkend.call_with_return("env", "i64.no_fold_wrap_extend_s", UINT64_C(45230338458316960))->to_ui64() == UINT32_C(18446744072918986912));
36}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [12/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_2_wasm>" ,
"" [int_exprs_2_wasm_tests] )

Definition at line 157 of file int_exprs_tests.cpp.

157 {
159 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.2.wasm");
160 backend_t bkend( code, &wa );
161
162 CHECK(bkend.call_with_return("env", "i64.no_fold_wrap_extend_u", UINT64_C(4538991236898928))->to_ui64() == UINT32_C(1079009392));
163}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [13/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_3_wasm>" ,
"" [int_exprs_3_wasm_tests] )

Definition at line 165 of file int_exprs_tests.cpp.

165 {
167 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.3.wasm");
168 backend_t bkend( code, &wa );
169
170 CHECK(bkend.call_with_return("env", "i32.no_fold_shl_shr_s", UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
171 CHECK(bkend.call_with_return("env", "i32.no_fold_shl_shr_u", UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
172 CHECK(bkend.call_with_return("env", "i64.no_fold_shl_shr_s", UINT64_C(9223372036854775808))->to_ui64() == UINT32_C(0));
173 CHECK(bkend.call_with_return("env", "i64.no_fold_shl_shr_u", UINT64_C(9223372036854775808))->to_ui64() == UINT32_C(0));
174}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [14/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_4_wasm>" ,
"" [int_exprs_4_wasm_tests] )

Definition at line 176 of file int_exprs_tests.cpp.

176 {
178 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.4.wasm");
179 backend_t bkend( code, &wa );
180
181 CHECK(bkend.call_with_return("env", "i32.no_fold_shr_s_shl", UINT32_C(1))->to_ui32() == UINT32_C(0));
182 CHECK(bkend.call_with_return("env", "i32.no_fold_shr_u_shl", UINT32_C(1))->to_ui32() == UINT32_C(0));
183 CHECK(bkend.call_with_return("env", "i64.no_fold_shr_s_shl", UINT64_C(1))->to_ui64() == UINT32_C(0));
184 CHECK(bkend.call_with_return("env", "i64.no_fold_shr_u_shl", UINT64_C(1))->to_ui64() == UINT32_C(0));
185}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [15/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_5_wasm>" ,
"" [int_exprs_5_wasm_tests] )

Definition at line 187 of file int_exprs_tests.cpp.

187 {
189 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.5.wasm");
190 backend_t bkend( code, &wa );
191
192 CHECK(bkend.call_with_return("env", "i32.no_fold_div_s_mul", UINT32_C(1))->to_ui32() == UINT32_C(0));
193 CHECK(bkend.call_with_return("env", "i32.no_fold_div_u_mul", UINT32_C(1))->to_ui32() == UINT32_C(0));
194 CHECK(bkend.call_with_return("env", "i64.no_fold_div_s_mul", UINT64_C(1))->to_ui64() == UINT32_C(0));
195 CHECK(bkend.call_with_return("env", "i64.no_fold_div_u_mul", UINT64_C(1))->to_ui64() == UINT32_C(0));
196}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [16/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_6_wasm>" ,
"" [int_exprs_6_wasm_tests] )

Definition at line 198 of file int_exprs_tests.cpp.

198 {
200 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.6.wasm");
201 backend_t bkend( code, &wa );
202
203 CHECK_THROWS_AS(bkend("env", "i32.no_fold_div_s_self", UINT32_C(0)), std::exception);
204 CHECK_THROWS_AS(bkend("env", "i32.no_fold_div_u_self", UINT32_C(0)), std::exception);
205 CHECK_THROWS_AS(bkend("env", "i64.no_fold_div_s_self", UINT64_C(0)), std::exception);
206 CHECK_THROWS_AS(bkend("env", "i64.no_fold_div_u_self", UINT64_C(0)), std::exception);
207}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [17/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_7_wasm>" ,
"" [int_exprs_7_wasm_tests] )

Definition at line 209 of file int_exprs_tests.cpp.

209 {
211 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.7.wasm");
212 backend_t bkend( code, &wa );
213
214 CHECK_THROWS_AS(bkend("env", "i32.no_fold_rem_s_self", UINT32_C(0)), std::exception);
215 CHECK_THROWS_AS(bkend("env", "i32.no_fold_rem_u_self", UINT32_C(0)), std::exception);
216 CHECK_THROWS_AS(bkend("env", "i64.no_fold_rem_s_self", UINT64_C(0)), std::exception);
217 CHECK_THROWS_AS(bkend("env", "i64.no_fold_rem_u_self", UINT64_C(0)), std::exception);
218}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [18/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_8_wasm>" ,
"" [int_exprs_8_wasm_tests] )

Definition at line 220 of file int_exprs_tests.cpp.

220 {
222 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.8.wasm");
223 backend_t bkend( code, &wa );
224
225 CHECK(bkend.call_with_return("env", "i32.no_fold_mul_div_s", UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
226 CHECK(bkend.call_with_return("env", "i32.no_fold_mul_div_u", UINT32_C(2147483648))->to_ui32() == UINT32_C(0));
227 CHECK(bkend.call_with_return("env", "i64.no_fold_mul_div_s", UINT64_C(9223372036854775808))->to_ui64() == UINT32_C(0));
228 CHECK(bkend.call_with_return("env", "i64.no_fold_mul_div_u", UINT64_C(9223372036854775808))->to_ui64() == UINT32_C(0));
229}
Here is the call graph for this function:

◆ BACKEND_TEST_CASE() [19/19]

BACKEND_TEST_CASE ( "Testing wasm <int_exprs_9_wasm>" ,
"" [int_exprs_9_wasm_tests] )

Definition at line 231 of file int_exprs_tests.cpp.

231 {
233 auto code = read_wasm( std::string(wasm_directory) + "int_exprs.9.wasm");
234 backend_t bkend( code, &wa );
235
236 CHECK(bkend.call_with_return("env", "i32.no_fold_div_s_2", UINT32_C(4294967285))->to_ui32() == UINT32_C(4294967291));
237 CHECK(bkend.call_with_return("env", "i64.no_fold_div_s_2", UINT64_C(18446744073709551605))->to_ui64() == UINT32_C(18446744073709551611));
238}
Here is the call graph for this function:

Variable Documentation

◆ wa

wasm_allocator wa
extern

Definition at line 10 of file main.cpp.