| Index: src/register-configuration.cc
|
| diff --git a/src/register-configuration.cc b/src/register-configuration.cc
|
| index 084e735af1e9c2346af612984f4b9cdb2ac769e5..2a0d6afc56da0cf5b756e0dda4787b40171b5d62 100644
|
| --- a/src/register-configuration.cc
|
| +++ b/src/register-configuration.cc
|
| @@ -44,6 +44,79 @@ class ArchDefaultRegisterConfiguration : public RegisterConfiguration {
|
| kMaxAllocatableDoubleRegisterCount,
|
| kMaxAllocatableDoubleRegisterCount,
|
| #elif V8_TARGET_ARCH_X87
|
| + kMaxAllocatableGeneralRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| +#elif V8_TARGET_ARCH_X64
|
| + kMaxAllocatableGeneralRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| +#elif V8_TARGET_ARCH_ARM
|
| + FLAG_enable_embedded_constant_pool
|
| + ? (kMaxAllocatableGeneralRegisterCount - 1)
|
| + : kMaxAllocatableGeneralRegisterCount,
|
| + CpuFeatures::IsSupported(VFP32DREGS)
|
| + ? kMaxAllocatableDoubleRegisterCount
|
| + : (ALLOCATABLE_NO_VFP32_DOUBLE_REGISTERS(REGISTER_COUNT)0),
|
| + ALLOCATABLE_NO_VFP32_DOUBLE_REGISTERS(REGISTER_COUNT)0,
|
| +#elif V8_TARGET_ARCH_ARM64
|
| + kMaxAllocatableGeneralRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| +#elif V8_TARGET_ARCH_MIPS
|
| + kMaxAllocatableGeneralRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| +#elif V8_TARGET_ARCH_MIPS64
|
| + kMaxAllocatableGeneralRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| +#elif V8_TARGET_ARCH_PPC
|
| + kMaxAllocatableGeneralRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| +#else
|
| + GetAllocatableGeneralRegisterCount(),
|
| + GetAllocatableDoubleRegisterCount(),
|
| + GetAllocatableAliasedDoubleRegisterCount(),
|
| +#endif
|
| + GetAllocatableGeneralCodes(), GetAllocatableDoubleCodes(),
|
| + kGeneralRegisterNames, kDoubleRegisterNames) {
|
| + }
|
| +
|
| + const char* general_register_name_table_[Register::kNumRegisters];
|
| + const char* double_register_name_table_[DoubleRegister::kMaxNumRegisters];
|
| +
|
| + private:
|
| + static const int* GetAllocatableGeneralCodes() {
|
| +#define REGISTER_CODE(R) Register::kCode_##R,
|
| + static const int general_codes[] = {
|
| + ALLOCATABLE_GENERAL_REGISTERS(REGISTER_CODE)};
|
| +#undef REGISTER_CODE
|
| + return general_codes;
|
| + }
|
| +
|
| + static const int* GetAllocatableDoubleCodes() {
|
| +#define REGISTER_CODE(R) DoubleRegister::kCode_##R,
|
| + static const int double_codes[] = {
|
| + ALLOCATABLE_DOUBLE_REGISTERS(REGISTER_CODE)};
|
| +#undef REGISTER_CODE
|
| + return double_codes;
|
| + }
|
| +};
|
| +
|
| +
|
| +class ArchDefaultRegisterConfigurationForTurbofan
|
| + : public RegisterConfiguration {
|
| + public:
|
| + ArchDefaultRegisterConfigurationForTurbofan()
|
| + : RegisterConfiguration(
|
| + Register::kNumRegisters, DoubleRegister::kMaxNumRegisters,
|
| +#if V8_TARGET_ARCH_IA32
|
| + kMaxAllocatableGeneralRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| + kMaxAllocatableDoubleRegisterCount,
|
| +#elif V8_TARGET_ARCH_X87
|
| kMaxAllocatableGeneralRegisterCount, 1, 1,
|
| #elif V8_TARGET_ARCH_X64
|
| kMaxAllocatableGeneralRegisterCount,
|
| @@ -107,6 +180,9 @@ class ArchDefaultRegisterConfiguration : public RegisterConfiguration {
|
| static base::LazyInstance<ArchDefaultRegisterConfiguration>::type
|
| kDefaultRegisterConfiguration = LAZY_INSTANCE_INITIALIZER;
|
|
|
| +static base::LazyInstance<ArchDefaultRegisterConfigurationForTurbofan>::type
|
| + kDefaultRegisterConfigurationForTurbo = LAZY_INSTANCE_INITIALIZER;
|
| +
|
| } // namespace
|
|
|
|
|
| @@ -114,6 +190,12 @@ const RegisterConfiguration* RegisterConfiguration::ArchDefault() {
|
| return &kDefaultRegisterConfiguration.Get();
|
| }
|
|
|
| +
|
| +const RegisterConfiguration* RegisterConfiguration::ArchDefaultForTurbo() {
|
| + return &kDefaultRegisterConfiguration.Get();
|
| +}
|
| +
|
| +
|
| RegisterConfiguration::RegisterConfiguration(
|
| int num_general_registers, int num_double_registers,
|
| int num_allocatable_general_registers, int num_allocatable_double_registers,
|
|
|