OLD | NEW |
---|---|
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/osr.h" | 9 #include "src/compiler/osr.h" |
10 #include "src/mips/macro-assembler-mips.h" | 10 #include "src/mips/macro-assembler-mips.h" |
(...skipping 703 matching lines...) Loading... | |
714 break; | 714 break; |
715 } | 715 } |
716 case kMipsFloat64RoundTruncate: { | 716 case kMipsFloat64RoundTruncate: { |
717 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); | 717 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); |
718 break; | 718 break; |
719 } | 719 } |
720 case kMipsFloat64RoundUp: { | 720 case kMipsFloat64RoundUp: { |
721 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(ceil_l_d, Ceil); | 721 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(ceil_l_d, Ceil); |
722 break; | 722 break; |
723 } | 723 } |
724 case kMipsFloat64Max: { | |
725 // (b < a) ? a : b | |
726 if (IsMipsArchVariant(kMips32r6)) { | |
727 __ cmp(OLT, L, kScratchDoubleReg, i.InputDoubleRegister(0), | |
paul.l...
2015/11/02 22:35:11
You're putting the result of cmp in scratch, but d
dusan.milosavljevic
2015/11/03 01:51:05
Done.
| |
728 i.InputDoubleRegister(1)); | |
729 __ sel_d(i.OutputSingleRegister(), i.InputDoubleRegister(1), | |
730 kScratchDoubleReg); | |
paul.l...
2015/11/02 22:35:11
s/b: sel_d(i.OutputDoubleRegister(), i.InputDouble
dusan.milosavljevic
2015/11/03 01:51:05
Done.
Different instruction from other sel. instr
| |
731 } else { | |
732 __ c(OLT, D, i.InputDoubleRegister(0), i.InputDoubleRegister(1)); | |
733 // Left operand is result, passthrough if false. | |
734 __ movt_d(i.OutputSingleRegister(), i.InputDoubleRegister(1)); | |
paul.l...
2015/11/02 22:35:12
All the Float64 output regs are show as OutputSing
dusan.milosavljevic
2015/11/03 01:51:05
Done.
| |
735 } | |
736 break; | |
737 } | |
738 case kMipsFloat64Min: { | |
739 // (a < b) ? a : b | |
740 if (IsMipsArchVariant(kMips32r6)) { | |
741 __ cmp(OLT, L, kScratchDoubleReg, i.InputDoubleRegister(0), | |
paul.l...
2015/11/02 22:35:11
nit: we have asm aliases for cmp_d() and cmp_s(),
dusan.milosavljevic
2015/11/03 01:51:05
Done.
| |
742 i.InputDoubleRegister(1)); | |
743 __ sel_d(i.OutputSingleRegister(), i.InputDoubleRegister(1), | |
744 kScratchDoubleReg); | |
745 } else { | |
746 __ c(OLT, D, i.InputDoubleRegister(1), i.InputDoubleRegister(0)); | |
747 // Right operand is result, passthrough if false. | |
748 __ movt_d(i.OutputSingleRegister(), i.InputDoubleRegister(1)); | |
749 } | |
750 break; | |
751 } | |
752 case kMipsFloat32Max: { | |
753 // (b < a) ? a : b | |
754 if (IsMipsArchVariant(kMips32r6)) { | |
755 __ cmp(OLT, W, kScratchDoubleReg, i.InputDoubleRegister(0), | |
756 i.InputDoubleRegister(1)); | |
757 __ sel_s(i.OutputSingleRegister(), i.InputDoubleRegister(1), | |
758 kScratchDoubleReg); | |
759 } else { | |
760 __ c(OLT, S, i.InputDoubleRegister(0), i.InputDoubleRegister(1)); | |
761 // Left operand is result, passthrough if false. | |
762 __ movt_s(i.OutputSingleRegister(), i.InputDoubleRegister(1)); | |
763 } | |
764 break; | |
765 } | |
766 case kMipsFloat32Min: { | |
767 // (a < b) ? a : b | |
768 if (IsMipsArchVariant(kMips32r6)) { | |
769 __ cmp(OLT, W, kScratchDoubleReg, i.InputDoubleRegister(0), | |
770 i.InputDoubleRegister(1)); | |
771 __ sel_d(i.OutputSingleRegister(), i.InputDoubleRegister(1), | |
772 kScratchDoubleReg); | |
773 } else { | |
774 __ c(OLT, S, i.InputDoubleRegister(1), i.InputDoubleRegister(0)); | |
775 // Right operand is result, passthrough if false. | |
776 __ movt_s(i.OutputSingleRegister(), i.InputDoubleRegister(1)); | |
777 } | |
778 break; | |
779 } | |
724 case kMipsCvtSD: { | 780 case kMipsCvtSD: { |
725 __ cvt_s_d(i.OutputSingleRegister(), i.InputDoubleRegister(0)); | 781 __ cvt_s_d(i.OutputSingleRegister(), i.InputDoubleRegister(0)); |
726 break; | 782 break; |
727 } | 783 } |
728 case kMipsCvtDS: { | 784 case kMipsCvtDS: { |
729 __ cvt_d_s(i.OutputDoubleRegister(), i.InputSingleRegister(0)); | 785 __ cvt_d_s(i.OutputDoubleRegister(), i.InputSingleRegister(0)); |
730 break; | 786 break; |
731 } | 787 } |
732 case kMipsCvtDW: { | 788 case kMipsCvtDW: { |
733 FPURegister scratch = kScratchDoubleReg; | 789 FPURegister scratch = kScratchDoubleReg; |
(...skipping 726 matching lines...) Loading... | |
1460 padding_size -= v8::internal::Assembler::kInstrSize; | 1516 padding_size -= v8::internal::Assembler::kInstrSize; |
1461 } | 1517 } |
1462 } | 1518 } |
1463 } | 1519 } |
1464 | 1520 |
1465 #undef __ | 1521 #undef __ |
1466 | 1522 |
1467 } // namespace compiler | 1523 } // namespace compiler |
1468 } // namespace internal | 1524 } // namespace internal |
1469 } // namespace v8 | 1525 } // namespace v8 |
OLD | NEW |