| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // Core register | 157 // Core register |
| 158 struct Register { | 158 struct Register { |
| 159 static const int kNumRegisters = 16; | 159 static const int kNumRegisters = 16; |
| 160 static const int kMaxNumAllocatableRegisters = | 160 static const int kMaxNumAllocatableRegisters = |
| 161 FLAG_enable_ool_constant_pool ? 8 : 9; | 161 FLAG_enable_ool_constant_pool ? 8 : 9; |
| 162 static const int kSizeInBytes = 4; | 162 static const int kSizeInBytes = 4; |
| 163 | 163 |
| 164 inline static int NumAllocatableRegisters(); | 164 inline static int NumAllocatableRegisters(); |
| 165 | 165 |
| 166 static int ToAllocationIndex(Register reg) { | 166 static int ToAllocationIndex(Register reg) { |
| 167 if (FLAG_enable_ool_constant_pool && (reg.code() >= kRegister_r8_Code)) { | |
| 168 return reg.code() - 1; | |
| 169 } | |
| 170 ASSERT(reg.code() < kMaxNumAllocatableRegisters); | 167 ASSERT(reg.code() < kMaxNumAllocatableRegisters); |
| 171 return reg.code(); | 168 return reg.code(); |
| 172 } | 169 } |
| 173 | 170 |
| 174 static Register FromAllocationIndex(int index) { | 171 static Register FromAllocationIndex(int index) { |
| 175 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); | 172 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
| 176 if (FLAG_enable_ool_constant_pool && (index >= 7)) { | |
| 177 return from_code(index + 1); | |
| 178 } | |
| 179 return from_code(index); | 173 return from_code(index); |
| 180 } | 174 } |
| 181 | 175 |
| 182 static const char* AllocationIndexToString(int index) { | 176 static const char* AllocationIndexToString(int index) { |
| 183 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); | 177 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
| 184 const char* const names[] = { | 178 const char* const names[] = { |
| 185 "r0", | 179 "r0", |
| 186 "r1", | 180 "r1", |
| 187 "r2", | 181 "r2", |
| 188 "r3", | 182 "r3", |
| (...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 public: | 1604 public: |
| 1611 explicit EnsureSpace(Assembler* assembler) { | 1605 explicit EnsureSpace(Assembler* assembler) { |
| 1612 assembler->CheckBuffer(); | 1606 assembler->CheckBuffer(); |
| 1613 } | 1607 } |
| 1614 }; | 1608 }; |
| 1615 | 1609 |
| 1616 | 1610 |
| 1617 } } // namespace v8::internal | 1611 } } // namespace v8::internal |
| 1618 | 1612 |
| 1619 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1613 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |