OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1721 Register addr, | 1721 Register addr, |
1722 Register scratch1, | 1722 Register scratch1, |
1723 SaveFPRegsMode save_fp, | 1723 SaveFPRegsMode save_fp, |
1724 RememberedSetFinalAction and_then); | 1724 RememberedSetFinalAction and_then); |
1725 | 1725 |
1726 // Push and pop the registers that can hold pointers, as defined by the | 1726 // Push and pop the registers that can hold pointers, as defined by the |
1727 // RegList constant kSafepointSavedRegisters. | 1727 // RegList constant kSafepointSavedRegisters. |
1728 void PushSafepointRegisters(); | 1728 void PushSafepointRegisters(); |
1729 void PopSafepointRegisters(); | 1729 void PopSafepointRegisters(); |
1730 | 1730 |
1731 void PushSafepointFPRegisters(); | 1731 void PushSafepointRegistersAndDoubles(); |
1732 void PopSafepointFPRegisters(); | 1732 void PopSafepointRegistersAndDoubles(); |
1733 | 1733 |
1734 // Store value in register src in the safepoint stack slot for register dst. | 1734 // Store value in register src in the safepoint stack slot for register dst. |
1735 void StoreToSafepointRegisterSlot(Register src, Register dst) { | 1735 void StoreToSafepointRegisterSlot(Register src, Register dst) { |
1736 Poke(src, SafepointRegisterStackIndex(dst.code()) * kPointerSize); | 1736 Poke(src, SafepointRegisterStackIndex(dst.code()) * kPointerSize); |
1737 } | 1737 } |
1738 | 1738 |
1739 // Load the value of the src register from its safepoint stack slot | 1739 // Load the value of the src register from its safepoint stack slot |
1740 // into register dst. | 1740 // into register dst. |
1741 void LoadFromSafepointRegisterSlot(Register dst, Register src) { | 1741 void LoadFromSafepointRegisterSlot(Register dst, Register src) { |
1742 Peek(src, SafepointRegisterStackIndex(dst.code()) * kPointerSize); | 1742 Peek(src, SafepointRegisterStackIndex(dst.code()) * kPointerSize); |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2208 | 2208 |
2209 ~UseScratchRegisterScope(); | 2209 ~UseScratchRegisterScope(); |
2210 | 2210 |
2211 // Take a register from the appropriate temps list. It will be returned | 2211 // Take a register from the appropriate temps list. It will be returned |
2212 // automatically when the scope ends. | 2212 // automatically when the scope ends. |
2213 Register AcquireW() { return AcquireNextAvailable(available_).W(); } | 2213 Register AcquireW() { return AcquireNextAvailable(available_).W(); } |
2214 Register AcquireX() { return AcquireNextAvailable(available_).X(); } | 2214 Register AcquireX() { return AcquireNextAvailable(available_).X(); } |
2215 FPRegister AcquireS() { return AcquireNextAvailable(availablefp_).S(); } | 2215 FPRegister AcquireS() { return AcquireNextAvailable(availablefp_).S(); } |
2216 FPRegister AcquireD() { return AcquireNextAvailable(availablefp_).D(); } | 2216 FPRegister AcquireD() { return AcquireNextAvailable(availablefp_).D(); } |
2217 | 2217 |
2218 Register Acquire(const Register& reg) { | |
ulan
2014/03/24 12:23:51
Please rename to UnsafeAcquire or something simila
vincent.belliard
2014/03/24 16:03:52
done
| |
2219 return AcquireFixed(available_, reg); | |
2220 } | |
2221 FPRegister Acquire(const FPRegister& reg) { | |
2222 return AcquireFixed(availablefp_, reg); | |
ulan
2014/03/24 12:23:51
It is not used and unsafe, please remove.
vincent.belliard
2014/03/24 16:03:52
done
| |
2223 } | |
2224 | |
2218 Register AcquireSameSizeAs(const Register& reg); | 2225 Register AcquireSameSizeAs(const Register& reg); |
2219 FPRegister AcquireSameSizeAs(const FPRegister& reg); | 2226 FPRegister AcquireSameSizeAs(const FPRegister& reg); |
2220 | 2227 |
2221 private: | 2228 private: |
2222 static CPURegister AcquireNextAvailable(CPURegList* available); | 2229 static CPURegister AcquireNextAvailable(CPURegList* available); |
2230 static CPURegister AcquireFixed(CPURegList* available, | |
2231 const CPURegister& reg); | |
2223 | 2232 |
2224 // Available scratch registers. | 2233 // Available scratch registers. |
2225 CPURegList* available_; // kRegister | 2234 CPURegList* available_; // kRegister |
2226 CPURegList* availablefp_; // kFPRegister | 2235 CPURegList* availablefp_; // kFPRegister |
2227 | 2236 |
2228 // The state of the available lists at the start of this scope. | 2237 // The state of the available lists at the start of this scope. |
2229 RegList old_available_; // kRegister | 2238 RegList old_available_; // kRegister |
2230 RegList old_availablefp_; // kFPRegister | 2239 RegList old_availablefp_; // kFPRegister |
2231 }; | 2240 }; |
2232 | 2241 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2294 #error "Unsupported option" | 2303 #error "Unsupported option" |
2295 #define CODE_COVERAGE_STRINGIFY(x) #x | 2304 #define CODE_COVERAGE_STRINGIFY(x) #x |
2296 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2305 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
2297 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2306 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
2298 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2307 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
2299 #else | 2308 #else |
2300 #define ACCESS_MASM(masm) masm-> | 2309 #define ACCESS_MASM(masm) masm-> |
2301 #endif | 2310 #endif |
2302 | 2311 |
2303 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2312 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
OLD | NEW |