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

Side by Side Diff: src/compiler/mips64/code-generator-mips64.cc

Issue 2252863003: [turbofan] Add Float32(Max|Min) machine operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Type is number now. Created 4 years, 3 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 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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 break; 1382 break;
1383 } 1383 }
1384 case kMips64Float64RoundTiesEven: { 1384 case kMips64Float64RoundTiesEven: {
1385 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(round); 1385 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(round);
1386 break; 1386 break;
1387 } 1387 }
1388 case kMips64Float32RoundTiesEven: { 1388 case kMips64Float32RoundTiesEven: {
1389 ASSEMBLE_ROUND_FLOAT_TO_FLOAT(round); 1389 ASSEMBLE_ROUND_FLOAT_TO_FLOAT(round);
1390 break; 1390 break;
1391 } 1391 }
1392 case kMips64Float32Max: {
1393 Label compare_nan, done_compare;
1394 __ MaxNaNCheck_s(i.OutputSingleRegister(), i.InputSingleRegister(0),
1395 i.InputSingleRegister(1), &compare_nan);
1396 __ Branch(&done_compare);
1397 __ bind(&compare_nan);
1398 __ Move(i.OutputSingleRegister(),
1399 std::numeric_limits<float>::quiet_NaN());
1400 __ bind(&done_compare);
1401 break;
1402 }
1392 case kMips64Float64Max: { 1403 case kMips64Float64Max: {
1393 Label compare_nan, done_compare; 1404 Label compare_nan, done_compare;
1394 __ MaxNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1405 __ MaxNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1395 i.InputDoubleRegister(1), &compare_nan); 1406 i.InputDoubleRegister(1), &compare_nan);
1396 __ Branch(&done_compare); 1407 __ Branch(&done_compare);
1397 __ bind(&compare_nan); 1408 __ bind(&compare_nan);
1398 __ Move(i.OutputDoubleRegister(), 1409 __ Move(i.OutputDoubleRegister(),
1399 std::numeric_limits<double>::quiet_NaN()); 1410 std::numeric_limits<double>::quiet_NaN());
1400 __ bind(&done_compare); 1411 __ bind(&done_compare);
1401 break; 1412 break;
1402 } 1413 }
1414 case kMips64Float32Min: {
1415 Label compare_nan, done_compare;
1416 __ MinNaNCheck_s(i.OutputSingleRegister(), i.InputSingleRegister(0),
1417 i.InputSingleRegister(1), &compare_nan);
1418 __ Branch(&done_compare);
1419 __ bind(&compare_nan);
1420 __ Move(i.OutputSingleRegister(),
1421 std::numeric_limits<float>::quiet_NaN());
1422 __ bind(&done_compare);
1423 break;
1424 }
1403 case kMips64Float64Min: { 1425 case kMips64Float64Min: {
1404 Label compare_nan, done_compare; 1426 Label compare_nan, done_compare;
1405 __ MinNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1427 __ MinNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1406 i.InputDoubleRegister(1), &compare_nan); 1428 i.InputDoubleRegister(1), &compare_nan);
1407 __ Branch(&done_compare); 1429 __ Branch(&done_compare);
1408 __ bind(&compare_nan); 1430 __ bind(&compare_nan);
1409 __ Move(i.OutputDoubleRegister(), 1431 __ Move(i.OutputDoubleRegister(),
1410 std::numeric_limits<double>::quiet_NaN()); 1432 std::numeric_limits<double>::quiet_NaN());
1411 __ bind(&done_compare); 1433 __ bind(&done_compare);
1412 break; 1434 break;
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
2465 padding_size -= v8::internal::Assembler::kInstrSize; 2487 padding_size -= v8::internal::Assembler::kInstrSize;
2466 } 2488 }
2467 } 2489 }
2468 } 2490 }
2469 2491
2470 #undef __ 2492 #undef __
2471 2493
2472 } // namespace compiler 2494 } // namespace compiler
2473 } // namespace internal 2495 } // namespace internal
2474 } // namespace v8 2496 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698