| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/register-configuration.h" | 5 #include "src/register-configuration.h" |
| 6 #include "src/globals.h" | 6 #include "src/globals.h" |
| 7 #include "src/macro-assembler.h" | 7 #include "src/macro-assembler.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 GetAllocatableAliasedDoubleRegisterCount(), | 75 GetAllocatableAliasedDoubleRegisterCount(), |
| 76 #endif | 76 #endif |
| 77 GetAllocatableGeneralCodes(), GetAllocatableDoubleCodes(), | 77 GetAllocatableGeneralCodes(), GetAllocatableDoubleCodes(), |
| 78 kGeneralRegisterNames, kDoubleRegisterNames) { | 78 kGeneralRegisterNames, kDoubleRegisterNames) { |
| 79 } | 79 } |
| 80 | 80 |
| 81 const char* general_register_name_table_[Register::kNumRegisters]; | 81 const char* general_register_name_table_[Register::kNumRegisters]; |
| 82 const char* double_register_name_table_[DoubleRegister::kMaxNumRegisters]; | 82 const char* double_register_name_table_[DoubleRegister::kMaxNumRegisters]; |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 friend struct Register; | |
| 86 friend struct DoubleRegister; | |
| 87 | |
| 88 static const int* GetAllocatableGeneralCodes() { | 85 static const int* GetAllocatableGeneralCodes() { |
| 89 #define REGISTER_CODE(R) Register::kCode_##R, | 86 #define REGISTER_CODE(R) Register::kCode_##R, |
| 90 static const int general_codes[] = { | 87 static const int general_codes[] = { |
| 91 ALLOCATABLE_GENERAL_REGISTERS(REGISTER_CODE)}; | 88 ALLOCATABLE_GENERAL_REGISTERS(REGISTER_CODE)}; |
| 92 #undef REGISTER_CODE | 89 #undef REGISTER_CODE |
| 93 return general_codes; | 90 return general_codes; |
| 94 } | 91 } |
| 95 | 92 |
| 96 static const int* GetAllocatableDoubleCodes() { | 93 static const int* GetAllocatableDoubleCodes() { |
| 97 #define REGISTER_CODE(R) DoubleRegister::kCode_##R, | 94 #define REGISTER_CODE(R) DoubleRegister::kCode_##R, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 134 } |
| 138 for (int i = 0; i < num_allocatable_double_registers_; ++i) { | 135 for (int i = 0; i < num_allocatable_double_registers_; ++i) { |
| 139 allocatable_double_codes_mask_ |= (1 << allocatable_double_codes_[i]); | 136 allocatable_double_codes_mask_ |= (1 << allocatable_double_codes_[i]); |
| 140 } | 137 } |
| 141 } | 138 } |
| 142 | 139 |
| 143 #undef REGISTER_COUNT | 140 #undef REGISTER_COUNT |
| 144 | 141 |
| 145 } // namespace internal | 142 } // namespace internal |
| 146 } // namespace v8 | 143 } // namespace v8 |
| OLD | NEW |