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

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

Issue 654833002: [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 | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/x64/instruction-codes-x64.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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 break; 276 break;
277 case kX64Test: 277 case kX64Test:
278 ASSEMBLE_BINOP(testq); 278 ASSEMBLE_BINOP(testq);
279 break; 279 break;
280 case kX64Imul32: 280 case kX64Imul32:
281 ASSEMBLE_MULT(imull); 281 ASSEMBLE_MULT(imull);
282 break; 282 break;
283 case kX64Imul: 283 case kX64Imul:
284 ASSEMBLE_MULT(imulq); 284 ASSEMBLE_MULT(imulq);
285 break; 285 break;
286 case kX64ImulHigh32:
287 __ imull(i.InputRegister(1));
288 break;
286 case kX64Idiv32: 289 case kX64Idiv32:
287 __ cdq(); 290 __ cdq();
288 __ idivl(i.InputRegister(1)); 291 __ idivl(i.InputRegister(1));
289 break; 292 break;
290 case kX64Idiv: 293 case kX64Idiv:
291 __ cqo(); 294 __ cqo();
292 __ idivq(i.InputRegister(1)); 295 __ idivq(i.InputRegister(1));
293 break; 296 break;
294 case kX64Udiv32: 297 case kX64Udiv32:
295 __ xorl(rdx, rdx); 298 __ xorl(rdx, rdx);
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 } 1002 }
1000 } 1003 }
1001 MarkLazyDeoptSite(); 1004 MarkLazyDeoptSite();
1002 } 1005 }
1003 1006
1004 #undef __ 1007 #undef __
1005 1008
1006 } // namespace internal 1009 } // namespace internal
1007 } // namespace compiler 1010 } // namespace compiler
1008 } // namespace v8 1011 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/x64/instruction-codes-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698