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

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: Modified according comments. 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
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | test/cctest/test-macro-assembler-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 FLOAT_MIN_MAX(Float32Max, a, b, a, done_max_aba, ool_max_aba, max_aba_); 1393 FLOAT_MIN_MAX(Float32Max, a, b, a, done_max_aba, ool_max_aba, max_aba_);
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 __ Branch(&done_min_abc);
1404 1404
1405 __ bind(&ool_min_aab); 1405 __ bind(&ool_min_aab);
1406 __ Float32MinOutOfLine(a, a, b); 1406 __ Float32MinOutOfLine(a, a, b);
1407 __ b(&done_min_aab); 1407 __ Branch(&done_min_aab);
1408 1408
1409 __ bind(&ool_min_aba); 1409 __ bind(&ool_min_aba);
1410 __ Float32MinOutOfLine(a, b, a); 1410 __ Float32MinOutOfLine(a, b, a);
1411 __ b(&done_min_aba); 1411 __ Branch(&done_min_aba);
1412 1412
1413 __ bind(&ool_max_abc); 1413 __ bind(&ool_max_abc);
1414 __ Float32MaxOutOfLine(a, b, c); 1414 __ Float32MaxOutOfLine(a, b, c);
1415 __ b(&done_max_abc); 1415 __ Branch(&done_max_abc);
1416 1416
1417 __ bind(&ool_max_aab); 1417 __ bind(&ool_max_aab);
1418 __ Float32MaxOutOfLine(a, a, b); 1418 __ Float32MaxOutOfLine(a, a, b);
1419 __ b(&done_max_aab); 1419 __ Branch(&done_max_aab);
1420 1420
1421 __ bind(&ool_max_aba); 1421 __ bind(&ool_max_aba);
1422 __ Float32MaxOutOfLine(a, b, a); 1422 __ Float32MaxOutOfLine(a, b, a);
1423 __ b(&done_max_aba); 1423 __ Branch(&done_max_aba);
1424 1424
1425 CodeDesc desc; 1425 CodeDesc desc;
1426 masm->GetCode(&desc); 1426 masm->GetCode(&desc);
1427 Handle<Code> code = masm->isolate()->factory()->NewCode( 1427 Handle<Code> code = masm->isolate()->factory()->NewCode(
1428 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1428 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1429 #ifdef DEBUG 1429 #ifdef DEBUG
1430 OFStream os(stdout); 1430 OFStream os(stdout);
1431 code->Print(os); 1431 code->Print(os);
1432 #endif 1432 #endif
1433 return FUNCTION_CAST<::F4>(code->entry()); 1433 return FUNCTION_CAST<::F4>(code->entry());
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 FLOAT_MIN_MAX(Float64Max, a, b, a, done_max_aba, ool_max_aba, max_aba_); 1536 FLOAT_MIN_MAX(Float64Max, a, b, a, done_max_aba, ool_max_aba, max_aba_);
1537 1537
1538 #undef FLOAT_MIN_MAX 1538 #undef FLOAT_MIN_MAX
1539 1539
1540 __ jr(ra); 1540 __ jr(ra);
1541 __ nop(); 1541 __ nop();
1542 1542
1543 // Generate out-of-line cases. 1543 // Generate out-of-line cases.
1544 __ bind(&ool_min_abc); 1544 __ bind(&ool_min_abc);
1545 __ Float64MinOutOfLine(a, b, c); 1545 __ Float64MinOutOfLine(a, b, c);
1546 __ b(&done_min_abc); 1546 __ Branch(&done_min_abc);
1547 1547
1548 __ bind(&ool_min_aab); 1548 __ bind(&ool_min_aab);
1549 __ Float64MinOutOfLine(a, a, b); 1549 __ Float64MinOutOfLine(a, a, b);
1550 __ b(&done_min_aab); 1550 __ Branch(&done_min_aab);
1551 1551
1552 __ bind(&ool_min_aba); 1552 __ bind(&ool_min_aba);
1553 __ Float64MinOutOfLine(a, b, a); 1553 __ Float64MinOutOfLine(a, b, a);
1554 __ b(&done_min_aba); 1554 __ Branch(&done_min_aba);
1555 1555
1556 __ bind(&ool_max_abc); 1556 __ bind(&ool_max_abc);
1557 __ Float64MaxOutOfLine(a, b, c); 1557 __ Float64MaxOutOfLine(a, b, c);
1558 __ b(&done_max_abc); 1558 __ Branch(&done_max_abc);
1559 1559
1560 __ bind(&ool_max_aab); 1560 __ bind(&ool_max_aab);
1561 __ Float64MaxOutOfLine(a, a, b); 1561 __ Float64MaxOutOfLine(a, a, b);
1562 __ b(&done_max_aab); 1562 __ Branch(&done_max_aab);
1563 1563
1564 __ bind(&ool_max_aba); 1564 __ bind(&ool_max_aba);
1565 __ Float64MaxOutOfLine(a, b, a); 1565 __ Float64MaxOutOfLine(a, b, a);
1566 __ b(&done_max_aba); 1566 __ Branch(&done_max_aba);
1567 1567
1568 CodeDesc desc; 1568 CodeDesc desc;
1569 masm->GetCode(&desc); 1569 masm->GetCode(&desc);
1570 Handle<Code> code = masm->isolate()->factory()->NewCode( 1570 Handle<Code> code = masm->isolate()->factory()->NewCode(
1571 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 1571 desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
1572 #ifdef DEBUG 1572 #ifdef DEBUG
1573 OFStream os(stdout); 1573 OFStream os(stdout);
1574 code->Print(os); 1574 code->Print(os);
1575 #endif 1575 #endif
1576 return FUNCTION_CAST<::F4>(code->entry()); 1576 return FUNCTION_CAST<::F4>(code->entry());
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 1639
1640 CHECK_MINMAX(0.0, nan_a, nan_a, nan_a); 1640 CHECK_MINMAX(0.0, nan_a, nan_a, nan_a);
1641 CHECK_MINMAX(nan_a, 0.0, nan_a, nan_a); 1641 CHECK_MINMAX(nan_a, 0.0, nan_a, nan_a);
1642 CHECK_MINMAX(nan_a, nan_b, nan_a, nan_a); 1642 CHECK_MINMAX(nan_a, nan_b, nan_a, nan_a);
1643 CHECK_MINMAX(nan_b, nan_a, nan_b, nan_b); 1643 CHECK_MINMAX(nan_b, nan_a, nan_b, nan_b);
1644 1644
1645 #undef CHECK_MINMAX 1645 #undef CHECK_MINMAX
1646 } 1646 }
1647 1647
1648 #undef __ 1648 #undef __
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | test/cctest/test-macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698