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/mips/assembler-mips.h" | 10 #include "src/mips/assembler-mips.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 return MemOperand(sp, offset); | 135 return MemOperand(sp, offset); |
136 } | 136 } |
137 | 137 |
138 | 138 |
139 // MacroAssembler implements a collection of frequently used macros. | 139 // MacroAssembler implements a collection of frequently used macros. |
140 class MacroAssembler: public Assembler { | 140 class MacroAssembler: public Assembler { |
141 public: | 141 public: |
142 MacroAssembler(Isolate* isolate, void* buffer, int size, | 142 MacroAssembler(Isolate* isolate, void* buffer, int size, |
143 CodeObjectRequired create_code_object); | 143 CodeObjectRequired create_code_object); |
144 | 144 |
| 145 Isolate* isolate() const { return isolate_; } |
| 146 |
145 // Arguments macros. | 147 // Arguments macros. |
146 #define COND_TYPED_ARGS Condition cond, Register r1, const Operand& r2 | 148 #define COND_TYPED_ARGS Condition cond, Register r1, const Operand& r2 |
147 #define COND_ARGS cond, r1, r2 | 149 #define COND_ARGS cond, r1, r2 |
148 | 150 |
149 // Cases when relocation is not needed. | 151 // Cases when relocation is not needed. |
150 #define DECLARE_NORELOC_PROTOTYPE(Name, target_type) \ | 152 #define DECLARE_NORELOC_PROTOTYPE(Name, target_type) \ |
151 void Name(target_type target, BranchDelaySlot bd = PROTECT); \ | 153 void Name(target_type target, BranchDelaySlot bd = PROTECT); \ |
152 inline void Name(BranchDelaySlot bd, target_type target) { \ | 154 inline void Name(BranchDelaySlot bd, target_type target) { \ |
153 Name(target, bd); \ | 155 Name(target, bd); \ |
154 } \ | 156 } \ |
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1739 Register mask_reg); | 1741 Register mask_reg); |
1740 | 1742 |
1741 // Compute memory operands for safepoint stack slots. | 1743 // Compute memory operands for safepoint stack slots. |
1742 static int SafepointRegisterStackIndex(int reg_code); | 1744 static int SafepointRegisterStackIndex(int reg_code); |
1743 MemOperand SafepointRegisterSlot(Register reg); | 1745 MemOperand SafepointRegisterSlot(Register reg); |
1744 MemOperand SafepointRegistersAndDoublesSlot(Register reg); | 1746 MemOperand SafepointRegistersAndDoublesSlot(Register reg); |
1745 | 1747 |
1746 bool generating_stub_; | 1748 bool generating_stub_; |
1747 bool has_frame_; | 1749 bool has_frame_; |
1748 bool has_double_zero_reg_set_; | 1750 bool has_double_zero_reg_set_; |
| 1751 Isolate* isolate_; |
1749 // This handle will be patched with the code object on installation. | 1752 // This handle will be patched with the code object on installation. |
1750 Handle<Object> code_object_; | 1753 Handle<Object> code_object_; |
1751 | 1754 |
1752 // Needs access to SafepointRegisterStackIndex for compiled frame | 1755 // Needs access to SafepointRegisterStackIndex for compiled frame |
1753 // traversal. | 1756 // traversal. |
1754 friend class StandardFrame; | 1757 friend class StandardFrame; |
1755 }; | 1758 }; |
1756 | 1759 |
1757 | 1760 |
1758 // The code patcher is used to patch (typically) small parts of code e.g. for | 1761 // The code patcher is used to patch (typically) small parts of code e.g. for |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1816 dd(GetLabelFunction(index)); | 1819 dd(GetLabelFunction(index)); |
1817 } | 1820 } |
1818 } | 1821 } |
1819 | 1822 |
1820 #define ACCESS_MASM(masm) masm-> | 1823 #define ACCESS_MASM(masm) masm-> |
1821 | 1824 |
1822 } // namespace internal | 1825 } // namespace internal |
1823 } // namespace v8 | 1826 } // namespace v8 |
1824 | 1827 |
1825 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1828 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |