| 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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 AllowDeferredHandleDereference heap_object_check; | 697 AllowDeferredHandleDereference heap_object_check; |
| 698 if (object->IsHeapObject()) { | 698 if (object->IsHeapObject()) { |
| 699 LoadHeapObject(result, Handle<HeapObject>::cast(object)); | 699 LoadHeapObject(result, Handle<HeapObject>::cast(object)); |
| 700 } else { | 700 } else { |
| 701 Mov(result, Operand(object)); | 701 Mov(result, Operand(object)); |
| 702 } | 702 } |
| 703 } | 703 } |
| 704 | 704 |
| 705 static int SafepointRegisterStackIndex(int reg_code); | 705 static int SafepointRegisterStackIndex(int reg_code); |
| 706 | 706 |
| 707 void CheckForInvalidValuesInCalleeSavedRegs(RegList list); | |
| 708 | |
| 709 // This is required for compatibility with architecture independant code. | 707 // This is required for compatibility with architecture independant code. |
| 710 // Remove if not needed. | 708 // Remove if not needed. |
| 711 inline void Move(Register dst, Register src) { Mov(dst, src); } | 709 inline void Move(Register dst, Register src) { Mov(dst, src); } |
| 712 | 710 |
| 713 void LoadInstanceDescriptors(Register map, | 711 void LoadInstanceDescriptors(Register map, |
| 714 Register descriptors); | 712 Register descriptors); |
| 715 void EnumLengthUntagged(Register dst, Register map); | 713 void EnumLengthUntagged(Register dst, Register map); |
| 716 void EnumLengthSmi(Register dst, Register map); | 714 void EnumLengthSmi(Register dst, Register map); |
| 717 void NumberOfOwnDescriptors(Register dst, Register map); | 715 void NumberOfOwnDescriptors(Register dst, Register map); |
| 718 | 716 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 Label* either_smi_label, | 752 Label* either_smi_label, |
| 755 Label* not_smi_label = NULL); | 753 Label* not_smi_label = NULL); |
| 756 inline void JumpIfEitherNotSmi(Register value1, | 754 inline void JumpIfEitherNotSmi(Register value1, |
| 757 Register value2, | 755 Register value2, |
| 758 Label* not_smi_label); | 756 Label* not_smi_label); |
| 759 inline void JumpIfBothNotSmi(Register value1, | 757 inline void JumpIfBothNotSmi(Register value1, |
| 760 Register value2, | 758 Register value2, |
| 761 Label* not_smi_label); | 759 Label* not_smi_label); |
| 762 | 760 |
| 763 // Abort execution if argument is a smi, enabled via --debug-code. | 761 // Abort execution if argument is a smi, enabled via --debug-code. |
| 764 void AssertNotSmi(Register object, | 762 void AssertNotSmi(Register object, BailoutReason reason = kOperandIsASmi); |
| 765 const char* fail_message = "Operand is a smi"); | 763 void AssertSmi(Register object, BailoutReason reason = kOperandIsNotASmi); |
| 766 void AssertSmi(Register object, | |
| 767 const char* fail_message = "Operand is not a smi"); | |
| 768 | 764 |
| 769 // Abort execution if argument is not a name, enabled via --debug-code. | 765 // Abort execution if argument is not a name, enabled via --debug-code. |
| 770 void AssertName(Register object); | 766 void AssertName(Register object); |
| 771 | 767 |
| 772 // Abort execution if argument is not a string, enabled via --debug-code. | 768 // Abort execution if argument is not a string, enabled via --debug-code. |
| 773 void AssertString(Register object); | 769 void AssertString(Register object); |
| 774 | 770 |
| 775 // Abort execution if argument is not the root value with the given index, | |
| 776 // enabled via --debug-code. | |
| 777 void AssertRootValue(Register src, | |
| 778 Heap::RootListIndex root_value_index, | |
| 779 const char* message); | |
| 780 | |
| 781 void JumpForHeapNumber(Register object, | 771 void JumpForHeapNumber(Register object, |
| 782 Register heap_number_map, | 772 Register heap_number_map, |
| 783 Label* on_heap_number, | 773 Label* on_heap_number, |
| 784 Label* on_not_heap_number = NULL); | 774 Label* on_not_heap_number = NULL); |
| 785 void JumpIfHeapNumber(Register object, | 775 void JumpIfHeapNumber(Register object, |
| 786 Label* on_heap_number, | 776 Label* on_heap_number, |
| 787 Register heap_number_map = NoReg); | 777 Register heap_number_map = NoReg); |
| 788 void JumpIfNotHeapNumber(Register object, | 778 void JumpIfNotHeapNumber(Register object, |
| 789 Label* on_not_heap_number, | 779 Label* on_not_heap_number, |
| 790 Register heap_number_map = NoReg); | 780 Register heap_number_map = NoReg); |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 // from its load site. | 1715 // from its load site. |
| 1726 void GetRelocatedValueLocation(Register ldr_location, | 1716 void GetRelocatedValueLocation(Register ldr_location, |
| 1727 Register result); | 1717 Register result); |
| 1728 | 1718 |
| 1729 | 1719 |
| 1730 // --------------------------------------------------------------------------- | 1720 // --------------------------------------------------------------------------- |
| 1731 // Debugging. | 1721 // Debugging. |
| 1732 | 1722 |
| 1733 // Calls Abort(msg) if the condition cond is not satisfied. | 1723 // Calls Abort(msg) if the condition cond is not satisfied. |
| 1734 // Use --debug_code to enable. | 1724 // Use --debug_code to enable. |
| 1735 void Assert(Condition cond, const char* msg); | 1725 void Assert(Condition cond, BailoutReason reason); |
| 1736 void AssertRegisterIsClear(Register reg, const char* msg); | 1726 void AssertRegisterIsClear(Register reg, BailoutReason reason); |
| 1737 void AssertRegisterIsRoot(Register reg, Heap::RootListIndex index); | 1727 void AssertRegisterIsRoot(Register reg, Heap::RootListIndex index); |
| 1738 void AssertFastElements(Register elements); | 1728 void AssertFastElements(Register elements); |
| 1739 | 1729 |
| 1740 // Abort if the specified register contains the invalid color bit pattern. | 1730 // Abort if the specified register contains the invalid color bit pattern. |
| 1741 // The pattern must be in bits [1:0] of 'reg' register. | 1731 // The pattern must be in bits [1:0] of 'reg' register. |
| 1742 // | 1732 // |
| 1743 // If emit_debug_code() is false, this emits no code. | 1733 // If emit_debug_code() is false, this emits no code. |
| 1744 void AssertHasValidColor(const Register& reg); | 1734 void AssertHasValidColor(const Register& reg); |
| 1745 | 1735 |
| 1746 // Abort if 'object' register doesn't point to a string object. | 1736 // Abort if 'object' register doesn't point to a string object. |
| 1747 // | 1737 // |
| 1748 // If emit_debug_code() is false, this emits no code. | 1738 // If emit_debug_code() is false, this emits no code. |
| 1749 void AssertIsString(const Register& object); | 1739 void AssertIsString(const Register& object); |
| 1750 | 1740 |
| 1751 // Like Assert(), but always enabled. | 1741 // Like Assert(), but always enabled. |
| 1752 void Check(Condition cond, const char* msg); | 1742 void Check(Condition cond, BailoutReason reason); |
| 1753 void CheckRegisterIsClear(Register reg, const char* msg); | 1743 void CheckRegisterIsClear(Register reg, BailoutReason reason); |
| 1754 | 1744 |
| 1755 // Print a message to stderr and abort execution. | 1745 // Print a message to stderr and abort execution. |
| 1756 void Abort(const char* msg); | 1746 void Abort(BailoutReason reason); |
| 1757 | 1747 |
| 1758 // Conditionally load the cached Array transitioned map of type | 1748 // Conditionally load the cached Array transitioned map of type |
| 1759 // transitioned_kind from the native context if the map in register | 1749 // transitioned_kind from the native context if the map in register |
| 1760 // map_in_out is the cached Array map in the native context of | 1750 // map_in_out is the cached Array map in the native context of |
| 1761 // expected_kind. | 1751 // expected_kind. |
| 1762 void LoadTransitionedArrayMapConditional( | 1752 void LoadTransitionedArrayMapConditional( |
| 1763 ElementsKind expected_kind, | 1753 ElementsKind expected_kind, |
| 1764 ElementsKind transitioned_kind, | 1754 ElementsKind transitioned_kind, |
| 1765 Register map_in_out, | 1755 Register map_in_out, |
| 1766 Register scratch, | 1756 Register scratch, |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2144 #error "Unsupported option" | 2134 #error "Unsupported option" |
| 2145 #define CODE_COVERAGE_STRINGIFY(x) #x | 2135 #define CODE_COVERAGE_STRINGIFY(x) #x |
| 2146 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2136 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 2147 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2137 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 2148 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2138 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 2149 #else | 2139 #else |
| 2150 #define ACCESS_MASM(masm) masm-> | 2140 #define ACCESS_MASM(masm) masm-> |
| 2151 #endif | 2141 #endif |
| 2152 | 2142 |
| 2153 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ | 2143 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ |
| OLD | NEW |