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/arm64/assembler-arm64.h" | 10 #include "src/arm64/assembler-arm64.h" |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 // Abort execution if argument is a smi, enabled via --debug-code. | 952 // Abort execution if argument is a smi, enabled via --debug-code. |
953 void AssertNotSmi(Register object, BailoutReason reason = kOperandIsASmi); | 953 void AssertNotSmi(Register object, BailoutReason reason = kOperandIsASmi); |
954 void AssertSmi(Register object, BailoutReason reason = kOperandIsNotASmi); | 954 void AssertSmi(Register object, BailoutReason reason = kOperandIsNotASmi); |
955 | 955 |
956 inline void ObjectTag(Register tagged_obj, Register obj); | 956 inline void ObjectTag(Register tagged_obj, Register obj); |
957 inline void ObjectUntag(Register untagged_obj, Register obj); | 957 inline void ObjectUntag(Register untagged_obj, Register obj); |
958 | 958 |
959 // Abort execution if argument is not a name, enabled via --debug-code. | 959 // Abort execution if argument is not a name, enabled via --debug-code. |
960 void AssertName(Register object); | 960 void AssertName(Register object); |
961 | 961 |
962 // Abort execution if argument is not a JSFunction, enabled via --debug-code. | |
963 void AssertFunction(Register object); | |
964 | |
965 // Abort execution if argument is not undefined or an AllocationSite, enabled | 962 // Abort execution if argument is not undefined or an AllocationSite, enabled |
966 // via --debug-code. | 963 // via --debug-code. |
967 void AssertUndefinedOrAllocationSite(Register object, Register scratch); | 964 void AssertUndefinedOrAllocationSite(Register object, Register scratch); |
968 | 965 |
969 // Abort execution if argument is not a string, enabled via --debug-code. | 966 // Abort execution if argument is not a string, enabled via --debug-code. |
970 void AssertString(Register object); | 967 void AssertString(Register object); |
971 | 968 |
972 void JumpIfHeapNumber(Register object, Label* on_heap_number, | 969 void JumpIfHeapNumber(Register object, Label* on_heap_number, |
973 SmiCheckType smi_check_type = DONT_DO_SMI_CHECK); | 970 SmiCheckType smi_check_type = DONT_DO_SMI_CHECK); |
974 void JumpIfNotHeapNumber(Register object, Label* on_not_heap_number, | 971 void JumpIfNotHeapNumber(Register object, Label* on_not_heap_number, |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1686 // * The exit frame is dropped. | 1683 // * The exit frame is dropped. |
1687 // * The stack pointer is reset to jssp. | 1684 // * The stack pointer is reset to jssp. |
1688 // | 1685 // |
1689 // The stack pointer must be csp on entry. | 1686 // The stack pointer must be csp on entry. |
1690 void LeaveExitFrame(bool save_doubles, | 1687 void LeaveExitFrame(bool save_doubles, |
1691 const Register& scratch, | 1688 const Register& scratch, |
1692 bool restore_context); | 1689 bool restore_context); |
1693 | 1690 |
1694 void LoadContext(Register dst, int context_chain_length); | 1691 void LoadContext(Register dst, int context_chain_length); |
1695 | 1692 |
1696 // Load the global proxy from the current context. | |
1697 void LoadGlobalProxy(Register dst); | |
1698 | |
1699 // Emit code for a truncating division by a constant. The dividend register is | 1693 // Emit code for a truncating division by a constant. The dividend register is |
1700 // unchanged. Dividend and result must be different. | 1694 // unchanged. Dividend and result must be different. |
1701 void TruncatingDiv(Register result, Register dividend, int32_t divisor); | 1695 void TruncatingDiv(Register result, Register dividend, int32_t divisor); |
1702 | 1696 |
1703 // --------------------------------------------------------------------------- | 1697 // --------------------------------------------------------------------------- |
1704 // StatsCounter support | 1698 // StatsCounter support |
1705 | 1699 |
1706 void SetCounter(StatsCounter* counter, int value, Register scratch1, | 1700 void SetCounter(StatsCounter* counter, int value, Register scratch1, |
1707 Register scratch2); | 1701 Register scratch2); |
1708 void IncrementCounter(StatsCounter* counter, int value, Register scratch1, | 1702 void IncrementCounter(StatsCounter* counter, int value, Register scratch1, |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2293 #error "Unsupported option" | 2287 #error "Unsupported option" |
2294 #define CODE_COVERAGE_STRINGIFY(x) #x | 2288 #define CODE_COVERAGE_STRINGIFY(x) #x |
2295 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2289 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
2296 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2290 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
2297 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2291 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
2298 #else | 2292 #else |
2299 #define ACCESS_MASM(masm) masm-> | 2293 #define ACCESS_MASM(masm) masm-> |
2300 #endif | 2294 #endif |
2301 | 2295 |
2302 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2296 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
OLD | NEW |