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

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

Issue 547233003: [turbofan] Machine operators are globally shared singletons. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Next windows fix. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/ast-graph-builder.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 #include "src/compiler/instruction-selector-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // Shared routine for multiple binary operations. 130 // Shared routine for multiple binary operations.
131 static void VisitBinop(InstructionSelector* selector, Node* node, 131 static void VisitBinop(InstructionSelector* selector, Node* node,
132 ArchOpcode opcode, ImmediateMode operand_mode) { 132 ArchOpcode opcode, ImmediateMode operand_mode) {
133 FlagsContinuation cont; 133 FlagsContinuation cont;
134 VisitBinop(selector, node, opcode, operand_mode, &cont); 134 VisitBinop(selector, node, opcode, operand_mode, &cont);
135 } 135 }
136 136
137 137
138 void InstructionSelector::VisitLoad(Node* node) { 138 void InstructionSelector::VisitLoad(Node* node) {
139 MachineType rep = RepresentationOf(OpParameter<MachineType>(node)); 139 MachineType rep = RepresentationOf(OpParameter<LoadRepresentation>(node));
140 MachineType typ = TypeOf(OpParameter<MachineType>(node)); 140 MachineType typ = TypeOf(OpParameter<LoadRepresentation>(node));
141 Arm64OperandGenerator g(this); 141 Arm64OperandGenerator g(this);
142 Node* base = node->InputAt(0); 142 Node* base = node->InputAt(0);
143 Node* index = node->InputAt(1); 143 Node* index = node->InputAt(1);
144 ArchOpcode opcode; 144 ArchOpcode opcode;
145 switch (rep) { 145 switch (rep) {
146 case kRepFloat32: 146 case kRepFloat32:
147 opcode = kArm64LdrS; 147 opcode = kArm64LdrS;
148 break; 148 break;
149 case kRepFloat64: 149 case kRepFloat64:
150 opcode = kArm64LdrD; 150 opcode = kArm64LdrD;
(...skipping 26 matching lines...) Expand all
177 } 177 }
178 178
179 179
180 void InstructionSelector::VisitStore(Node* node) { 180 void InstructionSelector::VisitStore(Node* node) {
181 Arm64OperandGenerator g(this); 181 Arm64OperandGenerator g(this);
182 Node* base = node->InputAt(0); 182 Node* base = node->InputAt(0);
183 Node* index = node->InputAt(1); 183 Node* index = node->InputAt(1);
184 Node* value = node->InputAt(2); 184 Node* value = node->InputAt(2);
185 185
186 StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node); 186 StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node);
187 MachineType rep = RepresentationOf(store_rep.machine_type); 187 MachineType rep = RepresentationOf(store_rep.machine_type());
188 if (store_rep.write_barrier_kind == kFullWriteBarrier) { 188 if (store_rep.write_barrier_kind() == kFullWriteBarrier) {
189 DCHECK(rep == kRepTagged); 189 DCHECK(rep == kRepTagged);
190 // TODO(dcarney): refactor RecordWrite function to take temp registers 190 // TODO(dcarney): refactor RecordWrite function to take temp registers
191 // and pass them here instead of using fixed regs 191 // and pass them here instead of using fixed regs
192 // TODO(dcarney): handle immediate indices. 192 // TODO(dcarney): handle immediate indices.
193 InstructionOperand* temps[] = {g.TempRegister(x11), g.TempRegister(x12)}; 193 InstructionOperand* temps[] = {g.TempRegister(x11), g.TempRegister(x12)};
194 Emit(kArm64StoreWriteBarrier, NULL, g.UseFixed(base, x10), 194 Emit(kArm64StoreWriteBarrier, NULL, g.UseFixed(base, x10),
195 g.UseFixed(index, x11), g.UseFixed(value, x12), arraysize(temps), 195 g.UseFixed(index, x11), g.UseFixed(value, x12), arraysize(temps),
196 temps); 196 temps);
197 return; 197 return;
198 } 198 }
199 DCHECK_EQ(kNoWriteBarrier, store_rep.write_barrier_kind); 199 DCHECK_EQ(kNoWriteBarrier, store_rep.write_barrier_kind());
200 ArchOpcode opcode; 200 ArchOpcode opcode;
201 switch (rep) { 201 switch (rep) {
202 case kRepFloat32: 202 case kRepFloat32:
203 opcode = kArm64StrS; 203 opcode = kArm64StrS;
204 break; 204 break;
205 case kRepFloat64: 205 case kRepFloat64:
206 opcode = kArm64StrD; 206 opcode = kArm64StrD;
207 break; 207 break;
208 case kRepBit: // Fall through. 208 case kRepBit: // Fall through.
209 case kRepWord8: 209 case kRepWord8:
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 // Caller clean up of stack for C-style calls. 661 // Caller clean up of stack for C-style calls.
662 if (is_c_frame && aligned_push_count > 0) { 662 if (is_c_frame && aligned_push_count > 0) {
663 DCHECK(deoptimization == NULL && continuation == NULL); 663 DCHECK(deoptimization == NULL && continuation == NULL);
664 Emit(kArchDrop | MiscField::encode(aligned_push_count), NULL); 664 Emit(kArchDrop | MiscField::encode(aligned_push_count), NULL);
665 } 665 }
666 } 666 }
667 667
668 } // namespace compiler 668 } // namespace compiler
669 } // namespace internal 669 } // namespace internal
670 } // namespace v8 670 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698