OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdint.h> | 5 #include <stdint.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "src/wasm/wasm-macro-gen.h" | 9 #include "src/wasm/wasm-macro-gen.h" |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 } | 36 } |
37 // kExprI64Ior: | 37 // kExprI64Ior: |
38 TEST(Run_WasmI64Ior) { | 38 TEST(Run_WasmI64Ior) { |
39 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64()); | 39 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64()); |
40 BUILD(r, WASM_I64_IOR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); | 40 BUILD(r, WASM_I64_IOR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
41 FOR_INT64_INPUTS(i) { | 41 FOR_INT64_INPUTS(i) { |
42 FOR_INT64_INPUTS(j) { CHECK_EQ((*i) | (*j), r.Call(*i, *j)); } | 42 FOR_INT64_INPUTS(j) { CHECK_EQ((*i) | (*j), r.Call(*i, *j)); } |
43 } | 43 } |
44 } | 44 } |
45 // kExprI64Xor: | 45 // kExprI64Xor: |
| 46 TEST(Run_WasmI64Xor) { |
| 47 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64()); |
| 48 BUILD(r, WASM_I64_XOR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
| 49 FOR_INT64_INPUTS(i) { |
| 50 FOR_INT64_INPUTS(j) { CHECK_EQ((*i) ^ (*j), r.Call(*i, *j)); } |
| 51 } |
| 52 } |
46 // kExprI64Shl: | 53 // kExprI64Shl: |
47 // kExprI64ShrU: | 54 // kExprI64ShrU: |
48 // kExprI64ShrS: | 55 // kExprI64ShrS: |
49 // kExprI64Eq: | 56 // kExprI64Eq: |
50 // kExprI64Ne: | 57 // kExprI64Ne: |
51 // kExprI64LtS: | 58 // kExprI64LtS: |
52 // kExprI64LeS: | 59 // kExprI64LeS: |
53 // kExprI64LtU: | 60 // kExprI64LtU: |
54 // kExprI64LeU: | 61 // kExprI64LeU: |
55 // kExprI64GtS: | 62 // kExprI64GtS: |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 WASM_I64(0xbcd1234000000013), WASM_I64(0xbcd1234000000014), | 120 WASM_I64(0xbcd1234000000013), WASM_I64(0xbcd1234000000014), |
114 WASM_I64(0xbcd1234000000015), WASM_I64(0xbcd1234000000016), | 121 WASM_I64(0xbcd1234000000015), WASM_I64(0xbcd1234000000016), |
115 WASM_I64(0xbcd1234000000017), WASM_I64(0xbcd1234000000018), | 122 WASM_I64(0xbcd1234000000017), WASM_I64(0xbcd1234000000018), |
116 WASM_I64(0xbcd1234000000019), WASM_I64(0xbcd123400000001a), | 123 WASM_I64(0xbcd1234000000019), WASM_I64(0xbcd123400000001a), |
117 WASM_I64(0xbcd123400000001b), WASM_I64(0xbcd123400000001c), | 124 WASM_I64(0xbcd123400000001b), WASM_I64(0xbcd123400000001c), |
118 WASM_I64(0xbcd123400000001d)))); | 125 WASM_I64(0xbcd123400000001d)))); |
119 | 126 |
120 CHECK_EQ(i + 0xb, r.Call()); | 127 CHECK_EQ(i + 0xb, r.Call()); |
121 } | 128 } |
122 } | 129 } |
OLD | NEW |