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

Side by Side Diff: src/compiler/ia32/code-generator-ia32.cc

Issue 1578723002: [turbofan] Build s/NULL/nullptr/g and CHECK(x != nullptr) to CHECK_NOT_NULL(x). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/graph-visualizer.cc ('k') | src/compiler/ia32/instruction-selector-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 } 1493 }
1494 size_t pop_size = descriptor->StackParameterCount() * kPointerSize; 1494 size_t pop_size = descriptor->StackParameterCount() * kPointerSize;
1495 // Might need ecx for scratch if pop_size is too big. 1495 // Might need ecx for scratch if pop_size is too big.
1496 DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & ecx.bit()); 1496 DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & ecx.bit());
1497 __ Ret(static_cast<int>(pop_size), ecx); 1497 __ Ret(static_cast<int>(pop_size), ecx);
1498 } 1498 }
1499 1499
1500 1500
1501 void CodeGenerator::AssembleMove(InstructionOperand* source, 1501 void CodeGenerator::AssembleMove(InstructionOperand* source,
1502 InstructionOperand* destination) { 1502 InstructionOperand* destination) {
1503 IA32OperandConverter g(this, NULL); 1503 IA32OperandConverter g(this, nullptr);
1504 // Dispatch on the source and destination operand kinds. Not all 1504 // Dispatch on the source and destination operand kinds. Not all
1505 // combinations are possible. 1505 // combinations are possible.
1506 if (source->IsRegister()) { 1506 if (source->IsRegister()) {
1507 DCHECK(destination->IsRegister() || destination->IsStackSlot()); 1507 DCHECK(destination->IsRegister() || destination->IsStackSlot());
1508 Register src = g.ToRegister(source); 1508 Register src = g.ToRegister(source);
1509 Operand dst = g.ToOperand(destination); 1509 Operand dst = g.ToOperand(destination);
1510 __ mov(dst, src); 1510 __ mov(dst, src);
1511 } else if (source->IsStackSlot()) { 1511 } else if (source->IsStackSlot()) {
1512 DCHECK(destination->IsRegister() || destination->IsStackSlot()); 1512 DCHECK(destination->IsRegister() || destination->IsStackSlot());
1513 Operand src = g.ToOperand(source); 1513 Operand src = g.ToOperand(source);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 __ movsd(dst, kScratchDoubleReg); 1603 __ movsd(dst, kScratchDoubleReg);
1604 } 1604 }
1605 } else { 1605 } else {
1606 UNREACHABLE(); 1606 UNREACHABLE();
1607 } 1607 }
1608 } 1608 }
1609 1609
1610 1610
1611 void CodeGenerator::AssembleSwap(InstructionOperand* source, 1611 void CodeGenerator::AssembleSwap(InstructionOperand* source,
1612 InstructionOperand* destination) { 1612 InstructionOperand* destination) {
1613 IA32OperandConverter g(this, NULL); 1613 IA32OperandConverter g(this, nullptr);
1614 // Dispatch on the source and destination operand kinds. Not all 1614 // Dispatch on the source and destination operand kinds. Not all
1615 // combinations are possible. 1615 // combinations are possible.
1616 if (source->IsRegister() && destination->IsRegister()) { 1616 if (source->IsRegister() && destination->IsRegister()) {
1617 // Register-register. 1617 // Register-register.
1618 Register src = g.ToRegister(source); 1618 Register src = g.ToRegister(source);
1619 Register dst = g.ToRegister(destination); 1619 Register dst = g.ToRegister(destination);
1620 __ xchg(dst, src); 1620 __ xchg(dst, src);
1621 } else if (source->IsRegister() && destination->IsStackSlot()) { 1621 } else if (source->IsRegister() && destination->IsStackSlot()) {
1622 // Register-memory. 1622 // Register-memory.
1623 __ xchg(g.ToRegister(source), g.ToOperand(destination)); 1623 __ xchg(g.ToRegister(source), g.ToOperand(destination));
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 1689 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
1690 __ Nop(padding_size); 1690 __ Nop(padding_size);
1691 } 1691 }
1692 } 1692 }
1693 1693
1694 #undef __ 1694 #undef __
1695 1695
1696 } // namespace compiler 1696 } // namespace compiler
1697 } // namespace internal 1697 } // namespace internal
1698 } // namespace v8 1698 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/graph-visualizer.cc ('k') | src/compiler/ia32/instruction-selector-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698