github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/integration_test/spectest/v1/testdata/int_exprs.json (about)

     1  {"source_filename": "./int_exprs.wast",
     2   "commands": [
     3    {"type": "module", "line": 6, "filename": "int_exprs.0.wasm"}, 
     4    {"type": "assert_return", "line": 18, "action": {"type": "invoke", "field": "i32.no_fold_cmp_s_offset", "args": [{"type": "i32", "value": "2147483647"}, {"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
     5    {"type": "assert_return", "line": 19, "action": {"type": "invoke", "field": "i32.no_fold_cmp_u_offset", "args": [{"type": "i32", "value": "4294967295"}, {"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
     6    {"type": "assert_return", "line": 20, "action": {"type": "invoke", "field": "i64.no_fold_cmp_s_offset", "args": [{"type": "i64", "value": "9223372036854775807"}, {"type": "i64", "value": "0"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
     7    {"type": "assert_return", "line": 21, "action": {"type": "invoke", "field": "i64.no_fold_cmp_u_offset", "args": [{"type": "i64", "value": "18446744073709551615"}, {"type": "i64", "value": "0"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
     8    {"type": "module", "line": 25, "filename": "int_exprs.1.wasm"}, 
     9    {"type": "assert_return", "line": 30, "action": {"type": "invoke", "field": "i64.no_fold_wrap_extend_s", "args": [{"type": "i64", "value": "4538991236898928"}]}, "expected": [{"type": "i64", "value": "1079009392"}]}, 
    10    {"type": "assert_return", "line": 31, "action": {"type": "invoke", "field": "i64.no_fold_wrap_extend_s", "args": [{"type": "i64", "value": "45230338458316960"}]}, "expected": [{"type": "i64", "value": "18446744072918986912"}]}, 
    11    {"type": "module", "line": 35, "filename": "int_exprs.2.wasm"}, 
    12    {"type": "assert_return", "line": 40, "action": {"type": "invoke", "field": "i64.no_fold_wrap_extend_u", "args": [{"type": "i64", "value": "4538991236898928"}]}, "expected": [{"type": "i64", "value": "1079009392"}]}, 
    13    {"type": "module", "line": 44, "filename": "int_exprs.3.wasm"}, 
    14    {"type": "assert_return", "line": 56, "action": {"type": "invoke", "field": "i32.no_fold_shl_shr_s", "args": [{"type": "i32", "value": "2147483648"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    15    {"type": "assert_return", "line": 57, "action": {"type": "invoke", "field": "i32.no_fold_shl_shr_u", "args": [{"type": "i32", "value": "2147483648"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    16    {"type": "assert_return", "line": 58, "action": {"type": "invoke", "field": "i64.no_fold_shl_shr_s", "args": [{"type": "i64", "value": "9223372036854775808"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    17    {"type": "assert_return", "line": 59, "action": {"type": "invoke", "field": "i64.no_fold_shl_shr_u", "args": [{"type": "i64", "value": "9223372036854775808"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    18    {"type": "module", "line": 63, "filename": "int_exprs.4.wasm"}, 
    19    {"type": "assert_return", "line": 75, "action": {"type": "invoke", "field": "i32.no_fold_shr_s_shl", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    20    {"type": "assert_return", "line": 76, "action": {"type": "invoke", "field": "i32.no_fold_shr_u_shl", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    21    {"type": "assert_return", "line": 77, "action": {"type": "invoke", "field": "i64.no_fold_shr_s_shl", "args": [{"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    22    {"type": "assert_return", "line": 78, "action": {"type": "invoke", "field": "i64.no_fold_shr_u_shl", "args": [{"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    23    {"type": "module", "line": 82, "filename": "int_exprs.5.wasm"}, 
    24    {"type": "assert_return", "line": 94, "action": {"type": "invoke", "field": "i32.no_fold_div_s_mul", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    25    {"type": "assert_return", "line": 95, "action": {"type": "invoke", "field": "i32.no_fold_div_u_mul", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    26    {"type": "assert_return", "line": 96, "action": {"type": "invoke", "field": "i64.no_fold_div_s_mul", "args": [{"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    27    {"type": "assert_return", "line": 97, "action": {"type": "invoke", "field": "i64.no_fold_div_u_mul", "args": [{"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    28    {"type": "module", "line": 101, "filename": "int_exprs.6.wasm"}, 
    29    {"type": "assert_trap", "line": 113, "action": {"type": "invoke", "field": "i32.no_fold_div_s_self", "args": [{"type": "i32", "value": "0"}]}, "text": "integer divide by zero", "expected": [{"type": "i32"}]}, 
    30    {"type": "assert_trap", "line": 114, "action": {"type": "invoke", "field": "i32.no_fold_div_u_self", "args": [{"type": "i32", "value": "0"}]}, "text": "integer divide by zero", "expected": [{"type": "i32"}]}, 
    31    {"type": "assert_trap", "line": 115, "action": {"type": "invoke", "field": "i64.no_fold_div_s_self", "args": [{"type": "i64", "value": "0"}]}, "text": "integer divide by zero", "expected": [{"type": "i64"}]}, 
    32    {"type": "assert_trap", "line": 116, "action": {"type": "invoke", "field": "i64.no_fold_div_u_self", "args": [{"type": "i64", "value": "0"}]}, "text": "integer divide by zero", "expected": [{"type": "i64"}]}, 
    33    {"type": "module", "line": 120, "filename": "int_exprs.7.wasm"}, 
    34    {"type": "assert_trap", "line": 132, "action": {"type": "invoke", "field": "i32.no_fold_rem_s_self", "args": [{"type": "i32", "value": "0"}]}, "text": "integer divide by zero", "expected": [{"type": "i32"}]}, 
    35    {"type": "assert_trap", "line": 133, "action": {"type": "invoke", "field": "i32.no_fold_rem_u_self", "args": [{"type": "i32", "value": "0"}]}, "text": "integer divide by zero", "expected": [{"type": "i32"}]}, 
    36    {"type": "assert_trap", "line": 134, "action": {"type": "invoke", "field": "i64.no_fold_rem_s_self", "args": [{"type": "i64", "value": "0"}]}, "text": "integer divide by zero", "expected": [{"type": "i64"}]}, 
    37    {"type": "assert_trap", "line": 135, "action": {"type": "invoke", "field": "i64.no_fold_rem_u_self", "args": [{"type": "i64", "value": "0"}]}, "text": "integer divide by zero", "expected": [{"type": "i64"}]}, 
    38    {"type": "module", "line": 139, "filename": "int_exprs.8.wasm"}, 
    39    {"type": "assert_return", "line": 151, "action": {"type": "invoke", "field": "i32.no_fold_mul_div_s", "args": [{"type": "i32", "value": "2147483648"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    40    {"type": "assert_return", "line": 152, "action": {"type": "invoke", "field": "i32.no_fold_mul_div_u", "args": [{"type": "i32", "value": "2147483648"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    41    {"type": "assert_return", "line": 153, "action": {"type": "invoke", "field": "i64.no_fold_mul_div_s", "args": [{"type": "i64", "value": "9223372036854775808"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    42    {"type": "assert_return", "line": 154, "action": {"type": "invoke", "field": "i64.no_fold_mul_div_u", "args": [{"type": "i64", "value": "9223372036854775808"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    43    {"type": "module", "line": 158, "filename": "int_exprs.9.wasm"}, 
    44    {"type": "assert_return", "line": 166, "action": {"type": "invoke", "field": "i32.no_fold_div_s_2", "args": [{"type": "i32", "value": "4294967285"}]}, "expected": [{"type": "i32", "value": "4294967291"}]}, 
    45    {"type": "assert_return", "line": 167, "action": {"type": "invoke", "field": "i64.no_fold_div_s_2", "args": [{"type": "i64", "value": "18446744073709551605"}]}, "expected": [{"type": "i64", "value": "18446744073709551611"}]}, 
    46    {"type": "module", "line": 171, "filename": "int_exprs.10.wasm"}, 
    47    {"type": "assert_return", "line": 179, "action": {"type": "invoke", "field": "i32.no_fold_rem_s_2", "args": [{"type": "i32", "value": "4294967285"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, 
    48    {"type": "assert_return", "line": 180, "action": {"type": "invoke", "field": "i64.no_fold_rem_s_2", "args": [{"type": "i64", "value": "18446744073709551605"}]}, "expected": [{"type": "i64", "value": "18446744073709551615"}]}, 
    49    {"type": "module", "line": 184, "filename": "int_exprs.11.wasm"}, 
    50    {"type": "assert_trap", "line": 196, "action": {"type": "invoke", "field": "i32.div_s_0", "args": [{"type": "i32", "value": "71"}]}, "text": "integer divide by zero", "expected": [{"type": "i32"}]}, 
    51    {"type": "assert_trap", "line": 197, "action": {"type": "invoke", "field": "i32.div_u_0", "args": [{"type": "i32", "value": "71"}]}, "text": "integer divide by zero", "expected": [{"type": "i32"}]}, 
    52    {"type": "assert_trap", "line": 198, "action": {"type": "invoke", "field": "i64.div_s_0", "args": [{"type": "i64", "value": "71"}]}, "text": "integer divide by zero", "expected": [{"type": "i64"}]}, 
    53    {"type": "assert_trap", "line": 199, "action": {"type": "invoke", "field": "i64.div_u_0", "args": [{"type": "i64", "value": "71"}]}, "text": "integer divide by zero", "expected": [{"type": "i64"}]}, 
    54    {"type": "module", "line": 203, "filename": "int_exprs.12.wasm"}, 
    55    {"type": "assert_return", "line": 215, "action": {"type": "invoke", "field": "i32.div_s_3", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "23"}]}, 
    56    {"type": "assert_return", "line": 216, "action": {"type": "invoke", "field": "i32.div_s_3", "args": [{"type": "i32", "value": "1610612736"}]}, "expected": [{"type": "i32", "value": "536870912"}]}, 
    57    {"type": "assert_return", "line": 217, "action": {"type": "invoke", "field": "i32.div_u_3", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "23"}]}, 
    58    {"type": "assert_return", "line": 218, "action": {"type": "invoke", "field": "i32.div_u_3", "args": [{"type": "i32", "value": "3221225472"}]}, "expected": [{"type": "i32", "value": "1073741824"}]}, 
    59    {"type": "assert_return", "line": 219, "action": {"type": "invoke", "field": "i64.div_s_3", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "23"}]}, 
    60    {"type": "assert_return", "line": 220, "action": {"type": "invoke", "field": "i64.div_s_3", "args": [{"type": "i64", "value": "3458764513820540928"}]}, "expected": [{"type": "i64", "value": "1152921504606846976"}]}, 
    61    {"type": "assert_return", "line": 221, "action": {"type": "invoke", "field": "i64.div_u_3", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "23"}]}, 
    62    {"type": "assert_return", "line": 222, "action": {"type": "invoke", "field": "i64.div_u_3", "args": [{"type": "i64", "value": "13835058055282163712"}]}, "expected": [{"type": "i64", "value": "4611686018427387904"}]}, 
    63    {"type": "module", "line": 226, "filename": "int_exprs.13.wasm"}, 
    64    {"type": "assert_return", "line": 238, "action": {"type": "invoke", "field": "i32.div_s_5", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "14"}]}, 
    65    {"type": "assert_return", "line": 239, "action": {"type": "invoke", "field": "i32.div_s_5", "args": [{"type": "i32", "value": "1342177280"}]}, "expected": [{"type": "i32", "value": "268435456"}]}, 
    66    {"type": "assert_return", "line": 240, "action": {"type": "invoke", "field": "i32.div_u_5", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "14"}]}, 
    67    {"type": "assert_return", "line": 241, "action": {"type": "invoke", "field": "i32.div_u_5", "args": [{"type": "i32", "value": "2684354560"}]}, "expected": [{"type": "i32", "value": "536870912"}]}, 
    68    {"type": "assert_return", "line": 242, "action": {"type": "invoke", "field": "i64.div_s_5", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "14"}]}, 
    69    {"type": "assert_return", "line": 243, "action": {"type": "invoke", "field": "i64.div_s_5", "args": [{"type": "i64", "value": "5764607523034234880"}]}, "expected": [{"type": "i64", "value": "1152921504606846976"}]}, 
    70    {"type": "assert_return", "line": 244, "action": {"type": "invoke", "field": "i64.div_u_5", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "14"}]}, 
    71    {"type": "assert_return", "line": 245, "action": {"type": "invoke", "field": "i64.div_u_5", "args": [{"type": "i64", "value": "11529215046068469760"}]}, "expected": [{"type": "i64", "value": "2305843009213693952"}]}, 
    72    {"type": "module", "line": 249, "filename": "int_exprs.14.wasm"}, 
    73    {"type": "assert_return", "line": 261, "action": {"type": "invoke", "field": "i32.div_s_7", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "10"}]}, 
    74    {"type": "assert_return", "line": 262, "action": {"type": "invoke", "field": "i32.div_s_7", "args": [{"type": "i32", "value": "1879048192"}]}, "expected": [{"type": "i32", "value": "268435456"}]}, 
    75    {"type": "assert_return", "line": 263, "action": {"type": "invoke", "field": "i32.div_u_7", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "10"}]}, 
    76    {"type": "assert_return", "line": 264, "action": {"type": "invoke", "field": "i32.div_u_7", "args": [{"type": "i32", "value": "3758096384"}]}, "expected": [{"type": "i32", "value": "536870912"}]}, 
    77    {"type": "assert_return", "line": 265, "action": {"type": "invoke", "field": "i64.div_s_7", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "10"}]}, 
    78    {"type": "assert_return", "line": 266, "action": {"type": "invoke", "field": "i64.div_s_7", "args": [{"type": "i64", "value": "8070450532247928832"}]}, "expected": [{"type": "i64", "value": "1152921504606846976"}]}, 
    79    {"type": "assert_return", "line": 267, "action": {"type": "invoke", "field": "i64.div_u_7", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "10"}]}, 
    80    {"type": "assert_return", "line": 268, "action": {"type": "invoke", "field": "i64.div_u_7", "args": [{"type": "i64", "value": "16140901064495857664"}]}, "expected": [{"type": "i64", "value": "2305843009213693952"}]}, 
    81    {"type": "module", "line": 272, "filename": "int_exprs.15.wasm"}, 
    82    {"type": "assert_return", "line": 284, "action": {"type": "invoke", "field": "i32.rem_s_3", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "2"}]}, 
    83    {"type": "assert_return", "line": 285, "action": {"type": "invoke", "field": "i32.rem_s_3", "args": [{"type": "i32", "value": "1610612736"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    84    {"type": "assert_return", "line": 286, "action": {"type": "invoke", "field": "i32.rem_u_3", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "2"}]}, 
    85    {"type": "assert_return", "line": 287, "action": {"type": "invoke", "field": "i32.rem_u_3", "args": [{"type": "i32", "value": "3221225472"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    86    {"type": "assert_return", "line": 288, "action": {"type": "invoke", "field": "i64.rem_s_3", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "2"}]}, 
    87    {"type": "assert_return", "line": 289, "action": {"type": "invoke", "field": "i64.rem_s_3", "args": [{"type": "i64", "value": "3458764513820540928"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    88    {"type": "assert_return", "line": 290, "action": {"type": "invoke", "field": "i64.rem_u_3", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "2"}]}, 
    89    {"type": "assert_return", "line": 291, "action": {"type": "invoke", "field": "i64.rem_u_3", "args": [{"type": "i64", "value": "13835058055282163712"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    90    {"type": "module", "line": 295, "filename": "int_exprs.16.wasm"}, 
    91    {"type": "assert_return", "line": 307, "action": {"type": "invoke", "field": "i32.rem_s_5", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    92    {"type": "assert_return", "line": 308, "action": {"type": "invoke", "field": "i32.rem_s_5", "args": [{"type": "i32", "value": "1342177280"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    93    {"type": "assert_return", "line": 309, "action": {"type": "invoke", "field": "i32.rem_u_5", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    94    {"type": "assert_return", "line": 310, "action": {"type": "invoke", "field": "i32.rem_u_5", "args": [{"type": "i32", "value": "2684354560"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    95    {"type": "assert_return", "line": 311, "action": {"type": "invoke", "field": "i64.rem_s_5", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "1"}]}, 
    96    {"type": "assert_return", "line": 312, "action": {"type": "invoke", "field": "i64.rem_s_5", "args": [{"type": "i64", "value": "5764607523034234880"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    97    {"type": "assert_return", "line": 313, "action": {"type": "invoke", "field": "i64.rem_u_5", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "1"}]}, 
    98    {"type": "assert_return", "line": 314, "action": {"type": "invoke", "field": "i64.rem_u_5", "args": [{"type": "i64", "value": "11529215046068469760"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    99    {"type": "module", "line": 318, "filename": "int_exprs.17.wasm"}, 
   100    {"type": "assert_return", "line": 330, "action": {"type": "invoke", "field": "i32.rem_s_7", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
   101    {"type": "assert_return", "line": 331, "action": {"type": "invoke", "field": "i32.rem_s_7", "args": [{"type": "i32", "value": "1879048192"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
   102    {"type": "assert_return", "line": 332, "action": {"type": "invoke", "field": "i32.rem_u_7", "args": [{"type": "i32", "value": "71"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
   103    {"type": "assert_return", "line": 333, "action": {"type": "invoke", "field": "i32.rem_u_7", "args": [{"type": "i32", "value": "3758096384"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
   104    {"type": "assert_return", "line": 334, "action": {"type": "invoke", "field": "i64.rem_s_7", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "1"}]}, 
   105    {"type": "assert_return", "line": 335, "action": {"type": "invoke", "field": "i64.rem_s_7", "args": [{"type": "i64", "value": "8070450532247928832"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
   106    {"type": "assert_return", "line": 336, "action": {"type": "invoke", "field": "i64.rem_u_7", "args": [{"type": "i64", "value": "71"}]}, "expected": [{"type": "i64", "value": "1"}]}, 
   107    {"type": "assert_return", "line": 337, "action": {"type": "invoke", "field": "i64.rem_u_7", "args": [{"type": "i64", "value": "16140901064495857664"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
   108    {"type": "module", "line": 341, "filename": "int_exprs.18.wasm"}, 
   109    {"type": "assert_trap", "line": 349, "action": {"type": "invoke", "field": "i32.no_fold_div_neg1", "args": [{"type": "i32", "value": "2147483648"}]}, "text": "integer overflow", "expected": [{"type": "i32"}]}, 
   110    {"type": "assert_trap", "line": 350, "action": {"type": "invoke", "field": "i64.no_fold_div_neg1", "args": [{"type": "i64", "value": "9223372036854775808"}]}, "text": "integer overflow", "expected": [{"type": "i64"}]}]}