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

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

Issue 946553002: [turbofan] Fix several int vs size_t issues. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Fix Win64. Created 5 years, 10 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/x64/code-generator-x64.cc ('k') | 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 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/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 if (cont->IsBranch()) { 339 if (cont->IsBranch()) {
340 inputs[input_count++] = g.Label(cont->true_block()); 340 inputs[input_count++] = g.Label(cont->true_block());
341 inputs[input_count++] = g.Label(cont->false_block()); 341 inputs[input_count++] = g.Label(cont->false_block());
342 } 342 }
343 343
344 outputs[output_count++] = g.DefineSameAsFirst(node); 344 outputs[output_count++] = g.DefineSameAsFirst(node);
345 if (cont->IsSet()) { 345 if (cont->IsSet()) {
346 outputs[output_count++] = g.DefineAsRegister(cont->result()); 346 outputs[output_count++] = g.DefineAsRegister(cont->result());
347 } 347 }
348 348
349 DCHECK_NE(0, static_cast<int>(input_count)); 349 DCHECK_NE(0u, input_count);
350 DCHECK_NE(0, static_cast<int>(output_count)); 350 DCHECK_NE(0u, output_count);
351 DCHECK_GE(arraysize(inputs), input_count); 351 DCHECK_GE(arraysize(inputs), input_count);
352 DCHECK_GE(arraysize(outputs), output_count); 352 DCHECK_GE(arraysize(outputs), output_count);
353 353
354 Instruction* instr = selector->Emit(cont->Encode(opcode), output_count, 354 Instruction* instr = selector->Emit(cont->Encode(opcode), output_count,
355 outputs, input_count, inputs); 355 outputs, input_count, inputs);
356 if (cont->IsBranch()) instr->MarkAsControl(); 356 if (cont->IsBranch()) instr->MarkAsControl();
357 } 357 }
358 358
359 359
360 // Shared routine for multiple binary operations. 360 // Shared routine for multiple binary operations.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 void EmitLea(InstructionSelector* selector, InstructionCode opcode, 464 void EmitLea(InstructionSelector* selector, InstructionCode opcode,
465 Node* result, Node* index, int scale, Node* base, 465 Node* result, Node* index, int scale, Node* base,
466 Node* displacement) { 466 Node* displacement) {
467 X64OperandGenerator g(selector); 467 X64OperandGenerator g(selector);
468 468
469 InstructionOperand inputs[4]; 469 InstructionOperand inputs[4];
470 size_t input_count = 0; 470 size_t input_count = 0;
471 AddressingMode mode = g.GenerateMemoryOperandInputs( 471 AddressingMode mode = g.GenerateMemoryOperandInputs(
472 index, scale, base, displacement, inputs, &input_count); 472 index, scale, base, displacement, inputs, &input_count);
473 473
474 DCHECK_NE(0, static_cast<int>(input_count)); 474 DCHECK_NE(0u, input_count);
475 DCHECK_GE(arraysize(inputs), input_count); 475 DCHECK_GE(arraysize(inputs), input_count);
476 476
477 InstructionOperand outputs[1]; 477 InstructionOperand outputs[1];
478 outputs[0] = g.DefineAsRegister(result); 478 outputs[0] = g.DefineAsRegister(result);
479 479
480 opcode = AddressingModeField::encode(mode) | opcode; 480 opcode = AddressingModeField::encode(mode) | opcode;
481 481
482 selector->Emit(opcode, 1, outputs, input_count, inputs); 482 selector->Emit(opcode, 1, outputs, input_count, inputs);
483 } 483 }
484 484
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 MachineOperatorBuilder::kFloat64Ceil | 1404 MachineOperatorBuilder::kFloat64Ceil |
1405 MachineOperatorBuilder::kFloat64RoundTruncate | 1405 MachineOperatorBuilder::kFloat64RoundTruncate |
1406 MachineOperatorBuilder::kWord32ShiftIsSafe; 1406 MachineOperatorBuilder::kWord32ShiftIsSafe;
1407 } 1407 }
1408 return MachineOperatorBuilder::kNoFlags; 1408 return MachineOperatorBuilder::kNoFlags;
1409 } 1409 }
1410 1410
1411 } // namespace compiler 1411 } // namespace compiler
1412 } // namespace internal 1412 } // namespace internal
1413 } // namespace v8 1413 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698