OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 "src/compiler/int64-lowering.h" | 5 #include "src/compiler/int64-lowering.h" |
6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
8 #include "src/compiler/machine-operator.h" | 8 #include "src/compiler/machine-operator.h" |
9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
10 | 10 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 MachineRepresentation::kWord64); | 302 MachineRepresentation::kWord64); |
303 EXPECT_THAT(graph()->end()->InputAt(1), | 303 EXPECT_THAT(graph()->end()->InputAt(1), |
304 IsReturn2(IsWord32Or(IsInt32Constant(low_word_value(0)), | 304 IsReturn2(IsWord32Or(IsInt32Constant(low_word_value(0)), |
305 IsInt32Constant(low_word_value(1))), | 305 IsInt32Constant(low_word_value(1))), |
306 IsWord32Or(IsInt32Constant(high_word_value(0)), | 306 IsWord32Or(IsInt32Constant(high_word_value(0)), |
307 IsInt32Constant(high_word_value(1))), | 307 IsInt32Constant(high_word_value(1))), |
308 start(), start())); | 308 start(), start())); |
309 } | 309 } |
310 | 310 |
311 // kExprI64Xor: | 311 // kExprI64Xor: |
| 312 TEST_F(Int64LoweringTest, Int64Xor) { |
| 313 if (4 != kPointerSize) return; |
| 314 |
| 315 LowerGraph(graph()->NewNode(machine()->Word64Xor(), Int64Constant(value(0)), |
| 316 Int64Constant(value(1))), |
| 317 MachineRepresentation::kWord64); |
| 318 EXPECT_THAT(graph()->end()->InputAt(1), |
| 319 IsReturn2(IsWord32Xor(IsInt32Constant(low_word_value(0)), |
| 320 IsInt32Constant(low_word_value(1))), |
| 321 IsWord32Xor(IsInt32Constant(high_word_value(0)), |
| 322 IsInt32Constant(high_word_value(1))), |
| 323 start(), start())); |
| 324 } |
312 // kExprI64Shl: | 325 // kExprI64Shl: |
313 // kExprI64ShrU: | 326 // kExprI64ShrU: |
314 // kExprI64ShrS: | 327 // kExprI64ShrS: |
315 // kExprI64Eq: | 328 // kExprI64Eq: |
316 // kExprI64Ne: | 329 // kExprI64Ne: |
317 // kExprI64LtS: | 330 // kExprI64LtS: |
318 // kExprI64LeS: | 331 // kExprI64LeS: |
319 // kExprI64LtU: | 332 // kExprI64LtU: |
320 // kExprI64LeU: | 333 // kExprI64LeU: |
321 // kExprI64GtS: | 334 // kExprI64GtS: |
(...skipping 17 matching lines...) Expand all Loading... |
339 // kExprF64SConvertI64: | 352 // kExprF64SConvertI64: |
340 // kExprF64UConvertI64: | 353 // kExprF64UConvertI64: |
341 // kExprI64SConvertF32: | 354 // kExprI64SConvertF32: |
342 // kExprI64SConvertF64: | 355 // kExprI64SConvertF64: |
343 // kExprI64UConvertF32: | 356 // kExprI64UConvertF32: |
344 // kExprI64UConvertF64: | 357 // kExprI64UConvertF64: |
345 | 358 |
346 } // namespace compiler | 359 } // namespace compiler |
347 } // namespace internal | 360 } // namespace internal |
348 } // namespace v8 | 361 } // namespace v8 |
OLD | NEW |