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

Side by Side Diff: src/compiler/mips/instruction-selector-mips.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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 void InstructionSelector::VisitWord32Sar(Node* node) { 258 void InstructionSelector::VisitWord32Sar(Node* node) {
259 VisitRRO(this, kMipsSar, node); 259 VisitRRO(this, kMipsSar, node);
260 } 260 }
261 261
262 262
263 void InstructionSelector::VisitWord32Ror(Node* node) { 263 void InstructionSelector::VisitWord32Ror(Node* node) {
264 VisitRRO(this, kMipsRor, node); 264 VisitRRO(this, kMipsRor, node);
265 } 265 }
266 266
267 267
268 void InstructionSelector::VisitWord32Clz(Node* node) {
269 MipsOperandGenerator g(this);
270 Emit(kMipsClz, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
271 }
272
273
268 void InstructionSelector::VisitInt32Add(Node* node) { 274 void InstructionSelector::VisitInt32Add(Node* node) {
269 MipsOperandGenerator g(this); 275 MipsOperandGenerator g(this);
270 276
271 // TODO(plind): Consider multiply & add optimization from arm port. 277 // TODO(plind): Consider multiply & add optimization from arm port.
272 VisitBinop(this, node, kMipsAdd); 278 VisitBinop(this, node, kMipsAdd);
273 } 279 }
274 280
275 281
276 void InstructionSelector::VisitInt32Sub(Node* node) { 282 void InstructionSelector::VisitInt32Sub(Node* node) {
277 VisitBinop(this, node, kMipsSub); 283 VisitBinop(this, node, kMipsSub);
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { 944 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) {
939 return MachineOperatorBuilder::kFloat64RoundDown | 945 return MachineOperatorBuilder::kFloat64RoundDown |
940 MachineOperatorBuilder::kFloat64RoundTruncate; 946 MachineOperatorBuilder::kFloat64RoundTruncate;
941 } 947 }
942 return MachineOperatorBuilder::kNoFlags; 948 return MachineOperatorBuilder::kNoFlags;
943 } 949 }
944 950
945 } // namespace compiler 951 } // namespace compiler
946 } // namespace internal 952 } // namespace internal
947 } // namespace v8 953 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-codes-mips.h ('k') | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698