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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this 1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include <cmath> 5 #include <cmath>
6 #include <functional> 6 #include <functional>
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/utils/random-number-generator.h" 10 #include "src/base/utils/random-number-generator.h"
(...skipping 6178 matching lines...) Expand 10 before | Expand all | Expand 10 after
6189 c->CalleeSavedFPRegisters(), // callee saved FP 6189 c->CalleeSavedFPRegisters(), // callee saved FP
6190 CallDescriptor::kNoFlags, // flags 6190 CallDescriptor::kNoFlags, // flags
6191 "c-call-as-code"); 6191 "c-call-as-code");
6192 Node* call = r.AddNode(r.common()->Call(desc), phi); 6192 Node* call = r.AddNode(r.common()->Call(desc), phi);
6193 r.Return(call); 6193 r.Return(call);
6194 6194
6195 CHECK_EQ(33, r.Call(1)); 6195 CHECK_EQ(33, r.Call(1));
6196 CHECK_EQ(44, r.Call(0)); 6196 CHECK_EQ(44, r.Call(0));
6197 } 6197 }
6198 6198
6199 TEST(ParentFramePointer) {
6200 RawMachineAssemblerTester<int32_t> r(MachineType::Int32());
6201 RawMachineLabel tlabel;
6202 RawMachineLabel flabel;
6203 RawMachineLabel merge;
6204 Node* frame = r.LoadFramePointer();
6205 Node* parent_frame = r.LoadParentFramePointer();
6206 frame = r.Load(MachineType::IntPtr(), frame);
6207 r.Branch(r.WordEqual(frame, parent_frame), &tlabel, &flabel);
6208 r.Bind(&tlabel);
6209 Node* fa = r.Int32Constant(1);
6210 r.Goto(&merge);
6211 r.Bind(&flabel);
6212 Node* fb = r.Int32Constant(0);
6213 r.Goto(&merge);
6214 r.Bind(&merge);
6215 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb);
6216 r.Return(phi);
6217 CHECK_EQ(1, r.Call(1));
6218 }
6219
6199 } // namespace compiler 6220 } // namespace compiler
6200 } // namespace internal 6221 } // namespace internal
6201 } // namespace v8 6222 } // namespace v8
OLDNEW
« 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