Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // TODO(jochen): Remove this after the setting is turned on globally. | 5 // TODO(jochen): Remove this after the setting is turned on globally. |
| 6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| 11 #include "src/compiler/machine-type.h" | 11 #include "src/compiler/machine-type.h" |
| 12 #include "src/compiler/raw-machine-assembler.h" | 12 #include "src/compiler/raw-machine-assembler.h" |
| 13 #include "src/register-configuration.h" | 13 #include "src/register-configuration.h" |
| 14 | 14 |
| 15 #include "test/cctest/cctest.h" | 15 #include "test/cctest/cctest.h" |
| 16 #include "test/cctest/compiler/codegen-tester.h" | 16 #include "test/cctest/compiler/codegen-tester.h" |
| 17 #include "test/cctest/compiler/graph-builder-tester.h" | 17 #include "test/cctest/compiler/graph-builder-tester.h" |
| 18 #include "test/cctest/compiler/value-helper.h" | 18 #include "test/cctest/compiler/value-helper.h" |
| 19 | 19 |
| 20 namespace v8 { | 20 namespace v8 { |
| 21 namespace internal { | 21 namespace internal { |
| 22 namespace compiler { | 22 namespace compiler { |
| 23 | 23 |
| 24 #if V8_TARGET_ARCH_ARM64 | |
|
titzer
2015/12/03 11:31:59
You can go ahead and remove the uses of this predi
ahaas
2015/12/03 15:25:06
Done.
| |
| 25 // TODO(titzer): fix native stack parameters on arm64 | |
| 26 #define DISABLE_NATIVE_STACK_PARAMS true | |
| 27 #else | |
| 28 #define DISABLE_NATIVE_STACK_PARAMS false | 24 #define DISABLE_NATIVE_STACK_PARAMS false |
| 29 #endif | |
| 30 | 25 |
| 31 namespace { | 26 namespace { |
| 32 typedef float float32; | 27 typedef float float32; |
| 33 typedef double float64; | 28 typedef double float64; |
| 34 | 29 |
| 35 // Picks a representative pair of integers from the given range. | 30 // Picks a representative pair of integers from the given range. |
| 36 // If there are less than {max_pairs} possible pairs, do them all, otherwise try | 31 // If there are less than {max_pairs} possible pairs, do them all, otherwise try |
| 37 // to select a representative set. | 32 // to select a representative set. |
| 38 class Pairs { | 33 class Pairs { |
| 39 public: | 34 public: |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 return new (zone) CallDescriptor( // -- | 209 return new (zone) CallDescriptor( // -- |
| 215 CallDescriptor::kCallCodeObject, // kind | 210 CallDescriptor::kCallCodeObject, // kind |
| 216 target_type, // target MachineType | 211 target_type, // target MachineType |
| 217 target_loc, // target location | 212 target_loc, // target location |
| 218 msig, // machine_sig | 213 msig, // machine_sig |
| 219 locations.Build(), // location_sig | 214 locations.Build(), // location_sig |
| 220 stack_param_count, // stack_parameter_count | 215 stack_param_count, // stack_parameter_count |
| 221 compiler::Operator::kNoProperties, // properties | 216 compiler::Operator::kNoProperties, // properties |
| 222 kCalleeSaveRegisters, // callee-saved registers | 217 kCalleeSaveRegisters, // callee-saved registers |
| 223 kCalleeSaveFPRegisters, // callee-saved fp regs | 218 kCalleeSaveFPRegisters, // callee-saved fp regs |
| 224 CallDescriptor::kNoFlags, // flags | 219 CallDescriptor::kUseNativeStack, // flags |
| 225 "c-call"); | 220 "c-call"); |
| 226 } | 221 } |
| 227 | 222 |
| 228 private: | 223 private: |
| 229 Allocator& params; | 224 Allocator& params; |
| 230 Allocator& rets; | 225 Allocator& rets; |
| 231 }; | 226 }; |
| 232 | 227 |
| 233 const int kMaxParamCount = 64; | 228 const int kMaxParamCount = 64; |
| 234 | 229 |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1038 // TODO(titzer): mix in 64-bit types on all platforms when supported. | 1033 // TODO(titzer): mix in 64-bit types on all platforms when supported. |
| 1039 #if V8_TARGET_ARCH_32_BIT | 1034 #if V8_TARGET_ARCH_32_BIT |
| 1040 static MachineType types[] = { | 1035 static MachineType types[] = { |
| 1041 kMachInt32, kMachFloat32, kMachFloat64, kMachInt32, kMachFloat64, | 1036 kMachInt32, kMachFloat32, kMachFloat64, kMachInt32, kMachFloat64, |
| 1042 kMachFloat32, kMachFloat32, kMachFloat64, kMachInt32, kMachFloat32, | 1037 kMachFloat32, kMachFloat32, kMachFloat64, kMachInt32, kMachFloat32, |
| 1043 kMachInt32, kMachFloat64, kMachFloat64, kMachFloat32, kMachInt32, | 1038 kMachInt32, kMachFloat64, kMachFloat64, kMachFloat32, kMachInt32, |
| 1044 kMachFloat64, kMachInt32, kMachFloat32}; | 1039 kMachFloat64, kMachInt32, kMachFloat32}; |
| 1045 #else | 1040 #else |
| 1046 static MachineType types[] = { | 1041 static MachineType types[] = { |
| 1047 kMachInt32, kMachInt64, kMachFloat32, kMachFloat64, kMachInt32, | 1042 kMachInt32, kMachInt64, kMachFloat32, kMachFloat64, kMachInt32, |
| 1048 kMachFloat64, kMachFloat32, kMachInt64, kMachFloat64, kMachInt32, | 1043 kMachFloat64, kMachFloat32, kMachInt64, kMachInt64, kMachFloat32, |
| 1049 kMachFloat32, kMachInt32, kMachFloat64, kMachFloat64, kMachInt64, | 1044 kMachFloat32, kMachInt32, kMachFloat64, kMachFloat64, kMachInt64, |
| 1050 kMachInt32, kMachFloat64, kMachInt32, kMachFloat32}; | 1045 kMachInt32, kMachFloat64, kMachInt32, kMachFloat32}; |
| 1051 #endif | 1046 #endif |
| 1052 | 1047 |
| 1053 Isolate* isolate = CcTest::InitIsolateOnce(); | 1048 Isolate* isolate = CcTest::InitIsolateOnce(); |
| 1054 | 1049 |
| 1055 // Build machine signature | 1050 // Build machine signature |
| 1056 MachineType* params = &types[start]; | 1051 MachineType* params = &types[start]; |
| 1057 const int num_params = static_cast<int>(arraysize(types) - start); | 1052 const int num_params = static_cast<int>(arraysize(types) - start); |
| 1058 | 1053 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1162 | 1157 |
| 1163 | 1158 |
| 1164 TEST(MixedParams_0) { MixedParamTest(0); } | 1159 TEST(MixedParams_0) { MixedParamTest(0); } |
| 1165 TEST(MixedParams_1) { MixedParamTest(1); } | 1160 TEST(MixedParams_1) { MixedParamTest(1); } |
| 1166 TEST(MixedParams_2) { MixedParamTest(2); } | 1161 TEST(MixedParams_2) { MixedParamTest(2); } |
| 1167 TEST(MixedParams_3) { MixedParamTest(3); } | 1162 TEST(MixedParams_3) { MixedParamTest(3); } |
| 1168 | 1163 |
| 1169 } // namespace compiler | 1164 } // namespace compiler |
| 1170 } // namespace internal | 1165 } // namespace internal |
| 1171 } // namespace v8 | 1166 } // namespace v8 |
| OLD | NEW |