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

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

Issue 1081033003: [x86] Allow (v)divsd->(v)mulsd to execute in parallel. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | src/compiler/x64/code-generator-x64.cc » ('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/ia32/assembler-ia32.h" 10 #include "src/ia32/assembler-ia32.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 __ addss(i.InputDoubleRegister(0), i.InputOperand(1)); 461 __ addss(i.InputDoubleRegister(0), i.InputOperand(1));
462 break; 462 break;
463 case kSSEFloat32Sub: 463 case kSSEFloat32Sub:
464 __ subss(i.InputDoubleRegister(0), i.InputOperand(1)); 464 __ subss(i.InputDoubleRegister(0), i.InputOperand(1));
465 break; 465 break;
466 case kSSEFloat32Mul: 466 case kSSEFloat32Mul:
467 __ mulss(i.InputDoubleRegister(0), i.InputOperand(1)); 467 __ mulss(i.InputDoubleRegister(0), i.InputOperand(1));
468 break; 468 break;
469 case kSSEFloat32Div: 469 case kSSEFloat32Div:
470 __ divss(i.InputDoubleRegister(0), i.InputOperand(1)); 470 __ divss(i.InputDoubleRegister(0), i.InputOperand(1));
471 // Don't delete this mov. It may improve performance on some CPUs,
472 // when there is a (v)mulss depending on the result.
473 __ movaps(i.OutputDoubleRegister(), i.OutputDoubleRegister());
471 break; 474 break;
472 case kSSEFloat32Max: 475 case kSSEFloat32Max:
473 __ maxss(i.InputDoubleRegister(0), i.InputOperand(1)); 476 __ maxss(i.InputDoubleRegister(0), i.InputOperand(1));
474 break; 477 break;
475 case kSSEFloat32Min: 478 case kSSEFloat32Min:
476 __ minss(i.InputDoubleRegister(0), i.InputOperand(1)); 479 __ minss(i.InputDoubleRegister(0), i.InputOperand(1));
477 break; 480 break;
478 case kSSEFloat32Sqrt: 481 case kSSEFloat32Sqrt:
479 __ sqrtss(i.OutputDoubleRegister(), i.InputOperand(0)); 482 __ sqrtss(i.OutputDoubleRegister(), i.InputOperand(0));
480 break; 483 break;
(...skipping 18 matching lines...) Expand all
499 __ addsd(i.InputDoubleRegister(0), i.InputOperand(1)); 502 __ addsd(i.InputDoubleRegister(0), i.InputOperand(1));
500 break; 503 break;
501 case kSSEFloat64Sub: 504 case kSSEFloat64Sub:
502 __ subsd(i.InputDoubleRegister(0), i.InputOperand(1)); 505 __ subsd(i.InputDoubleRegister(0), i.InputOperand(1));
503 break; 506 break;
504 case kSSEFloat64Mul: 507 case kSSEFloat64Mul:
505 __ mulsd(i.InputDoubleRegister(0), i.InputOperand(1)); 508 __ mulsd(i.InputDoubleRegister(0), i.InputOperand(1));
506 break; 509 break;
507 case kSSEFloat64Div: 510 case kSSEFloat64Div:
508 __ divsd(i.InputDoubleRegister(0), i.InputOperand(1)); 511 __ divsd(i.InputDoubleRegister(0), i.InputOperand(1));
512 // Don't delete this mov. It may improve performance on some CPUs,
513 // when there is a (v)mulsd depending on the result.
514 __ movaps(i.OutputDoubleRegister(), i.OutputDoubleRegister());
509 break; 515 break;
510 case kSSEFloat64Max: 516 case kSSEFloat64Max:
511 __ maxsd(i.InputDoubleRegister(0), i.InputOperand(1)); 517 __ maxsd(i.InputDoubleRegister(0), i.InputOperand(1));
512 break; 518 break;
513 case kSSEFloat64Min: 519 case kSSEFloat64Min:
514 __ minsd(i.InputDoubleRegister(0), i.InputOperand(1)); 520 __ minsd(i.InputDoubleRegister(0), i.InputOperand(1));
515 break; 521 break;
516 case kSSEFloat64Mod: { 522 case kSSEFloat64Mod: {
517 // TODO(dcarney): alignment is wrong. 523 // TODO(dcarney): alignment is wrong.
518 __ sub(esp, Immediate(kDoubleSize)); 524 __ sub(esp, Immediate(kDoubleSize));
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 case kAVXFloat32Mul: { 628 case kAVXFloat32Mul: {
623 CpuFeatureScope avx_scope(masm(), AVX); 629 CpuFeatureScope avx_scope(masm(), AVX);
624 __ vmulss(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 630 __ vmulss(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
625 i.InputOperand(1)); 631 i.InputOperand(1));
626 break; 632 break;
627 } 633 }
628 case kAVXFloat32Div: { 634 case kAVXFloat32Div: {
629 CpuFeatureScope avx_scope(masm(), AVX); 635 CpuFeatureScope avx_scope(masm(), AVX);
630 __ vdivss(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 636 __ vdivss(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
631 i.InputOperand(1)); 637 i.InputOperand(1));
638 // Don't delete this mov. It may improve performance on some CPUs,
639 // when there is a (v)mulss depending on the result.
640 __ movaps(i.OutputDoubleRegister(), i.OutputDoubleRegister());
632 break; 641 break;
633 } 642 }
634 case kAVXFloat32Max: { 643 case kAVXFloat32Max: {
635 CpuFeatureScope avx_scope(masm(), AVX); 644 CpuFeatureScope avx_scope(masm(), AVX);
636 __ vmaxss(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 645 __ vmaxss(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
637 i.InputOperand(1)); 646 i.InputOperand(1));
638 break; 647 break;
639 } 648 }
640 case kAVXFloat32Min: { 649 case kAVXFloat32Min: {
641 CpuFeatureScope avx_scope(masm(), AVX); 650 CpuFeatureScope avx_scope(masm(), AVX);
(...skipping 16 matching lines...) Expand all
658 case kAVXFloat64Mul: { 667 case kAVXFloat64Mul: {
659 CpuFeatureScope avx_scope(masm(), AVX); 668 CpuFeatureScope avx_scope(masm(), AVX);
660 __ vmulsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 669 __ vmulsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
661 i.InputOperand(1)); 670 i.InputOperand(1));
662 break; 671 break;
663 } 672 }
664 case kAVXFloat64Div: { 673 case kAVXFloat64Div: {
665 CpuFeatureScope avx_scope(masm(), AVX); 674 CpuFeatureScope avx_scope(masm(), AVX);
666 __ vdivsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 675 __ vdivsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
667 i.InputOperand(1)); 676 i.InputOperand(1));
677 // Don't delete this mov. It may improve performance on some CPUs,
678 // when there is a (v)mulsd depending on the result.
679 __ movaps(i.OutputDoubleRegister(), i.OutputDoubleRegister());
668 break; 680 break;
669 } 681 }
670 case kAVXFloat64Max: { 682 case kAVXFloat64Max: {
671 CpuFeatureScope avx_scope(masm(), AVX); 683 CpuFeatureScope avx_scope(masm(), AVX);
672 __ vmaxsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 684 __ vmaxsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
673 i.InputOperand(1)); 685 i.InputOperand(1));
674 break; 686 break;
675 } 687 }
676 case kAVXFloat64Min: { 688 case kAVXFloat64Min: {
677 CpuFeatureScope avx_scope(masm(), AVX); 689 CpuFeatureScope avx_scope(masm(), AVX);
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 } 1484 }
1473 } 1485 }
1474 MarkLazyDeoptSite(); 1486 MarkLazyDeoptSite();
1475 } 1487 }
1476 1488
1477 #undef __ 1489 #undef __
1478 1490
1479 } // namespace compiler 1491 } // namespace compiler
1480 } // namespace internal 1492 } // namespace internal
1481 } // namespace v8 1493 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698