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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 return MemOperand(sp, offset); | 163 return MemOperand(sp, offset); |
164 } | 164 } |
165 | 165 |
166 | 166 |
167 // MacroAssembler implements a collection of frequently used macros. | 167 // MacroAssembler implements a collection of frequently used macros. |
168 class MacroAssembler: public Assembler { | 168 class MacroAssembler: public Assembler { |
169 public: | 169 public: |
170 MacroAssembler(Isolate* isolate, void* buffer, int size, | 170 MacroAssembler(Isolate* isolate, void* buffer, int size, |
171 CodeObjectRequired create_code_object); | 171 CodeObjectRequired create_code_object); |
172 | 172 |
| 173 Isolate* isolate() const { return isolate_; } |
| 174 |
173 // Arguments macros. | 175 // Arguments macros. |
174 #define COND_TYPED_ARGS Condition cond, Register r1, const Operand& r2 | 176 #define COND_TYPED_ARGS Condition cond, Register r1, const Operand& r2 |
175 #define COND_ARGS cond, r1, r2 | 177 #define COND_ARGS cond, r1, r2 |
176 | 178 |
177 // Cases when relocation is not needed. | 179 // Cases when relocation is not needed. |
178 #define DECLARE_NORELOC_PROTOTYPE(Name, target_type) \ | 180 #define DECLARE_NORELOC_PROTOTYPE(Name, target_type) \ |
179 void Name(target_type target, BranchDelaySlot bd = PROTECT); \ | 181 void Name(target_type target, BranchDelaySlot bd = PROTECT); \ |
180 inline void Name(BranchDelaySlot bd, target_type target) { \ | 182 inline void Name(BranchDelaySlot bd, target_type target) { \ |
181 Name(target, bd); \ | 183 Name(target, bd); \ |
182 } \ | 184 } \ |
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 Register mask_reg); | 1876 Register mask_reg); |
1875 | 1877 |
1876 // Compute memory operands for safepoint stack slots. | 1878 // Compute memory operands for safepoint stack slots. |
1877 static int SafepointRegisterStackIndex(int reg_code); | 1879 static int SafepointRegisterStackIndex(int reg_code); |
1878 MemOperand SafepointRegisterSlot(Register reg); | 1880 MemOperand SafepointRegisterSlot(Register reg); |
1879 MemOperand SafepointRegistersAndDoublesSlot(Register reg); | 1881 MemOperand SafepointRegistersAndDoublesSlot(Register reg); |
1880 | 1882 |
1881 bool generating_stub_; | 1883 bool generating_stub_; |
1882 bool has_frame_; | 1884 bool has_frame_; |
1883 bool has_double_zero_reg_set_; | 1885 bool has_double_zero_reg_set_; |
| 1886 Isolate* isolate_; |
1884 // This handle will be patched with the code object on installation. | 1887 // This handle will be patched with the code object on installation. |
1885 Handle<Object> code_object_; | 1888 Handle<Object> code_object_; |
1886 | 1889 |
1887 // Needs access to SafepointRegisterStackIndex for compiled frame | 1890 // Needs access to SafepointRegisterStackIndex for compiled frame |
1888 // traversal. | 1891 // traversal. |
1889 friend class StandardFrame; | 1892 friend class StandardFrame; |
1890 }; | 1893 }; |
1891 | 1894 |
1892 | 1895 |
1893 // The code patcher is used to patch (typically) small parts of code e.g. for | 1896 // The code patcher is used to patch (typically) small parts of code e.g. for |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1960 dd(GetLabelFunction(index)); | 1963 dd(GetLabelFunction(index)); |
1961 } | 1964 } |
1962 } | 1965 } |
1963 | 1966 |
1964 #define ACCESS_MASM(masm) masm-> | 1967 #define ACCESS_MASM(masm) masm-> |
1965 | 1968 |
1966 } // namespace internal | 1969 } // namespace internal |
1967 } // namespace v8 | 1970 } // namespace v8 |
1968 | 1971 |
1969 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1972 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |