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

Side by Side Diff: src/compiler/x64/code-generator-x64.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/verifier.cc ('k') | src/compiler/x64/instruction-selector-x64.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 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 } 1914 }
1915 size_t pop_size = descriptor->StackParameterCount() * kPointerSize; 1915 size_t pop_size = descriptor->StackParameterCount() * kPointerSize;
1916 // Might need rcx for scratch if pop_size is too big. 1916 // Might need rcx for scratch if pop_size is too big.
1917 DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & rcx.bit()); 1917 DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & rcx.bit());
1918 __ Ret(static_cast<int>(pop_size), rcx); 1918 __ Ret(static_cast<int>(pop_size), rcx);
1919 } 1919 }
1920 1920
1921 1921
1922 void CodeGenerator::AssembleMove(InstructionOperand* source, 1922 void CodeGenerator::AssembleMove(InstructionOperand* source,
1923 InstructionOperand* destination) { 1923 InstructionOperand* destination) {
1924 X64OperandConverter g(this, NULL); 1924 X64OperandConverter g(this, nullptr);
1925 // Dispatch on the source and destination operand kinds. Not all 1925 // Dispatch on the source and destination operand kinds. Not all
1926 // combinations are possible. 1926 // combinations are possible.
1927 if (source->IsRegister()) { 1927 if (source->IsRegister()) {
1928 DCHECK(destination->IsRegister() || destination->IsStackSlot()); 1928 DCHECK(destination->IsRegister() || destination->IsStackSlot());
1929 Register src = g.ToRegister(source); 1929 Register src = g.ToRegister(source);
1930 if (destination->IsRegister()) { 1930 if (destination->IsRegister()) {
1931 __ movq(g.ToRegister(destination), src); 1931 __ movq(g.ToRegister(destination), src);
1932 } else { 1932 } else {
1933 __ movq(g.ToOperand(destination), src); 1933 __ movq(g.ToOperand(destination), src);
1934 } 1934 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 __ Movsd(dst, xmm0); 2035 __ Movsd(dst, xmm0);
2036 } 2036 }
2037 } else { 2037 } else {
2038 UNREACHABLE(); 2038 UNREACHABLE();
2039 } 2039 }
2040 } 2040 }
2041 2041
2042 2042
2043 void CodeGenerator::AssembleSwap(InstructionOperand* source, 2043 void CodeGenerator::AssembleSwap(InstructionOperand* source,
2044 InstructionOperand* destination) { 2044 InstructionOperand* destination) {
2045 X64OperandConverter g(this, NULL); 2045 X64OperandConverter g(this, nullptr);
2046 // Dispatch on the source and destination operand kinds. Not all 2046 // Dispatch on the source and destination operand kinds. Not all
2047 // combinations are possible. 2047 // combinations are possible.
2048 if (source->IsRegister() && destination->IsRegister()) { 2048 if (source->IsRegister() && destination->IsRegister()) {
2049 // Register-register. 2049 // Register-register.
2050 __ xchgq(g.ToRegister(source), g.ToRegister(destination)); 2050 __ xchgq(g.ToRegister(source), g.ToRegister(destination));
2051 } else if (source->IsRegister() && destination->IsStackSlot()) { 2051 } else if (source->IsRegister() && destination->IsStackSlot()) {
2052 Register src = g.ToRegister(source); 2052 Register src = g.ToRegister(source);
2053 Operand dst = g.ToOperand(destination); 2053 Operand dst = g.ToOperand(destination);
2054 __ xchgq(src, dst); 2054 __ xchgq(src, dst);
2055 } else if ((source->IsStackSlot() && destination->IsStackSlot()) || 2055 } else if ((source->IsStackSlot() && destination->IsStackSlot()) ||
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2108 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2109 __ Nop(padding_size); 2109 __ Nop(padding_size);
2110 } 2110 }
2111 } 2111 }
2112 2112
2113 #undef __ 2113 #undef __
2114 2114
2115 } // namespace compiler 2115 } // namespace compiler
2116 } // namespace internal 2116 } // namespace internal
2117 } // namespace v8 2117 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698