| 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_MACRO_ASSEMBLER_ARM64_H_ | 5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| (...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2230 // automatically when the scope ends. | 2230 // automatically when the scope ends. |
| 2231 Register AcquireW() { return AcquireNextAvailable(available_).W(); } | 2231 Register AcquireW() { return AcquireNextAvailable(available_).W(); } |
| 2232 Register AcquireX() { return AcquireNextAvailable(available_).X(); } | 2232 Register AcquireX() { return AcquireNextAvailable(available_).X(); } |
| 2233 FPRegister AcquireS() { return AcquireNextAvailable(availablefp_).S(); } | 2233 FPRegister AcquireS() { return AcquireNextAvailable(availablefp_).S(); } |
| 2234 FPRegister AcquireD() { return AcquireNextAvailable(availablefp_).D(); } | 2234 FPRegister AcquireD() { return AcquireNextAvailable(availablefp_).D(); } |
| 2235 | 2235 |
| 2236 Register UnsafeAcquire(const Register& reg) { | 2236 Register UnsafeAcquire(const Register& reg) { |
| 2237 return Register(UnsafeAcquire(available_, reg)); | 2237 return Register(UnsafeAcquire(available_, reg)); |
| 2238 } | 2238 } |
| 2239 | 2239 |
| 2240 Register Acquire(const Register& reg) { |
| 2241 CHECK(available_->IncludesAliasOf(reg)); |
| 2242 return UnsafeAcquire(reg); |
| 2243 } |
| 2244 |
| 2240 Register AcquireSameSizeAs(const Register& reg); | 2245 Register AcquireSameSizeAs(const Register& reg); |
| 2241 FPRegister AcquireSameSizeAs(const FPRegister& reg); | 2246 FPRegister AcquireSameSizeAs(const FPRegister& reg); |
| 2242 | 2247 |
| 2243 private: | 2248 private: |
| 2244 static CPURegister AcquireNextAvailable(CPURegList* available); | 2249 static CPURegister AcquireNextAvailable(CPURegList* available); |
| 2245 static CPURegister UnsafeAcquire(CPURegList* available, | 2250 static CPURegister UnsafeAcquire(CPURegList* available, |
| 2246 const CPURegister& reg); | 2251 const CPURegister& reg); |
| 2247 | 2252 |
| 2248 // Available scratch registers. | 2253 // Available scratch registers. |
| 2249 CPURegList* available_; // kRegister | 2254 CPURegList* available_; // kRegister |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2318 #error "Unsupported option" | 2323 #error "Unsupported option" |
| 2319 #define CODE_COVERAGE_STRINGIFY(x) #x | 2324 #define CODE_COVERAGE_STRINGIFY(x) #x |
| 2320 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2325 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 2321 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2326 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 2322 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2327 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 2323 #else | 2328 #else |
| 2324 #define ACCESS_MASM(masm) masm-> | 2329 #define ACCESS_MASM(masm) masm-> |
| 2325 #endif | 2330 #endif |
| 2326 | 2331 |
| 2327 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2332 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| OLD | NEW |