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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3127 __ Jump(a4); | 3127 __ Jump(a4); |
3128 | 3128 |
3129 __ bind(&stack_overflow); | 3129 __ bind(&stack_overflow); |
3130 { | 3130 { |
3131 FrameScope frame(masm, StackFrame::MANUAL); | 3131 FrameScope frame(masm, StackFrame::MANUAL); |
3132 __ CallRuntime(Runtime::kThrowStackOverflow); | 3132 __ CallRuntime(Runtime::kThrowStackOverflow); |
3133 __ break_(0xCC); | 3133 __ break_(0xCC); |
3134 } | 3134 } |
3135 } | 3135 } |
3136 | 3136 |
| 3137 void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { |
| 3138 { |
| 3139 FrameScope scope(masm, StackFrame::INTERNAL); |
| 3140 |
| 3141 // Save all parameter registers (see wasm-linkage.cc). They might be |
| 3142 // overwritten in the runtime call below. |
| 3143 // Other registers (like context and root) are not relevant here. The |
| 3144 // CEntryStub will overwrite them anyway. |
| 3145 const RegList gp_regs = a0.bit() | a1.bit() | a2.bit() | a3.bit() | |
| 3146 a4.bit() | a5.bit() | a6.bit() | a7.bit(); |
| 3147 const RegList fp_regs = f2.bit() | f4.bit() | f6.bit() | f8.bit() | |
| 3148 f10.bit() | f12.bit() | f14.bit(); |
| 3149 __ MultiPush(gp_regs); |
| 3150 __ MultiPushFPU(fp_regs); |
| 3151 |
| 3152 __ Move(kContextRegister, Smi::kZero); |
| 3153 __ CallRuntime(Runtime::kWasmCompileLazy); |
| 3154 |
| 3155 // Restore registers. |
| 3156 __ MultiPopFPU(fp_regs); |
| 3157 __ MultiPop(gp_regs); |
| 3158 } |
| 3159 // Now jump to the instructions of the returned code object. |
| 3160 __ Daddu(at, v0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 3161 __ Jump(at); |
| 3162 } |
| 3163 |
3137 #undef __ | 3164 #undef __ |
3138 | 3165 |
3139 } // namespace internal | 3166 } // namespace internal |
3140 } // namespace v8 | 3167 } // namespace v8 |
3141 | 3168 |
3142 #endif // V8_TARGET_ARCH_MIPS64 | 3169 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |