Index: test/cctest/compiler/test-run-native-calls.cc |
diff --git a/test/cctest/compiler/test-run-native-calls.cc b/test/cctest/compiler/test-run-native-calls.cc |
index b1bfa9f7befe42d3ac4aa111046191d07801c624..af3748b8fd1b8049445a3155b8ecda39b779b1fa 100644 |
--- a/test/cctest/compiler/test-run-native-calls.cc |
+++ b/test/cctest/compiler/test-run-native-calls.cc |
@@ -689,7 +689,8 @@ TEST(Run_CopyTwentyInt32_all_allocatable_pairs) { |
while (pairs.More()) { |
Zone zone; |
int parray[2]; |
- int rarray[] = {0}; |
+ int rarray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableGeneralCode(0)}; |
pairs.Next(&parray[0], &parray[1], false); |
Allocator params(parray, 2, nullptr, 0); |
Allocator rets(rarray, 1, nullptr, 0); |
@@ -741,7 +742,8 @@ static void Test_Int32_WeightedSum_of_size(int count) { |
Zone zone; |
int parray[] = {p0}; |
- int rarray[] = {0}; |
+ int rarray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableGeneralCode(0)}; |
Allocator params(parray, 1, nullptr, 0); |
Allocator rets(rarray, 1, nullptr, 0); |
RegisterConfig config(params, rets); |
@@ -796,8 +798,10 @@ template <int which> |
void Test_Int32_Select() { |
if (DISABLE_NATIVE_STACK_PARAMS) return; |
- int parray[] = {0}; |
- int rarray[] = {0}; |
+ int parray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableGeneralCode(0)}; |
+ int rarray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableGeneralCode(0)}; |
Allocator params(parray, 1, nullptr, 0); |
Allocator rets(rarray, 1, nullptr, 0); |
RegisterConfig config(params, rets); |
@@ -838,7 +842,8 @@ TEST(Int64Select_registers) { |
return; |
if (kPointerSize < 8) return; // TODO(titzer): int64 on 32-bit platforms |
- int rarray[] = {0}; |
+ int rarray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableGeneralCode(0)}; |
ArgsBuffer<int64_t>::Sig sig(2); |
RegisterPairs pairs; |
@@ -863,7 +868,8 @@ TEST(Float32Select_registers) { |
return; |
} |
- int rarray[] = {0}; |
+ int rarray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableDoubleCode(0)}; |
ArgsBuffer<float32>::Sig sig(2); |
Float32RegisterPairs pairs; |
@@ -889,7 +895,8 @@ TEST(Float64Select_registers) { |
if (RegisterConfiguration::ArchDefault() |
->num_allocatable_general_registers() < 2) |
return; |
- int rarray[] = {0}; |
+ int rarray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableDoubleCode(0)}; |
ArgsBuffer<float64>::Sig sig(2); |
Float64RegisterPairs pairs; |
@@ -910,7 +917,8 @@ TEST(Float64Select_registers) { |
TEST(Float32Select_stack_params_return_reg) { |
if (DISABLE_NATIVE_STACK_PARAMS) return; |
- int rarray[] = {0}; |
+ int rarray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableDoubleCode(0)}; |
Allocator params(nullptr, 0, nullptr, 0); |
Allocator rets(nullptr, 0, rarray, 1); |
RegisterConfig config(params, rets); |
@@ -931,7 +939,8 @@ TEST(Float32Select_stack_params_return_reg) { |
TEST(Float64Select_stack_params_return_reg) { |
if (DISABLE_NATIVE_STACK_PARAMS) return; |
- int rarray[] = {0}; |
+ int rarray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableDoubleCode(0)}; |
Allocator params(nullptr, 0, nullptr, 0); |
Allocator rets(nullptr, 0, rarray, 1); |
RegisterConfig config(params, rets); |
@@ -985,7 +994,8 @@ static void Build_Select_With_Call(CallDescriptor* desc, |
TEST(Float64StackParamsToStackParams) { |
if (DISABLE_NATIVE_STACK_PARAMS) return; |
- int rarray[] = {0}; |
+ int rarray[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableDoubleCode(0)}; |
Allocator params(nullptr, 0, nullptr, 0); |
Allocator rets(nullptr, 0, rarray, 1); |
@@ -1028,10 +1038,18 @@ void MixedParamTest(int start) { |
const int num_params = static_cast<int>(arraysize(types) - start); |
// Build call descriptor |
- int parray[] = {0, 1}; |
- int rarray[] = {0}; |
- Allocator palloc(parray, 2, parray, 2); |
- Allocator ralloc(rarray, 1, rarray, 1); |
+ int parray_gp[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableGeneralCode(0), |
+ RegisterConfiguration::ArchDefault()->GetAllocatableGeneralCode(1)}; |
+ int rarray_gp[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableGeneralCode(0)}; |
+ int parray_fp[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableDoubleCode(0), |
+ RegisterConfiguration::ArchDefault()->GetAllocatableDoubleCode(1)}; |
+ int rarray_fp[] = { |
+ RegisterConfiguration::ArchDefault()->GetAllocatableDoubleCode(0)}; |
+ Allocator palloc(parray_gp, 2, parray_fp, 2); |
+ Allocator ralloc(rarray_gp, 1, rarray_fp, 1); |
RegisterConfig config(palloc, ralloc); |
for (int which = 0; which < num_params; which++) { |