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

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

Issue 456333002: Move MachineRepresentation to machine-type.h and rename to MachineType in preparation for merging i… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/arm/linkage-arm.cc ('k') | src/compiler/arm64/linkage-arm64.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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 // Shared routine for multiple binary operations. 144 // Shared routine for multiple binary operations.
145 static void VisitBinop(InstructionSelector* selector, Node* node, 145 static void VisitBinop(InstructionSelector* selector, Node* node,
146 ArchOpcode opcode, ImmediateMode operand_mode) { 146 ArchOpcode opcode, ImmediateMode operand_mode) {
147 FlagsContinuation cont; 147 FlagsContinuation cont;
148 VisitBinop(selector, node, opcode, operand_mode, &cont); 148 VisitBinop(selector, node, opcode, operand_mode, &cont);
149 } 149 }
150 150
151 151
152 void InstructionSelector::VisitLoad(Node* node) { 152 void InstructionSelector::VisitLoad(Node* node) {
153 MachineRepresentation rep = OpParameter<MachineRepresentation>(node); 153 MachineType rep = OpParameter<MachineType>(node);
154 Arm64OperandGenerator g(this); 154 Arm64OperandGenerator g(this);
155 Node* base = node->InputAt(0); 155 Node* base = node->InputAt(0);
156 Node* index = node->InputAt(1); 156 Node* index = node->InputAt(1);
157 157
158 InstructionOperand* result = rep == kMachineFloat64 158 InstructionOperand* result = rep == kMachineFloat64
159 ? g.DefineAsDoubleRegister(node) 159 ? g.DefineAsDoubleRegister(node)
160 : g.DefineAsRegister(node); 160 : g.DefineAsRegister(node);
161 161
162 ArchOpcode opcode; 162 ArchOpcode opcode;
163 switch (rep) { 163 switch (rep) {
(...skipping 30 matching lines...) Expand all
194 } 194 }
195 195
196 196
197 void InstructionSelector::VisitStore(Node* node) { 197 void InstructionSelector::VisitStore(Node* node) {
198 Arm64OperandGenerator g(this); 198 Arm64OperandGenerator g(this);
199 Node* base = node->InputAt(0); 199 Node* base = node->InputAt(0);
200 Node* index = node->InputAt(1); 200 Node* index = node->InputAt(1);
201 Node* value = node->InputAt(2); 201 Node* value = node->InputAt(2);
202 202
203 StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node); 203 StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node);
204 MachineRepresentation rep = store_rep.rep; 204 MachineType rep = store_rep.rep;
205 if (store_rep.write_barrier_kind == kFullWriteBarrier) { 205 if (store_rep.write_barrier_kind == kFullWriteBarrier) {
206 DCHECK(rep == kMachineTagged); 206 DCHECK(rep == kMachineTagged);
207 // TODO(dcarney): refactor RecordWrite function to take temp registers 207 // TODO(dcarney): refactor RecordWrite function to take temp registers
208 // and pass them here instead of using fixed regs 208 // and pass them here instead of using fixed regs
209 // TODO(dcarney): handle immediate indices. 209 // TODO(dcarney): handle immediate indices.
210 InstructionOperand* temps[] = {g.TempRegister(x11), g.TempRegister(x12)}; 210 InstructionOperand* temps[] = {g.TempRegister(x11), g.TempRegister(x12)};
211 Emit(kArm64StoreWriteBarrier, NULL, g.UseFixed(base, x10), 211 Emit(kArm64StoreWriteBarrier, NULL, g.UseFixed(base, x10),
212 g.UseFixed(index, x11), g.UseFixed(value, x12), ARRAY_SIZE(temps), 212 g.UseFixed(index, x11), g.UseFixed(value, x12), ARRAY_SIZE(temps),
213 temps); 213 temps);
214 return; 214 return;
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 // Caller clean up of stack for C-style calls. 658 // Caller clean up of stack for C-style calls.
659 if (is_c_frame && aligned_push_count > 0) { 659 if (is_c_frame && aligned_push_count > 0) {
660 DCHECK(deoptimization == NULL && continuation == NULL); 660 DCHECK(deoptimization == NULL && continuation == NULL);
661 Emit(kArm64Drop | MiscField::encode(aligned_push_count), NULL); 661 Emit(kArm64Drop | MiscField::encode(aligned_push_count), NULL);
662 } 662 }
663 } 663 }
664 664
665 } // namespace compiler 665 } // namespace compiler
666 } // namespace internal 666 } // namespace internal
667 } // namespace v8 667 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/linkage-arm.cc ('k') | src/compiler/arm64/linkage-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698