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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 // | 717 // |
718 // In debug mode, both of these will write invalid data into the claimed or | 718 // In debug mode, both of these will write invalid data into the claimed or |
719 // dropped space. | 719 // dropped space. |
720 // | 720 // |
721 // If the current stack pointer (according to StackPointer()) is csp, then it | 721 // If the current stack pointer (according to StackPointer()) is csp, then it |
722 // must be aligned to 16 bytes and the size claimed or dropped must be a | 722 // must be aligned to 16 bytes and the size claimed or dropped must be a |
723 // multiple of 16 bytes. | 723 // multiple of 16 bytes. |
724 // | 724 // |
725 // Note that unit_size must be specified in bytes. For variants which take a | 725 // Note that unit_size must be specified in bytes. For variants which take a |
726 // Register count, the unit size must be a power of two. | 726 // Register count, the unit size must be a power of two. |
727 inline void Claim(uint64_t count, uint64_t unit_size = kXRegSize); | 727 inline void Claim(int64_t count, uint64_t unit_size = kXRegSize); |
728 inline void Claim(const Register& count, | 728 inline void Claim(const Register& count, |
729 uint64_t unit_size = kXRegSize); | 729 uint64_t unit_size = kXRegSize); |
730 inline void Drop(uint64_t count, uint64_t unit_size = kXRegSize); | 730 inline void Drop(int64_t count, uint64_t unit_size = kXRegSize); |
731 inline void Drop(const Register& count, | 731 inline void Drop(const Register& count, |
732 uint64_t unit_size = kXRegSize); | 732 uint64_t unit_size = kXRegSize); |
733 | 733 |
734 // Variants of Claim and Drop, where the 'count' parameter is a SMI held in a | 734 // Variants of Claim and Drop, where the 'count' parameter is a SMI held in a |
735 // register. | 735 // register. |
736 inline void ClaimBySMI(const Register& count_smi, | 736 inline void ClaimBySMI(const Register& count_smi, |
737 uint64_t unit_size = kXRegSize); | 737 uint64_t unit_size = kXRegSize); |
738 inline void DropBySMI(const Register& count_smi, | 738 inline void DropBySMI(const Register& count_smi, |
739 uint64_t unit_size = kXRegSize); | 739 uint64_t unit_size = kXRegSize); |
740 | 740 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 // enabled via --debug-code. | 970 // enabled via --debug-code. |
971 void AssertBoundFunction(Register object); | 971 void AssertBoundFunction(Register object); |
972 | 972 |
973 // Abort execution if argument is not undefined or an AllocationSite, enabled | 973 // Abort execution if argument is not undefined or an AllocationSite, enabled |
974 // via --debug-code. | 974 // via --debug-code. |
975 void AssertUndefinedOrAllocationSite(Register object, Register scratch); | 975 void AssertUndefinedOrAllocationSite(Register object, Register scratch); |
976 | 976 |
977 // Abort execution if argument is not a string, enabled via --debug-code. | 977 // Abort execution if argument is not a string, enabled via --debug-code. |
978 void AssertString(Register object); | 978 void AssertString(Register object); |
979 | 979 |
| 980 // Abort execution if argument is not a positive or zero integer, enabled via |
| 981 // --debug-code. |
| 982 void AssertPositiveOrZero(Register value); |
| 983 |
980 void JumpIfHeapNumber(Register object, Label* on_heap_number, | 984 void JumpIfHeapNumber(Register object, Label* on_heap_number, |
981 SmiCheckType smi_check_type = DONT_DO_SMI_CHECK); | 985 SmiCheckType smi_check_type = DONT_DO_SMI_CHECK); |
982 void JumpIfNotHeapNumber(Register object, Label* on_not_heap_number, | 986 void JumpIfNotHeapNumber(Register object, Label* on_not_heap_number, |
983 SmiCheckType smi_check_type = DONT_DO_SMI_CHECK); | 987 SmiCheckType smi_check_type = DONT_DO_SMI_CHECK); |
984 | 988 |
985 // Sets the vs flag if the input is -0.0. | 989 // Sets the vs flag if the input is -0.0. |
986 void TestForMinusZero(DoubleRegister input); | 990 void TestForMinusZero(DoubleRegister input); |
987 | 991 |
988 // Jump to label if the input double register contains -0.0. | 992 // Jump to label if the input double register contains -0.0. |
989 void JumpIfMinusZero(DoubleRegister input, Label* on_negative_zero); | 993 void JumpIfMinusZero(DoubleRegister input, Label* on_negative_zero); |
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2242 #error "Unsupported option" | 2246 #error "Unsupported option" |
2243 #define CODE_COVERAGE_STRINGIFY(x) #x | 2247 #define CODE_COVERAGE_STRINGIFY(x) #x |
2244 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2248 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
2245 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2249 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
2246 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2250 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
2247 #else | 2251 #else |
2248 #define ACCESS_MASM(masm) masm-> | 2252 #define ACCESS_MASM(masm) masm-> |
2249 #endif | 2253 #endif |
2250 | 2254 |
2251 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2255 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
OLD | NEW |