Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1755)

Unified Diff: test/cctest/compiler/test-run-machops.cc

Issue 1645653002: [turbofan] Add the StackSlot operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Forgot to initialize frame in testing code. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698