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

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

Issue 2216383002: TurboFan: Introduce TaggedSigned and TaggedPointer representations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Mips compile fix. 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/compiler/simplified-lowering.cc ('k') | src/machine-type.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 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 case MachineRepresentation::kBit: // Fall through. 162 case MachineRepresentation::kBit: // Fall through.
163 case MachineRepresentation::kWord8: 163 case MachineRepresentation::kWord8:
164 opcode = load_rep.IsSigned() ? kX64Movsxbl : kX64Movzxbl; 164 opcode = load_rep.IsSigned() ? kX64Movsxbl : kX64Movzxbl;
165 break; 165 break;
166 case MachineRepresentation::kWord16: 166 case MachineRepresentation::kWord16:
167 opcode = load_rep.IsSigned() ? kX64Movsxwl : kX64Movzxwl; 167 opcode = load_rep.IsSigned() ? kX64Movsxwl : kX64Movzxwl;
168 break; 168 break;
169 case MachineRepresentation::kWord32: 169 case MachineRepresentation::kWord32:
170 opcode = kX64Movl; 170 opcode = kX64Movl;
171 break; 171 break;
172 case MachineRepresentation::kTaggedSigned: // Fall through.
173 case MachineRepresentation::kTaggedPointer: // Fall through.
172 case MachineRepresentation::kTagged: // Fall through. 174 case MachineRepresentation::kTagged: // Fall through.
173 case MachineRepresentation::kWord64: 175 case MachineRepresentation::kWord64:
174 opcode = kX64Movq; 176 opcode = kX64Movq;
175 break; 177 break;
176 case MachineRepresentation::kSimd128: // Fall through. 178 case MachineRepresentation::kSimd128: // Fall through.
177 case MachineRepresentation::kNone: 179 case MachineRepresentation::kNone:
178 UNREACHABLE(); 180 UNREACHABLE();
179 return; 181 return;
180 } 182 }
181 183
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 case MachineRepresentation::kBit: // Fall through. 249 case MachineRepresentation::kBit: // Fall through.
248 case MachineRepresentation::kWord8: 250 case MachineRepresentation::kWord8:
249 opcode = kX64Movb; 251 opcode = kX64Movb;
250 break; 252 break;
251 case MachineRepresentation::kWord16: 253 case MachineRepresentation::kWord16:
252 opcode = kX64Movw; 254 opcode = kX64Movw;
253 break; 255 break;
254 case MachineRepresentation::kWord32: 256 case MachineRepresentation::kWord32:
255 opcode = kX64Movl; 257 opcode = kX64Movl;
256 break; 258 break;
259 case MachineRepresentation::kTaggedSigned: // Fall through.
260 case MachineRepresentation::kTaggedPointer: // Fall through.
257 case MachineRepresentation::kTagged: // Fall through. 261 case MachineRepresentation::kTagged: // Fall through.
258 case MachineRepresentation::kWord64: 262 case MachineRepresentation::kWord64:
259 opcode = kX64Movq; 263 opcode = kX64Movq;
260 break; 264 break;
261 case MachineRepresentation::kSimd128: // Fall through. 265 case MachineRepresentation::kSimd128: // Fall through.
262 case MachineRepresentation::kNone: 266 case MachineRepresentation::kNone:
263 UNREACHABLE(); 267 UNREACHABLE();
264 return; 268 return;
265 } 269 }
266 InstructionOperand inputs[4]; 270 InstructionOperand inputs[4];
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 opcode = kCheckedLoadWord64; 308 opcode = kCheckedLoadWord64;
305 break; 309 break;
306 case MachineRepresentation::kFloat32: 310 case MachineRepresentation::kFloat32:
307 opcode = kCheckedLoadFloat32; 311 opcode = kCheckedLoadFloat32;
308 break; 312 break;
309 case MachineRepresentation::kFloat64: 313 case MachineRepresentation::kFloat64:
310 opcode = kCheckedLoadFloat64; 314 opcode = kCheckedLoadFloat64;
311 break; 315 break;
312 case MachineRepresentation::kBit: // Fall through. 316 case MachineRepresentation::kBit: // Fall through.
313 case MachineRepresentation::kSimd128: // Fall through. 317 case MachineRepresentation::kSimd128: // Fall through.
318 case MachineRepresentation::kTaggedSigned: // Fall through.
319 case MachineRepresentation::kTaggedPointer: // Fall through.
314 case MachineRepresentation::kTagged: // Fall through. 320 case MachineRepresentation::kTagged: // Fall through.
315 case MachineRepresentation::kNone: 321 case MachineRepresentation::kNone:
316 UNREACHABLE(); 322 UNREACHABLE();
317 return; 323 return;
318 } 324 }
319 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { 325 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) {
320 Int32Matcher mlength(length); 326 Int32Matcher mlength(length);
321 Int32BinopMatcher moffset(offset); 327 Int32BinopMatcher moffset(offset);
322 if (mlength.HasValue() && moffset.right().HasValue() && 328 if (mlength.HasValue() && moffset.right().HasValue() &&
323 moffset.right().Value() >= 0 && 329 moffset.right().Value() >= 0 &&
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 opcode = kCheckedStoreWord64; 363 opcode = kCheckedStoreWord64;
358 break; 364 break;
359 case MachineRepresentation::kFloat32: 365 case MachineRepresentation::kFloat32:
360 opcode = kCheckedStoreFloat32; 366 opcode = kCheckedStoreFloat32;
361 break; 367 break;
362 case MachineRepresentation::kFloat64: 368 case MachineRepresentation::kFloat64:
363 opcode = kCheckedStoreFloat64; 369 opcode = kCheckedStoreFloat64;
364 break; 370 break;
365 case MachineRepresentation::kBit: // Fall through. 371 case MachineRepresentation::kBit: // Fall through.
366 case MachineRepresentation::kSimd128: // Fall through. 372 case MachineRepresentation::kSimd128: // Fall through.
373 case MachineRepresentation::kTaggedSigned: // Fall through.
374 case MachineRepresentation::kTaggedPointer: // Fall through.
367 case MachineRepresentation::kTagged: // Fall through. 375 case MachineRepresentation::kTagged: // Fall through.
368 case MachineRepresentation::kNone: 376 case MachineRepresentation::kNone:
369 UNREACHABLE(); 377 UNREACHABLE();
370 return; 378 return;
371 } 379 }
372 InstructionOperand value_operand = 380 InstructionOperand value_operand =
373 g.CanBeImmediate(value) ? g.UseImmediate(value) : g.UseRegister(value); 381 g.CanBeImmediate(value) ? g.UseImmediate(value) : g.UseRegister(value);
374 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { 382 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) {
375 Int32Matcher mlength(length); 383 Int32Matcher mlength(length);
376 Int32BinopMatcher moffset(offset); 384 Int32BinopMatcher moffset(offset);
(...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 // static 2211 // static
2204 MachineOperatorBuilder::AlignmentRequirements 2212 MachineOperatorBuilder::AlignmentRequirements
2205 InstructionSelector::AlignmentRequirements() { 2213 InstructionSelector::AlignmentRequirements() {
2206 return MachineOperatorBuilder::AlignmentRequirements:: 2214 return MachineOperatorBuilder::AlignmentRequirements::
2207 FullUnalignedAccessSupport(); 2215 FullUnalignedAccessSupport();
2208 } 2216 }
2209 2217
2210 } // namespace compiler 2218 } // namespace compiler
2211 } // namespace internal 2219 } // namespace internal
2212 } // namespace v8 2220 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/machine-type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698