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

Side by Side Diff: test/cctest/compiler/test-run-machops.cc

Issue 2124023003: [turbofan] Add MachineType to LinkageLocation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 5 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
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/ieee754.h" 10 #include "src/base/ieee754.h"
(...skipping 6410 matching lines...) Expand 10 before | Expand all | Expand 10 after
6421 // TODO(titzer): all this descriptor hackery is just to call the above 6421 // TODO(titzer): all this descriptor hackery is just to call the above
6422 // functions as code objects instead of direct addresses. 6422 // functions as code objects instead of direct addresses.
6423 CSignature0<int32_t> sig; 6423 CSignature0<int32_t> sig;
6424 CallDescriptor* c = Linkage::GetSimplifiedCDescriptor(r.zone(), &sig); 6424 CallDescriptor* c = Linkage::GetSimplifiedCDescriptor(r.zone(), &sig);
6425 LinkageLocation ret[] = {c->GetReturnLocation(0)}; 6425 LinkageLocation ret[] = {c->GetReturnLocation(0)};
6426 Signature<LinkageLocation> loc(1, 0, ret); 6426 Signature<LinkageLocation> loc(1, 0, ret);
6427 CallDescriptor* desc = new (r.zone()) CallDescriptor( // -- 6427 CallDescriptor* desc = new (r.zone()) CallDescriptor( // --
6428 CallDescriptor::kCallCodeObject, // kind 6428 CallDescriptor::kCallCodeObject, // kind
6429 MachineType::AnyTagged(), // target_type 6429 MachineType::AnyTagged(), // target_type
6430 c->GetInputLocation(0), // target_loc 6430 c->GetInputLocation(0), // target_loc
6431 &sig, // machine_sig
6432 &loc, // location_sig 6431 &loc, // location_sig
6433 0, // stack count 6432 0, // stack count
6434 Operator::kNoProperties, // properties 6433 Operator::kNoProperties, // properties
6435 c->CalleeSavedRegisters(), // callee saved 6434 c->CalleeSavedRegisters(), // callee saved
6436 c->CalleeSavedFPRegisters(), // callee saved FP 6435 c->CalleeSavedFPRegisters(), // callee saved FP
6437 CallDescriptor::kNoFlags, // flags 6436 CallDescriptor::kNoFlags, // flags
6438 "c-call-as-code"); 6437 "c-call-as-code");
6439 Node* call = r.AddNode(r.common()->Call(desc), phi); 6438 Node* call = r.AddNode(r.common()->Call(desc), phi);
6440 r.Return(call); 6439 r.Return(call);
6441 6440
(...skipping 18 matching lines...) Expand all
6460 r.Goto(&merge); 6459 r.Goto(&merge);
6461 r.Bind(&merge); 6460 r.Bind(&merge);
6462 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb); 6461 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb);
6463 r.Return(phi); 6462 r.Return(phi);
6464 CHECK_EQ(1, r.Call(1)); 6463 CHECK_EQ(1, r.Call(1));
6465 } 6464 }
6466 6465
6467 } // namespace compiler 6466 } // namespace compiler
6468 } // namespace internal 6467 } // namespace internal
6469 } // namespace v8 6468 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-multiple-return.cc ('k') | test/cctest/compiler/test-run-native-calls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698