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

Side by Side Diff: test/cctest/test-macro-assembler-mips.cc

Issue 2556793003: MIPS[64]: Fix `MIPS: Improve Float(32|64)(Max|Min)`. (Closed)
Patch Set: Created 4 years 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 1394
1395 #undef FLOAT_MIN_MAX 1395 #undef FLOAT_MIN_MAX
1396 1396
1397 __ jr(ra); 1397 __ jr(ra);
1398 __ nop(); 1398 __ nop();
1399 1399
1400 // Generate out-of-line cases. 1400 // Generate out-of-line cases.
1401 __ bind(&ool_min_abc); 1401 __ bind(&ool_min_abc);
1402 __ Float32MinOutOfLine(a, b, c); 1402 __ Float32MinOutOfLine(a, b, c);
1403 __ b(&done_min_abc); 1403 __ b(&done_min_abc);
1404 __ nop();
1404 1405
1405 __ bind(&ool_min_aab); 1406 __ bind(&ool_min_aab);
1406 __ Float32MinOutOfLine(a, a, b); 1407 __ Float32MinOutOfLine(a, a, b);
1407 __ b(&done_min_aab); 1408 __ b(&done_min_aab);
1409 __ nop();
1408 1410
1409 __ bind(&ool_min_aba); 1411 __ bind(&ool_min_aba);
1410 __ Float32MinOutOfLine(a, b, a); 1412 __ Float32MinOutOfLine(a, b, a);
1411 __ b(&done_min_aba); 1413 __ b(&done_min_aba);
1414 __ nop();
1412 1415
1413 __ bind(&ool_max_abc); 1416 __ bind(&ool_max_abc);
1414 __ Float32MaxOutOfLine(a, b, c); 1417 __ Float32MaxOutOfLine(a, b, c);
1415 __ b(&done_max_abc); 1418 __ b(&done_max_abc);
1419 __ nop();
1416 1420
1417 __ bind(&ool_max_aab); 1421 __ bind(&ool_max_aab);
1418 __ Float32MaxOutOfLine(a, a, b); 1422 __ Float32MaxOutOfLine(a, a, b);
1419 __ b(&done_max_aab); 1423 __ b(&done_max_aab);
1424 __ nop();
1420 1425
1421 __ bind(&ool_max_aba); 1426 __ bind(&ool_max_aba);
1422 __ Float32MaxOutOfLine(a, b, a); 1427 __ Float32MaxOutOfLine(a, b, a);
1423 __ b(&done_max_aba); 1428 __ b(&done_max_aba);
1429 __ nop();
1424 1430
1425 CodeDesc desc; 1431 CodeDesc desc;
1426 masm->GetCode(&desc); 1432 masm->GetCode(&desc);
1427 Handle<Code> code = masm->isolate()->factory()->NewCode( 1433 Handle<Code> code = masm->isolate()->factory()->NewCode(
1428 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1434 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1429 #ifdef DEBUG 1435 #ifdef DEBUG
1430 OFStream os(stdout); 1436 OFStream os(stdout);
1431 code->Print(os); 1437 code->Print(os);
1432 #endif 1438 #endif
1433 return FUNCTION_CAST<::F4>(code->entry()); 1439 return FUNCTION_CAST<::F4>(code->entry());
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 1543
1538 #undef FLOAT_MIN_MAX 1544 #undef FLOAT_MIN_MAX
1539 1545
1540 __ jr(ra); 1546 __ jr(ra);
1541 __ nop(); 1547 __ nop();
1542 1548
1543 // Generate out-of-line cases. 1549 // Generate out-of-line cases.
1544 __ bind(&ool_min_abc); 1550 __ bind(&ool_min_abc);
1545 __ Float64MinOutOfLine(a, b, c); 1551 __ Float64MinOutOfLine(a, b, c);
1546 __ b(&done_min_abc); 1552 __ b(&done_min_abc);
1553 __ nop();
1547 1554
1548 __ bind(&ool_min_aab); 1555 __ bind(&ool_min_aab);
1549 __ Float64MinOutOfLine(a, a, b); 1556 __ Float64MinOutOfLine(a, a, b);
1550 __ b(&done_min_aab); 1557 __ b(&done_min_aab);
1558 __ nop();
1551 1559
1552 __ bind(&ool_min_aba); 1560 __ bind(&ool_min_aba);
1553 __ Float64MinOutOfLine(a, b, a); 1561 __ Float64MinOutOfLine(a, b, a);
1554 __ b(&done_min_aba); 1562 __ b(&done_min_aba);
1563 __ nop();
1555 1564
1556 __ bind(&ool_max_abc); 1565 __ bind(&ool_max_abc);
1557 __ Float64MaxOutOfLine(a, b, c); 1566 __ Float64MaxOutOfLine(a, b, c);
1558 __ b(&done_max_abc); 1567 __ b(&done_max_abc);
1568 __ nop();
1559 1569
1560 __ bind(&ool_max_aab); 1570 __ bind(&ool_max_aab);
1561 __ Float64MaxOutOfLine(a, a, b); 1571 __ Float64MaxOutOfLine(a, a, b);
1562 __ b(&done_max_aab); 1572 __ b(&done_max_aab);
1573 __ nop();
1563 1574
1564 __ bind(&ool_max_aba); 1575 __ bind(&ool_max_aba);
1565 __ Float64MaxOutOfLine(a, b, a); 1576 __ Float64MaxOutOfLine(a, b, a);
1566 __ b(&done_max_aba); 1577 __ b(&done_max_aba);
1578 __ nop();
1567 1579
1568 CodeDesc desc; 1580 CodeDesc desc;
1569 masm->GetCode(&desc); 1581 masm->GetCode(&desc);
1570 Handle<Code> code = masm->isolate()->factory()->NewCode( 1582 Handle<Code> code = masm->isolate()->factory()->NewCode(
1571 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1583 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1572 #ifdef DEBUG 1584 #ifdef DEBUG
1573 OFStream os(stdout); 1585 OFStream os(stdout);
1574 code->Print(os); 1586 code->Print(os);
1575 #endif 1587 #endif
1576 return FUNCTION_CAST<::F4>(code->entry()); 1588 return FUNCTION_CAST<::F4>(code->entry());
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 1651
1640 CHECK_MINMAX(0.0, nan_a, nan_a, nan_a); 1652 CHECK_MINMAX(0.0, nan_a, nan_a, nan_a);
1641 CHECK_MINMAX(nan_a, 0.0, nan_a, nan_a); 1653 CHECK_MINMAX(nan_a, 0.0, nan_a, nan_a);
1642 CHECK_MINMAX(nan_a, nan_b, nan_a, nan_a); 1654 CHECK_MINMAX(nan_a, nan_b, nan_a, nan_a);
1643 CHECK_MINMAX(nan_b, nan_a, nan_b, nan_b); 1655 CHECK_MINMAX(nan_b, nan_a, nan_b, nan_b);
1644 1656
1645 #undef CHECK_MINMAX 1657 #undef CHECK_MINMAX
1646 } 1658 }
1647 1659
1648 #undef __ 1660 #undef __
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698