Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: src/builtins/arm/builtins-arm.cc

Issue 2731523005: [wasm] Lazy compilation for asm.js (Closed)
Patch Set: [wasm] Lazy compilation for asm.js Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/builtins/arm64/builtins-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | src/builtins/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698