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

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 10440099: Adding unary op optimizations. missing assembly operations/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/flow_graph_optimizer.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 DISALLOW_COPY_AND_ASSIGN(DeoptimizationStub); 61 DISALLOW_COPY_AND_ASSIGN(DeoptimizationStub);
62 }; 62 };
63 63
64 64
65 void DeoptimizationStub::GenerateCode(FlowGraphCompiler* compiler) { 65 void DeoptimizationStub::GenerateCode(FlowGraphCompiler* compiler) {
66 Assembler* assem = compiler->assembler(); 66 Assembler* assem = compiler->assembler();
67 #define __ assem-> 67 #define __ assem->
68 __ Comment("Deopt stub for id %d", deopt_id_); 68 __ Comment("Deopt stub for id %d", deopt_id_);
69 __ Bind(entry_label()); 69 __ Bind(entry_label());
70 for (intptr_t i = 0; i < registers_.length(); i++) { 70 for (intptr_t i = 0; i < registers_.length(); i++) {
71 __ pushq(registers_[i]); 71 if (registers_[i] != kNoRegister) {
72 __ pushq(registers_[i]);
73 }
72 } 74 }
73 __ movq(RAX, Immediate(Smi::RawValue(reason_))); 75 __ movq(RAX, Immediate(Smi::RawValue(reason_)));
74 __ call(&StubCode::DeoptimizeLabel()); 76 __ call(&StubCode::DeoptimizeLabel());
75 compiler->AddCurrentDescriptor(PcDescriptors::kOther, 77 compiler->AddCurrentDescriptor(PcDescriptors::kOther,
76 deopt_id_, 78 deopt_id_,
77 deopt_token_index_, 79 deopt_token_index_,
78 try_index_); 80 try_index_);
79 #undef __ 81 #undef __
80 } 82 }
81 83
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 // Moved to intermediate_language_x64.cc. 978 // Moved to intermediate_language_x64.cc.
977 UNREACHABLE(); 979 UNREACHABLE();
978 } 980 }
979 981
980 982
981 void FlowGraphCompiler::VisitBinaryOp(BinaryOpComp* comp) { 983 void FlowGraphCompiler::VisitBinaryOp(BinaryOpComp* comp) {
982 UNIMPLEMENTED(); 984 UNIMPLEMENTED();
983 } 985 }
984 986
985 987
988 void FlowGraphCompiler::VisitUnarySmiOp(UnarySmiOpComp* comp) {
989 UNIMPLEMENTED();
990 }
991
992
993 void FlowGraphCompiler::VisitNumberNegate(NumberNegateComp* comp) {
994 UNIMPLEMENTED();
995 }
996
997
986 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { 998 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) {
987 LocationSummary* locs = instr->locs(); 999 LocationSummary* locs = instr->locs();
988 ASSERT(locs != NULL); 1000 ASSERT(locs != NULL);
989 1001
990 locs->AllocateRegisters(); 1002 locs->AllocateRegisters();
991 1003
992 // Load instruction inputs into allocated registers. 1004 // Load instruction inputs into allocated registers.
993 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) { 1005 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) {
994 Location loc = locs->in(i); 1006 Location loc = locs->in(i);
995 ASSERT(loc.kind() == Location::kRegister); 1007 ASSERT(loc.kind() == Location::kRegister);
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 1558
1547 void FlowGraphCompiler::FinalizeComments(const Code& code) { 1559 void FlowGraphCompiler::FinalizeComments(const Code& code) {
1548 code.set_comments(assembler_->GetCodeComments()); 1560 code.set_comments(assembler_->GetCodeComments());
1549 } 1561 }
1550 1562
1551 #undef __ 1563 #undef __
1552 1564
1553 } // namespace dart 1565 } // namespace dart
1554 1566
1555 #endif // defined TARGET_ARCH_X64 1567 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698