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

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

Issue 401683003: Specialize mint shift code on arm for a constant shift amount. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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/locations.h ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/locations.h" 5 #include "vm/locations.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/il_printer.h" 8 #include "vm/il_printer.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 78
79 Location Location::RegisterOrSmiConstant(Value* value) { 79 Location Location::RegisterOrSmiConstant(Value* value) {
80 ConstantInstr* constant = value->definition()->AsConstant(); 80 ConstantInstr* constant = value->definition()->AsConstant();
81 return ((constant != NULL) && Assembler::IsSafeSmi(constant->value())) 81 return ((constant != NULL) && Assembler::IsSafeSmi(constant->value()))
82 ? Location::Constant(constant->value()) 82 ? Location::Constant(constant->value())
83 : Location::RequiresRegister(); 83 : Location::RequiresRegister();
84 } 84 }
85 85
86 86
87 Location Location::WritableRegisterOrSmiConstant(Value* value) {
88 ConstantInstr* constant = value->definition()->AsConstant();
89 return ((constant != NULL) && Assembler::IsSafeSmi(constant->value()))
90 ? Location::Constant(constant->value())
91 : Location::WritableRegister();
92 }
93
94
87 Location Location::FixedRegisterOrConstant(Value* value, Register reg) { 95 Location Location::FixedRegisterOrConstant(Value* value, Register reg) {
88 ConstantInstr* constant = value->definition()->AsConstant(); 96 ConstantInstr* constant = value->definition()->AsConstant();
89 return ((constant != NULL) && Assembler::IsSafe(constant->value())) 97 return ((constant != NULL) && Assembler::IsSafe(constant->value()))
90 ? Location::Constant(constant->value()) 98 ? Location::Constant(constant->value())
91 : Location::RegisterLocation(reg); 99 : Location::RegisterLocation(reg);
92 } 100 }
93 101
94 102
95 Location Location::FixedRegisterOrSmiConstant(Value* value, Register reg) { 103 Location Location::FixedRegisterOrSmiConstant(Value* value, Register reg) {
96 ConstantInstr* constant = value->definition()->AsConstant(); 104 ConstantInstr* constant = value->definition()->AsConstant();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 246
239 if (!out(0).IsInvalid()) { 247 if (!out(0).IsInvalid()) {
240 f->Print(" => "); 248 f->Print(" => ");
241 out(0).PrintTo(f); 249 out(0).PrintTo(f);
242 } 250 }
243 251
244 if (always_calls()) f->Print(" C"); 252 if (always_calls()) f->Print(" C");
245 } 253 }
246 254
247 } // namespace dart 255 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698