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 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 break; | 1189 break; |
1190 } | 1190 } |
1191 case kMipsFloat64RoundTiesEven: { | 1191 case kMipsFloat64RoundTiesEven: { |
1192 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(round); | 1192 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(round); |
1193 break; | 1193 break; |
1194 } | 1194 } |
1195 case kMipsFloat32RoundTiesEven: { | 1195 case kMipsFloat32RoundTiesEven: { |
1196 ASSEMBLE_ROUND_FLOAT_TO_FLOAT(round); | 1196 ASSEMBLE_ROUND_FLOAT_TO_FLOAT(round); |
1197 break; | 1197 break; |
1198 } | 1198 } |
| 1199 case kMipsFloat32Max: { |
| 1200 Label compare_nan, done_compare; |
| 1201 __ MaxNaNCheck_s(i.OutputSingleRegister(), i.InputSingleRegister(0), |
| 1202 i.InputSingleRegister(1), &compare_nan); |
| 1203 __ Branch(&done_compare); |
| 1204 __ bind(&compare_nan); |
| 1205 __ Move(i.OutputSingleRegister(), |
| 1206 std::numeric_limits<float>::quiet_NaN()); |
| 1207 __ bind(&done_compare); |
| 1208 break; |
| 1209 } |
1199 case kMipsFloat64Max: { | 1210 case kMipsFloat64Max: { |
1200 Label compare_nan, done_compare; | 1211 Label compare_nan, done_compare; |
1201 __ MaxNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1212 __ MaxNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
1202 i.InputDoubleRegister(1), &compare_nan); | 1213 i.InputDoubleRegister(1), &compare_nan); |
1203 __ Branch(&done_compare); | 1214 __ Branch(&done_compare); |
1204 __ bind(&compare_nan); | 1215 __ bind(&compare_nan); |
1205 __ Move(i.OutputDoubleRegister(), | 1216 __ Move(i.OutputDoubleRegister(), |
1206 std::numeric_limits<double>::quiet_NaN()); | 1217 std::numeric_limits<double>::quiet_NaN()); |
1207 __ bind(&done_compare); | 1218 __ bind(&done_compare); |
1208 break; | 1219 break; |
1209 } | 1220 } |
| 1221 case kMipsFloat32Min: { |
| 1222 Label compare_nan, done_compare; |
| 1223 __ MinNaNCheck_s(i.OutputSingleRegister(), i.InputSingleRegister(0), |
| 1224 i.InputSingleRegister(1), &compare_nan); |
| 1225 __ Branch(&done_compare); |
| 1226 __ bind(&compare_nan); |
| 1227 __ Move(i.OutputSingleRegister(), |
| 1228 std::numeric_limits<float>::quiet_NaN()); |
| 1229 __ bind(&done_compare); |
| 1230 break; |
| 1231 } |
1210 case kMipsFloat64Min: { | 1232 case kMipsFloat64Min: { |
1211 Label compare_nan, done_compare; | 1233 Label compare_nan, done_compare; |
1212 __ MinNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1234 __ MinNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
1213 i.InputDoubleRegister(1), &compare_nan); | 1235 i.InputDoubleRegister(1), &compare_nan); |
1214 __ Branch(&done_compare); | 1236 __ Branch(&done_compare); |
1215 __ bind(&compare_nan); | 1237 __ bind(&compare_nan); |
1216 __ Move(i.OutputDoubleRegister(), | 1238 __ Move(i.OutputDoubleRegister(), |
1217 std::numeric_limits<double>::quiet_NaN()); | 1239 std::numeric_limits<double>::quiet_NaN()); |
1218 __ bind(&done_compare); | 1240 __ bind(&done_compare); |
1219 break; | 1241 break; |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2190 padding_size -= v8::internal::Assembler::kInstrSize; | 2212 padding_size -= v8::internal::Assembler::kInstrSize; |
2191 } | 2213 } |
2192 } | 2214 } |
2193 } | 2215 } |
2194 | 2216 |
2195 #undef __ | 2217 #undef __ |
2196 | 2218 |
2197 } // namespace compiler | 2219 } // namespace compiler |
2198 } // namespace internal | 2220 } // namespace internal |
2199 } // namespace v8 | 2221 } // namespace v8 |
OLD | NEW |