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

Side by Side Diff: src/s390/code-stubs-s390.cc

Issue 2188483008: PPC/s390: [stubs] Port CreateWeakCellStub to turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/ppc/code-stubs-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/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { 1708 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) {
1709 // r2 : number of arguments to the construct function 1709 // r2 : number of arguments to the construct function
1710 // r3 : the function to call 1710 // r3 : the function to call
1711 // r4 : feedback vector 1711 // r4 : feedback vector
1712 // r5 : slot in feedback vector (Smi) 1712 // r5 : slot in feedback vector (Smi)
1713 FrameScope scope(masm, StackFrame::INTERNAL); 1713 FrameScope scope(masm, StackFrame::INTERNAL);
1714 1714
1715 // Number-of-arguments register must be smi-tagged to call out. 1715 // Number-of-arguments register must be smi-tagged to call out.
1716 __ SmiTag(r2); 1716 __ SmiTag(r2);
1717 __ Push(r5, r4, r3, r2); 1717 __ Push(r5, r4, r3, r2);
1718 __ Push(cp);
1718 1719
1719 __ CallStub(stub); 1720 __ CallStub(stub);
1720 1721
1722 __ Pop(cp);
1721 __ Pop(r5, r4, r3, r2); 1723 __ Pop(r5, r4, r3, r2);
1722 __ SmiUntag(r2); 1724 __ SmiUntag(r2);
1723 } 1725 }
1724 1726
1725 static void GenerateRecordCallTarget(MacroAssembler* masm) { 1727 static void GenerateRecordCallTarget(MacroAssembler* masm) {
1726 // Cache the called function in a feedback vector slot. Cache states 1728 // Cache the called function in a feedback vector slot. Cache states
1727 // are uninitialized, monomorphic (indicated by a JSFunction), and 1729 // are uninitialized, monomorphic (indicated by a JSFunction), and
1728 // megamorphic. 1730 // megamorphic.
1729 // r2 : number of arguments to the construct function 1731 // r2 : number of arguments to the construct function
1730 // r3 : the function to call 1732 // r3 : the function to call
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 __ LoadSmiLiteral(r7, Smi::FromInt(1)); 2016 __ LoadSmiLiteral(r7, Smi::FromInt(1));
2015 __ StoreP(r7, FieldMemOperand(r8, count_offset), r0); 2017 __ StoreP(r7, FieldMemOperand(r8, count_offset), r0);
2016 2018
2017 // Store the function. Use a stub since we need a frame for allocation. 2019 // Store the function. Use a stub since we need a frame for allocation.
2018 // r4 - vector 2020 // r4 - vector
2019 // r5 - slot 2021 // r5 - slot
2020 // r3 - function 2022 // r3 - function
2021 { 2023 {
2022 FrameScope scope(masm, StackFrame::INTERNAL); 2024 FrameScope scope(masm, StackFrame::INTERNAL);
2023 CreateWeakCellStub create_stub(masm->isolate()); 2025 CreateWeakCellStub create_stub(masm->isolate());
2024 __ Push(r3); 2026 __ Push(cp, r3);
2025 __ CallStub(&create_stub); 2027 __ CallStub(&create_stub);
2026 __ Pop(r3); 2028 __ Pop(cp, r3);
2027 } 2029 }
2028 2030
2029 __ b(&call_function); 2031 __ b(&call_function);
2030 2032
2031 // We are here because tracing is on or we encountered a MISS case we can't 2033 // We are here because tracing is on or we encountered a MISS case we can't
2032 // handle here. 2034 // handle here.
2033 __ bind(&miss); 2035 __ bind(&miss);
2034 GenerateMiss(masm); 2036 GenerateMiss(masm);
2035 2037
2036 __ b(&call); 2038 __ b(&call);
(...skipping 3355 matching lines...) Expand 10 before | Expand all | Expand 10 after
5392 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5394 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5393 kStackUnwindSpace, NULL, return_value_operand, NULL); 5395 kStackUnwindSpace, NULL, return_value_operand, NULL);
5394 } 5396 }
5395 5397
5396 #undef __ 5398 #undef __
5397 5399
5398 } // namespace internal 5400 } // namespace internal
5399 } // namespace v8 5401 } // namespace v8
5400 5402
5401 #endif // V8_TARGET_ARCH_S390 5403 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698