OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/mips64/assembler-mips64.h" | 10 #include "src/mips64/assembler-mips64.h" |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 // Machine code version of Map::GetConstructor(). | 1064 // Machine code version of Map::GetConstructor(). |
1065 // |temp| holds |result|'s map when done, and |temp2| its instance type. | 1065 // |temp| holds |result|'s map when done, and |temp2| its instance type. |
1066 void GetMapConstructor(Register result, Register map, Register temp, | 1066 void GetMapConstructor(Register result, Register map, Register temp, |
1067 Register temp2); | 1067 Register temp2); |
1068 | 1068 |
1069 // Try to get function prototype of a function and puts the value in | 1069 // Try to get function prototype of a function and puts the value in |
1070 // the result register. Checks that the function really is a | 1070 // the result register. Checks that the function really is a |
1071 // function and jumps to the miss label if the fast checks fail. The | 1071 // function and jumps to the miss label if the fast checks fail. The |
1072 // function register will be untouched; the other registers may be | 1072 // function register will be untouched; the other registers may be |
1073 // clobbered. | 1073 // clobbered. |
1074 void TryGetFunctionPrototype(Register function, | 1074 void TryGetFunctionPrototype(Register function, Register result, |
1075 Register result, | 1075 Register scratch, Label* miss); |
1076 Register scratch, | |
1077 Label* miss, | |
1078 bool miss_on_bound_function = false); | |
1079 | 1076 |
1080 void GetObjectType(Register function, | 1077 void GetObjectType(Register function, |
1081 Register map, | 1078 Register map, |
1082 Register type_reg); | 1079 Register type_reg); |
1083 | 1080 |
1084 // Check if a map for a JSObject indicates that the object has fast elements. | 1081 // Check if a map for a JSObject indicates that the object has fast elements. |
1085 // Jump to the specified label if it does not. | 1082 // Jump to the specified label if it does not. |
1086 void CheckFastElements(Register map, | 1083 void CheckFastElements(Register map, |
1087 Register scratch, | 1084 Register scratch, |
1088 Label* fail); | 1085 Label* fail); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 } | 1671 } |
1675 // Generates function and stub prologue code. | 1672 // Generates function and stub prologue code. |
1676 void StubPrologue(); | 1673 void StubPrologue(); |
1677 void Prologue(bool code_pre_aging); | 1674 void Prologue(bool code_pre_aging); |
1678 | 1675 |
1679 // Activation support. | 1676 // Activation support. |
1680 void EnterFrame(StackFrame::Type type); | 1677 void EnterFrame(StackFrame::Type type); |
1681 void EnterFrame(StackFrame::Type type, bool load_constant_pool_pointer_reg); | 1678 void EnterFrame(StackFrame::Type type, bool load_constant_pool_pointer_reg); |
1682 void LeaveFrame(StackFrame::Type type); | 1679 void LeaveFrame(StackFrame::Type type); |
1683 | 1680 |
1684 // Patch the relocated value (lui/ori pair). | |
1685 void PatchRelocatedValue(Register li_location, | |
1686 Register scratch, | |
1687 Register new_value); | |
1688 // Get the relocatad value (loaded data) from the lui/ori pair. | |
1689 void GetRelocatedValue(Register li_location, | |
1690 Register value, | |
1691 Register scratch); | |
1692 | |
1693 // Expects object in a0 and returns map with validated enum cache | 1681 // Expects object in a0 and returns map with validated enum cache |
1694 // in a0. Assumes that any other register can be used as a scratch. | 1682 // in a0. Assumes that any other register can be used as a scratch. |
1695 void CheckEnumCache(Register null_value, Label* call_runtime); | 1683 void CheckEnumCache(Register null_value, Label* call_runtime); |
1696 | 1684 |
1697 // AllocationMemento support. Arrays may have an associated | 1685 // AllocationMemento support. Arrays may have an associated |
1698 // AllocationMemento object that can be checked for in order to pretransition | 1686 // AllocationMemento object that can be checked for in order to pretransition |
1699 // to another type. | 1687 // to another type. |
1700 // On entry, receiver_reg should point to the array object. | 1688 // On entry, receiver_reg should point to the array object. |
1701 // scratch_reg gets clobbered. | 1689 // scratch_reg gets clobbered. |
1702 // If allocation info is present, jump to allocation_memento_present. | 1690 // If allocation info is present, jump to allocation_memento_present. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1842 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1830 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1843 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1831 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1844 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1832 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1845 #else | 1833 #else |
1846 #define ACCESS_MASM(masm) masm-> | 1834 #define ACCESS_MASM(masm) masm-> |
1847 #endif | 1835 #endif |
1848 | 1836 |
1849 } } // namespace v8::internal | 1837 } } // namespace v8::internal |
1850 | 1838 |
1851 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1839 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |