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

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

Issue 1485023004: MIPS:[turbofan] Use Ins, Dins to clear bits instead of And with inverted immediate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comments. 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-codes-mips.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 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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 __ srav(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); 694 __ srav(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
695 } else { 695 } else {
696 int32_t imm = i.InputOperand(1).immediate(); 696 int32_t imm = i.InputOperand(1).immediate();
697 __ sra(i.OutputRegister(), i.InputRegister(0), imm); 697 __ sra(i.OutputRegister(), i.InputRegister(0), imm);
698 } 698 }
699 break; 699 break;
700 case kMipsExt: 700 case kMipsExt:
701 __ Ext(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1), 701 __ Ext(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1),
702 i.InputInt8(2)); 702 i.InputInt8(2));
703 break; 703 break;
704 case kMipsIns:
705 if (instr->InputAt(1)->IsImmediate() && i.InputInt8(1) == 0) {
706 __ Ins(i.OutputRegister(), zero_reg, i.InputInt8(1), i.InputInt8(2));
707 } else {
708 __ Ins(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1),
709 i.InputInt8(2));
710 }
711 break;
704 case kMipsRor: 712 case kMipsRor:
705 __ Ror(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 713 __ Ror(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
706 break; 714 break;
707 case kMipsTst: 715 case kMipsTst:
708 // Pseudo-instruction used for tst/branch. No opcode emitted here. 716 // Pseudo-instruction used for tst/branch. No opcode emitted here.
709 break; 717 break;
710 case kMipsCmp: 718 case kMipsCmp:
711 // Pseudo-instruction used for cmp/branch. No opcode emitted here. 719 // Pseudo-instruction used for cmp/branch. No opcode emitted here.
712 break; 720 break;
713 case kMipsMov: 721 case kMipsMov:
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 padding_size -= v8::internal::Assembler::kInstrSize; 1646 padding_size -= v8::internal::Assembler::kInstrSize;
1639 } 1647 }
1640 } 1648 }
1641 } 1649 }
1642 1650
1643 #undef __ 1651 #undef __
1644 1652
1645 } // namespace compiler 1653 } // namespace compiler
1646 } // namespace internal 1654 } // namespace internal
1647 } // namespace v8 1655 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/mips/instruction-codes-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698