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

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

Issue 2761773004: PPC/s390: [wasm] Lazy compilation for asm.js (Closed)
Patch Set: 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/s390/builtins-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 3009 matching lines...) Expand 10 before | Expand all | Expand 10 after
3020 __ JumpToJSEntry(ip); 3020 __ JumpToJSEntry(ip);
3021 3021
3022 __ bind(&stack_overflow); 3022 __ bind(&stack_overflow);
3023 { 3023 {
3024 FrameScope frame(masm, StackFrame::MANUAL); 3024 FrameScope frame(masm, StackFrame::MANUAL);
3025 __ CallRuntime(Runtime::kThrowStackOverflow); 3025 __ CallRuntime(Runtime::kThrowStackOverflow);
3026 __ bkpt(0); 3026 __ bkpt(0);
3027 } 3027 }
3028 } 3028 }
3029 3029
3030 void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
3031 {
3032 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
3033
3034 // Save all parameter registers (see wasm-linkage.cc). They might be
3035 // overwritten in the runtime call below. We don't have any callee-saved
3036 // registers in wasm, so no need to store anything else.
3037 const RegList gp_regs = r3.bit() | r4.bit() | r5.bit() | r6.bit() |
3038 r7.bit() | r8.bit() | r9.bit() | r10.bit();
3039 const RegList fp_regs = d1.bit() | d2.bit() | d3.bit() | d4.bit() |
3040 d5.bit() | d6.bit() | d7.bit() | d8.bit();
3041 __ MultiPush(gp_regs);
3042 __ MultiPushDoubles(fp_regs);
3043
3044 // Initialize cp register with kZero, CEntryStub will use it to set the
3045 // current context on the isolate.
3046 __ LoadSmiLiteral(cp, Smi::kZero);
3047 __ CallRuntime(Runtime::kWasmCompileLazy);
3048 // Store returned instruction start in ip.
3049 __ addi(ip, r3, Operand(Code::kHeaderSize - kHeapObjectTag));
3050
3051 // Restore registers.
3052 __ MultiPopDoubles(fp_regs);
3053 __ MultiPop(gp_regs);
3054 }
3055 // Now jump to the instructions of the returned code object.
3056 __ Jump(ip);
3057 }
3058
3030 #undef __ 3059 #undef __
3031 } // namespace internal 3060 } // namespace internal
3032 } // namespace v8 3061 } // namespace v8
3033 3062
3034 #endif // V8_TARGET_ARCH_PPC 3063 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/builtins/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698