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

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

Issue 651223003: MIPS: [turbofan] Optimize division/modulus by constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | « 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/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 #include "src/compiler/code-generator-impl.h" 6 #include "src/compiler/code-generator-impl.h"
7 #include "src/compiler/gap-resolver.h" 7 #include "src/compiler/gap-resolver.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/mips/macro-assembler-mips.h" 10 #include "src/mips/macro-assembler-mips.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 case kMipsSub: 178 case kMipsSub:
179 __ Subu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 179 __ Subu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
180 break; 180 break;
181 case kMipsSubOvf: 181 case kMipsSubOvf:
182 __ SubuAndCheckForOverflow(i.OutputRegister(), i.InputRegister(0), 182 __ SubuAndCheckForOverflow(i.OutputRegister(), i.InputRegister(0),
183 i.InputOperand(1), kCompareReg, kScratchReg); 183 i.InputOperand(1), kCompareReg, kScratchReg);
184 break; 184 break;
185 case kMipsMul: 185 case kMipsMul:
186 __ Mul(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 186 __ Mul(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
187 break; 187 break;
188 case kMipsMulHigh:
189 __ Mulh(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
190 break;
188 case kMipsDiv: 191 case kMipsDiv:
189 __ Div(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 192 __ Div(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
190 break; 193 break;
191 case kMipsDivU: 194 case kMipsDivU:
192 __ Divu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 195 __ Divu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
193 break; 196 break;
194 case kMipsMod: 197 case kMipsMod:
195 __ Mod(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 198 __ Mod(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
196 break; 199 break;
197 case kMipsModU: 200 case kMipsModU:
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 } 959 }
957 } 960 }
958 MarkLazyDeoptSite(); 961 MarkLazyDeoptSite();
959 } 962 }
960 963
961 #undef __ 964 #undef __
962 965
963 } // namespace compiler 966 } // namespace compiler
964 } // namespace internal 967 } // namespace internal
965 } // namespace v8 968 } // 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