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

Side by Side Diff: src/compiler/mips64/instruction-selector-mips64.cc

Issue 1020223002: MIPS: [turbofan] Turn Math.clz32 into an inlinable builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/base/bits.h" 5 #include "src/base/bits.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 void InstructionSelector::VisitWord64Sar(Node* node) { 298 void InstructionSelector::VisitWord64Sar(Node* node) {
299 VisitRRO(this, kMips64Dsar, node); 299 VisitRRO(this, kMips64Dsar, node);
300 } 300 }
301 301
302 302
303 void InstructionSelector::VisitWord32Ror(Node* node) { 303 void InstructionSelector::VisitWord32Ror(Node* node) {
304 VisitRRO(this, kMips64Ror, node); 304 VisitRRO(this, kMips64Ror, node);
305 } 305 }
306 306
307 307
308 void InstructionSelector::VisitWord32Clz(Node* node) {
309 Mips64OperandGenerator g(this);
310 Emit(kMips64Clz, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
311 }
312
313
308 void InstructionSelector::VisitWord64Ror(Node* node) { 314 void InstructionSelector::VisitWord64Ror(Node* node) {
309 VisitRRO(this, kMips64Dror, node); 315 VisitRRO(this, kMips64Dror, node);
310 } 316 }
311 317
312 318
313 void InstructionSelector::VisitInt32Add(Node* node) { 319 void InstructionSelector::VisitInt32Add(Node* node) {
314 Mips64OperandGenerator g(this); 320 Mips64OperandGenerator g(this);
315 // TODO(plind): Consider multiply & add optimization from arm port. 321 // TODO(plind): Consider multiply & add optimization from arm port.
316 VisitBinop(this, node, kMips64Add); 322 VisitBinop(this, node, kMips64Add);
317 } 323 }
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 // static 1156 // static
1151 MachineOperatorBuilder::Flags 1157 MachineOperatorBuilder::Flags
1152 InstructionSelector::SupportedMachineOperatorFlags() { 1158 InstructionSelector::SupportedMachineOperatorFlags() {
1153 return MachineOperatorBuilder::kFloat64RoundDown | 1159 return MachineOperatorBuilder::kFloat64RoundDown |
1154 MachineOperatorBuilder::kFloat64RoundTruncate; 1160 MachineOperatorBuilder::kFloat64RoundTruncate;
1155 } 1161 }
1156 1162
1157 } // namespace compiler 1163 } // namespace compiler
1158 } // namespace internal 1164 } // namespace internal
1159 } // namespace v8 1165 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/instruction-codes-mips64.h ('k') | test/unittests/compiler/mips/instruction-selector-mips-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698