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

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

Issue 651383003: [x86] Several small performance improvements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 2 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
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/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 } 863 }
864 } else if (source->IsConstant()) { 864 } else if (source->IsConstant()) {
865 ConstantOperand* constant_source = ConstantOperand::cast(source); 865 ConstantOperand* constant_source = ConstantOperand::cast(source);
866 Constant src = g.ToConstant(constant_source); 866 Constant src = g.ToConstant(constant_source);
867 if (destination->IsRegister() || destination->IsStackSlot()) { 867 if (destination->IsRegister() || destination->IsStackSlot()) {
868 Register dst = destination->IsRegister() ? g.ToRegister(destination) 868 Register dst = destination->IsRegister() ? g.ToRegister(destination)
869 : kScratchRegister; 869 : kScratchRegister;
870 switch (src.type()) { 870 switch (src.type()) {
871 case Constant::kInt32: 871 case Constant::kInt32:
872 // TODO(dcarney): don't need scratch in this case. 872 // TODO(dcarney): don't need scratch in this case.
873 __ movq(dst, Immediate(src.ToInt32())); 873 __ Set(dst, src.ToInt32());
874 break; 874 break;
875 case Constant::kInt64: 875 case Constant::kInt64:
876 __ Set(dst, src.ToInt64()); 876 __ Set(dst, src.ToInt64());
877 break; 877 break;
878 case Constant::kFloat32: 878 case Constant::kFloat32:
879 __ Move(dst, 879 __ Move(dst,
880 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); 880 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
881 break; 881 break;
882 case Constant::kFloat64: 882 case Constant::kFloat64:
883 __ Move(dst, 883 __ Move(dst,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 } 1002 }
1003 } 1003 }
1004 MarkLazyDeoptSite(); 1004 MarkLazyDeoptSite();
1005 } 1005 }
1006 1006
1007 #undef __ 1007 #undef __
1008 1008
1009 } // namespace internal 1009 } // namespace internal
1010 } // namespace compiler 1010 } // namespace compiler
1011 } // namespace v8 1011 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698