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

Side by Side Diff: src/ic/s390/handler-compiler-s390.cc

Issue 1799893002: S390: Upstream changes from the past 2 weeks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/full-codegen/s390/full-codegen-s390.cc ('k') | src/s390/assembler-s390.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 8
9 #include "src/api-arguments.h" 9 #include "src/api-arguments.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 10 matching lines...) Expand all
21 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, 21 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder,
22 int accessor_index, int expected_arguments, Register scratch) { 22 int accessor_index, int expected_arguments, Register scratch) {
23 // ----------- S t a t e ------------- 23 // ----------- S t a t e -------------
24 // -- r2 : receiver 24 // -- r2 : receiver
25 // -- r4 : name 25 // -- r4 : name
26 // -- lr : return address 26 // -- lr : return address
27 // ----------------------------------- 27 // -----------------------------------
28 { 28 {
29 FrameScope scope(masm, StackFrame::INTERNAL); 29 FrameScope scope(masm, StackFrame::INTERNAL);
30 30
31 // Save context register
32 __ push(cp);
33
31 if (accessor_index >= 0) { 34 if (accessor_index >= 0) {
32 DCHECK(!holder.is(scratch)); 35 DCHECK(!holder.is(scratch));
33 DCHECK(!receiver.is(scratch)); 36 DCHECK(!receiver.is(scratch));
34 // Call the JavaScript getter with the receiver on the stack. 37 // Call the JavaScript getter with the receiver on the stack.
35 if (map->IsJSGlobalObjectMap()) { 38 if (map->IsJSGlobalObjectMap()) {
36 // Swap in the global receiver. 39 // Swap in the global receiver.
37 __ LoadP(scratch, 40 __ LoadP(scratch,
38 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); 41 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset));
39 receiver = scratch; 42 receiver = scratch;
40 } 43 }
41 __ Push(receiver); 44 __ Push(receiver);
42 ParameterCount actual(0); 45 ParameterCount actual(0);
43 ParameterCount expected(expected_arguments); 46 ParameterCount expected(expected_arguments);
44 __ LoadAccessor(r3, holder, accessor_index, ACCESSOR_GETTER); 47 __ LoadAccessor(r3, holder, accessor_index, ACCESSOR_GETTER);
45 __ InvokeFunction(r3, expected, actual, CALL_FUNCTION, 48 __ InvokeFunction(r3, expected, actual, CALL_FUNCTION,
46 CheckDebugStepCallWrapper()); 49 CheckDebugStepCallWrapper());
47 } else { 50 } else {
48 // If we generate a global code snippet for deoptimization only, remember 51 // If we generate a global code snippet for deoptimization only, remember
49 // the place to continue after deoptimization. 52 // the place to continue after deoptimization.
50 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); 53 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset());
51 } 54 }
52 55
53 // Restore context register. 56 // Restore context register.
54 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 57 __ pop(cp);
55 } 58 }
56 __ Ret(); 59 __ Ret();
57 } 60 }
58 61
59 void NamedStoreHandlerCompiler::GenerateStoreViaSetter( 62 void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
60 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, 63 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder,
61 int accessor_index, int expected_arguments, Register scratch) { 64 int accessor_index, int expected_arguments, Register scratch) {
62 // ----------- S t a t e ------------- 65 // ----------- S t a t e -------------
63 // -- lr : return address 66 // -- lr : return address
64 // ----------------------------------- 67 // -----------------------------------
65 { 68 {
66 FrameScope scope(masm, StackFrame::INTERNAL); 69 FrameScope scope(masm, StackFrame::INTERNAL);
67 70
71 // Save context register
68 // Save value register, so we can restore it later. 72 // Save value register, so we can restore it later.
69 __ Push(value()); 73 __ Push(cp, value());
70 74
71 if (accessor_index >= 0) { 75 if (accessor_index >= 0) {
72 DCHECK(!holder.is(scratch)); 76 DCHECK(!holder.is(scratch));
73 DCHECK(!receiver.is(scratch)); 77 DCHECK(!receiver.is(scratch));
74 DCHECK(!value().is(scratch)); 78 DCHECK(!value().is(scratch));
75 // Call the JavaScript setter with receiver and value on the stack. 79 // Call the JavaScript setter with receiver and value on the stack.
76 if (map->IsJSGlobalObjectMap()) { 80 if (map->IsJSGlobalObjectMap()) {
77 // Swap in the global receiver. 81 // Swap in the global receiver.
78 __ LoadP(scratch, 82 __ LoadP(scratch,
79 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); 83 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset));
80 receiver = scratch; 84 receiver = scratch;
81 } 85 }
82 __ Push(receiver, value()); 86 __ Push(receiver, value());
83 ParameterCount actual(1); 87 ParameterCount actual(1);
84 ParameterCount expected(expected_arguments); 88 ParameterCount expected(expected_arguments);
85 __ LoadAccessor(r3, holder, accessor_index, ACCESSOR_SETTER); 89 __ LoadAccessor(r3, holder, accessor_index, ACCESSOR_SETTER);
86 __ InvokeFunction(r3, expected, actual, CALL_FUNCTION, 90 __ InvokeFunction(r3, expected, actual, CALL_FUNCTION,
87 CheckDebugStepCallWrapper()); 91 CheckDebugStepCallWrapper());
88 } else { 92 } else {
89 // If we generate a global code snippet for deoptimization only, remember 93 // If we generate a global code snippet for deoptimization only, remember
90 // the place to continue after deoptimization. 94 // the place to continue after deoptimization.
91 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); 95 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset());
92 } 96 }
93 97
94 // We have to return the passed value, not the return value of the setter. 98 // We have to return the passed value, not the return value of the setter.
95 __ Pop(r2);
96
97 // Restore context register. 99 // Restore context register.
98 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 100 __ Pop(cp, r2);
99 } 101 }
100 __ Ret(); 102 __ Ret();
101 } 103 }
102 104
103 void PropertyHandlerCompiler::PushVectorAndSlot(Register vector, 105 void PropertyHandlerCompiler::PushVectorAndSlot(Register vector,
104 Register slot) { 106 Register slot) {
105 MacroAssembler* masm = this->masm(); 107 MacroAssembler* masm = this->masm();
106 __ Push(vector, slot); 108 __ Push(vector, slot);
107 } 109 }
108 110
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 752
751 // Return the generated code. 753 // Return the generated code.
752 return GetCode(kind(), Code::NORMAL, name); 754 return GetCode(kind(), Code::NORMAL, name);
753 } 755 }
754 756
755 #undef __ 757 #undef __
756 } // namespace internal 758 } // namespace internal
757 } // namespace v8 759 } // namespace v8
758 760
759 #endif // V8_TARGET_ARCH_ARM 761 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | src/s390/assembler-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698