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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 Heap::RootListIndex index, | 236 Heap::RootListIndex index, |
237 BranchDelaySlot bdslot = PROTECT); | 237 BranchDelaySlot bdslot = PROTECT); |
238 | 238 |
239 // GetLabelFunction must be lambda '[](size_t index) -> Label*' or a | 239 // GetLabelFunction must be lambda '[](size_t index) -> Label*' or a |
240 // functor/function with 'Label *func(size_t index)' declaration. | 240 // functor/function with 'Label *func(size_t index)' declaration. |
241 template <typename Func> | 241 template <typename Func> |
242 void GenerateSwitchTable(Register index, size_t case_count, | 242 void GenerateSwitchTable(Register index, size_t case_count, |
243 Func GetLabelFunction); | 243 Func GetLabelFunction); |
244 #undef COND_ARGS | 244 #undef COND_ARGS |
245 | 245 |
| 246 // Emit code that loads |parameter_index|'th parameter from the stack to |
| 247 // the register according to the CallInterfaceDescriptor definition. |
| 248 // |sp_to_caller_sp_offset_in_words| specifies the number of words pushed |
| 249 // below the caller's sp. |
| 250 template <class Descriptor> |
| 251 void LoadParameterFromStack( |
| 252 Register reg, typename Descriptor::ParameterIndices parameter_index, |
| 253 int sp_to_ra_offset_in_words = 0) { |
| 254 DCHECK(Descriptor::kPassLastArgsOnStack); |
| 255 UNIMPLEMENTED(); |
| 256 } |
| 257 |
246 // Emit code to discard a non-negative number of pointer-sized elements | 258 // Emit code to discard a non-negative number of pointer-sized elements |
247 // from the stack, clobbering only the sp register. | 259 // from the stack, clobbering only the sp register. |
248 void Drop(int count, | 260 void Drop(int count, |
249 Condition cond = cc_always, | 261 Condition cond = cc_always, |
250 Register reg = no_reg, | 262 Register reg = no_reg, |
251 const Operand& op = Operand(no_reg)); | 263 const Operand& op = Operand(no_reg)); |
252 | 264 |
253 // Trivial case of DropAndRet that utilizes the delay slot and only emits | 265 // Trivial case of DropAndRet that utilizes the delay slot and only emits |
254 // 2 instructions. | 266 // 2 instructions. |
255 void DropAndRet(int drop); | 267 void DropAndRet(int drop); |
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2062 dd(GetLabelFunction(index)); | 2074 dd(GetLabelFunction(index)); |
2063 } | 2075 } |
2064 } | 2076 } |
2065 | 2077 |
2066 #define ACCESS_MASM(masm) masm-> | 2078 #define ACCESS_MASM(masm) masm-> |
2067 | 2079 |
2068 } // namespace internal | 2080 } // namespace internal |
2069 } // namespace v8 | 2081 } // namespace v8 |
2070 | 2082 |
2071 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 2083 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |