Chromium Code Reviews| 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 52672c8a89204cdf1fcc7d275311813bbeaf9a46..92d127680b8b7b4fa767c33ad5ff04c84c5b11ba 100644 |
| --- a/test/cctest/compiler/test-run-machops.cc |
| +++ b/test/cctest/compiler/test-run-machops.cc |
| @@ -72,6 +72,20 @@ TEST(RunWord32Ctz) { |
| CHECK_EQ(0, m.Call(uint32_t(0x9afdbc81))); |
| } |
| +TEST(RunStackSlot) { |
|
titzer
2016/01/28 09:02:18
Can you write another test that tries the same for
ahaas
2016/01/28 14:55:44
Done.
|
| + BufferedRawMachineAssemblerTester<double> m; |
| + |
| + Node* slot1 = m.StackSlot(MachineRepresentation::kFloat64); |
| + Node* slot2 = m.StackSlot(MachineRepresentation::kWord32); |
| + |
| + m.Store(MachineRepresentation::kFloat64, slot1, m.Float64Constant(2143.64543), |
| + WriteBarrierKind::kNoWriteBarrier); |
| + m.Store(MachineRepresentation::kWord32, slot2, m.Int32Constant(2143), |
| + WriteBarrierKind::kNoWriteBarrier); |
| + m.Return(m.Load(MachineType::Float64(), slot1)); |
| + |
| + CHECK_EQ(2143.64543, m.Call()); |
| +} |
| TEST(RunWord32Clz) { |
| BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Uint32()); |