| 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/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 // it will be encoded in the event marker. | 754 // it will be encoded in the event marker. |
| 755 inline void AnnotateInstrumentation(const char* marker_name); | 755 inline void AnnotateInstrumentation(const char* marker_name); |
| 756 | 756 |
| 757 // If emit_debug_code() is true, emit a run-time check to ensure that | 757 // If emit_debug_code() is true, emit a run-time check to ensure that |
| 758 // StackPointer() does not point below the system stack pointer. | 758 // StackPointer() does not point below the system stack pointer. |
| 759 // | 759 // |
| 760 // Whilst it is architecturally legal for StackPointer() to point below csp, | 760 // Whilst it is architecturally legal for StackPointer() to point below csp, |
| 761 // it can be evidence of a potential bug because the ABI forbids accesses | 761 // it can be evidence of a potential bug because the ABI forbids accesses |
| 762 // below csp. | 762 // below csp. |
| 763 // | 763 // |
| 764 // If StackPointer() is the system stack pointer (csp) or ALWAYS_ALIGN_CSP is | 764 // If StackPointer() is the system stack pointer (csp), then csp will be |
| 765 // enabled, then csp will be dereferenced to cause the processor | 765 // dereferenced to cause the processor (or simulator) to abort if it is not |
| 766 // (or simulator) to abort if it is not properly aligned. | 766 // properly aligned. |
| 767 // | 767 // |
| 768 // If emit_debug_code() is false, this emits no code. | 768 // If emit_debug_code() is false, this emits no code. |
| 769 void AssertStackConsistency(); | 769 void AssertStackConsistency(); |
| 770 | 770 |
| 771 // Preserve the callee-saved registers (as defined by AAPCS64). | 771 // Preserve the callee-saved registers (as defined by AAPCS64). |
| 772 // | 772 // |
| 773 // Higher-numbered registers are pushed before lower-numbered registers, and | 773 // Higher-numbered registers are pushed before lower-numbered registers, and |
| 774 // thus get higher addresses. | 774 // thus get higher addresses. |
| 775 // Floating-point registers are pushed before general-purpose registers, and | 775 // Floating-point registers are pushed before general-purpose registers, and |
| 776 // thus get higher addresses. | 776 // thus get higher addresses. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 // This is necessary when pushing or otherwise adding things to the stack, to | 824 // This is necessary when pushing or otherwise adding things to the stack, to |
| 825 // satisfy the AAPCS64 constraint that the memory below the system stack | 825 // satisfy the AAPCS64 constraint that the memory below the system stack |
| 826 // pointer is not accessed. The amount pushed will be increased as necessary | 826 // pointer is not accessed. The amount pushed will be increased as necessary |
| 827 // to ensure csp remains aligned to 16 bytes. | 827 // to ensure csp remains aligned to 16 bytes. |
| 828 // | 828 // |
| 829 // This method asserts that StackPointer() is not csp, since the call does | 829 // This method asserts that StackPointer() is not csp, since the call does |
| 830 // not make sense in that context. | 830 // not make sense in that context. |
| 831 inline void BumpSystemStackPointer(const Operand& space); | 831 inline void BumpSystemStackPointer(const Operand& space); |
| 832 | 832 |
| 833 // Re-synchronizes the system stack pointer (csp) with the current stack | 833 // Re-synchronizes the system stack pointer (csp) with the current stack |
| 834 // pointer (according to StackPointer()). This function will ensure the | 834 // pointer (according to StackPointer()). |
| 835 // new value of the system stack pointer is remains aligned to 16 bytes, and | |
| 836 // is lower than or equal to the value of the current stack pointer. | |
| 837 // | 835 // |
| 838 // This method asserts that StackPointer() is not csp, since the call does | 836 // This method asserts that StackPointer() is not csp, since the call does |
| 839 // not make sense in that context. | 837 // not make sense in that context. |
| 840 inline void SyncSystemStackPointer(); | 838 inline void SyncSystemStackPointer(); |
| 841 | 839 |
| 842 // Helpers ------------------------------------------------------------------ | 840 // Helpers ------------------------------------------------------------------ |
| 843 // Root register. | 841 // Root register. |
| 844 inline void InitializeRootRegister(); | 842 inline void InitializeRootRegister(); |
| 845 | 843 |
| 846 void AssertFPCRState(Register fpcr = NoReg); | 844 void AssertFPCRState(Register fpcr = NoReg); |
| (...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2332 #error "Unsupported option" | 2330 #error "Unsupported option" |
| 2333 #define CODE_COVERAGE_STRINGIFY(x) #x | 2331 #define CODE_COVERAGE_STRINGIFY(x) #x |
| 2334 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2332 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 2335 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2333 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 2336 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2334 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 2337 #else | 2335 #else |
| 2338 #define ACCESS_MASM(masm) masm-> | 2336 #define ACCESS_MASM(masm) masm-> |
| 2339 #endif | 2337 #endif |
| 2340 | 2338 |
| 2341 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2339 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| OLD | NEW |