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

Side by Side Diff: src/compiler/s390/instruction-selector-s390.cc

Issue 2101933006: s390: [turbofan] Make sure binop results do not overwrite deoptimization inputs on arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | 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 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 #include "src/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/s390/frames-s390.h" 9 #include "src/s390/frames-s390.h"
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 size_t output_count = 0; 121 size_t output_count = 0;
122 122
123 inputs[input_count++] = g.UseRegister(m.left().node()); 123 inputs[input_count++] = g.UseRegister(m.left().node());
124 inputs[input_count++] = g.UseOperand(m.right().node(), operand_mode); 124 inputs[input_count++] = g.UseOperand(m.right().node(), operand_mode);
125 125
126 if (cont->IsBranch()) { 126 if (cont->IsBranch()) {
127 inputs[input_count++] = g.Label(cont->true_block()); 127 inputs[input_count++] = g.Label(cont->true_block());
128 inputs[input_count++] = g.Label(cont->false_block()); 128 inputs[input_count++] = g.Label(cont->false_block());
129 } 129 }
130 130
131 outputs[output_count++] = g.DefineAsRegister(node); 131 if (cont->IsDeoptimize()) {
132 // If we can deoptimize as a result of the binop, we need to make sure that
133 // the deopt inputs are not overwritten by the binop result. One way
134 // to achieve that is to declare the output register as same-as-first.
135 outputs[output_count++] = g.DefineSameAsFirst(node);
136 } else {
137 outputs[output_count++] = g.DefineAsRegister(node);
138 }
132 if (cont->IsSet()) { 139 if (cont->IsSet()) {
133 outputs[output_count++] = g.DefineAsRegister(cont->result()); 140 outputs[output_count++] = g.DefineAsRegister(cont->result());
134 } 141 }
135 142
136 DCHECK_NE(0u, input_count); 143 DCHECK_NE(0u, input_count);
137 DCHECK_NE(0u, output_count); 144 DCHECK_NE(0u, output_count);
138 DCHECK_GE(arraysize(inputs), input_count); 145 DCHECK_GE(arraysize(inputs), input_count);
139 DCHECK_GE(arraysize(outputs), output_count); 146 DCHECK_GE(arraysize(outputs), output_count);
140 147
141 opcode = cont->Encode(opcode); 148 opcode = cont->Encode(opcode);
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 // static 1855 // static
1849 MachineOperatorBuilder::AlignmentRequirements 1856 MachineOperatorBuilder::AlignmentRequirements
1850 InstructionSelector::AlignmentRequirements() { 1857 InstructionSelector::AlignmentRequirements() {
1851 return MachineOperatorBuilder::AlignmentRequirements:: 1858 return MachineOperatorBuilder::AlignmentRequirements::
1852 FullUnalignedAccessSupport(); 1859 FullUnalignedAccessSupport();
1853 } 1860 }
1854 1861
1855 } // namespace compiler 1862 } // namespace compiler
1856 } // namespace internal 1863 } // namespace internal
1857 } // namespace v8 1864 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698