Index: test/cctest/compiler/test-run-machops.cc |
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc |
index 50b46d7d0e288424e10ab97155590f346b6a4bf6..8d1d4c33e7661426142bafdec6b4f20981eb7ed0 100644 |
--- a/test/cctest/compiler/test-run-machops.cc |
+++ b/test/cctest/compiler/test-run-machops.cc |
@@ -4161,6 +4161,27 @@ TEST(RunInt32PairAdd) { |
} |
} |
+TEST(RunInt32PairAddUseOnlyHighWord) { |
titzer
2016/10/19 09:20:42
Can you add tests for all the Int32Pair* operation
ahaas
2016/10/19 09:59:19
Done.
|
+ BufferedRawMachineAssemblerTester<int32_t> m( |
+ MachineType::Uint32(), MachineType::Uint32(), MachineType::Uint32(), |
+ MachineType::Uint32()); |
+ |
+ Node* PairAdd = m.Int32PairAdd(m.Parameter(0), m.Parameter(1), m.Parameter(2), |
+ m.Parameter(3)); |
+ |
+ m.Return(m.Projection(1, PairAdd)); |
+ |
+ FOR_UINT64_INPUTS(i) { |
+ FOR_UINT64_INPUTS(j) { |
+ CHECK_EQ(static_cast<uint32_t>((*i + *j) >> 32), |
+ m.Call(static_cast<uint32_t>(*i & 0xffffffff), |
+ static_cast<uint32_t>(*i >> 32), |
+ static_cast<uint32_t>(*j & 0xffffffff), |
+ static_cast<uint32_t>(*j >> 32))); |
+ } |
+ } |
+} |
+ |
void TestInt32PairAddWithSharedInput(int a, int b, int c, int d) { |
BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Uint32(), |
MachineType::Uint32()); |