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 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 unsigned SizeInBits() const; | 59 unsigned SizeInBits() const; |
60 int SizeInBytes() const; | 60 int SizeInBytes() const; |
61 bool Is32Bits() const; | 61 bool Is32Bits() const; |
62 bool Is64Bits() const; | 62 bool Is64Bits() const; |
63 bool IsValid() const; | 63 bool IsValid() const; |
64 bool IsValidOrNone() const; | 64 bool IsValidOrNone() const; |
65 bool IsValidRegister() const; | 65 bool IsValidRegister() const; |
66 bool IsValidFPRegister() const; | 66 bool IsValidFPRegister() const; |
67 bool IsNone() const; | 67 bool IsNone() const; |
68 bool Is(const CPURegister& other) const; | 68 bool Is(const CPURegister& other) const; |
| 69 bool Aliases(const CPURegister& other) const; |
69 | 70 |
70 bool IsZero() const; | 71 bool IsZero() const; |
71 bool IsSP() const; | 72 bool IsSP() const; |
72 | 73 |
73 bool IsRegister() const; | 74 bool IsRegister() const; |
74 bool IsFPRegister() const; | 75 bool IsFPRegister() const; |
75 | 76 |
76 Register X() const; | 77 Register X() const; |
77 Register W() const; | 78 Register W() const; |
78 FPRegister D() const; | 79 FPRegister D() const; |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 ASSERT(IsValid()); | 555 ASSERT(IsValid()); |
555 return size_; | 556 return size_; |
556 } | 557 } |
557 | 558 |
558 unsigned RegisterSizeInBytes() const { | 559 unsigned RegisterSizeInBytes() const { |
559 int size_in_bits = RegisterSizeInBits(); | 560 int size_in_bits = RegisterSizeInBits(); |
560 ASSERT((size_in_bits % kBitsPerByte) == 0); | 561 ASSERT((size_in_bits % kBitsPerByte) == 0); |
561 return size_in_bits / kBitsPerByte; | 562 return size_in_bits / kBitsPerByte; |
562 } | 563 } |
563 | 564 |
| 565 unsigned TotalSizeInBytes() const { |
| 566 ASSERT(IsValid()); |
| 567 return RegisterSizeInBytes() * Count(); |
| 568 } |
| 569 |
564 private: | 570 private: |
565 RegList list_; | 571 RegList list_; |
566 unsigned size_; | 572 unsigned size_; |
567 CPURegister::RegisterType type_; | 573 CPURegister::RegisterType type_; |
568 | 574 |
569 bool IsValid() const { | 575 bool IsValid() const { |
570 const RegList kValidRegisters = 0x8000000ffffffff; | 576 const RegList kValidRegisters = 0x8000000ffffffff; |
571 const RegList kValidFPRegisters = 0x0000000ffffffff; | 577 const RegList kValidFPRegisters = 0x0000000ffffffff; |
572 switch (type_) { | 578 switch (type_) { |
573 case CPURegister::kRegister: | 579 case CPURegister::kRegister: |
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2227 class EnsureSpace BASE_EMBEDDED { | 2233 class EnsureSpace BASE_EMBEDDED { |
2228 public: | 2234 public: |
2229 explicit EnsureSpace(Assembler* assembler) { | 2235 explicit EnsureSpace(Assembler* assembler) { |
2230 assembler->CheckBufferSpace(); | 2236 assembler->CheckBufferSpace(); |
2231 } | 2237 } |
2232 }; | 2238 }; |
2233 | 2239 |
2234 } } // namespace v8::internal | 2240 } } // namespace v8::internal |
2235 | 2241 |
2236 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ | 2242 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ |
OLD | NEW |