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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 3089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3100 __ Jump(t0); | 3100 __ Jump(t0); |
3101 | 3101 |
3102 __ bind(&stack_overflow); | 3102 __ bind(&stack_overflow); |
3103 { | 3103 { |
3104 FrameScope frame(masm, StackFrame::MANUAL); | 3104 FrameScope frame(masm, StackFrame::MANUAL); |
3105 __ CallRuntime(Runtime::kThrowStackOverflow); | 3105 __ CallRuntime(Runtime::kThrowStackOverflow); |
3106 __ break_(0xCC); | 3106 __ break_(0xCC); |
3107 } | 3107 } |
3108 } | 3108 } |
3109 | 3109 |
| 3110 void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { |
| 3111 { |
| 3112 FrameScope scope(masm, StackFrame::INTERNAL); |
| 3113 |
| 3114 // Save all parameter registers (see wasm-linkage.cc). They might be |
| 3115 // overwritten in the runtime call below. |
| 3116 // Other registers (like context and root) are not relevant here. The |
| 3117 // CEntryStub will overwrite them anyway. |
| 3118 const RegList gp_regs = a0.bit() | a1.bit() | a2.bit() | a3.bit(); |
| 3119 const RegList fp_regs = f2.bit() | f4.bit() | f6.bit() | f8.bit() | |
| 3120 f10.bit() | f12.bit() | f14.bit(); |
| 3121 __ MultiPush(gp_regs); |
| 3122 __ MultiPushFPU(fp_regs); |
| 3123 |
| 3124 __ Move(kContextRegister, Smi::kZero); |
| 3125 __ CallRuntime(Runtime::kWasmCompileLazy); |
| 3126 |
| 3127 // Restore registers. |
| 3128 __ MultiPopFPU(fp_regs); |
| 3129 __ MultiPop(gp_regs); |
| 3130 } |
| 3131 // Now jump to the instructions of the returned code object. |
| 3132 __ Addu(at, v0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 3133 __ Jump(at); |
| 3134 } |
| 3135 |
3110 #undef __ | 3136 #undef __ |
3111 | 3137 |
3112 } // namespace internal | 3138 } // namespace internal |
3113 } // namespace v8 | 3139 } // namespace v8 |
3114 | 3140 |
3115 #endif // V8_TARGET_ARCH_MIPS | 3141 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |