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

Side by Side Diff: src/compiler/x64/code-generator-x64.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/verifier.cc ('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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 case kX64Test: 282 case kX64Test:
283 ASSEMBLE_BINOP(testq); 283 ASSEMBLE_BINOP(testq);
284 break; 284 break;
285 case kX64Imul32: 285 case kX64Imul32:
286 ASSEMBLE_MULT(imull); 286 ASSEMBLE_MULT(imull);
287 break; 287 break;
288 case kX64Imul: 288 case kX64Imul:
289 ASSEMBLE_MULT(imulq); 289 ASSEMBLE_MULT(imulq);
290 break; 290 break;
291 case kX64ImulHigh32: 291 case kX64ImulHigh32:
292 __ imull(i.InputRegister(1)); 292 if (instr->InputAt(1)->IsRegister()) {
293 __ imull(i.InputRegister(1));
294 } else {
295 __ imull(i.InputOperand(1));
296 }
297 break;
298 case kX64UmulHigh32:
299 if (instr->InputAt(1)->IsRegister()) {
300 __ mull(i.InputRegister(1));
301 } else {
302 __ mull(i.InputOperand(1));
303 }
293 break; 304 break;
294 case kX64Idiv32: 305 case kX64Idiv32:
295 __ cdq(); 306 __ cdq();
296 __ idivl(i.InputRegister(1)); 307 __ idivl(i.InputRegister(1));
297 break; 308 break;
298 case kX64Idiv: 309 case kX64Idiv:
299 __ cqo(); 310 __ cqo();
300 __ idivq(i.InputRegister(1)); 311 __ idivq(i.InputRegister(1));
301 break; 312 break;
302 case kX64Udiv32: 313 case kX64Udiv32:
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 } 1031 }
1021 } 1032 }
1022 MarkLazyDeoptSite(); 1033 MarkLazyDeoptSite();
1023 } 1034 }
1024 1035
1025 #undef __ 1036 #undef __
1026 1037
1027 } // namespace internal 1038 } // namespace internal
1028 } // namespace compiler 1039 } // namespace compiler
1029 } // namespace v8 1040 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/compiler/x64/instruction-codes-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698