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

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

Issue 697663003: [turbofan] Also optimize unsigned division by constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Slight improvement Created 6 years, 1 month 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 | « src/compiler/change-lowering.cc ('k') | src/compiler/ia32/instruction-codes-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 6
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/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 case kIA32Imul: 240 case kIA32Imul:
241 if (HasImmediateInput(instr, 1)) { 241 if (HasImmediateInput(instr, 1)) {
242 __ imul(i.OutputRegister(), i.InputOperand(0), i.InputInt32(1)); 242 __ imul(i.OutputRegister(), i.InputOperand(0), i.InputInt32(1));
243 } else { 243 } else {
244 __ imul(i.OutputRegister(), i.InputOperand(1)); 244 __ imul(i.OutputRegister(), i.InputOperand(1));
245 } 245 }
246 break; 246 break;
247 case kIA32ImulHigh: 247 case kIA32ImulHigh:
248 __ imul(i.InputRegister(1)); 248 __ imul(i.InputRegister(1));
249 break; 249 break;
250 case kIA32UmulHigh:
251 __ mul(i.InputRegister(1));
252 break;
250 case kIA32Idiv: 253 case kIA32Idiv:
251 __ cdq(); 254 __ cdq();
252 __ idiv(i.InputOperand(1)); 255 __ idiv(i.InputOperand(1));
253 break; 256 break;
254 case kIA32Udiv: 257 case kIA32Udiv:
255 __ Move(edx, Immediate(0)); 258 __ Move(edx, Immediate(0));
256 __ div(i.InputOperand(1)); 259 __ div(i.InputOperand(1));
257 break; 260 break;
258 case kIA32Not: 261 case kIA32Not:
259 __ not_(i.OutputOperand()); 262 __ not_(i.OutputOperand());
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 } 1054 }
1052 } 1055 }
1053 MarkLazyDeoptSite(); 1056 MarkLazyDeoptSite();
1054 } 1057 }
1055 1058
1056 #undef __ 1059 #undef __
1057 1060
1058 } // namespace compiler 1061 } // namespace compiler
1059 } // namespace internal 1062 } // namespace internal
1060 } // namespace v8 1063 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | src/compiler/ia32/instruction-codes-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698