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 | 6 |
7 #include "src/arm64/macro-assembler-arm64.h" | 7 #include "src/arm64/macro-assembler-arm64.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 i.InputFloat32Register(1)); | 681 i.InputFloat32Register(1)); |
682 break; | 682 break; |
683 case kArm64Float32Max: | 683 case kArm64Float32Max: |
684 __ Fmax(i.OutputFloat32Register(), i.InputFloat32Register(0), | 684 __ Fmax(i.OutputFloat32Register(), i.InputFloat32Register(0), |
685 i.InputFloat32Register(1)); | 685 i.InputFloat32Register(1)); |
686 break; | 686 break; |
687 case kArm64Float32Min: | 687 case kArm64Float32Min: |
688 __ Fmin(i.OutputFloat32Register(), i.InputFloat32Register(0), | 688 __ Fmin(i.OutputFloat32Register(), i.InputFloat32Register(0), |
689 i.InputFloat32Register(1)); | 689 i.InputFloat32Register(1)); |
690 break; | 690 break; |
| 691 case kArm64Float32Abs: |
| 692 __ Fabs(i.OutputFloat32Register(), i.InputFloat32Register(0)); |
| 693 break; |
691 case kArm64Float32Sqrt: | 694 case kArm64Float32Sqrt: |
692 __ Fsqrt(i.OutputFloat32Register(), i.InputFloat32Register(0)); | 695 __ Fsqrt(i.OutputFloat32Register(), i.InputFloat32Register(0)); |
693 break; | 696 break; |
694 case kArm64Float64Cmp: | 697 case kArm64Float64Cmp: |
695 if (instr->InputAt(1)->IsDoubleRegister()) { | 698 if (instr->InputAt(1)->IsDoubleRegister()) { |
696 __ Fcmp(i.InputDoubleRegister(0), i.InputDoubleRegister(1)); | 699 __ Fcmp(i.InputDoubleRegister(0), i.InputDoubleRegister(1)); |
697 } else { | 700 } else { |
698 DCHECK(instr->InputAt(1)->IsImmediate()); | 701 DCHECK(instr->InputAt(1)->IsImmediate()); |
699 // 0.0 is the only immediate supported by fcmp instructions. | 702 // 0.0 is the only immediate supported by fcmp instructions. |
700 DCHECK(i.InputDouble(1) == 0.0); | 703 DCHECK(i.InputDouble(1) == 0.0); |
(...skipping 28 matching lines...) Expand all Loading... |
729 break; | 732 break; |
730 } | 733 } |
731 case kArm64Float64Max: | 734 case kArm64Float64Max: |
732 __ Fmax(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 735 __ Fmax(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
733 i.InputDoubleRegister(1)); | 736 i.InputDoubleRegister(1)); |
734 break; | 737 break; |
735 case kArm64Float64Min: | 738 case kArm64Float64Min: |
736 __ Fmin(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 739 __ Fmin(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
737 i.InputDoubleRegister(1)); | 740 i.InputDoubleRegister(1)); |
738 break; | 741 break; |
| 742 case kArm64Float64Abs: |
| 743 __ Fabs(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 744 break; |
739 case kArm64Float64Neg: | 745 case kArm64Float64Neg: |
740 __ Fneg(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 746 __ Fneg(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
741 break; | 747 break; |
742 case kArm64Float64Sqrt: | 748 case kArm64Float64Sqrt: |
743 __ Fsqrt(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 749 __ Fsqrt(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
744 break; | 750 break; |
745 case kArm64Float32ToFloat64: | 751 case kArm64Float32ToFloat64: |
746 __ Fcvt(i.OutputDoubleRegister(), i.InputDoubleRegister(0).S()); | 752 __ Fcvt(i.OutputDoubleRegister(), i.InputDoubleRegister(0).S()); |
747 break; | 753 break; |
748 case kArm64Float64ToFloat32: | 754 case kArm64Float64ToFloat32: |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 } | 1267 } |
1262 } | 1268 } |
1263 MarkLazyDeoptSite(); | 1269 MarkLazyDeoptSite(); |
1264 } | 1270 } |
1265 | 1271 |
1266 #undef __ | 1272 #undef __ |
1267 | 1273 |
1268 } // namespace compiler | 1274 } // namespace compiler |
1269 } // namespace internal | 1275 } // namespace internal |
1270 } // namespace v8 | 1276 } // namespace v8 |
OLD | NEW |