OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 3146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3157 __ Jump(code_entry); | 3157 __ Jump(code_entry); |
3158 | 3158 |
3159 __ Bind(&stack_overflow); | 3159 __ Bind(&stack_overflow); |
3160 { | 3160 { |
3161 FrameScope frame(masm, StackFrame::MANUAL); | 3161 FrameScope frame(masm, StackFrame::MANUAL); |
3162 __ CallRuntime(Runtime::kThrowStackOverflow); | 3162 __ CallRuntime(Runtime::kThrowStackOverflow); |
3163 __ Unreachable(); | 3163 __ Unreachable(); |
3164 } | 3164 } |
3165 } | 3165 } |
3166 | 3166 |
| 3167 void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { |
| 3168 DCHECK(masm->StackPointer().is(jssp)); |
| 3169 __ Move(jssp, csp); |
| 3170 { |
| 3171 FrameScope scope(masm, StackFrame::INTERNAL); |
| 3172 |
| 3173 // Save all parameter registers (see wasm-linkage.cc). |
| 3174 const RegList gp_regs = x0.Bit() | x1.Bit() | x2.Bit() | x3.Bit() | |
| 3175 x4.Bit() | x5.Bit() | x6.Bit() | x7.Bit(); |
| 3176 const RegList fp_regs = d0.Bit() | d1.Bit() | d2.Bit() | d3.Bit() | |
| 3177 d4.Bit() | d5.Bit() | d6.Bit() | d7.Bit(); |
| 3178 __ PushXRegList(gp_regs); |
| 3179 __ PushDRegList(fp_regs); |
| 3180 |
| 3181 // Initialize cp register with kZero, CEntryStub will use it to set the |
| 3182 // current context on the isolate. |
| 3183 __ Move(cp, Smi::kZero); |
| 3184 __ CallRuntime(Runtime::kWasmCompileLazy); |
| 3185 // Store returned instruction start in x8. |
| 3186 __ Add(x8, x0, Code::kHeaderSize - kHeapObjectTag); |
| 3187 |
| 3188 // Restore registers. |
| 3189 __ PopDRegList(fp_regs); |
| 3190 __ PopXRegList(gp_regs); |
| 3191 } |
| 3192 // Now jump to the instructions of the returned code object. |
| 3193 __ Jump(x8); |
| 3194 } |
| 3195 |
3167 #undef __ | 3196 #undef __ |
3168 | 3197 |
3169 } // namespace internal | 3198 } // namespace internal |
3170 } // namespace v8 | 3199 } // namespace v8 |
3171 | 3200 |
3172 #endif // V8_TARGET_ARCH_ARM | 3201 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |