| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef V8_ARM64_ASSEMBLER_ARM64_H_ | 5 #ifndef V8_ARM64_ASSEMBLER_ARM64_H_ |
| 6 #define V8_ARM64_ASSEMBLER_ARM64_H_ | 6 #define V8_ARM64_ASSEMBLER_ARM64_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 269 |
| 270 // Gap between low and high ranges. | 270 // Gap between low and high ranges. |
| 271 static const int kAllocatableRangeGapSize = | 271 static const int kAllocatableRangeGapSize = |
| 272 (kAllocatableHighRangeBegin - kAllocatableLowRangeEnd) - 1; | 272 (kAllocatableHighRangeBegin - kAllocatableLowRangeEnd) - 1; |
| 273 | 273 |
| 274 static const int kMaxNumAllocatableRegisters = | 274 static const int kMaxNumAllocatableRegisters = |
| 275 (kAllocatableLowRangeEnd - kAllocatableLowRangeBegin + 1) + | 275 (kAllocatableLowRangeEnd - kAllocatableLowRangeBegin + 1) + |
| 276 (kAllocatableHighRangeEnd - kAllocatableHighRangeBegin + 1); | 276 (kAllocatableHighRangeEnd - kAllocatableHighRangeBegin + 1); |
| 277 static int NumAllocatableRegisters() { return kMaxNumAllocatableRegisters; } | 277 static int NumAllocatableRegisters() { return kMaxNumAllocatableRegisters; } |
| 278 | 278 |
| 279 // TODO(turbofan): Proper float32 support. |
| 280 static int NumAllocatableAliasedRegisters() { |
| 281 return NumAllocatableRegisters(); |
| 282 } |
| 283 |
| 279 // Return true if the register is one that crankshaft can allocate. | 284 // Return true if the register is one that crankshaft can allocate. |
| 280 bool IsAllocatable() const { | 285 bool IsAllocatable() const { |
| 281 return (Bit() & kAllocatableFPRegisters) != 0; | 286 return (Bit() & kAllocatableFPRegisters) != 0; |
| 282 } | 287 } |
| 283 | 288 |
| 284 static FPRegister FromAllocationIndex(unsigned int index) { | 289 static FPRegister FromAllocationIndex(unsigned int index) { |
| 285 DCHECK(index < static_cast<unsigned>(NumAllocatableRegisters())); | 290 DCHECK(index < static_cast<unsigned>(NumAllocatableRegisters())); |
| 286 | 291 |
| 287 return (index <= kAllocatableLowRangeEnd) | 292 return (index <= kAllocatableLowRangeEnd) |
| 288 ? from_code(index) | 293 ? from_code(index) |
| (...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 class EnsureSpace BASE_EMBEDDED { | 2296 class EnsureSpace BASE_EMBEDDED { |
| 2292 public: | 2297 public: |
| 2293 explicit EnsureSpace(Assembler* assembler) { | 2298 explicit EnsureSpace(Assembler* assembler) { |
| 2294 assembler->CheckBufferSpace(); | 2299 assembler->CheckBufferSpace(); |
| 2295 } | 2300 } |
| 2296 }; | 2301 }; |
| 2297 | 2302 |
| 2298 } } // namespace v8::internal | 2303 } } // namespace v8::internal |
| 2299 | 2304 |
| 2300 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ | 2305 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ |
| OLD | NEW |