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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 1044793002: [turbofan] Add backend support for float32 operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MachineOperator unit tests. 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 } 854 }
855 855
856 856
857 void MacroAssembler::VFPCanonicalizeNaN(const DwVfpRegister dst, 857 void MacroAssembler::VFPCanonicalizeNaN(const DwVfpRegister dst,
858 const DwVfpRegister src, 858 const DwVfpRegister src,
859 const Condition cond) { 859 const Condition cond) {
860 vsub(dst, src, kDoubleRegZero, cond); 860 vsub(dst, src, kDoubleRegZero, cond);
861 } 861 }
862 862
863 863
864 void MacroAssembler::VFPCompareAndSetFlags(const SwVfpRegister src1,
865 const SwVfpRegister src2,
866 const Condition cond) {
867 // Compare and move FPSCR flags to the normal condition flags.
868 VFPCompareAndLoadFlags(src1, src2, pc, cond);
869 }
870
871 void MacroAssembler::VFPCompareAndSetFlags(const SwVfpRegister src1,
872 const float src2,
873 const Condition cond) {
874 // Compare and move FPSCR flags to the normal condition flags.
875 VFPCompareAndLoadFlags(src1, src2, pc, cond);
876 }
877
878
864 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1, 879 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1,
865 const DwVfpRegister src2, 880 const DwVfpRegister src2,
866 const Condition cond) { 881 const Condition cond) {
867 // Compare and move FPSCR flags to the normal condition flags. 882 // Compare and move FPSCR flags to the normal condition flags.
868 VFPCompareAndLoadFlags(src1, src2, pc, cond); 883 VFPCompareAndLoadFlags(src1, src2, pc, cond);
869 } 884 }
870 885
871 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1, 886 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1,
872 const double src2, 887 const double src2,
873 const Condition cond) { 888 const Condition cond) {
874 // Compare and move FPSCR flags to the normal condition flags. 889 // Compare and move FPSCR flags to the normal condition flags.
875 VFPCompareAndLoadFlags(src1, src2, pc, cond); 890 VFPCompareAndLoadFlags(src1, src2, pc, cond);
876 } 891 }
877 892
878 893
894 void MacroAssembler::VFPCompareAndLoadFlags(const SwVfpRegister src1,
895 const SwVfpRegister src2,
896 const Register fpscr_flags,
897 const Condition cond) {
898 // Compare and load FPSCR.
899 vcmp(src1, src2, cond);
900 vmrs(fpscr_flags, cond);
901 }
902
903 void MacroAssembler::VFPCompareAndLoadFlags(const SwVfpRegister src1,
904 const float src2,
905 const Register fpscr_flags,
906 const Condition cond) {
907 // Compare and load FPSCR.
908 vcmp(src1, src2, cond);
909 vmrs(fpscr_flags, cond);
910 }
911
912
879 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1, 913 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1,
880 const DwVfpRegister src2, 914 const DwVfpRegister src2,
881 const Register fpscr_flags, 915 const Register fpscr_flags,
882 const Condition cond) { 916 const Condition cond) {
883 // Compare and load FPSCR. 917 // Compare and load FPSCR.
884 vcmp(src1, src2, cond); 918 vcmp(src1, src2, cond);
885 vmrs(fpscr_flags, cond); 919 vmrs(fpscr_flags, cond);
886 } 920 }
887 921
888 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1, 922 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1,
889 const double src2, 923 const double src2,
890 const Register fpscr_flags, 924 const Register fpscr_flags,
891 const Condition cond) { 925 const Condition cond) {
892 // Compare and load FPSCR. 926 // Compare and load FPSCR.
893 vcmp(src1, src2, cond); 927 vcmp(src1, src2, cond);
894 vmrs(fpscr_flags, cond); 928 vmrs(fpscr_flags, cond);
895 } 929 }
896 930
931
897 void MacroAssembler::Vmov(const DwVfpRegister dst, 932 void MacroAssembler::Vmov(const DwVfpRegister dst,
898 const double imm, 933 const double imm,
899 const Register scratch) { 934 const Register scratch) {
900 static const DoubleRepresentation minus_zero(-0.0); 935 static const DoubleRepresentation minus_zero(-0.0);
901 static const DoubleRepresentation zero(0.0); 936 static const DoubleRepresentation zero(0.0);
902 DoubleRepresentation value_rep(imm); 937 DoubleRepresentation value_rep(imm);
903 // Handle special values first. 938 // Handle special values first.
904 if (value_rep == zero) { 939 if (value_rep == zero) {
905 vmov(dst, kDoubleRegZero); 940 vmov(dst, kDoubleRegZero);
906 } else if (value_rep == minus_zero) { 941 } else if (value_rep == minus_zero) {
(...skipping 2969 matching lines...) Expand 10 before | Expand all | Expand 10 after
3876 } 3911 }
3877 } 3912 }
3878 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3913 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3879 add(result, result, Operand(dividend, LSR, 31)); 3914 add(result, result, Operand(dividend, LSR, 31));
3880 } 3915 }
3881 3916
3882 } // namespace internal 3917 } // namespace internal
3883 } // namespace v8 3918 } // namespace v8
3884 3919
3885 #endif // V8_TARGET_ARCH_ARM 3920 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698