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_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/assembler-inl.h" | 7 #include "src/assembler-inl.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/counters.h" | 9 #include "src/counters.h" |
10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 3031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3042 __ Jump(r4); | 3042 __ Jump(r4); |
3043 | 3043 |
3044 __ bind(&stack_overflow); | 3044 __ bind(&stack_overflow); |
3045 { | 3045 { |
3046 FrameScope frame(masm, StackFrame::MANUAL); | 3046 FrameScope frame(masm, StackFrame::MANUAL); |
3047 __ CallRuntime(Runtime::kThrowStackOverflow); | 3047 __ CallRuntime(Runtime::kThrowStackOverflow); |
3048 __ bkpt(0); | 3048 __ bkpt(0); |
3049 } | 3049 } |
3050 } | 3050 } |
3051 | 3051 |
| 3052 void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { |
| 3053 { |
| 3054 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 3055 |
| 3056 // Save all parameter registers (see wasm-linkage.cc). |
| 3057 const RegList gp_regs = r0.bit() | r1.bit() | r2.bit() | r3.bit(); |
| 3058 constexpr DwVfpRegister lowest_fp_reg = d0; |
| 3059 constexpr DwVfpRegister highest_fp_reg = d7; |
| 3060 |
| 3061 __ stm(db_w, sp, gp_regs); |
| 3062 __ vstm(db_w, sp, lowest_fp_reg, highest_fp_reg); |
| 3063 |
| 3064 // Initialize cp register with kZero, CEntryStub will use it to set the |
| 3065 // current context on the isolate. |
| 3066 __ Move(cp, Smi::kZero); |
| 3067 __ CallRuntime(Runtime::kWasmCompileLazy); |
| 3068 // Store returned instruction start in r8. |
| 3069 __ add(r8, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 3070 |
| 3071 // Restore registers. |
| 3072 __ vldm(ia_w, sp, lowest_fp_reg, highest_fp_reg); |
| 3073 __ ldm(ia_w, sp, gp_regs); |
| 3074 } |
| 3075 // Now jump to the instructions of the returned code object. |
| 3076 __ Jump(r8); |
| 3077 } |
3052 #undef __ | 3078 #undef __ |
3053 | 3079 |
3054 } // namespace internal | 3080 } // namespace internal |
3055 } // namespace v8 | 3081 } // namespace v8 |
3056 | 3082 |
3057 #endif // V8_TARGET_ARCH_ARM | 3083 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |