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

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

Issue 1695313002: [turbofan] Add an operator to access the parent frame pointer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 544669d5749c9d740fbbbcbe5f56328c37bdc5d5..fc291e4c2b01f14764f90eff460c64b1db3c9f0f 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -6196,6 +6196,27 @@ TEST(RunComputedCodeObject) {
CHECK_EQ(44, r.Call(0));
}
+TEST(ParentFramePointer) {
+ RawMachineAssemblerTester<int32_t> r(MachineType::Int32());
+ RawMachineLabel tlabel;
+ RawMachineLabel flabel;
+ RawMachineLabel merge;
+ Node* frame = r.LoadFramePointer();
+ Node* parent_frame = r.LoadParentFramePointer();
+ frame = r.Load(MachineType::IntPtr(), frame);
+ r.Branch(r.WordEqual(frame, parent_frame), &tlabel, &flabel);
+ r.Bind(&tlabel);
+ Node* fa = r.Int32Constant(1);
+ r.Goto(&merge);
+ r.Bind(&flabel);
+ Node* fb = r.Int32Constant(0);
+ r.Goto(&merge);
+ r.Bind(&merge);
+ Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb);
+ r.Return(phi);
+ CHECK_EQ(1, r.Call(1));
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698