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

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

Issue 1485833003: MIPS:[turbofan] Use Nor instruction for bit negation instead of xori. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | src/compiler/mips/instruction-selector-mips.cc » ('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 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/ast/scopes.h" 5 #include "src/ast/scopes.h"
6 #include "src/compiler/code-generator.h" 6 #include "src/compiler/code-generator.h"
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/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 case kMipsModU: 658 case kMipsModU:
659 __ Modu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 659 __ Modu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
660 break; 660 break;
661 case kMipsAnd: 661 case kMipsAnd:
662 __ And(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 662 __ And(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
663 break; 663 break;
664 case kMipsOr: 664 case kMipsOr:
665 __ Or(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 665 __ Or(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
666 break; 666 break;
667 case kMipsNor: 667 case kMipsNor:
668 __ Nor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 668 if (instr->InputAt(1)->IsRegister()) {
669 __ Nor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
670 } else {
671 DCHECK(i.InputOperand(1).immediate() == 0);
672 __ Nor(i.OutputRegister(), i.InputRegister(0), zero_reg);
673 }
669 break; 674 break;
670 case kMipsXor: 675 case kMipsXor:
671 __ Xor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 676 __ Xor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
672 break; 677 break;
673 case kMipsClz: 678 case kMipsClz:
674 __ Clz(i.OutputRegister(), i.InputRegister(0)); 679 __ Clz(i.OutputRegister(), i.InputRegister(0));
675 break; 680 break;
676 case kMipsShl: 681 case kMipsShl:
677 if (instr->InputAt(1)->IsRegister()) { 682 if (instr->InputAt(1)->IsRegister()) {
678 __ sllv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); 683 __ sllv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 padding_size -= v8::internal::Assembler::kInstrSize; 1643 padding_size -= v8::internal::Assembler::kInstrSize;
1639 } 1644 }
1640 } 1645 }
1641 } 1646 }
1642 1647
1643 #undef __ 1648 #undef __
1644 1649
1645 } // namespace compiler 1650 } // namespace compiler
1646 } // namespace internal 1651 } // namespace internal
1647 } // namespace v8 1652 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/mips/instruction-selector-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698