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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.h" |
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/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 case kMipsCvtDS: { | 937 case kMipsCvtDS: { |
938 __ cvt_d_s(i.OutputDoubleRegister(), i.InputSingleRegister(0)); | 938 __ cvt_d_s(i.OutputDoubleRegister(), i.InputSingleRegister(0)); |
939 break; | 939 break; |
940 } | 940 } |
941 case kMipsCvtDW: { | 941 case kMipsCvtDW: { |
942 FPURegister scratch = kScratchDoubleReg; | 942 FPURegister scratch = kScratchDoubleReg; |
943 __ mtc1(i.InputRegister(0), scratch); | 943 __ mtc1(i.InputRegister(0), scratch); |
944 __ cvt_d_w(i.OutputDoubleRegister(), scratch); | 944 __ cvt_d_w(i.OutputDoubleRegister(), scratch); |
945 break; | 945 break; |
946 } | 946 } |
| 947 case kMipsCvtSW: { |
| 948 FPURegister scratch = kScratchDoubleReg; |
| 949 __ mtc1(i.InputRegister(0), scratch); |
| 950 __ cvt_s_w(i.OutputDoubleRegister(), scratch); |
| 951 break; |
| 952 } |
947 case kMipsCvtDUw: { | 953 case kMipsCvtDUw: { |
948 FPURegister scratch = kScratchDoubleReg; | 954 FPURegister scratch = kScratchDoubleReg; |
949 __ Cvt_d_uw(i.OutputDoubleRegister(), i.InputRegister(0), scratch); | 955 __ Cvt_d_uw(i.OutputDoubleRegister(), i.InputRegister(0), scratch); |
950 break; | 956 break; |
951 } | 957 } |
952 case kMipsFloorWD: { | 958 case kMipsFloorWD: { |
953 FPURegister scratch = kScratchDoubleReg; | 959 FPURegister scratch = kScratchDoubleReg; |
954 __ floor_w_d(scratch, i.InputDoubleRegister(0)); | 960 __ floor_w_d(scratch, i.InputDoubleRegister(0)); |
955 __ mfc1(i.OutputRegister(), scratch); | 961 __ mfc1(i.OutputRegister(), scratch); |
956 break; | 962 break; |
(...skipping 10 matching lines...) Expand all Loading... |
967 __ mfc1(i.OutputRegister(), scratch); | 973 __ mfc1(i.OutputRegister(), scratch); |
968 break; | 974 break; |
969 } | 975 } |
970 case kMipsTruncWD: { | 976 case kMipsTruncWD: { |
971 FPURegister scratch = kScratchDoubleReg; | 977 FPURegister scratch = kScratchDoubleReg; |
972 // Other arches use round to zero here, so we follow. | 978 // Other arches use round to zero here, so we follow. |
973 __ trunc_w_d(scratch, i.InputDoubleRegister(0)); | 979 __ trunc_w_d(scratch, i.InputDoubleRegister(0)); |
974 __ mfc1(i.OutputRegister(), scratch); | 980 __ mfc1(i.OutputRegister(), scratch); |
975 break; | 981 break; |
976 } | 982 } |
| 983 case kMipsFloorWS: { |
| 984 FPURegister scratch = kScratchDoubleReg; |
| 985 __ floor_w_s(scratch, i.InputDoubleRegister(0)); |
| 986 __ mfc1(i.OutputRegister(), scratch); |
| 987 break; |
| 988 } |
| 989 case kMipsCeilWS: { |
| 990 FPURegister scratch = kScratchDoubleReg; |
| 991 __ ceil_w_s(scratch, i.InputDoubleRegister(0)); |
| 992 __ mfc1(i.OutputRegister(), scratch); |
| 993 break; |
| 994 } |
| 995 case kMipsRoundWS: { |
| 996 FPURegister scratch = kScratchDoubleReg; |
| 997 __ round_w_s(scratch, i.InputDoubleRegister(0)); |
| 998 __ mfc1(i.OutputRegister(), scratch); |
| 999 break; |
| 1000 } |
| 1001 case kMipsTruncWS: { |
| 1002 FPURegister scratch = kScratchDoubleReg; |
| 1003 __ trunc_w_s(scratch, i.InputDoubleRegister(0)); |
| 1004 __ mfc1(i.OutputRegister(), scratch); |
| 1005 break; |
| 1006 } |
977 case kMipsTruncUwD: { | 1007 case kMipsTruncUwD: { |
978 FPURegister scratch = kScratchDoubleReg; | 1008 FPURegister scratch = kScratchDoubleReg; |
979 // TODO(plind): Fix wrong param order of Trunc_uw_d() macro-asm function. | 1009 // TODO(plind): Fix wrong param order of Trunc_uw_d() macro-asm function. |
980 __ Trunc_uw_d(i.InputDoubleRegister(0), i.OutputRegister(), scratch); | 1010 __ Trunc_uw_d(i.InputDoubleRegister(0), i.OutputRegister(), scratch); |
981 break; | 1011 break; |
982 } | 1012 } |
983 case kMipsFloat64ExtractLowWord32: | 1013 case kMipsFloat64ExtractLowWord32: |
984 __ FmoveLow(i.OutputRegister(), i.InputDoubleRegister(0)); | 1014 __ FmoveLow(i.OutputRegister(), i.InputDoubleRegister(0)); |
985 break; | 1015 break; |
986 case kMipsFloat64ExtractHighWord32: | 1016 case kMipsFloat64ExtractHighWord32: |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 padding_size -= v8::internal::Assembler::kInstrSize; | 1745 padding_size -= v8::internal::Assembler::kInstrSize; |
1716 } | 1746 } |
1717 } | 1747 } |
1718 } | 1748 } |
1719 | 1749 |
1720 #undef __ | 1750 #undef __ |
1721 | 1751 |
1722 } // namespace compiler | 1752 } // namespace compiler |
1723 } // namespace internal | 1753 } // namespace internal |
1724 } // namespace v8 | 1754 } // namespace v8 |
OLD | NEW |