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

Unified Diff: test/cctest/compiler/test-multiple-return.cc

Issue 1401453002: Using RegisterConfiguration in test-multiple-return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-multiple-return.cc
diff --git a/test/cctest/compiler/test-multiple-return.cc b/test/cctest/compiler/test-multiple-return.cc
index b15f7791f2078a396fca012219316380654ea928..6fd84a9872b0cee8a715e7b6a0a4467cd1783689 100644
--- a/test/cctest/compiler/test-multiple-return.cc
+++ b/test/cctest/compiler/test-multiple-return.cc
@@ -29,17 +29,22 @@ CallDescriptor* GetCallDescriptor(Zone* zone, int return_count,
int param_count) {
MachineSignature::Builder msig(zone, return_count, param_count);
LocationSignature::Builder locations(zone, return_count, param_count);
+ const RegisterConfiguration* config = RegisterConfiguration::ArchDefault();
// Add return location(s).
+ DCHECK(return_count <= config->num_allocatable_general_registers());
for (int i = 0; i < return_count; i++) {
msig.AddReturn(compiler::kMachInt32);
- locations.AddReturn(LinkageLocation::ForRegister(i));
+ locations.AddReturn(
+ LinkageLocation::ForRegister(config->allocatable_general_codes()[i]));
}
// Add register and/or stack parameter(s).
+ DCHECK(param_count <= config->num_allocatable_general_registers());
for (int i = 0; i < param_count; i++) {
msig.AddParam(compiler::kMachInt32);
- locations.AddParam(LinkageLocation::ForRegister(i));
+ locations.AddParam(
+ LinkageLocation::ForRegister(config->allocatable_general_codes()[i]));
}
const RegList kCalleeSaveRegisters = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698