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/compilation-info.h" | 6 #include "src/compilation-info.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 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 break; | 1255 break; |
1256 } | 1256 } |
1257 case kMipsFloat32RoundTiesEven: { | 1257 case kMipsFloat32RoundTiesEven: { |
1258 ASSEMBLE_ROUND_FLOAT_TO_FLOAT(round); | 1258 ASSEMBLE_ROUND_FLOAT_TO_FLOAT(round); |
1259 break; | 1259 break; |
1260 } | 1260 } |
1261 case kMipsFloat32Max: { | 1261 case kMipsFloat32Max: { |
1262 FPURegister dst = i.OutputSingleRegister(); | 1262 FPURegister dst = i.OutputSingleRegister(); |
1263 FPURegister src1 = i.InputSingleRegister(0); | 1263 FPURegister src1 = i.InputSingleRegister(0); |
1264 FPURegister src2 = i.InputSingleRegister(1); | 1264 FPURegister src2 = i.InputSingleRegister(1); |
1265 if (src1.is(src2)) { | 1265 auto ool = new (zone()) OutOfLineFloat32Max(this, dst, src1, src2); |
1266 __ Move_s(dst, src1); | 1266 __ Float32Max(dst, src1, src2, ool->entry()); |
1267 } else { | 1267 __ bind(ool->exit()); |
1268 auto ool = new (zone()) OutOfLineFloat32Max(this, dst, src1, src2); | |
1269 __ Float32Max(dst, src1, src2, ool->entry()); | |
1270 __ bind(ool->exit()); | |
1271 } | |
1272 break; | 1268 break; |
1273 } | 1269 } |
1274 case kMipsFloat64Max: { | 1270 case kMipsFloat64Max: { |
1275 DoubleRegister dst = i.OutputDoubleRegister(); | 1271 DoubleRegister dst = i.OutputDoubleRegister(); |
1276 DoubleRegister src1 = i.InputDoubleRegister(0); | 1272 DoubleRegister src1 = i.InputDoubleRegister(0); |
1277 DoubleRegister src2 = i.InputDoubleRegister(1); | 1273 DoubleRegister src2 = i.InputDoubleRegister(1); |
1278 if (src1.is(src2)) { | 1274 auto ool = new (zone()) OutOfLineFloat64Max(this, dst, src1, src2); |
1279 __ Move_d(dst, src1); | 1275 __ Float64Max(dst, src1, src2, ool->entry()); |
1280 } else { | 1276 __ bind(ool->exit()); |
1281 auto ool = new (zone()) OutOfLineFloat64Max(this, dst, src1, src2); | |
1282 __ Float64Max(dst, src1, src2, ool->entry()); | |
1283 __ bind(ool->exit()); | |
1284 } | |
1285 break; | 1277 break; |
1286 } | 1278 } |
1287 case kMipsFloat32Min: { | 1279 case kMipsFloat32Min: { |
1288 FPURegister dst = i.OutputSingleRegister(); | 1280 FPURegister dst = i.OutputSingleRegister(); |
1289 FPURegister src1 = i.InputSingleRegister(0); | 1281 FPURegister src1 = i.InputSingleRegister(0); |
1290 FPURegister src2 = i.InputSingleRegister(1); | 1282 FPURegister src2 = i.InputSingleRegister(1); |
1291 if (src1.is(src2)) { | 1283 auto ool = new (zone()) OutOfLineFloat32Min(this, dst, src1, src2); |
1292 __ Move_s(dst, src1); | 1284 __ Float32Min(dst, src1, src2, ool->entry()); |
1293 } else { | 1285 __ bind(ool->exit()); |
1294 auto ool = new (zone()) OutOfLineFloat32Min(this, dst, src1, src2); | |
1295 __ Float32Min(dst, src1, src2, ool->entry()); | |
1296 __ bind(ool->exit()); | |
1297 } | |
1298 break; | 1286 break; |
1299 } | 1287 } |
1300 case kMipsFloat64Min: { | 1288 case kMipsFloat64Min: { |
1301 DoubleRegister dst = i.OutputDoubleRegister(); | 1289 DoubleRegister dst = i.OutputDoubleRegister(); |
1302 DoubleRegister src1 = i.InputDoubleRegister(0); | 1290 DoubleRegister src1 = i.InputDoubleRegister(0); |
1303 DoubleRegister src2 = i.InputDoubleRegister(1); | 1291 DoubleRegister src2 = i.InputDoubleRegister(1); |
1304 if (src1.is(src2)) { | 1292 auto ool = new (zone()) OutOfLineFloat64Min(this, dst, src1, src2); |
1305 __ Move_d(dst, src1); | 1293 __ Float64Min(dst, src1, src2, ool->entry()); |
1306 } else { | 1294 __ bind(ool->exit()); |
1307 auto ool = new (zone()) OutOfLineFloat64Min(this, dst, src1, src2); | |
1308 __ Float64Min(dst, src1, src2, ool->entry()); | |
1309 __ bind(ool->exit()); | |
1310 } | |
1311 break; | 1295 break; |
1312 } | 1296 } |
1313 case kMipsCvtSD: { | 1297 case kMipsCvtSD: { |
1314 __ cvt_s_d(i.OutputSingleRegister(), i.InputDoubleRegister(0)); | 1298 __ cvt_s_d(i.OutputSingleRegister(), i.InputDoubleRegister(0)); |
1315 break; | 1299 break; |
1316 } | 1300 } |
1317 case kMipsCvtDS: { | 1301 case kMipsCvtDS: { |
1318 __ cvt_d_s(i.OutputDoubleRegister(), i.InputSingleRegister(0)); | 1302 __ cvt_d_s(i.OutputDoubleRegister(), i.InputSingleRegister(0)); |
1319 break; | 1303 break; |
1320 } | 1304 } |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2332 padding_size -= v8::internal::Assembler::kInstrSize; | 2316 padding_size -= v8::internal::Assembler::kInstrSize; |
2333 } | 2317 } |
2334 } | 2318 } |
2335 } | 2319 } |
2336 | 2320 |
2337 #undef __ | 2321 #undef __ |
2338 | 2322 |
2339 } // namespace compiler | 2323 } // namespace compiler |
2340 } // namespace internal | 2324 } // namespace internal |
2341 } // namespace v8 | 2325 } // namespace v8 |
OLD | NEW |