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

Side by Side Diff: src/builtins/s390/builtins-s390.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 | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | 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_S390 5 #if V8_TARGET_ARCH_S390
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 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 __ JumpToJSEntry(ip); 3031 __ JumpToJSEntry(ip);
3032 3032
3033 __ bind(&stack_overflow); 3033 __ bind(&stack_overflow);
3034 { 3034 {
3035 FrameScope frame(masm, StackFrame::MANUAL); 3035 FrameScope frame(masm, StackFrame::MANUAL);
3036 __ CallRuntime(Runtime::kThrowStackOverflow); 3036 __ CallRuntime(Runtime::kThrowStackOverflow);
3037 __ bkpt(0); 3037 __ bkpt(0);
3038 } 3038 }
3039 } 3039 }
3040 3040
3041 void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
3042 {
3043 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
3044
3045 // Save all parameter registers (see wasm-linkage.cc). They might be
3046 // overwritten in the runtime call below. We don't have any callee-saved
3047 // registers in wasm, so no need to store anything else.
3048 const RegList gp_regs =
3049 r2.bit() | r3.bit() | r4.bit() | r5.bit() | r6.bit();
3050 #if V8_TARGET_ARCH_S390X
3051 const RegList fp_regs = d0.bit() | d2.bit() | d4.bit() | d6.bit();
3052 #else
3053 const RegList fp_regs = d0.bit() | d2.bit();
3054 #endif
3055 __ MultiPush(gp_regs);
3056 __ MultiPushDoubles(fp_regs);
3057
3058 // Initialize cp register with kZero, CEntryStub will use it to set the
3059 // current context on the isolate.
3060 __ LoadSmiLiteral(cp, Smi::kZero);
3061 __ CallRuntime(Runtime::kWasmCompileLazy);
3062 // Store returned instruction start in ip.
3063 __ AddP(ip, r2, Operand(Code::kHeaderSize - kHeapObjectTag));
3064
3065 // Restore registers.
3066 __ MultiPopDoubles(fp_regs);
3067 __ MultiPop(gp_regs);
3068 }
3069 // Now jump to the instructions of the returned code object.
3070 __ Jump(ip);
3071 }
3072
3041 #undef __ 3073 #undef __
3042 3074
3043 } // namespace internal 3075 } // namespace internal
3044 } // namespace v8 3076 } // namespace v8
3045 3077
3046 #endif // V8_TARGET_ARCH_S390 3078 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698