Lines Matching refs:BUILD
21 #define BUILD(r, ...) \
24 r.Build(code, code + arraysize(code)); \
32 BUILD(r, WASM_I8(kExpectedValue));
41 BUILD(r, WASM_I8(kExpectedValue));
50 BUILD(r, WASM_I8(-99), WASM_I8(kExpectedValue));
59 BUILD(r, WASM_I8(value));
70 BUILD(r, WASM_I32(kExpectedValue));
80 BUILD(r, WASM_I32(kExpectedValue));
91 BUILD(r, kExprMemorySize);
101 BUILD(r, WASM_I64(kExpectedValue));
112 BUILD(r, WASM_I64(kExpectedValue));
123 BUILD(r, WASM_GET_LOCAL(0));
131 BUILD(r, WASM_GET_LOCAL(0));
139 BUILD(r, WASM_GET_LOCAL(1));
147 BUILD(r, WASM_I32_ADD(WASM_I8(11), WASM_I8(44)));
155 BUILD(r, WASM_I32_ADD(WASM_I8(13), WASM_GET_LOCAL(0)));
163 BUILD(r, WASM_I32_ADD(WASM_I8(13), WASM_GET_LOCAL(0)));
171 BUILD(r, WASM_I32_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
188 BUILD(r,
197 BUILD(r, WASM_I32_SCONVERT_F64(WASM_F64_ADD(WASM_F64(13.5), WASM_F64(43.5))));
208 BUILD(r, WASM_BINOP(opcode, WASM_I32(a), WASM_I32(b)));
214 BUILD(r, WASM_BINOP(opcode, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
253 BUILD(r, WASM_UNOP(opcode, WASM_I32(a)));
259 BUILD(r, WASM_UNOP(opcode, WASM_GET_LOCAL(0)));
354 BUILD(r, WASM_BINOP(opcode, WASM_I64(a), WASM_I64(b)));
360 BUILD(r, WASM_BINOP(opcode, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
371 BUILD(r, WASM_BINOP(opcode, WASM_I64(a), WASM_I64(b)));
377 BUILD(r, WASM_BINOP(opcode, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
447 BUILD(r, WASM_I64_CLZ(WASM_GET_LOCAL(0)));
493 BUILD(r, WASM_I64_CTZ(WASM_GET_LOCAL(0)));
511 BUILD(r, WASM_I64_POPCNT(WASM_GET_LOCAL(0)));
522 BUILD(r, WASM_I32_DIVS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
533 BUILD(r, WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
544 BUILD(r, WASM_I32_DIVU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
555 BUILD(r, WASM_I32_REMU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
568 BUILD(r, WASM_I32_DIVS(WASM_GET_LOCAL(0), WASM_I8(denom)));
583 BUILD(r, WASM_I32_DIVU(WASM_GET_LOCAL(0), WASM_I32(denom)));
602 BUILD(r,
621 BUILD(r, WASM_I64_DIVS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
632 BUILD(r, WASM_I64_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
643 BUILD(r, WASM_I64_DIVU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
654 BUILD(r, WASM_I64_REMU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
667 BUILD(r, WASM_I64_DIVS(WASM_GET_LOCAL(0), WASM_I64(denom)));
682 BUILD(r, WASM_I64_DIVU(WASM_GET_LOCAL(0), WASM_I64(denom)));
700 BUILD(r, WASM_BINOP(opcode, WASM_F32(a), WASM_F32(b)));
706 BUILD(r, WASM_BINOP(opcode, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
717 BUILD(r,
724 BUILD(r, WASM_I32_SCONVERT_F32(
735 BUILD(r, WASM_I32_SCONVERT_F32(WASM_UNOP(opcode, WASM_F32(a))));
741 BUILD(r, WASM_I32_SCONVERT_F32(WASM_UNOP(opcode, WASM_GET_LOCAL(0))));
751 BUILD(r, WASM_BINOP(opcode, WASM_F64(a), WASM_F64(b)));
757 BUILD(r, WASM_BINOP(opcode, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
768 BUILD(r,
774 BUILD(r, WASM_I32_SCONVERT_F64(
785 BUILD(r, WASM_I32_SCONVERT_F64(WASM_UNOP(opcode, WASM_F64(a))));
791 BUILD(r, WASM_I32_SCONVERT_F64(WASM_UNOP(opcode, WASM_GET_LOCAL(0))));
850 BUILD(r, WASM_F32_NEG(WASM_GET_LOCAL(0)));
861 BUILD(r, WASM_F64_NEG(WASM_GET_LOCAL(0)));
873 BUILD(r, WASM_IF_ELSE(WASM_GET_LOCAL(0), // --
886 BUILD(r, WASM_IF_ELSE(WASM_ZERO, // --
896 BUILD(r, WASM_RETURN(WASM_I8(12)));
904 BUILD(r, WASM_BLOCK(1, WASM_RETURN(WASM_I8(17))));
912 BUILD(r, WASM_RETURN(WASM_GET_LOCAL(0)));
922 BUILD(r, WASM_RETURN(WASM_GET_LOCAL(0)));
932 BUILD(r, WASM_RETURN(WASM_GET_LOCAL(0)));
949 BUILD(r, WASM_RETURN(WASM_GET_LOCAL(0)));
966 BUILD(r, WASM_SELECT(WASM_GET_LOCAL(0), WASM_I8(11), WASM_I8(22)));
977 BUILD(r,
988 BUILD(r, WASM_BLOCK(2, WASM_SELECT(WASM_GET_LOCAL(0), WASM_I8(11),
997 BUILD(r, WASM_BLOCK(
1008 BUILD(r, WASM_TABLESWITCH_OP(1, 1, WASM_CASE(0)),
1016 BUILD(r, WASM_TABLESWITCH_OP(1, 2, WASM_CASE_BR(0), WASM_CASE(0)),
1028 BUILD(r, WASM_BLOCK(
1048 BUILD(r, WASM_TABLESWITCH_OP(2, 2, WASM_CASE(0), WASM_CASE(1)),
1060 BUILD(r, WASM_TABLESWITCH_OP(2, 2, WASM_CASE(1), WASM_CASE(0)),
1086 r.Build(code, code + arraysize(code));
1113 r.Build(code, code + arraysize(code));
1137 r.Build(code, code + arraysize(code));
1164 r.Build(code, code + arraysize(code));
1186 BUILD(r, WASM_I32_REINTERPRET_F32(
1203 BUILD(r, WASM_BLOCK(
1222 BUILD(r, WASM_STORE_MEM(MachineType::Int32(), WASM_ZERO,
1235 BUILD(r, kExprNop);
1242 BUILD(r, WASM_RETURN0);
1250 BUILD(r, WASM_BLOCK(2, // --
1263 BUILD(r, WASM_BLOCK(2, WASM_BRV_IF(0, WASM_GET_LOCAL(0), WASM_I8(51)),
1275 BUILD(r, WASM_BLOCK(2, // --
1290 BUILD(r, // --
1304 BUILD(r, WASM_BLOCK(
1317 BUILD(r,
1326 BUILD(r, WASM_IF_ELSE(WASM_GET_LOCAL(0), // --
1339 BUILD(r, WASM_IF_ELSE(WASM_GET_LOCAL(0), // --
1351 BUILD(r,
1367 BUILD(r,
1382 BUILD(r, WASM_BLOCK(
1395 BUILD(r, WASM_BLOCK(2, WASM_LOOP(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BREAK(0)),
1407 BUILD(r, WASM_BLOCK(2, WASM_LOOP(2, WASM_BR_IF(1, WASM_GET_LOCAL(0)),
1419 BUILD(r, WASM_BLOCK(1, WASM_LOOP(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BREAK(1)),
1436 BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_I8(0)));
1456 BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0)));
1478 BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0)));
1509 BUILD(r, WASM_LOAD_MEM_OFFSET(machineTypes[m], 8, WASM_GET_LOCAL(0)),
1528 BUILD(r, WASM_LOAD_MEM_OFFSET(MachineType::Int32(), 4, WASM_GET_LOCAL(0)));
1562 BUILD(r,
1584 BUILD(r, WASM_STORE_MEM_OFFSET(MachineType::Int32(), 4, WASM_GET_LOCAL(0),
1624 BUILD(r, WASM_STORE_MEM_OFFSET(machineTypes[m], 8, WASM_GET_LOCAL(0),
1647 BUILD(r, WASM_I64_REINTERPRET_F64(
1664 BUILD(r, WASM_BLOCK(
1684 BUILD(r, WASM_LOAD_MEM(MachineType::Int64(), WASM_I8(0)));
1706 BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0)));
1722 BUILD(r, WASM_BLOCK(
1755 BUILD(r, kExprBlock, 2, kExprLoop, 1, kExprIf, kExprGetLocal, 0, kExprBr, 0,
1779 BUILD(r, WASM_BLOCK(
1809 BUILD(r, WASM_BLOCK(
1848 BUILD(
1879 // Only build the graph and compile, don't run.
1880 BUILD(r, WASM_INFINITE_LOOP);
1890 // Only build the graph and compile, don't run.
1891 BUILD(r, WASM_LOOP(1, WASM_LOAD_MEM(MachineType::Int32(), WASM_ZERO)));
1897 BUILD(r,
1906 BUILD(r, WASM_BLOCK(2, WASM_BRV(0, WASM_I8(7)), WASM_UNREACHABLE));
1914 BUILD(r, WASM_UNREACHABLE);
1920 BUILD(r, WASM_UNREACHABLE, WASM_UNREACHABLE);
1926 BUILD(r, WASM_UNREACHABLE, WASM_UNREACHABLE, WASM_UNREACHABLE);
1932 BUILD(r, WASM_UNREACHABLE, WASM_IF(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
1938 BUILD(r, WASM_UNREACHABLE,
1945 BUILD(r, WASM_BLOCK(2, WASM_BRV(0, WASM_GET_LOCAL(0)),
1954 BUILD(r, WASM_BLOCK(2, WASM_IF(WASM_GET_LOCAL(0), WASM_INFINITE_LOOP),
1963 BUILD(r,
1973 BUILD(r, WASM_BLOCK(2, WASM_BRV_IF(0, WASM_GET_LOCAL(0), WASM_I8(45)),
2009 // Test that the decoder can build a graph for all supported simple expressions.
2027 BUILD(r, WASM_LOAD_MEM(MachineType::Int8(), WASM_GET_LOCAL(0)));
2043 BUILD(r, WASM_LOAD_MEM(MachineType::Uint8(), WASM_GET_LOCAL(0)));
2059 BUILD(r, WASM_LOAD_MEM(MachineType::Int16(), WASM_GET_LOCAL(0)));
2076 BUILD(r, WASM_LOAD_MEM(MachineType::Uint16(), WASM_GET_LOCAL(0)));
2091 BUILD(r, WASM_STORE_GLOBAL(
2114 BUILD(r, WASM_STORE_GLOBAL(
2140 BUILD(r, WASM_BLOCK(2, WASM_STORE_GLOBAL(
2162 BUILD(r, WASM_BLOCK(2, WASM_STORE_GLOBAL(
2183 BUILD(r, WASM_BLOCK(2, WASM_STORE_GLOBAL(
2215 BUILD(
2261 BUILD(r, WASM_I64(*i));
2267 BUILD(r, WASM_GET_LOCAL(0));
2272 BUILD(r, WASM_I64_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2280 BUILD(r, WASM_I64_ADD(WASM_GET_LOCAL(0),
2293 BUILD(r, WASM_I64_ADD(WASM_GET_LOCAL(0),
2312 // Build the target function.
2316 BUILD(t, WASM_I32(kExpected));
2319 // Build the calling function.
2322 BUILD(r, WASM_CALL_FUNCTION0(index));
2333 // Build the target function.
2339 BUILD(t, WASM_GET_LOCAL(17));
2342 // Build the calling function.
2345 BUILD(r, WASM_CALL_FUNCTION(
2359 // Build the target function.
2365 BUILD(t, WASM_GET_LOCAL(17));
2368 // Build the calling function.
2371 BUILD(r, WASM_CALL_FUNCTION(index, WASM_F64(1.0), WASM_F64(2.0),
2390 // Build the target function.
2397 BUILD(t, WASM_STORE_MEM(MachineType::Int32(), WASM_I8(kMemOffset),
2401 // Build the calling function.
2404 BUILD(r, WASM_CALL_FUNCTION0(index),
2414 // Build the target function.
2418 BUILD(t, WASM_I32_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2421 // Build the caller function.
2424 BUILD(r, WASM_CALL_FUNCTION(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2438 // Build the target function.
2442 BUILD(t, WASM_I64_SUB(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2445 // Build the caller function.
2448 BUILD(r, WASM_CALL_FUNCTION(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2470 // Build the target function.
2472 BUILD(t, WASM_F32_SUB(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2478 BUILD(r, WASM_CALL_FUNCTION(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2496 BUILD(r, WASM_BLOCK(
2555 // Build the selector function.
2563 WasmFunctionCompiler t(b.Build());
2565 BUILD(t, WASM_GET_LOCAL(which));
2569 // Build the calling function.
2590 r.Build(&code[0], &code[end]);
2618 BUILD(r, WASM_LOOP(
2631 BUILD(r, WASM_BLOCK(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(0, WASM_I8(1))),
2640 BUILD(r, WASM_BLOCK(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(0, WASM_I8(1))),
2649 BUILD(r, WASM_BLOCK(2, WASM_BRV_IF(0, WASM_GET_LOCAL(0), WASM_I8(1)),
2658 BUILD(r, WASM_BLOCK(2, WASM_BRV_IF(0, WASM_GET_LOCAL(0), WASM_I8(1)),
2667 BUILD(r, WASM_BLOCK(6, WASM_IF(WASM_I32_EQ(WASM_GET_LOCAL(0), WASM_I8(1)),
2690 BUILD(r,
2715 BUILD(r, WASM_IF_ELSE(
2731 BUILD(r,
2743 BUILD(r, WASM_BLOCK(
2762 BUILD(r, WASM_LOOP(
2792 r.Build(code, code + arraysize(code));
2823 BUILD(t1, WASM_I32_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2827 BUILD(t2, WASM_I32_SUB(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2850 BUILD(r, WASM_CALL_INDIRECT(1, WASM_GET_LOCAL(0), WASM_I8(66), WASM_I8(22)));
2867 BUILD(t1, WASM_I32_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2871 BUILD(t2, WASM_I32_SUB(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2894 BUILD(r,
2917 BUILD(r, WASM_F32_FLOOR(WASM_GET_LOCAL(0)));
2925 BUILD(r, WASM_F32_CEIL(WASM_GET_LOCAL(0)));
2933 BUILD(r, WASM_F32_TRUNC(WASM_GET_LOCAL(0)));
2941 BUILD(r, WASM_F32_NEARESTINT(WASM_GET_LOCAL(0)));
2949 BUILD(r, WASM_F64_FLOOR(WASM_GET_LOCAL(0)));
2957 BUILD(r, WASM_F64_CEIL(WASM_GET_LOCAL(0)));
2965 BUILD(r, WASM_F64_TRUNC(WASM_GET_LOCAL(0)));
2973 BUILD(r, WASM_F64_NEARESTINT(WASM_GET_LOCAL(0)));
2983 BUILD(r, WASM_F32_MIN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
3007 BUILD(r, WASM_F64_MIN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
3031 BUILD(r, WASM_F32_MAX(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
3055 BUILD(r, WASM_F64_MAX(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
3080 BUILD(r, WASM_F32_SCONVERT_I64(WASM_GET_LOCAL(0)));
3089 BUILD(r, WASM_F32_UCONVERT_I64(WASM_GET_LOCAL(0)));
3097 BUILD(r, WASM_F64_SCONVERT_I64(WASM_GET_LOCAL(0)));
3106 BUILD(r, WASM_F64_UCONVERT_I64(WASM_GET_LOCAL(0)));
3114 BUILD(r, WASM_I64_SCONVERT_F32(WASM_GET_LOCAL(0)));
3129 BUILD(r, WASM_I64_SCONVERT_F64(WASM_GET_LOCAL(0)));
3144 BUILD(r, WASM_I64_UCONVERT_F32(WASM_GET_LOCAL(0)));
3158 BUILD(r, WASM_I64_UCONVERT_F64(WASM_GET_LOCAL(0)));
3175 BUILD(r, WASM_I32_SCONVERT_F32(WASM_GET_LOCAL(0)));
3190 BUILD(r, WASM_I32_SCONVERT_F64(WASM_GET_LOCAL(0)));
3205 BUILD(r, WASM_I32_UCONVERT_F32(WASM_GET_LOCAL(0)));
3219 BUILD(r, WASM_I32_UCONVERT_F64(WASM_GET_LOCAL(0)));
3234 BUILD(r, WASM_F64_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
3247 BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));