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

Side by Side Diff: runtime/vm/assembler_arm_test.cc

Issue 142663004: Reverts refactoring of CPU feature detection for (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/assembler_ia32.h » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h"
10 #include "vm/os.h" 9 #include "vm/os.h"
11 #include "vm/unit_test.h" 10 #include "vm/unit_test.h"
12 #include "vm/virtual_memory.h" 11 #include "vm/virtual_memory.h"
13 12
14 namespace dart { 13 namespace dart {
15 14
16 #define __ assembler-> 15 #define __ assembler->
17 16
18 17
19 ASSEMBLER_TEST_GENERATE(Simple, assembler) { 18 ASSEMBLER_TEST_GENERATE(Simple, assembler) {
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 1450
1452 1451
1453 ASSEMBLER_TEST_RUN(VstmsVldms_off, test) { 1452 ASSEMBLER_TEST_RUN(VstmsVldms_off, test) {
1454 EXPECT(test != NULL); 1453 EXPECT(test != NULL);
1455 typedef int (*Tst)(); 1454 typedef int (*Tst)();
1456 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1455 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1457 } 1456 }
1458 1457
1459 1458
1460 ASSEMBLER_TEST_GENERATE(Udiv, assembler) { 1459 ASSEMBLER_TEST_GENERATE(Udiv, assembler) {
1461 if (TargetCPUFeatures::integer_division_supported()) { 1460 if (CPUFeatures::integer_division_supported()) {
1462 __ mov(R0, ShifterOperand(27)); 1461 __ mov(R0, ShifterOperand(27));
1463 __ mov(R1, ShifterOperand(9)); 1462 __ mov(R1, ShifterOperand(9));
1464 __ udiv(R2, R0, R1); 1463 __ udiv(R2, R0, R1);
1465 __ mov(R0, ShifterOperand(R2)); 1464 __ mov(R0, ShifterOperand(R2));
1466 } else { 1465 } else {
1467 __ mov(R0, ShifterOperand(3)); 1466 __ mov(R0, ShifterOperand(3));
1468 } 1467 }
1469 __ bx(LR); 1468 __ bx(LR);
1470 } 1469 }
1471 1470
1472 1471
1473 ASSEMBLER_TEST_RUN(Udiv, test) { 1472 ASSEMBLER_TEST_RUN(Udiv, test) {
1474 EXPECT(test != NULL); 1473 EXPECT(test != NULL);
1475 typedef int (*Tst)(); 1474 typedef int (*Tst)();
1476 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1475 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1477 } 1476 }
1478 1477
1479 1478
1480 ASSEMBLER_TEST_GENERATE(Sdiv, assembler) { 1479 ASSEMBLER_TEST_GENERATE(Sdiv, assembler) {
1481 if (TargetCPUFeatures::integer_division_supported()) { 1480 if (CPUFeatures::integer_division_supported()) {
1482 __ mov(R0, ShifterOperand(27)); 1481 __ mov(R0, ShifterOperand(27));
1483 __ LoadImmediate(R1, -9); 1482 __ LoadImmediate(R1, -9);
1484 __ sdiv(R2, R0, R1); 1483 __ sdiv(R2, R0, R1);
1485 __ mov(R0, ShifterOperand(R2)); 1484 __ mov(R0, ShifterOperand(R2));
1486 } else { 1485 } else {
1487 __ LoadImmediate(R0, -3); 1486 __ LoadImmediate(R0, -3);
1488 } 1487 }
1489 __ bx(LR); 1488 __ bx(LR);
1490 } 1489 }
1491 1490
1492 1491
1493 ASSEMBLER_TEST_RUN(Sdiv, test) { 1492 ASSEMBLER_TEST_RUN(Sdiv, test) {
1494 EXPECT(test != NULL); 1493 EXPECT(test != NULL);
1495 typedef int (*Tst)(); 1494 typedef int (*Tst)();
1496 EXPECT_EQ(-3, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1495 EXPECT_EQ(-3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1497 } 1496 }
1498 1497
1499 1498
1500 ASSEMBLER_TEST_GENERATE(Udiv_zero, assembler) { 1499 ASSEMBLER_TEST_GENERATE(Udiv_zero, assembler) {
1501 if (TargetCPUFeatures::integer_division_supported()) { 1500 if (CPUFeatures::integer_division_supported()) {
1502 __ mov(R0, ShifterOperand(27)); 1501 __ mov(R0, ShifterOperand(27));
1503 __ mov(R1, ShifterOperand(0)); 1502 __ mov(R1, ShifterOperand(0));
1504 __ udiv(R2, R0, R1); 1503 __ udiv(R2, R0, R1);
1505 __ mov(R0, ShifterOperand(R2)); 1504 __ mov(R0, ShifterOperand(R2));
1506 } else { 1505 } else {
1507 __ LoadImmediate(R0, 0); 1506 __ LoadImmediate(R0, 0);
1508 } 1507 }
1509 __ bx(LR); 1508 __ bx(LR);
1510 } 1509 }
1511 1510
1512 1511
1513 ASSEMBLER_TEST_RUN(Udiv_zero, test) { 1512 ASSEMBLER_TEST_RUN(Udiv_zero, test) {
1514 EXPECT(test != NULL); 1513 EXPECT(test != NULL);
1515 typedef int (*Tst)(); 1514 typedef int (*Tst)();
1516 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1515 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1517 } 1516 }
1518 1517
1519 1518
1520 ASSEMBLER_TEST_GENERATE(Sdiv_zero, assembler) { 1519 ASSEMBLER_TEST_GENERATE(Sdiv_zero, assembler) {
1521 if (TargetCPUFeatures::integer_division_supported()) { 1520 if (CPUFeatures::integer_division_supported()) {
1522 __ mov(R0, ShifterOperand(27)); 1521 __ mov(R0, ShifterOperand(27));
1523 __ mov(R1, ShifterOperand(0)); 1522 __ mov(R1, ShifterOperand(0));
1524 __ udiv(R2, R0, R1); 1523 __ udiv(R2, R0, R1);
1525 __ mov(R0, ShifterOperand(R2)); 1524 __ mov(R0, ShifterOperand(R2));
1526 } else { 1525 } else {
1527 __ LoadImmediate(R0, 0); 1526 __ LoadImmediate(R0, 0);
1528 } 1527 }
1529 __ bx(LR); 1528 __ bx(LR);
1530 } 1529 }
1531 1530
1532 1531
1533 ASSEMBLER_TEST_RUN(Sdiv_zero, test) { 1532 ASSEMBLER_TEST_RUN(Sdiv_zero, test) {
1534 EXPECT(test != NULL); 1533 EXPECT(test != NULL);
1535 typedef int (*Tst)(); 1534 typedef int (*Tst)();
1536 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1535 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1537 } 1536 }
1538 1537
1539 1538
1540 ASSEMBLER_TEST_GENERATE(Udiv_corner, assembler) { 1539 ASSEMBLER_TEST_GENERATE(Udiv_corner, assembler) {
1541 if (TargetCPUFeatures::integer_division_supported()) { 1540 if (CPUFeatures::integer_division_supported()) {
1542 __ LoadImmediate(R0, 0x80000000); 1541 __ LoadImmediate(R0, 0x80000000);
1543 __ LoadImmediate(R1, 0xffffffff); 1542 __ LoadImmediate(R1, 0xffffffff);
1544 __ udiv(R2, R0, R1); 1543 __ udiv(R2, R0, R1);
1545 __ mov(R0, ShifterOperand(R2)); 1544 __ mov(R0, ShifterOperand(R2));
1546 } else { 1545 } else {
1547 __ LoadImmediate(R0, 0); 1546 __ LoadImmediate(R0, 0);
1548 } 1547 }
1549 __ bx(LR); 1548 __ bx(LR);
1550 } 1549 }
1551 1550
1552 1551
1553 ASSEMBLER_TEST_RUN(Udiv_corner, test) { 1552 ASSEMBLER_TEST_RUN(Udiv_corner, test) {
1554 EXPECT(test != NULL); 1553 EXPECT(test != NULL);
1555 typedef int (*Tst)(); 1554 typedef int (*Tst)();
1556 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1555 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1557 } 1556 }
1558 1557
1559 1558
1560 ASSEMBLER_TEST_GENERATE(Sdiv_corner, assembler) { 1559 ASSEMBLER_TEST_GENERATE(Sdiv_corner, assembler) {
1561 if (TargetCPUFeatures::integer_division_supported()) { 1560 if (CPUFeatures::integer_division_supported()) {
1562 __ LoadImmediate(R0, 0x80000000); 1561 __ LoadImmediate(R0, 0x80000000);
1563 __ LoadImmediate(R1, 0xffffffff); 1562 __ LoadImmediate(R1, 0xffffffff);
1564 __ sdiv(R2, R0, R1); 1563 __ sdiv(R2, R0, R1);
1565 __ mov(R0, ShifterOperand(R2)); 1564 __ mov(R0, ShifterOperand(R2));
1566 } else { 1565 } else {
1567 __ LoadImmediate(R0, 0x80000000); 1566 __ LoadImmediate(R0, 0x80000000);
1568 } 1567 }
1569 __ bx(LR); 1568 __ bx(LR);
1570 } 1569 }
1571 1570
1572 1571
1573 ASSEMBLER_TEST_RUN(Sdiv_corner, test) { 1572 ASSEMBLER_TEST_RUN(Sdiv_corner, test) {
1574 EXPECT(test != NULL); 1573 EXPECT(test != NULL);
1575 typedef int (*Tst)(); 1574 typedef int (*Tst)();
1576 EXPECT_EQ(static_cast<int32_t>(0x80000000), 1575 EXPECT_EQ(static_cast<int32_t>(0x80000000),
1577 EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1576 EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1578 } 1577 }
1579 1578
1580 1579
1581 ASSEMBLER_TEST_GENERATE(IntDiv_supported, assembler) { 1580 ASSEMBLER_TEST_GENERATE(IntDiv_supported, assembler) {
1582 #if defined(USING_SIMULATOR) 1581 #if defined(USING_SIMULATOR)
1583 bool orig = TargetCPUFeatures::integer_division_supported(); 1582 bool orig = CPUFeatures::integer_division_supported();
1584 HostCPUFeatures::set_integer_division_supported(true); 1583 CPUFeatures::set_integer_division_supported(true);
1585 __ mov(R0, ShifterOperand(27)); 1584 __ mov(R0, ShifterOperand(27));
1586 __ mov(R1, ShifterOperand(9)); 1585 __ mov(R1, ShifterOperand(9));
1587 __ IntegerDivide(R0, R0, R1, D0, D1); 1586 __ IntegerDivide(R0, R0, R1, D0, D1);
1588 HostCPUFeatures::set_integer_division_supported(orig); 1587 CPUFeatures::set_integer_division_supported(orig);
1589 __ bx(LR); 1588 __ bx(LR);
1590 #else 1589 #else
1591 __ mov(R0, ShifterOperand(27)); 1590 __ mov(R0, ShifterOperand(27));
1592 __ mov(R1, ShifterOperand(9)); 1591 __ mov(R1, ShifterOperand(9));
1593 __ IntegerDivide(R0, R0, R1, D0, D1); 1592 __ IntegerDivide(R0, R0, R1, D0, D1);
1594 __ bx(LR); 1593 __ bx(LR);
1595 #endif 1594 #endif
1596 } 1595 }
1597 1596
1598 1597
1599 ASSEMBLER_TEST_RUN(IntDiv_supported, test) { 1598 ASSEMBLER_TEST_RUN(IntDiv_supported, test) {
1600 EXPECT(test != NULL); 1599 EXPECT(test != NULL);
1601 typedef int (*Tst)(); 1600 typedef int (*Tst)();
1602 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1601 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1603 } 1602 }
1604 1603
1605 1604
1606 ASSEMBLER_TEST_GENERATE(IntDiv_unsupported, assembler) { 1605 ASSEMBLER_TEST_GENERATE(IntDiv_unsupported, assembler) {
1607 #if defined(USING_SIMULATOR) 1606 #if defined(USING_SIMULATOR)
1608 bool orig = TargetCPUFeatures::integer_division_supported(); 1607 bool orig = CPUFeatures::integer_division_supported();
1609 HostCPUFeatures::set_integer_division_supported(false); 1608 CPUFeatures::set_integer_division_supported(false);
1610 __ mov(R0, ShifterOperand(27)); 1609 __ mov(R0, ShifterOperand(27));
1611 __ mov(R1, ShifterOperand(9)); 1610 __ mov(R1, ShifterOperand(9));
1612 __ IntegerDivide(R0, R0, R1, D0, D1); 1611 __ IntegerDivide(R0, R0, R1, D0, D1);
1613 HostCPUFeatures::set_integer_division_supported(orig); 1612 CPUFeatures::set_integer_division_supported(orig);
1614 __ bx(LR); 1613 __ bx(LR);
1615 #else 1614 #else
1616 __ mov(R0, ShifterOperand(27)); 1615 __ mov(R0, ShifterOperand(27));
1617 __ mov(R1, ShifterOperand(9)); 1616 __ mov(R1, ShifterOperand(9));
1618 __ IntegerDivide(R0, R0, R1, D0, D1); 1617 __ IntegerDivide(R0, R0, R1, D0, D1);
1619 __ bx(LR); 1618 __ bx(LR);
1620 #endif 1619 #endif
1621 } 1620 }
1622 1621
1623 1622
(...skipping 14 matching lines...) Expand all
1638 1637
1639 1638
1640 ASSEMBLER_TEST_RUN(Muls, test) { 1639 ASSEMBLER_TEST_RUN(Muls, test) {
1641 EXPECT(test != NULL); 1640 EXPECT(test != NULL);
1642 typedef int (*Tst)(); 1641 typedef int (*Tst)();
1643 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1642 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1644 } 1643 }
1645 1644
1646 1645
1647 ASSEMBLER_TEST_GENERATE(Vaddqi8, assembler) { 1646 ASSEMBLER_TEST_GENERATE(Vaddqi8, assembler) {
1648 if (TargetCPUFeatures::neon_supported()) { 1647 if (CPUFeatures::neon_supported()) {
1649 __ mov(R0, ShifterOperand(1)); 1648 __ mov(R0, ShifterOperand(1));
1650 __ vmovsr(S0, R0); 1649 __ vmovsr(S0, R0);
1651 __ mov(R0, ShifterOperand(2)); 1650 __ mov(R0, ShifterOperand(2));
1652 __ vmovsr(S1, R0); 1651 __ vmovsr(S1, R0);
1653 __ mov(R0, ShifterOperand(3)); 1652 __ mov(R0, ShifterOperand(3));
1654 __ vmovsr(S2, R0); 1653 __ vmovsr(S2, R0);
1655 __ mov(R0, ShifterOperand(4)); 1654 __ mov(R0, ShifterOperand(4));
1656 __ vmovsr(S3, R0); 1655 __ vmovsr(S3, R0);
1657 __ mov(R0, ShifterOperand(5)); 1656 __ mov(R0, ShifterOperand(5));
1658 __ vmovsr(S4, R0); 1657 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
1682 1681
1683 1682
1684 ASSEMBLER_TEST_RUN(Vaddqi8, test) { 1683 ASSEMBLER_TEST_RUN(Vaddqi8, test) {
1685 EXPECT(test != NULL); 1684 EXPECT(test != NULL);
1686 typedef int (*Tst)(); 1685 typedef int (*Tst)();
1687 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1686 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1688 } 1687 }
1689 1688
1690 1689
1691 ASSEMBLER_TEST_GENERATE(Vaddqi16, assembler) { 1690 ASSEMBLER_TEST_GENERATE(Vaddqi16, assembler) {
1692 if (TargetCPUFeatures::neon_supported()) { 1691 if (CPUFeatures::neon_supported()) {
1693 __ mov(R0, ShifterOperand(1)); 1692 __ mov(R0, ShifterOperand(1));
1694 __ vmovsr(S0, R0); 1693 __ vmovsr(S0, R0);
1695 __ mov(R0, ShifterOperand(2)); 1694 __ mov(R0, ShifterOperand(2));
1696 __ vmovsr(S1, R0); 1695 __ vmovsr(S1, R0);
1697 __ mov(R0, ShifterOperand(3)); 1696 __ mov(R0, ShifterOperand(3));
1698 __ vmovsr(S2, R0); 1697 __ vmovsr(S2, R0);
1699 __ mov(R0, ShifterOperand(4)); 1698 __ mov(R0, ShifterOperand(4));
1700 __ vmovsr(S3, R0); 1699 __ vmovsr(S3, R0);
1701 __ mov(R0, ShifterOperand(5)); 1700 __ mov(R0, ShifterOperand(5));
1702 __ vmovsr(S4, R0); 1701 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
1726 1725
1727 1726
1728 ASSEMBLER_TEST_RUN(Vaddqi16, test) { 1727 ASSEMBLER_TEST_RUN(Vaddqi16, test) {
1729 EXPECT(test != NULL); 1728 EXPECT(test != NULL);
1730 typedef int (*Tst)(); 1729 typedef int (*Tst)();
1731 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1730 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1732 } 1731 }
1733 1732
1734 1733
1735 ASSEMBLER_TEST_GENERATE(Vaddqi32, assembler) { 1734 ASSEMBLER_TEST_GENERATE(Vaddqi32, assembler) {
1736 if (TargetCPUFeatures::neon_supported()) { 1735 if (CPUFeatures::neon_supported()) {
1737 __ mov(R0, ShifterOperand(1)); 1736 __ mov(R0, ShifterOperand(1));
1738 __ vmovsr(S0, R0); 1737 __ vmovsr(S0, R0);
1739 __ mov(R0, ShifterOperand(2)); 1738 __ mov(R0, ShifterOperand(2));
1740 __ vmovsr(S1, R0); 1739 __ vmovsr(S1, R0);
1741 __ mov(R0, ShifterOperand(3)); 1740 __ mov(R0, ShifterOperand(3));
1742 __ vmovsr(S2, R0); 1741 __ vmovsr(S2, R0);
1743 __ mov(R0, ShifterOperand(4)); 1742 __ mov(R0, ShifterOperand(4));
1744 __ vmovsr(S3, R0); 1743 __ vmovsr(S3, R0);
1745 __ mov(R0, ShifterOperand(5)); 1744 __ mov(R0, ShifterOperand(5));
1746 __ vmovsr(S4, R0); 1745 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
1770 1769
1771 1770
1772 ASSEMBLER_TEST_RUN(Vaddqi32, test) { 1771 ASSEMBLER_TEST_RUN(Vaddqi32, test) {
1773 EXPECT(test != NULL); 1772 EXPECT(test != NULL);
1774 typedef int (*Tst)(); 1773 typedef int (*Tst)();
1775 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1774 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1776 } 1775 }
1777 1776
1778 1777
1779 ASSEMBLER_TEST_GENERATE(Vaddqi64, assembler) { 1778 ASSEMBLER_TEST_GENERATE(Vaddqi64, assembler) {
1780 if (TargetCPUFeatures::neon_supported()) { 1779 if (CPUFeatures::neon_supported()) {
1781 __ mov(R0, ShifterOperand(1)); 1780 __ mov(R0, ShifterOperand(1));
1782 __ vmovsr(S0, R0); 1781 __ vmovsr(S0, R0);
1783 __ mov(R0, ShifterOperand(2)); 1782 __ mov(R0, ShifterOperand(2));
1784 __ vmovsr(S2, R0); 1783 __ vmovsr(S2, R0);
1785 __ mov(R0, ShifterOperand(3)); 1784 __ mov(R0, ShifterOperand(3));
1786 __ vmovsr(S4, R0); 1785 __ vmovsr(S4, R0);
1787 __ mov(R0, ShifterOperand(4)); 1786 __ mov(R0, ShifterOperand(4));
1788 __ vmovsr(S6, R0); 1787 __ vmovsr(S6, R0);
1789 1788
1790 __ vaddqi(kWordPair, Q2, Q0, Q1); 1789 __ vaddqi(kWordPair, Q2, Q0, Q1);
(...skipping 11 matching lines...) Expand all
1802 1801
1803 1802
1804 ASSEMBLER_TEST_RUN(Vaddqi64, test) { 1803 ASSEMBLER_TEST_RUN(Vaddqi64, test) {
1805 EXPECT(test != NULL); 1804 EXPECT(test != NULL);
1806 typedef int (*Tst)(); 1805 typedef int (*Tst)();
1807 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1806 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1808 } 1807 }
1809 1808
1810 1809
1811 ASSEMBLER_TEST_GENERATE(Vsubqi8, assembler) { 1810 ASSEMBLER_TEST_GENERATE(Vsubqi8, assembler) {
1812 if (TargetCPUFeatures::neon_supported()) { 1811 if (CPUFeatures::neon_supported()) {
1813 __ mov(R0, ShifterOperand(1)); 1812 __ mov(R0, ShifterOperand(1));
1814 __ vmovsr(S0, R0); 1813 __ vmovsr(S0, R0);
1815 __ mov(R0, ShifterOperand(2)); 1814 __ mov(R0, ShifterOperand(2));
1816 __ vmovsr(S1, R0); 1815 __ vmovsr(S1, R0);
1817 __ mov(R0, ShifterOperand(3)); 1816 __ mov(R0, ShifterOperand(3));
1818 __ vmovsr(S2, R0); 1817 __ vmovsr(S2, R0);
1819 __ mov(R0, ShifterOperand(4)); 1818 __ mov(R0, ShifterOperand(4));
1820 __ vmovsr(S3, R0); 1819 __ vmovsr(S3, R0);
1821 __ mov(R0, ShifterOperand(2)); 1820 __ mov(R0, ShifterOperand(2));
1822 __ vmovsr(S4, R0); 1821 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
1846 1845
1847 1846
1848 ASSEMBLER_TEST_RUN(Vsubqi8, test) { 1847 ASSEMBLER_TEST_RUN(Vsubqi8, test) {
1849 EXPECT(test != NULL); 1848 EXPECT(test != NULL);
1850 typedef int (*Tst)(); 1849 typedef int (*Tst)();
1851 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1850 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1852 } 1851 }
1853 1852
1854 1853
1855 ASSEMBLER_TEST_GENERATE(Vsubqi16, assembler) { 1854 ASSEMBLER_TEST_GENERATE(Vsubqi16, assembler) {
1856 if (TargetCPUFeatures::neon_supported()) { 1855 if (CPUFeatures::neon_supported()) {
1857 __ mov(R0, ShifterOperand(1)); 1856 __ mov(R0, ShifterOperand(1));
1858 __ vmovsr(S0, R0); 1857 __ vmovsr(S0, R0);
1859 __ mov(R0, ShifterOperand(2)); 1858 __ mov(R0, ShifterOperand(2));
1860 __ vmovsr(S1, R0); 1859 __ vmovsr(S1, R0);
1861 __ mov(R0, ShifterOperand(3)); 1860 __ mov(R0, ShifterOperand(3));
1862 __ vmovsr(S2, R0); 1861 __ vmovsr(S2, R0);
1863 __ mov(R0, ShifterOperand(4)); 1862 __ mov(R0, ShifterOperand(4));
1864 __ vmovsr(S3, R0); 1863 __ vmovsr(S3, R0);
1865 __ mov(R0, ShifterOperand(2)); 1864 __ mov(R0, ShifterOperand(2));
1866 __ vmovsr(S4, R0); 1865 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
1890 1889
1891 1890
1892 ASSEMBLER_TEST_RUN(Vsubqi16, test) { 1891 ASSEMBLER_TEST_RUN(Vsubqi16, test) {
1893 EXPECT(test != NULL); 1892 EXPECT(test != NULL);
1894 typedef int (*Tst)(); 1893 typedef int (*Tst)();
1895 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1894 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1896 } 1895 }
1897 1896
1898 1897
1899 ASSEMBLER_TEST_GENERATE(Vsubqi32, assembler) { 1898 ASSEMBLER_TEST_GENERATE(Vsubqi32, assembler) {
1900 if (TargetCPUFeatures::neon_supported()) { 1899 if (CPUFeatures::neon_supported()) {
1901 __ mov(R0, ShifterOperand(1)); 1900 __ mov(R0, ShifterOperand(1));
1902 __ vmovsr(S0, R0); 1901 __ vmovsr(S0, R0);
1903 __ mov(R0, ShifterOperand(2)); 1902 __ mov(R0, ShifterOperand(2));
1904 __ vmovsr(S1, R0); 1903 __ vmovsr(S1, R0);
1905 __ mov(R0, ShifterOperand(3)); 1904 __ mov(R0, ShifterOperand(3));
1906 __ vmovsr(S2, R0); 1905 __ vmovsr(S2, R0);
1907 __ mov(R0, ShifterOperand(4)); 1906 __ mov(R0, ShifterOperand(4));
1908 __ vmovsr(S3, R0); 1907 __ vmovsr(S3, R0);
1909 __ mov(R0, ShifterOperand(2)); 1908 __ mov(R0, ShifterOperand(2));
1910 __ vmovsr(S4, R0); 1909 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
1934 1933
1935 1934
1936 ASSEMBLER_TEST_RUN(Vsubqi32, test) { 1935 ASSEMBLER_TEST_RUN(Vsubqi32, test) {
1937 EXPECT(test != NULL); 1936 EXPECT(test != NULL);
1938 typedef int (*Tst)(); 1937 typedef int (*Tst)();
1939 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1938 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1940 } 1939 }
1941 1940
1942 1941
1943 ASSEMBLER_TEST_GENERATE(Vsubqi64, assembler) { 1942 ASSEMBLER_TEST_GENERATE(Vsubqi64, assembler) {
1944 if (TargetCPUFeatures::neon_supported()) { 1943 if (CPUFeatures::neon_supported()) {
1945 __ mov(R0, ShifterOperand(1)); 1944 __ mov(R0, ShifterOperand(1));
1946 __ vmovsr(S0, R0); 1945 __ vmovsr(S0, R0);
1947 __ mov(R0, ShifterOperand(2)); 1946 __ mov(R0, ShifterOperand(2));
1948 __ vmovsr(S2, R0); 1947 __ vmovsr(S2, R0);
1949 __ mov(R0, ShifterOperand(2)); 1948 __ mov(R0, ShifterOperand(2));
1950 __ vmovsr(S4, R0); 1949 __ vmovsr(S4, R0);
1951 __ mov(R0, ShifterOperand(4)); 1950 __ mov(R0, ShifterOperand(4));
1952 __ vmovsr(S6, R0); 1951 __ vmovsr(S6, R0);
1953 1952
1954 __ vsubqi(kWordPair, Q2, Q1, Q0); 1953 __ vsubqi(kWordPair, Q2, Q1, Q0);
(...skipping 11 matching lines...) Expand all
1966 1965
1967 1966
1968 ASSEMBLER_TEST_RUN(Vsubqi64, test) { 1967 ASSEMBLER_TEST_RUN(Vsubqi64, test) {
1969 EXPECT(test != NULL); 1968 EXPECT(test != NULL);
1970 typedef int (*Tst)(); 1969 typedef int (*Tst)();
1971 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1970 EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1972 } 1971 }
1973 1972
1974 1973
1975 ASSEMBLER_TEST_GENERATE(Vmulqi8, assembler) { 1974 ASSEMBLER_TEST_GENERATE(Vmulqi8, assembler) {
1976 if (TargetCPUFeatures::neon_supported()) { 1975 if (CPUFeatures::neon_supported()) {
1977 __ mov(R0, ShifterOperand(1)); 1976 __ mov(R0, ShifterOperand(1));
1978 __ vmovsr(S0, R0); 1977 __ vmovsr(S0, R0);
1979 __ mov(R0, ShifterOperand(2)); 1978 __ mov(R0, ShifterOperand(2));
1980 __ vmovsr(S1, R0); 1979 __ vmovsr(S1, R0);
1981 __ mov(R0, ShifterOperand(3)); 1980 __ mov(R0, ShifterOperand(3));
1982 __ vmovsr(S2, R0); 1981 __ vmovsr(S2, R0);
1983 __ mov(R0, ShifterOperand(4)); 1982 __ mov(R0, ShifterOperand(4));
1984 __ vmovsr(S3, R0); 1983 __ vmovsr(S3, R0);
1985 __ mov(R0, ShifterOperand(5)); 1984 __ mov(R0, ShifterOperand(5));
1986 __ vmovsr(S4, R0); 1985 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
2010 2009
2011 2010
2012 ASSEMBLER_TEST_RUN(Vmulqi8, test) { 2011 ASSEMBLER_TEST_RUN(Vmulqi8, test) {
2013 EXPECT(test != NULL); 2012 EXPECT(test != NULL);
2014 typedef int (*Tst)(); 2013 typedef int (*Tst)();
2015 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2014 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2016 } 2015 }
2017 2016
2018 2017
2019 ASSEMBLER_TEST_GENERATE(Vmulqi16, assembler) { 2018 ASSEMBLER_TEST_GENERATE(Vmulqi16, assembler) {
2020 if (TargetCPUFeatures::neon_supported()) { 2019 if (CPUFeatures::neon_supported()) {
2021 __ mov(R0, ShifterOperand(1)); 2020 __ mov(R0, ShifterOperand(1));
2022 __ vmovsr(S0, R0); 2021 __ vmovsr(S0, R0);
2023 __ mov(R0, ShifterOperand(2)); 2022 __ mov(R0, ShifterOperand(2));
2024 __ vmovsr(S1, R0); 2023 __ vmovsr(S1, R0);
2025 __ mov(R0, ShifterOperand(3)); 2024 __ mov(R0, ShifterOperand(3));
2026 __ vmovsr(S2, R0); 2025 __ vmovsr(S2, R0);
2027 __ mov(R0, ShifterOperand(4)); 2026 __ mov(R0, ShifterOperand(4));
2028 __ vmovsr(S3, R0); 2027 __ vmovsr(S3, R0);
2029 __ mov(R0, ShifterOperand(5)); 2028 __ mov(R0, ShifterOperand(5));
2030 __ vmovsr(S4, R0); 2029 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
2054 2053
2055 2054
2056 ASSEMBLER_TEST_RUN(Vmulqi16, test) { 2055 ASSEMBLER_TEST_RUN(Vmulqi16, test) {
2057 EXPECT(test != NULL); 2056 EXPECT(test != NULL);
2058 typedef int (*Tst)(); 2057 typedef int (*Tst)();
2059 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2058 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2060 } 2059 }
2061 2060
2062 2061
2063 ASSEMBLER_TEST_GENERATE(Vmulqi32, assembler) { 2062 ASSEMBLER_TEST_GENERATE(Vmulqi32, assembler) {
2064 if (TargetCPUFeatures::neon_supported()) { 2063 if (CPUFeatures::neon_supported()) {
2065 __ mov(R0, ShifterOperand(1)); 2064 __ mov(R0, ShifterOperand(1));
2066 __ vmovsr(S0, R0); 2065 __ vmovsr(S0, R0);
2067 __ mov(R0, ShifterOperand(2)); 2066 __ mov(R0, ShifterOperand(2));
2068 __ vmovsr(S1, R0); 2067 __ vmovsr(S1, R0);
2069 __ mov(R0, ShifterOperand(3)); 2068 __ mov(R0, ShifterOperand(3));
2070 __ vmovsr(S2, R0); 2069 __ vmovsr(S2, R0);
2071 __ mov(R0, ShifterOperand(4)); 2070 __ mov(R0, ShifterOperand(4));
2072 __ vmovsr(S3, R0); 2071 __ vmovsr(S3, R0);
2073 __ mov(R0, ShifterOperand(5)); 2072 __ mov(R0, ShifterOperand(5));
2074 __ vmovsr(S4, R0); 2073 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
2098 2097
2099 2098
2100 ASSEMBLER_TEST_RUN(Vmulqi32, test) { 2099 ASSEMBLER_TEST_RUN(Vmulqi32, test) {
2101 EXPECT(test != NULL); 2100 EXPECT(test != NULL);
2102 typedef int (*Tst)(); 2101 typedef int (*Tst)();
2103 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2102 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2104 } 2103 }
2105 2104
2106 2105
2107 ASSEMBLER_TEST_GENERATE(Vaddqs, assembler) { 2106 ASSEMBLER_TEST_GENERATE(Vaddqs, assembler) {
2108 if (TargetCPUFeatures::neon_supported()) { 2107 if (CPUFeatures::neon_supported()) {
2109 __ LoadSImmediate(S0, 1.0); 2108 __ LoadSImmediate(S0, 1.0);
2110 __ LoadSImmediate(S1, 2.0); 2109 __ LoadSImmediate(S1, 2.0);
2111 __ LoadSImmediate(S2, 3.0); 2110 __ LoadSImmediate(S2, 3.0);
2112 __ LoadSImmediate(S3, 4.0); 2111 __ LoadSImmediate(S3, 4.0);
2113 __ LoadSImmediate(S4, 5.0); 2112 __ LoadSImmediate(S4, 5.0);
2114 __ LoadSImmediate(S5, 6.0); 2113 __ LoadSImmediate(S5, 6.0);
2115 __ LoadSImmediate(S6, 7.0); 2114 __ LoadSImmediate(S6, 7.0);
2116 __ LoadSImmediate(S7, 8.0); 2115 __ LoadSImmediate(S7, 8.0);
2117 2116
2118 __ vaddqs(Q2, Q0, Q1); 2117 __ vaddqs(Q2, Q0, Q1);
(...skipping 14 matching lines...) Expand all
2133 2132
2134 2133
2135 ASSEMBLER_TEST_RUN(Vaddqs, test) { 2134 ASSEMBLER_TEST_RUN(Vaddqs, test) {
2136 EXPECT(test != NULL); 2135 EXPECT(test != NULL);
2137 typedef int (*Tst)(); 2136 typedef int (*Tst)();
2138 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2137 EXPECT_EQ(36, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2139 } 2138 }
2140 2139
2141 2140
2142 ASSEMBLER_TEST_GENERATE(Vsubqs, assembler) { 2141 ASSEMBLER_TEST_GENERATE(Vsubqs, assembler) {
2143 if (TargetCPUFeatures::neon_supported()) { 2142 if (CPUFeatures::neon_supported()) {
2144 __ LoadSImmediate(S0, 1.0); 2143 __ LoadSImmediate(S0, 1.0);
2145 __ LoadSImmediate(S1, 2.0); 2144 __ LoadSImmediate(S1, 2.0);
2146 __ LoadSImmediate(S2, 3.0); 2145 __ LoadSImmediate(S2, 3.0);
2147 __ LoadSImmediate(S3, 4.0); 2146 __ LoadSImmediate(S3, 4.0);
2148 __ LoadSImmediate(S4, 2.0); 2147 __ LoadSImmediate(S4, 2.0);
2149 __ LoadSImmediate(S5, 4.0); 2148 __ LoadSImmediate(S5, 4.0);
2150 __ LoadSImmediate(S6, 6.0); 2149 __ LoadSImmediate(S6, 6.0);
2151 __ LoadSImmediate(S7, 8.0); 2150 __ LoadSImmediate(S7, 8.0);
2152 2151
2153 __ vsubqs(Q2, Q1, Q0); 2152 __ vsubqs(Q2, Q1, Q0);
(...skipping 14 matching lines...) Expand all
2168 2167
2169 2168
2170 ASSEMBLER_TEST_RUN(Vsubqs, test) { 2169 ASSEMBLER_TEST_RUN(Vsubqs, test) {
2171 EXPECT(test != NULL); 2170 EXPECT(test != NULL);
2172 typedef int (*Tst)(); 2171 typedef int (*Tst)();
2173 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2172 EXPECT_EQ(10, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2174 } 2173 }
2175 2174
2176 2175
2177 ASSEMBLER_TEST_GENERATE(Vmulqs, assembler) { 2176 ASSEMBLER_TEST_GENERATE(Vmulqs, assembler) {
2178 if (TargetCPUFeatures::neon_supported()) { 2177 if (CPUFeatures::neon_supported()) {
2179 __ LoadSImmediate(S0, 1.0); 2178 __ LoadSImmediate(S0, 1.0);
2180 __ LoadSImmediate(S1, 2.0); 2179 __ LoadSImmediate(S1, 2.0);
2181 __ LoadSImmediate(S2, 3.0); 2180 __ LoadSImmediate(S2, 3.0);
2182 __ LoadSImmediate(S3, 4.0); 2181 __ LoadSImmediate(S3, 4.0);
2183 __ LoadSImmediate(S4, 5.0); 2182 __ LoadSImmediate(S4, 5.0);
2184 __ LoadSImmediate(S5, 6.0); 2183 __ LoadSImmediate(S5, 6.0);
2185 __ LoadSImmediate(S6, 7.0); 2184 __ LoadSImmediate(S6, 7.0);
2186 __ LoadSImmediate(S7, 8.0); 2185 __ LoadSImmediate(S7, 8.0);
2187 2186
2188 __ vmulqs(Q2, Q1, Q0); 2187 __ vmulqs(Q2, Q1, Q0);
(...skipping 14 matching lines...) Expand all
2203 2202
2204 2203
2205 ASSEMBLER_TEST_RUN(Vmulqs, test) { 2204 ASSEMBLER_TEST_RUN(Vmulqs, test) {
2206 EXPECT(test != NULL); 2205 EXPECT(test != NULL);
2207 typedef int (*Tst)(); 2206 typedef int (*Tst)();
2208 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2207 EXPECT_EQ(70, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2209 } 2208 }
2210 2209
2211 2210
2212 ASSEMBLER_TEST_GENERATE(VtblX, assembler) { 2211 ASSEMBLER_TEST_GENERATE(VtblX, assembler) {
2213 if (TargetCPUFeatures::neon_supported()) { 2212 if (CPUFeatures::neon_supported()) {
2214 // Index. 2213 // Index.
2215 __ LoadImmediate(R0, 0x03020100); 2214 __ LoadImmediate(R0, 0x03020100);
2216 __ vmovsr(S0, R0); 2215 __ vmovsr(S0, R0);
2217 __ vmovsr(S1, R0); 2216 __ vmovsr(S1, R0);
2218 2217
2219 // Table. 2218 // Table.
2220 __ LoadSImmediate(S2, 1.0); 2219 __ LoadSImmediate(S2, 1.0);
2221 __ LoadSImmediate(S3, 2.0); 2220 __ LoadSImmediate(S3, 2.0);
2222 __ LoadSImmediate(S4, 3.0); 2221 __ LoadSImmediate(S4, 3.0);
2223 __ LoadSImmediate(S5, 4.0); 2222 __ LoadSImmediate(S5, 4.0);
(...skipping 22 matching lines...) Expand all
2246 2245
2247 2246
2248 ASSEMBLER_TEST_RUN(VtblX, test) { 2247 ASSEMBLER_TEST_RUN(VtblX, test) {
2249 EXPECT(test != NULL); 2248 EXPECT(test != NULL);
2250 typedef int (*Tst)(); 2249 typedef int (*Tst)();
2251 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2250 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2252 } 2251 }
2253 2252
2254 2253
2255 ASSEMBLER_TEST_GENERATE(VtblY, assembler) { 2254 ASSEMBLER_TEST_GENERATE(VtblY, assembler) {
2256 if (TargetCPUFeatures::neon_supported()) { 2255 if (CPUFeatures::neon_supported()) {
2257 // Index. 2256 // Index.
2258 __ LoadImmediate(R0, 0x07060504); 2257 __ LoadImmediate(R0, 0x07060504);
2259 __ vmovsr(S0, R0); 2258 __ vmovsr(S0, R0);
2260 __ vmovsr(S1, R0); 2259 __ vmovsr(S1, R0);
2261 2260
2262 // Table. 2261 // Table.
2263 __ LoadSImmediate(S2, 2.0); 2262 __ LoadSImmediate(S2, 2.0);
2264 __ LoadSImmediate(S3, 1.0); 2263 __ LoadSImmediate(S3, 1.0);
2265 __ LoadSImmediate(S4, 3.0); 2264 __ LoadSImmediate(S4, 3.0);
2266 __ LoadSImmediate(S5, 4.0); 2265 __ LoadSImmediate(S5, 4.0);
(...skipping 22 matching lines...) Expand all
2289 2288
2290 2289
2291 ASSEMBLER_TEST_RUN(VtblY, test) { 2290 ASSEMBLER_TEST_RUN(VtblY, test) {
2292 EXPECT(test != NULL); 2291 EXPECT(test != NULL);
2293 typedef int (*Tst)(); 2292 typedef int (*Tst)();
2294 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2293 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2295 } 2294 }
2296 2295
2297 2296
2298 ASSEMBLER_TEST_GENERATE(VtblZ, assembler) { 2297 ASSEMBLER_TEST_GENERATE(VtblZ, assembler) {
2299 if (TargetCPUFeatures::neon_supported()) { 2298 if (CPUFeatures::neon_supported()) {
2300 // Index. 2299 // Index.
2301 __ LoadImmediate(R0, 0x0b0a0908); 2300 __ LoadImmediate(R0, 0x0b0a0908);
2302 __ vmovsr(S0, R0); 2301 __ vmovsr(S0, R0);
2303 __ vmovsr(S1, R0); 2302 __ vmovsr(S1, R0);
2304 2303
2305 // Table. 2304 // Table.
2306 __ LoadSImmediate(S2, 2.0); 2305 __ LoadSImmediate(S2, 2.0);
2307 __ LoadSImmediate(S3, 3.0); 2306 __ LoadSImmediate(S3, 3.0);
2308 __ LoadSImmediate(S4, 1.0); 2307 __ LoadSImmediate(S4, 1.0);
2309 __ LoadSImmediate(S5, 4.0); 2308 __ LoadSImmediate(S5, 4.0);
(...skipping 22 matching lines...) Expand all
2332 2331
2333 2332
2334 ASSEMBLER_TEST_RUN(VtblZ, test) { 2333 ASSEMBLER_TEST_RUN(VtblZ, test) {
2335 EXPECT(test != NULL); 2334 EXPECT(test != NULL);
2336 typedef int (*Tst)(); 2335 typedef int (*Tst)();
2337 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2336 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2338 } 2337 }
2339 2338
2340 2339
2341 ASSEMBLER_TEST_GENERATE(VtblW, assembler) { 2340 ASSEMBLER_TEST_GENERATE(VtblW, assembler) {
2342 if (TargetCPUFeatures::neon_supported()) { 2341 if (CPUFeatures::neon_supported()) {
2343 // Index. 2342 // Index.
2344 __ LoadImmediate(R0, 0x0f0e0d0c); 2343 __ LoadImmediate(R0, 0x0f0e0d0c);
2345 __ vmovsr(S0, R0); 2344 __ vmovsr(S0, R0);
2346 __ vmovsr(S1, R0); 2345 __ vmovsr(S1, R0);
2347 2346
2348 // Table. 2347 // Table.
2349 __ LoadSImmediate(S2, 2.0); 2348 __ LoadSImmediate(S2, 2.0);
2350 __ LoadSImmediate(S3, 3.0); 2349 __ LoadSImmediate(S3, 3.0);
2351 __ LoadSImmediate(S4, 4.0); 2350 __ LoadSImmediate(S4, 4.0);
2352 __ LoadSImmediate(S5, 1.0); 2351 __ LoadSImmediate(S5, 1.0);
(...skipping 22 matching lines...) Expand all
2375 2374
2376 2375
2377 ASSEMBLER_TEST_RUN(VtblW, test) { 2376 ASSEMBLER_TEST_RUN(VtblW, test) {
2378 EXPECT(test != NULL); 2377 EXPECT(test != NULL);
2379 typedef int (*Tst)(); 2378 typedef int (*Tst)();
2380 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2379 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2381 } 2380 }
2382 2381
2383 2382
2384 ASSEMBLER_TEST_GENERATE(Veorq, assembler) { 2383 ASSEMBLER_TEST_GENERATE(Veorq, assembler) {
2385 if (TargetCPUFeatures::neon_supported()) { 2384 if (CPUFeatures::neon_supported()) {
2386 // Q0 2385 // Q0
2387 __ LoadImmediate(R0, 0xaaaaaaab); 2386 __ LoadImmediate(R0, 0xaaaaaaab);
2388 __ vmovsr(S0, R0); 2387 __ vmovsr(S0, R0);
2389 __ vmovsr(S1, R0); 2388 __ vmovsr(S1, R0);
2390 __ vmovsr(S2, R0); 2389 __ vmovsr(S2, R0);
2391 __ vmovsr(S3, R0); 2390 __ vmovsr(S3, R0);
2392 2391
2393 // Q1 2392 // Q1
2394 __ LoadImmediate(R0, 0x55555555); 2393 __ LoadImmediate(R0, 0x55555555);
2395 __ vmovsr(S4, R0); 2394 __ vmovsr(S4, R0);
(...skipping 21 matching lines...) Expand all
2417 2416
2418 2417
2419 ASSEMBLER_TEST_RUN(Veorq, test) { 2418 ASSEMBLER_TEST_RUN(Veorq, test) {
2420 EXPECT(test != NULL); 2419 EXPECT(test != NULL);
2421 typedef int (*Tst)(); 2420 typedef int (*Tst)();
2422 EXPECT_EQ(-8, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2421 EXPECT_EQ(-8, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2423 } 2422 }
2424 2423
2425 2424
2426 ASSEMBLER_TEST_GENERATE(Vornq, assembler) { 2425 ASSEMBLER_TEST_GENERATE(Vornq, assembler) {
2427 if (TargetCPUFeatures::neon_supported()) { 2426 if (CPUFeatures::neon_supported()) {
2428 // Q0 2427 // Q0
2429 __ LoadImmediate(R0, 0xfffffff0); 2428 __ LoadImmediate(R0, 0xfffffff0);
2430 __ vmovsr(S0, R0); 2429 __ vmovsr(S0, R0);
2431 __ vmovsr(S1, R0); 2430 __ vmovsr(S1, R0);
2432 __ vmovsr(S2, R0); 2431 __ vmovsr(S2, R0);
2433 __ vmovsr(S3, R0); 2432 __ vmovsr(S3, R0);
2434 2433
2435 // Q1 2434 // Q1
2436 __ LoadImmediate(R0, 0); 2435 __ LoadImmediate(R0, 0);
2437 __ vmovsr(S4, R0); 2436 __ vmovsr(S4, R0);
(...skipping 21 matching lines...) Expand all
2459 2458
2460 2459
2461 ASSEMBLER_TEST_RUN(Vornq, test) { 2460 ASSEMBLER_TEST_RUN(Vornq, test) {
2462 EXPECT(test != NULL); 2461 EXPECT(test != NULL);
2463 typedef int (*Tst)(); 2462 typedef int (*Tst)();
2464 EXPECT_EQ(60, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2463 EXPECT_EQ(60, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2465 } 2464 }
2466 2465
2467 2466
2468 ASSEMBLER_TEST_GENERATE(Vorrq, assembler) { 2467 ASSEMBLER_TEST_GENERATE(Vorrq, assembler) {
2469 if (TargetCPUFeatures::neon_supported()) { 2468 if (CPUFeatures::neon_supported()) {
2470 // Q0 2469 // Q0
2471 __ LoadImmediate(R0, 0xaaaaaaaa); 2470 __ LoadImmediate(R0, 0xaaaaaaaa);
2472 __ vmovsr(S0, R0); 2471 __ vmovsr(S0, R0);
2473 __ vmovsr(S1, R0); 2472 __ vmovsr(S1, R0);
2474 __ vmovsr(S2, R0); 2473 __ vmovsr(S2, R0);
2475 __ vmovsr(S3, R0); 2474 __ vmovsr(S3, R0);
2476 2475
2477 // Q1 2476 // Q1
2478 __ LoadImmediate(R0, 0x55555555); 2477 __ LoadImmediate(R0, 0x55555555);
2479 __ vmovsr(S4, R0); 2478 __ vmovsr(S4, R0);
(...skipping 21 matching lines...) Expand all
2501 2500
2502 2501
2503 ASSEMBLER_TEST_RUN(Vorrq, test) { 2502 ASSEMBLER_TEST_RUN(Vorrq, test) {
2504 EXPECT(test != NULL); 2503 EXPECT(test != NULL);
2505 typedef int (*Tst)(); 2504 typedef int (*Tst)();
2506 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2505 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2507 } 2506 }
2508 2507
2509 2508
2510 ASSEMBLER_TEST_GENERATE(Vandq, assembler) { 2509 ASSEMBLER_TEST_GENERATE(Vandq, assembler) {
2511 if (TargetCPUFeatures::neon_supported()) { 2510 if (CPUFeatures::neon_supported()) {
2512 // Q0 2511 // Q0
2513 __ LoadImmediate(R0, 0xaaaaaaab); 2512 __ LoadImmediate(R0, 0xaaaaaaab);
2514 __ vmovsr(S0, R0); 2513 __ vmovsr(S0, R0);
2515 __ vmovsr(S1, R0); 2514 __ vmovsr(S1, R0);
2516 __ vmovsr(S2, R0); 2515 __ vmovsr(S2, R0);
2517 __ vmovsr(S3, R0); 2516 __ vmovsr(S3, R0);
2518 2517
2519 // Q1 2518 // Q1
2520 __ LoadImmediate(R0, 0x55555555); 2519 __ LoadImmediate(R0, 0x55555555);
2521 __ vmovsr(S4, R0); 2520 __ vmovsr(S4, R0);
(...skipping 21 matching lines...) Expand all
2543 2542
2544 2543
2545 ASSEMBLER_TEST_RUN(Vandq, test) { 2544 ASSEMBLER_TEST_RUN(Vandq, test) {
2546 EXPECT(test != NULL); 2545 EXPECT(test != NULL);
2547 typedef int (*Tst)(); 2546 typedef int (*Tst)();
2548 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2547 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2549 } 2548 }
2550 2549
2551 2550
2552 ASSEMBLER_TEST_GENERATE(Vmovq, assembler) { 2551 ASSEMBLER_TEST_GENERATE(Vmovq, assembler) {
2553 if (TargetCPUFeatures::neon_supported()) { 2552 if (CPUFeatures::neon_supported()) {
2554 // Q0 2553 // Q0
2555 __ LoadSImmediate(S0, 1.0); 2554 __ LoadSImmediate(S0, 1.0);
2556 __ vmovs(S1, S0); 2555 __ vmovs(S1, S0);
2557 __ vmovs(S2, S0); 2556 __ vmovs(S2, S0);
2558 __ vmovs(S3, S0); 2557 __ vmovs(S3, S0);
2559 2558
2560 // Q0 2559 // Q0
2561 __ LoadSImmediate(S4, -1.0); 2560 __ LoadSImmediate(S4, -1.0);
2562 __ vmovs(S5, S0); 2561 __ vmovs(S5, S0);
2563 __ vmovs(S6, S0); 2562 __ vmovs(S6, S0);
(...skipping 17 matching lines...) Expand all
2581 2580
2582 2581
2583 ASSEMBLER_TEST_RUN(Vmovq, test) { 2582 ASSEMBLER_TEST_RUN(Vmovq, test) {
2584 EXPECT(test != NULL); 2583 EXPECT(test != NULL);
2585 typedef int (*Tst)(); 2584 typedef int (*Tst)();
2586 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2585 EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2587 } 2586 }
2588 2587
2589 2588
2590 ASSEMBLER_TEST_GENERATE(Vdupb, assembler) { 2589 ASSEMBLER_TEST_GENERATE(Vdupb, assembler) {
2591 if (TargetCPUFeatures::neon_supported()) { 2590 if (CPUFeatures::neon_supported()) {
2592 __ LoadImmediate(R0, 0x00000000); 2591 __ LoadImmediate(R0, 0x00000000);
2593 __ LoadImmediate(R1, 0x00ff0000); 2592 __ LoadImmediate(R1, 0x00ff0000);
2594 __ vmovsr(S4, R0); 2593 __ vmovsr(S4, R0);
2595 __ vmovsr(S5, R1); 2594 __ vmovsr(S5, R1);
2596 2595
2597 // Should copy 0xff to each byte of Q0. 2596 // Should copy 0xff to each byte of Q0.
2598 __ vdup(kByte, Q0, D2, 6); 2597 __ vdup(kByte, Q0, D2, 6);
2599 2598
2600 __ vmovrs(R0, S0); 2599 __ vmovrs(R0, S0);
2601 __ vmovrs(R1, S1); 2600 __ vmovrs(R1, S1);
(...skipping 12 matching lines...) Expand all
2614 2613
2615 2614
2616 ASSEMBLER_TEST_RUN(Vdupb, test) { 2615 ASSEMBLER_TEST_RUN(Vdupb, test) {
2617 EXPECT(test != NULL); 2616 EXPECT(test != NULL);
2618 typedef int (*Tst)(); 2617 typedef int (*Tst)();
2619 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2618 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2620 } 2619 }
2621 2620
2622 2621
2623 ASSEMBLER_TEST_GENERATE(Vduph, assembler) { 2622 ASSEMBLER_TEST_GENERATE(Vduph, assembler) {
2624 if (TargetCPUFeatures::neon_supported()) { 2623 if (CPUFeatures::neon_supported()) {
2625 __ LoadImmediate(R0, 0xffff0000); 2624 __ LoadImmediate(R0, 0xffff0000);
2626 __ LoadImmediate(R1, 0x00000000); 2625 __ LoadImmediate(R1, 0x00000000);
2627 __ vmovsr(S4, R0); 2626 __ vmovsr(S4, R0);
2628 __ vmovsr(S5, R1); 2627 __ vmovsr(S5, R1);
2629 2628
2630 // Should copy 0xff to each byte of Q0. 2629 // Should copy 0xff to each byte of Q0.
2631 __ vdup(kHalfword, Q0, D2, 1); 2630 __ vdup(kHalfword, Q0, D2, 1);
2632 2631
2633 __ vmovrs(R0, S0); 2632 __ vmovrs(R0, S0);
2634 __ vmovrs(R1, S1); 2633 __ vmovrs(R1, S1);
(...skipping 12 matching lines...) Expand all
2647 2646
2648 2647
2649 ASSEMBLER_TEST_RUN(Vduph, test) { 2648 ASSEMBLER_TEST_RUN(Vduph, test) {
2650 EXPECT(test != NULL); 2649 EXPECT(test != NULL);
2651 typedef int (*Tst)(); 2650 typedef int (*Tst)();
2652 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2651 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2653 } 2652 }
2654 2653
2655 2654
2656 ASSEMBLER_TEST_GENERATE(Vdupw, assembler) { 2655 ASSEMBLER_TEST_GENERATE(Vdupw, assembler) {
2657 if (TargetCPUFeatures::neon_supported()) { 2656 if (CPUFeatures::neon_supported()) {
2658 __ LoadImmediate(R0, 0x00000000); 2657 __ LoadImmediate(R0, 0x00000000);
2659 __ LoadImmediate(R1, 0xffffffff); 2658 __ LoadImmediate(R1, 0xffffffff);
2660 __ vmovsr(S4, R0); 2659 __ vmovsr(S4, R0);
2661 __ vmovsr(S5, R1); 2660 __ vmovsr(S5, R1);
2662 2661
2663 // Should copy 0xff to each byte of Q0. 2662 // Should copy 0xff to each byte of Q0.
2664 __ vdup(kWord, Q0, D2, 1); 2663 __ vdup(kWord, Q0, D2, 1);
2665 2664
2666 __ vmovrs(R0, S0); 2665 __ vmovrs(R0, S0);
2667 __ vmovrs(R1, S1); 2666 __ vmovrs(R1, S1);
(...skipping 12 matching lines...) Expand all
2680 2679
2681 2680
2682 ASSEMBLER_TEST_RUN(Vdupw, test) { 2681 ASSEMBLER_TEST_RUN(Vdupw, test) {
2683 EXPECT(test != NULL); 2682 EXPECT(test != NULL);
2684 typedef int (*Tst)(); 2683 typedef int (*Tst)();
2685 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2684 EXPECT_EQ(-4, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2686 } 2685 }
2687 2686
2688 2687
2689 ASSEMBLER_TEST_GENERATE(Vzipqw, assembler) { 2688 ASSEMBLER_TEST_GENERATE(Vzipqw, assembler) {
2690 if (TargetCPUFeatures::neon_supported()) { 2689 if (CPUFeatures::neon_supported()) {
2691 __ LoadSImmediate(S0, 0.0); 2690 __ LoadSImmediate(S0, 0.0);
2692 __ LoadSImmediate(S1, 1.0); 2691 __ LoadSImmediate(S1, 1.0);
2693 __ LoadSImmediate(S2, 2.0); 2692 __ LoadSImmediate(S2, 2.0);
2694 __ LoadSImmediate(S3, 3.0); 2693 __ LoadSImmediate(S3, 3.0);
2695 __ LoadSImmediate(S4, 4.0); 2694 __ LoadSImmediate(S4, 4.0);
2696 __ LoadSImmediate(S5, 5.0); 2695 __ LoadSImmediate(S5, 5.0);
2697 __ LoadSImmediate(S6, 6.0); 2696 __ LoadSImmediate(S6, 6.0);
2698 __ LoadSImmediate(S7, 7.0); 2697 __ LoadSImmediate(S7, 7.0);
2699 2698
2700 __ vzipqw(Q0, Q1); 2699 __ vzipqw(Q0, Q1);
(...skipping 13 matching lines...) Expand all
2714 2713
2715 ASSEMBLER_TEST_RUN(Vzipqw, test) { 2714 ASSEMBLER_TEST_RUN(Vzipqw, test) {
2716 EXPECT(test != NULL); 2715 EXPECT(test != NULL);
2717 typedef float (*Vzipqw)(); 2716 typedef float (*Vzipqw)();
2718 float res = EXECUTE_TEST_CODE_FLOAT(Vzipqw, test->entry()); 2717 float res = EXECUTE_TEST_CODE_FLOAT(Vzipqw, test->entry());
2719 EXPECT_FLOAT_EQ(8.0, res, 0.0001f); 2718 EXPECT_FLOAT_EQ(8.0, res, 0.0001f);
2720 } 2719 }
2721 2720
2722 2721
2723 ASSEMBLER_TEST_GENERATE(Vceqqi32, assembler) { 2722 ASSEMBLER_TEST_GENERATE(Vceqqi32, assembler) {
2724 if (TargetCPUFeatures::neon_supported()) { 2723 if (CPUFeatures::neon_supported()) {
2725 __ mov(R0, ShifterOperand(1)); 2724 __ mov(R0, ShifterOperand(1));
2726 __ vmovsr(S0, R0); 2725 __ vmovsr(S0, R0);
2727 __ mov(R0, ShifterOperand(2)); 2726 __ mov(R0, ShifterOperand(2));
2728 __ vmovsr(S1, R0); 2727 __ vmovsr(S1, R0);
2729 __ mov(R0, ShifterOperand(3)); 2728 __ mov(R0, ShifterOperand(3));
2730 __ vmovsr(S2, R0); 2729 __ vmovsr(S2, R0);
2731 __ mov(R0, ShifterOperand(4)); 2730 __ mov(R0, ShifterOperand(4));
2732 __ vmovsr(S3, R0); 2731 __ vmovsr(S3, R0);
2733 __ mov(R0, ShifterOperand(1)); 2732 __ mov(R0, ShifterOperand(1));
2734 __ vmovsr(S4, R0); 2733 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
2758 2757
2759 2758
2760 ASSEMBLER_TEST_RUN(Vceqqi32, test) { 2759 ASSEMBLER_TEST_RUN(Vceqqi32, test) {
2761 EXPECT(test != NULL); 2760 EXPECT(test != NULL);
2762 typedef int (*Tst)(); 2761 typedef int (*Tst)();
2763 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2762 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2764 } 2763 }
2765 2764
2766 2765
2767 ASSEMBLER_TEST_GENERATE(Vceqqs, assembler) { 2766 ASSEMBLER_TEST_GENERATE(Vceqqs, assembler) {
2768 if (TargetCPUFeatures::neon_supported()) { 2767 if (CPUFeatures::neon_supported()) {
2769 __ LoadSImmediate(S0, 1.0); 2768 __ LoadSImmediate(S0, 1.0);
2770 __ LoadSImmediate(S1, 2.0); 2769 __ LoadSImmediate(S1, 2.0);
2771 __ LoadSImmediate(S2, 3.0); 2770 __ LoadSImmediate(S2, 3.0);
2772 __ LoadSImmediate(S3, 4.0); 2771 __ LoadSImmediate(S3, 4.0);
2773 __ LoadSImmediate(S4, 1.0); 2772 __ LoadSImmediate(S4, 1.0);
2774 __ LoadSImmediate(S5, 4.0); 2773 __ LoadSImmediate(S5, 4.0);
2775 __ LoadSImmediate(S6, 3.0); 2774 __ LoadSImmediate(S6, 3.0);
2776 __ LoadSImmediate(S7, 8.0); 2775 __ LoadSImmediate(S7, 8.0);
2777 2776
2778 __ vceqqs(Q2, Q1, Q0); 2777 __ vceqqs(Q2, Q1, Q0);
(...skipping 15 matching lines...) Expand all
2794 2793
2795 2794
2796 ASSEMBLER_TEST_RUN(Vceqqs, test) { 2795 ASSEMBLER_TEST_RUN(Vceqqs, test) {
2797 EXPECT(test != NULL); 2796 EXPECT(test != NULL);
2798 typedef int (*Tst)(); 2797 typedef int (*Tst)();
2799 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2798 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2800 } 2799 }
2801 2800
2802 2801
2803 ASSEMBLER_TEST_GENERATE(Vcgeqi32, assembler) { 2802 ASSEMBLER_TEST_GENERATE(Vcgeqi32, assembler) {
2804 if (TargetCPUFeatures::neon_supported()) { 2803 if (CPUFeatures::neon_supported()) {
2805 __ mov(R0, ShifterOperand(1)); 2804 __ mov(R0, ShifterOperand(1));
2806 __ vmovsr(S0, R0); 2805 __ vmovsr(S0, R0);
2807 __ mov(R0, ShifterOperand(2)); 2806 __ mov(R0, ShifterOperand(2));
2808 __ vmovsr(S1, R0); 2807 __ vmovsr(S1, R0);
2809 __ mov(R0, ShifterOperand(3)); 2808 __ mov(R0, ShifterOperand(3));
2810 __ vmovsr(S2, R0); 2809 __ vmovsr(S2, R0);
2811 __ mov(R0, ShifterOperand(4)); 2810 __ mov(R0, ShifterOperand(4));
2812 __ vmovsr(S3, R0); 2811 __ vmovsr(S3, R0);
2813 __ mov(R0, ShifterOperand(1)); 2812 __ mov(R0, ShifterOperand(1));
2814 __ vmovsr(S4, R0); 2813 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
2838 2837
2839 2838
2840 ASSEMBLER_TEST_RUN(Vcgeqi32, test) { 2839 ASSEMBLER_TEST_RUN(Vcgeqi32, test) {
2841 EXPECT(test != NULL); 2840 EXPECT(test != NULL);
2842 typedef int (*Tst)(); 2841 typedef int (*Tst)();
2843 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2842 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2844 } 2843 }
2845 2844
2846 2845
2847 ASSEMBLER_TEST_GENERATE(Vcugeqi32, assembler) { 2846 ASSEMBLER_TEST_GENERATE(Vcugeqi32, assembler) {
2848 if (TargetCPUFeatures::neon_supported()) { 2847 if (CPUFeatures::neon_supported()) {
2849 __ mov(R0, ShifterOperand(1)); 2848 __ mov(R0, ShifterOperand(1));
2850 __ vmovsr(S0, R0); 2849 __ vmovsr(S0, R0);
2851 __ mov(R0, ShifterOperand(2)); 2850 __ mov(R0, ShifterOperand(2));
2852 __ vmovsr(S1, R0); 2851 __ vmovsr(S1, R0);
2853 __ mov(R0, ShifterOperand(3)); 2852 __ mov(R0, ShifterOperand(3));
2854 __ vmovsr(S2, R0); 2853 __ vmovsr(S2, R0);
2855 __ mov(R0, ShifterOperand(4)); 2854 __ mov(R0, ShifterOperand(4));
2856 __ vmovsr(S3, R0); 2855 __ vmovsr(S3, R0);
2857 __ LoadImmediate(R0, -1); 2856 __ LoadImmediate(R0, -1);
2858 __ vmovsr(S4, R0); 2857 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
2882 2881
2883 2882
2884 ASSEMBLER_TEST_RUN(Vcugeqi32, test) { 2883 ASSEMBLER_TEST_RUN(Vcugeqi32, test) {
2885 EXPECT(test != NULL); 2884 EXPECT(test != NULL);
2886 typedef int (*Tst)(); 2885 typedef int (*Tst)();
2887 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2886 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2888 } 2887 }
2889 2888
2890 2889
2891 ASSEMBLER_TEST_GENERATE(Vcgeqs, assembler) { 2890 ASSEMBLER_TEST_GENERATE(Vcgeqs, assembler) {
2892 if (TargetCPUFeatures::neon_supported()) { 2891 if (CPUFeatures::neon_supported()) {
2893 __ LoadSImmediate(S0, 1.0); 2892 __ LoadSImmediate(S0, 1.0);
2894 __ LoadSImmediate(S1, 2.0); 2893 __ LoadSImmediate(S1, 2.0);
2895 __ LoadSImmediate(S2, 3.0); 2894 __ LoadSImmediate(S2, 3.0);
2896 __ LoadSImmediate(S3, 4.0); 2895 __ LoadSImmediate(S3, 4.0);
2897 __ LoadSImmediate(S4, 1.0); 2896 __ LoadSImmediate(S4, 1.0);
2898 __ LoadSImmediate(S5, 1.0); 2897 __ LoadSImmediate(S5, 1.0);
2899 __ LoadSImmediate(S6, 3.0); 2898 __ LoadSImmediate(S6, 3.0);
2900 __ LoadSImmediate(S7, 1.0); 2899 __ LoadSImmediate(S7, 1.0);
2901 2900
2902 __ vcgeqs(Q2, Q1, Q0); 2901 __ vcgeqs(Q2, Q1, Q0);
(...skipping 15 matching lines...) Expand all
2918 2917
2919 2918
2920 ASSEMBLER_TEST_RUN(Vcgeqs, test) { 2919 ASSEMBLER_TEST_RUN(Vcgeqs, test) {
2921 EXPECT(test != NULL); 2920 EXPECT(test != NULL);
2922 typedef int (*Tst)(); 2921 typedef int (*Tst)();
2923 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2922 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2924 } 2923 }
2925 2924
2926 2925
2927 ASSEMBLER_TEST_GENERATE(Vcgtqi32, assembler) { 2926 ASSEMBLER_TEST_GENERATE(Vcgtqi32, assembler) {
2928 if (TargetCPUFeatures::neon_supported()) { 2927 if (CPUFeatures::neon_supported()) {
2929 __ mov(R0, ShifterOperand(1)); 2928 __ mov(R0, ShifterOperand(1));
2930 __ vmovsr(S0, R0); 2929 __ vmovsr(S0, R0);
2931 __ mov(R0, ShifterOperand(2)); 2930 __ mov(R0, ShifterOperand(2));
2932 __ vmovsr(S1, R0); 2931 __ vmovsr(S1, R0);
2933 __ mov(R0, ShifterOperand(3)); 2932 __ mov(R0, ShifterOperand(3));
2934 __ vmovsr(S2, R0); 2933 __ vmovsr(S2, R0);
2935 __ mov(R0, ShifterOperand(4)); 2934 __ mov(R0, ShifterOperand(4));
2936 __ vmovsr(S3, R0); 2935 __ vmovsr(S3, R0);
2937 __ mov(R0, ShifterOperand(2)); 2936 __ mov(R0, ShifterOperand(2));
2938 __ vmovsr(S4, R0); 2937 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
2962 2961
2963 2962
2964 ASSEMBLER_TEST_RUN(Vcgtqi32, test) { 2963 ASSEMBLER_TEST_RUN(Vcgtqi32, test) {
2965 EXPECT(test != NULL); 2964 EXPECT(test != NULL);
2966 typedef int (*Tst)(); 2965 typedef int (*Tst)();
2967 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 2966 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
2968 } 2967 }
2969 2968
2970 2969
2971 ASSEMBLER_TEST_GENERATE(Vcugtqi32, assembler) { 2970 ASSEMBLER_TEST_GENERATE(Vcugtqi32, assembler) {
2972 if (TargetCPUFeatures::neon_supported()) { 2971 if (CPUFeatures::neon_supported()) {
2973 __ mov(R0, ShifterOperand(1)); 2972 __ mov(R0, ShifterOperand(1));
2974 __ vmovsr(S0, R0); 2973 __ vmovsr(S0, R0);
2975 __ mov(R0, ShifterOperand(2)); 2974 __ mov(R0, ShifterOperand(2));
2976 __ vmovsr(S1, R0); 2975 __ vmovsr(S1, R0);
2977 __ mov(R0, ShifterOperand(3)); 2976 __ mov(R0, ShifterOperand(3));
2978 __ vmovsr(S2, R0); 2977 __ vmovsr(S2, R0);
2979 __ mov(R0, ShifterOperand(4)); 2978 __ mov(R0, ShifterOperand(4));
2980 __ vmovsr(S3, R0); 2979 __ vmovsr(S3, R0);
2981 __ LoadImmediate(R0, -1); 2980 __ LoadImmediate(R0, -1);
2982 __ vmovsr(S4, R0); 2981 __ vmovsr(S4, R0);
(...skipping 23 matching lines...) Expand all
3006 3005
3007 3006
3008 ASSEMBLER_TEST_RUN(Vcugtqi32, test) { 3007 ASSEMBLER_TEST_RUN(Vcugtqi32, test) {
3009 EXPECT(test != NULL); 3008 EXPECT(test != NULL);
3010 typedef int (*Tst)(); 3009 typedef int (*Tst)();
3011 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 3010 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
3012 } 3011 }
3013 3012
3014 3013
3015 ASSEMBLER_TEST_GENERATE(Vcgtqs, assembler) { 3014 ASSEMBLER_TEST_GENERATE(Vcgtqs, assembler) {
3016 if (TargetCPUFeatures::neon_supported()) { 3015 if (CPUFeatures::neon_supported()) {
3017 __ LoadSImmediate(S0, 1.0); 3016 __ LoadSImmediate(S0, 1.0);
3018 __ LoadSImmediate(S1, 2.0); 3017 __ LoadSImmediate(S1, 2.0);
3019 __ LoadSImmediate(S2, 3.0); 3018 __ LoadSImmediate(S2, 3.0);
3020 __ LoadSImmediate(S3, 4.0); 3019 __ LoadSImmediate(S3, 4.0);
3021 __ LoadSImmediate(S4, 2.0); 3020 __ LoadSImmediate(S4, 2.0);
3022 __ LoadSImmediate(S5, 1.0); 3021 __ LoadSImmediate(S5, 1.0);
3023 __ LoadSImmediate(S6, 4.0); 3022 __ LoadSImmediate(S6, 4.0);
3024 __ LoadSImmediate(S7, 1.0); 3023 __ LoadSImmediate(S7, 1.0);
3025 3024
3026 __ vcgtqs(Q2, Q1, Q0); 3025 __ vcgtqs(Q2, Q1, Q0);
(...skipping 15 matching lines...) Expand all
3042 3041
3043 3042
3044 ASSEMBLER_TEST_RUN(Vcgtqs, test) { 3043 ASSEMBLER_TEST_RUN(Vcgtqs, test) {
3045 EXPECT(test != NULL); 3044 EXPECT(test != NULL);
3046 typedef int (*Tst)(); 3045 typedef int (*Tst)();
3047 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 3046 EXPECT_EQ(-2, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
3048 } 3047 }
3049 3048
3050 3049
3051 ASSEMBLER_TEST_GENERATE(Vminqs, assembler) { 3050 ASSEMBLER_TEST_GENERATE(Vminqs, assembler) {
3052 if (TargetCPUFeatures::neon_supported()) { 3051 if (CPUFeatures::neon_supported()) {
3053 __ LoadSImmediate(S0, 1.0); 3052 __ LoadSImmediate(S0, 1.0);
3054 __ LoadSImmediate(S1, 2.0); 3053 __ LoadSImmediate(S1, 2.0);
3055 __ LoadSImmediate(S2, 3.0); 3054 __ LoadSImmediate(S2, 3.0);
3056 __ LoadSImmediate(S3, 4.0); 3055 __ LoadSImmediate(S3, 4.0);
3057 3056
3058 __ LoadSImmediate(S4, 2.0); 3057 __ LoadSImmediate(S4, 2.0);
3059 __ LoadSImmediate(S5, 1.0); 3058 __ LoadSImmediate(S5, 1.0);
3060 __ LoadSImmediate(S6, 6.0); 3059 __ LoadSImmediate(S6, 6.0);
3061 __ LoadSImmediate(S7, 3.0); 3060 __ LoadSImmediate(S7, 3.0);
3062 3061
(...skipping 14 matching lines...) Expand all
3077 3076
3078 3077
3079 ASSEMBLER_TEST_RUN(Vminqs, test) { 3078 ASSEMBLER_TEST_RUN(Vminqs, test) {
3080 EXPECT(test != NULL); 3079 EXPECT(test != NULL);
3081 typedef int (*Tst)(); 3080 typedef int (*Tst)();
3082 EXPECT_EQ(8, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 3081 EXPECT_EQ(8, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
3083 } 3082 }
3084 3083
3085 3084
3086 ASSEMBLER_TEST_GENERATE(Vmaxqs, assembler) { 3085 ASSEMBLER_TEST_GENERATE(Vmaxqs, assembler) {
3087 if (TargetCPUFeatures::neon_supported()) { 3086 if (CPUFeatures::neon_supported()) {
3088 __ LoadSImmediate(S0, 1.0); 3087 __ LoadSImmediate(S0, 1.0);
3089 __ LoadSImmediate(S1, 2.0); 3088 __ LoadSImmediate(S1, 2.0);
3090 __ LoadSImmediate(S2, 3.0); 3089 __ LoadSImmediate(S2, 3.0);
3091 __ LoadSImmediate(S3, 4.0); 3090 __ LoadSImmediate(S3, 4.0);
3092 3091
3093 __ LoadSImmediate(S4, 2.0); 3092 __ LoadSImmediate(S4, 2.0);
3094 __ LoadSImmediate(S5, 1.0); 3093 __ LoadSImmediate(S5, 1.0);
3095 __ LoadSImmediate(S6, 6.0); 3094 __ LoadSImmediate(S6, 6.0);
3096 __ LoadSImmediate(S7, 3.0); 3095 __ LoadSImmediate(S7, 3.0);
3097 3096
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3147 3146
3148 // result = sign : result_exp<7:0> : estimate<51:29> 3147 // result = sign : result_exp<7:0> : estimate<51:29>
3149 int32_t result_bits = 3148 int32_t result_bits =
3150 (a_bits & 0x80000000) | ((result_exp & 0xff) << 23) | 3149 (a_bits & 0x80000000) | ((result_exp & 0xff) << 23) |
3151 ((bit_cast<uint64_t, double>(estimate) >> 29) & 0x7fffff); 3150 ((bit_cast<uint64_t, double>(estimate) >> 29) & 0x7fffff);
3152 return bit_cast<float, int32_t>(result_bits); 3151 return bit_cast<float, int32_t>(result_bits);
3153 } 3152 }
3154 3153
3155 3154
3156 ASSEMBLER_TEST_GENERATE(Vrecpeqs, assembler) { 3155 ASSEMBLER_TEST_GENERATE(Vrecpeqs, assembler) {
3157 if (TargetCPUFeatures::neon_supported()) { 3156 if (CPUFeatures::neon_supported()) {
3158 __ LoadSImmediate(S4, 147.0); 3157 __ LoadSImmediate(S4, 147.0);
3159 __ vmovs(S5, S4); 3158 __ vmovs(S5, S4);
3160 __ vmovs(S6, S4); 3159 __ vmovs(S6, S4);
3161 __ vmovs(S7, S4); 3160 __ vmovs(S7, S4);
3162 3161
3163 __ vrecpeqs(Q0, Q1); 3162 __ vrecpeqs(Q0, Q1);
3164 3163
3165 __ bx(LR); 3164 __ bx(LR);
3166 } else { 3165 } else {
3167 __ LoadSImmediate(S0, arm_recip_estimate(147.0)); 3166 __ LoadSImmediate(S0, arm_recip_estimate(147.0));
3168 __ bx(LR); 3167 __ bx(LR);
3169 } 3168 }
3170 } 3169 }
3171 3170
3172 3171
3173 ASSEMBLER_TEST_RUN(Vrecpeqs, test) { 3172 ASSEMBLER_TEST_RUN(Vrecpeqs, test) {
3174 EXPECT(test != NULL); 3173 EXPECT(test != NULL);
3175 typedef float (*Vrecpeqs)(); 3174 typedef float (*Vrecpeqs)();
3176 float res = EXECUTE_TEST_CODE_FLOAT(Vrecpeqs, test->entry()); 3175 float res = EXECUTE_TEST_CODE_FLOAT(Vrecpeqs, test->entry());
3177 EXPECT_FLOAT_EQ(arm_recip_estimate(147.0), res, 0.0001f); 3176 EXPECT_FLOAT_EQ(arm_recip_estimate(147.0), res, 0.0001f);
3178 } 3177 }
3179 3178
3180 3179
3181 ASSEMBLER_TEST_GENERATE(Vrecpsqs, assembler) { 3180 ASSEMBLER_TEST_GENERATE(Vrecpsqs, assembler) {
3182 if (TargetCPUFeatures::neon_supported()) { 3181 if (CPUFeatures::neon_supported()) {
3183 __ LoadSImmediate(S4, 5.0); 3182 __ LoadSImmediate(S4, 5.0);
3184 __ LoadSImmediate(S5, 2.0); 3183 __ LoadSImmediate(S5, 2.0);
3185 __ LoadSImmediate(S6, 3.0); 3184 __ LoadSImmediate(S6, 3.0);
3186 __ LoadSImmediate(S7, 4.0); 3185 __ LoadSImmediate(S7, 4.0);
3187 3186
3188 __ LoadSImmediate(S8, 10.0); 3187 __ LoadSImmediate(S8, 10.0);
3189 __ LoadSImmediate(S9, 1.0); 3188 __ LoadSImmediate(S9, 1.0);
3190 __ LoadSImmediate(S10, 6.0); 3189 __ LoadSImmediate(S10, 6.0);
3191 __ LoadSImmediate(S11, 3.0); 3190 __ LoadSImmediate(S11, 3.0);
3192 3191
3193 __ vrecpsqs(Q0, Q1, Q2); 3192 __ vrecpsqs(Q0, Q1, Q2);
3194 3193
3195 __ bx(LR); 3194 __ bx(LR);
3196 } else { 3195 } else {
3197 __ LoadSImmediate(S0, 2.0 - 10.0 * 5.0); 3196 __ LoadSImmediate(S0, 2.0 - 10.0 * 5.0);
3198 __ bx(LR); 3197 __ bx(LR);
3199 } 3198 }
3200 } 3199 }
3201 3200
3202 3201
3203 ASSEMBLER_TEST_RUN(Vrecpsqs, test) { 3202 ASSEMBLER_TEST_RUN(Vrecpsqs, test) {
3204 EXPECT(test != NULL); 3203 EXPECT(test != NULL);
3205 typedef float (*Vrecpsqs)(); 3204 typedef float (*Vrecpsqs)();
3206 float res = EXECUTE_TEST_CODE_FLOAT(Vrecpsqs, test->entry()); 3205 float res = EXECUTE_TEST_CODE_FLOAT(Vrecpsqs, test->entry());
3207 EXPECT_FLOAT_EQ(2.0 - 10.0 * 5.0, res, 0.0001f); 3206 EXPECT_FLOAT_EQ(2.0 - 10.0 * 5.0, res, 0.0001f);
3208 } 3207 }
3209 3208
3210 3209
3211 ASSEMBLER_TEST_GENERATE(Reciprocal, assembler) { 3210 ASSEMBLER_TEST_GENERATE(Reciprocal, assembler) {
3212 if (TargetCPUFeatures::neon_supported()) { 3211 if (CPUFeatures::neon_supported()) {
3213 __ LoadSImmediate(S4, 147000.0); 3212 __ LoadSImmediate(S4, 147000.0);
3214 __ vmovs(S5, S4); 3213 __ vmovs(S5, S4);
3215 __ vmovs(S6, S4); 3214 __ vmovs(S6, S4);
3216 __ vmovs(S7, S4); 3215 __ vmovs(S7, S4);
3217 3216
3218 // Reciprocal estimate. 3217 // Reciprocal estimate.
3219 __ vrecpeqs(Q0, Q1); 3218 __ vrecpeqs(Q0, Q1);
3220 // 2 Newton-Raphson steps. 3219 // 2 Newton-Raphson steps.
3221 __ vrecpsqs(Q2, Q1, Q0); 3220 __ vrecpsqs(Q2, Q1, Q0);
3222 __ vmulqs(Q0, Q0, Q2); 3221 __ vmulqs(Q0, Q0, Q2);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
3284 ASSERT((estimate >= 1.0) && (estimate <= (511.0/256.0))); 3283 ASSERT((estimate >= 1.0) && (estimate <= (511.0/256.0)));
3285 3284
3286 // result = 0 : result_exp<7:0> : estimate<51:29> 3285 // result = 0 : result_exp<7:0> : estimate<51:29>
3287 int32_t result_bits = ((result_exp & 0xff) << 23) | 3286 int32_t result_bits = ((result_exp & 0xff) << 23) |
3288 ((bit_cast<uint64_t, double>(estimate) >> 29) & 0x7fffff); 3287 ((bit_cast<uint64_t, double>(estimate) >> 29) & 0x7fffff);
3289 return bit_cast<float, int32_t>(result_bits); 3288 return bit_cast<float, int32_t>(result_bits);
3290 } 3289 }
3291 3290
3292 3291
3293 ASSEMBLER_TEST_GENERATE(Vrsqrteqs, assembler) { 3292 ASSEMBLER_TEST_GENERATE(Vrsqrteqs, assembler) {
3294 if (TargetCPUFeatures::neon_supported()) { 3293 if (CPUFeatures::neon_supported()) {
3295 __ LoadSImmediate(S4, 147.0); 3294 __ LoadSImmediate(S4, 147.0);
3296 __ vmovs(S5, S4); 3295 __ vmovs(S5, S4);
3297 __ vmovs(S6, S4); 3296 __ vmovs(S6, S4);
3298 __ vmovs(S7, S4); 3297 __ vmovs(S7, S4);
3299 3298
3300 __ vrsqrteqs(Q0, Q1); 3299 __ vrsqrteqs(Q0, Q1);
3301 3300
3302 __ bx(LR); 3301 __ bx(LR);
3303 } else { 3302 } else {
3304 __ LoadSImmediate(S0, arm_reciprocal_sqrt_estimate(147.0)); 3303 __ LoadSImmediate(S0, arm_reciprocal_sqrt_estimate(147.0));
3305 __ bx(LR); 3304 __ bx(LR);
3306 } 3305 }
3307 } 3306 }
3308 3307
3309 3308
3310 ASSEMBLER_TEST_RUN(Vrsqrteqs, test) { 3309 ASSEMBLER_TEST_RUN(Vrsqrteqs, test) {
3311 EXPECT(test != NULL); 3310 EXPECT(test != NULL);
3312 typedef float (*Vrsqrteqs)(); 3311 typedef float (*Vrsqrteqs)();
3313 float res = EXECUTE_TEST_CODE_FLOAT(Vrsqrteqs, test->entry()); 3312 float res = EXECUTE_TEST_CODE_FLOAT(Vrsqrteqs, test->entry());
3314 EXPECT_FLOAT_EQ(arm_reciprocal_sqrt_estimate(147.0), res, 0.0001f); 3313 EXPECT_FLOAT_EQ(arm_reciprocal_sqrt_estimate(147.0), res, 0.0001f);
3315 } 3314 }
3316 3315
3317 3316
3318 ASSEMBLER_TEST_GENERATE(Vrsqrtsqs, assembler) { 3317 ASSEMBLER_TEST_GENERATE(Vrsqrtsqs, assembler) {
3319 if (TargetCPUFeatures::neon_supported()) { 3318 if (CPUFeatures::neon_supported()) {
3320 __ LoadSImmediate(S4, 5.0); 3319 __ LoadSImmediate(S4, 5.0);
3321 __ LoadSImmediate(S5, 2.0); 3320 __ LoadSImmediate(S5, 2.0);
3322 __ LoadSImmediate(S6, 3.0); 3321 __ LoadSImmediate(S6, 3.0);
3323 __ LoadSImmediate(S7, 4.0); 3322 __ LoadSImmediate(S7, 4.0);
3324 3323
3325 __ LoadSImmediate(S8, 10.0); 3324 __ LoadSImmediate(S8, 10.0);
3326 __ LoadSImmediate(S9, 1.0); 3325 __ LoadSImmediate(S9, 1.0);
3327 __ LoadSImmediate(S10, 6.0); 3326 __ LoadSImmediate(S10, 6.0);
3328 __ LoadSImmediate(S11, 3.0); 3327 __ LoadSImmediate(S11, 3.0);
3329 3328
3330 __ vrsqrtsqs(Q0, Q1, Q2); 3329 __ vrsqrtsqs(Q0, Q1, Q2);
3331 3330
3332 __ bx(LR); 3331 __ bx(LR);
3333 } else { 3332 } else {
3334 __ LoadSImmediate(S0, (3.0 - 10.0 * 5.0) / 2.0); 3333 __ LoadSImmediate(S0, (3.0 - 10.0 * 5.0) / 2.0);
3335 __ bx(LR); 3334 __ bx(LR);
3336 } 3335 }
3337 } 3336 }
3338 3337
3339 3338
3340 ASSEMBLER_TEST_RUN(Vrsqrtsqs, test) { 3339 ASSEMBLER_TEST_RUN(Vrsqrtsqs, test) {
3341 EXPECT(test != NULL); 3340 EXPECT(test != NULL);
3342 typedef float (*Vrsqrtsqs)(); 3341 typedef float (*Vrsqrtsqs)();
3343 float res = EXECUTE_TEST_CODE_FLOAT(Vrsqrtsqs, test->entry()); 3342 float res = EXECUTE_TEST_CODE_FLOAT(Vrsqrtsqs, test->entry());
3344 EXPECT_FLOAT_EQ((3.0 - 10.0 * 5.0)/2.0, res, 0.0001f); 3343 EXPECT_FLOAT_EQ((3.0 - 10.0 * 5.0)/2.0, res, 0.0001f);
3345 } 3344 }
3346 3345
3347 3346
3348 ASSEMBLER_TEST_GENERATE(ReciprocalSqrt, assembler) { 3347 ASSEMBLER_TEST_GENERATE(ReciprocalSqrt, assembler) {
3349 if (TargetCPUFeatures::neon_supported()) { 3348 if (CPUFeatures::neon_supported()) {
3350 __ LoadSImmediate(S4, 147000.0); 3349 __ LoadSImmediate(S4, 147000.0);
3351 __ vmovs(S5, S4); 3350 __ vmovs(S5, S4);
3352 __ vmovs(S6, S4); 3351 __ vmovs(S6, S4);
3353 __ vmovs(S7, S4); 3352 __ vmovs(S7, S4);
3354 3353
3355 // Reciprocal square root estimate. 3354 // Reciprocal square root estimate.
3356 __ vrsqrteqs(Q0, Q1); 3355 __ vrsqrteqs(Q0, Q1);
3357 // 2 Newton-Raphson steps. xn+1 = xn * (3 - Q1*xn^2) / 2. 3356 // 2 Newton-Raphson steps. xn+1 = xn * (3 - Q1*xn^2) / 2.
3358 // First step. 3357 // First step.
3359 __ vmulqs(Q2, Q0, Q0); // Q2 <- xn^2 3358 __ vmulqs(Q2, Q0, Q0); // Q2 <- xn^2
(...skipping 14 matching lines...) Expand all
3374 3373
3375 ASSEMBLER_TEST_RUN(ReciprocalSqrt, test) { 3374 ASSEMBLER_TEST_RUN(ReciprocalSqrt, test) {
3376 EXPECT(test != NULL); 3375 EXPECT(test != NULL);
3377 typedef float (*ReciprocalSqrt)(); 3376 typedef float (*ReciprocalSqrt)();
3378 float res = EXECUTE_TEST_CODE_FLOAT(ReciprocalSqrt, test->entry()); 3377 float res = EXECUTE_TEST_CODE_FLOAT(ReciprocalSqrt, test->entry());
3379 EXPECT_FLOAT_EQ(1.0/sqrt(147000.0), res, 0.0001f); 3378 EXPECT_FLOAT_EQ(1.0/sqrt(147000.0), res, 0.0001f);
3380 } 3379 }
3381 3380
3382 3381
3383 ASSEMBLER_TEST_GENERATE(SIMDSqrt, assembler) { 3382 ASSEMBLER_TEST_GENERATE(SIMDSqrt, assembler) {
3384 if (TargetCPUFeatures::neon_supported()) { 3383 if (CPUFeatures::neon_supported()) {
3385 __ LoadSImmediate(S4, 147000.0); 3384 __ LoadSImmediate(S4, 147000.0);
3386 __ vmovs(S5, S4); 3385 __ vmovs(S5, S4);
3387 __ vmovs(S6, S4); 3386 __ vmovs(S6, S4);
3388 __ vmovs(S7, S4); 3387 __ vmovs(S7, S4);
3389 3388
3390 // Reciprocal square root estimate. 3389 // Reciprocal square root estimate.
3391 __ vrsqrteqs(Q0, Q1); 3390 __ vrsqrteqs(Q0, Q1);
3392 // 2 Newton-Raphson steps. xn+1 = xn * (3 - Q1*xn^2) / 2. 3391 // 2 Newton-Raphson steps. xn+1 = xn * (3 - Q1*xn^2) / 2.
3393 // First step. 3392 // First step.
3394 __ vmulqs(Q2, Q0, Q0); // Q2 <- xn^2 3393 __ vmulqs(Q2, Q0, Q0); // Q2 <- xn^2
(...skipping 24 matching lines...) Expand all
3419 3418
3420 ASSEMBLER_TEST_RUN(SIMDSqrt, test) { 3419 ASSEMBLER_TEST_RUN(SIMDSqrt, test) {
3421 EXPECT(test != NULL); 3420 EXPECT(test != NULL);
3422 typedef float (*SIMDSqrt)(); 3421 typedef float (*SIMDSqrt)();
3423 float res = EXECUTE_TEST_CODE_FLOAT(SIMDSqrt, test->entry()); 3422 float res = EXECUTE_TEST_CODE_FLOAT(SIMDSqrt, test->entry());
3424 EXPECT_FLOAT_EQ(sqrt(147000.0), res, 0.0001f); 3423 EXPECT_FLOAT_EQ(sqrt(147000.0), res, 0.0001f);
3425 } 3424 }
3426 3425
3427 3426
3428 ASSEMBLER_TEST_GENERATE(SIMDSqrt2, assembler) { 3427 ASSEMBLER_TEST_GENERATE(SIMDSqrt2, assembler) {
3429 if (TargetCPUFeatures::neon_supported()) { 3428 if (CPUFeatures::neon_supported()) {
3430 __ LoadSImmediate(S4, 1.0); 3429 __ LoadSImmediate(S4, 1.0);
3431 __ LoadSImmediate(S5, 4.0); 3430 __ LoadSImmediate(S5, 4.0);
3432 __ LoadSImmediate(S6, 9.0); 3431 __ LoadSImmediate(S6, 9.0);
3433 __ LoadSImmediate(S7, 16.0); 3432 __ LoadSImmediate(S7, 16.0);
3434 3433
3435 // Reciprocal square root estimate. 3434 // Reciprocal square root estimate.
3436 __ vrsqrteqs(Q0, Q1); 3435 __ vrsqrteqs(Q0, Q1);
3437 // 2 Newton-Raphson steps. xn+1 = xn * (3 - Q1*xn^2) / 2. 3436 // 2 Newton-Raphson steps. xn+1 = xn * (3 - Q1*xn^2) / 2.
3438 // First step. 3437 // First step.
3439 __ vmulqs(Q2, Q0, Q0); // Q2 <- xn^2 3438 __ vmulqs(Q2, Q0, Q0); // Q2 <- xn^2
(...skipping 28 matching lines...) Expand all
3468 3467
3469 ASSEMBLER_TEST_RUN(SIMDSqrt2, test) { 3468 ASSEMBLER_TEST_RUN(SIMDSqrt2, test) {
3470 EXPECT(test != NULL); 3469 EXPECT(test != NULL);
3471 typedef float (*SIMDSqrt2)(); 3470 typedef float (*SIMDSqrt2)();
3472 float res = EXECUTE_TEST_CODE_FLOAT(SIMDSqrt2, test->entry()); 3471 float res = EXECUTE_TEST_CODE_FLOAT(SIMDSqrt2, test->entry());
3473 EXPECT_FLOAT_EQ(10.0, res, 0.0001f); 3472 EXPECT_FLOAT_EQ(10.0, res, 0.0001f);
3474 } 3473 }
3475 3474
3476 3475
3477 ASSEMBLER_TEST_GENERATE(SIMDDiv, assembler) { 3476 ASSEMBLER_TEST_GENERATE(SIMDDiv, assembler) {
3478 if (TargetCPUFeatures::neon_supported()) { 3477 if (CPUFeatures::neon_supported()) {
3479 __ LoadSImmediate(S4, 1.0); 3478 __ LoadSImmediate(S4, 1.0);
3480 __ LoadSImmediate(S5, 4.0); 3479 __ LoadSImmediate(S5, 4.0);
3481 __ LoadSImmediate(S6, 9.0); 3480 __ LoadSImmediate(S6, 9.0);
3482 __ LoadSImmediate(S7, 16.0); 3481 __ LoadSImmediate(S7, 16.0);
3483 3482
3484 __ LoadSImmediate(S12, 4.0); 3483 __ LoadSImmediate(S12, 4.0);
3485 __ LoadSImmediate(S13, 16.0); 3484 __ LoadSImmediate(S13, 16.0);
3486 __ LoadSImmediate(S14, 36.0); 3485 __ LoadSImmediate(S14, 36.0);
3487 __ LoadSImmediate(S15, 64.0); 3486 __ LoadSImmediate(S15, 64.0);
3488 3487
(...skipping 20 matching lines...) Expand all
3509 3508
3510 ASSEMBLER_TEST_RUN(SIMDDiv, test) { 3509 ASSEMBLER_TEST_RUN(SIMDDiv, test) {
3511 EXPECT(test != NULL); 3510 EXPECT(test != NULL);
3512 typedef float (*SIMDDiv)(); 3511 typedef float (*SIMDDiv)();
3513 float res = EXECUTE_TEST_CODE_FLOAT(SIMDDiv, test->entry()); 3512 float res = EXECUTE_TEST_CODE_FLOAT(SIMDDiv, test->entry());
3514 EXPECT_FLOAT_EQ(16.0, res, 0.0001f); 3513 EXPECT_FLOAT_EQ(16.0, res, 0.0001f);
3515 } 3514 }
3516 3515
3517 3516
3518 ASSEMBLER_TEST_GENERATE(Vabsqs, assembler) { 3517 ASSEMBLER_TEST_GENERATE(Vabsqs, assembler) {
3519 if (TargetCPUFeatures::neon_supported()) { 3518 if (CPUFeatures::neon_supported()) {
3520 __ LoadSImmediate(S4, 1.0); 3519 __ LoadSImmediate(S4, 1.0);
3521 __ LoadSImmediate(S5, -1.0); 3520 __ LoadSImmediate(S5, -1.0);
3522 __ LoadSImmediate(S6, 1.0); 3521 __ LoadSImmediate(S6, 1.0);
3523 __ LoadSImmediate(S7, -1.0); 3522 __ LoadSImmediate(S7, -1.0);
3524 3523
3525 __ vabsqs(Q0, Q1); 3524 __ vabsqs(Q0, Q1);
3526 3525
3527 __ vadds(S0, S0, S1); 3526 __ vadds(S0, S0, S1);
3528 __ vadds(S0, S0, S2); 3527 __ vadds(S0, S0, S2);
3529 __ vadds(S0, S0, S3); 3528 __ vadds(S0, S0, S3);
3530 3529
3531 __ bx(LR); 3530 __ bx(LR);
3532 } else { 3531 } else {
3533 __ LoadSImmediate(S0, 4.0); 3532 __ LoadSImmediate(S0, 4.0);
3534 __ bx(LR); 3533 __ bx(LR);
3535 } 3534 }
3536 } 3535 }
3537 3536
3538 3537
3539 ASSEMBLER_TEST_RUN(Vabsqs, test) { 3538 ASSEMBLER_TEST_RUN(Vabsqs, test) {
3540 EXPECT(test != NULL); 3539 EXPECT(test != NULL);
3541 typedef float (*Vabsqs)(); 3540 typedef float (*Vabsqs)();
3542 float res = EXECUTE_TEST_CODE_FLOAT(Vabsqs, test->entry()); 3541 float res = EXECUTE_TEST_CODE_FLOAT(Vabsqs, test->entry());
3543 EXPECT_FLOAT_EQ(4.0, res, 0.0001f); 3542 EXPECT_FLOAT_EQ(4.0, res, 0.0001f);
3544 } 3543 }
3545 3544
3546 3545
3547 ASSEMBLER_TEST_GENERATE(Vnegqs, assembler) { 3546 ASSEMBLER_TEST_GENERATE(Vnegqs, assembler) {
3548 if (TargetCPUFeatures::neon_supported()) { 3547 if (CPUFeatures::neon_supported()) {
3549 __ LoadSImmediate(S4, 1.0); 3548 __ LoadSImmediate(S4, 1.0);
3550 __ LoadSImmediate(S5, -2.0); 3549 __ LoadSImmediate(S5, -2.0);
3551 __ LoadSImmediate(S6, 1.0); 3550 __ LoadSImmediate(S6, 1.0);
3552 __ LoadSImmediate(S7, -2.0); 3551 __ LoadSImmediate(S7, -2.0);
3553 3552
3554 __ vnegqs(Q0, Q1); 3553 __ vnegqs(Q0, Q1);
3555 3554
3556 __ vadds(S0, S0, S1); 3555 __ vadds(S0, S0, S1);
3557 __ vadds(S0, S0, S2); 3556 __ vadds(S0, S0, S2);
3558 __ vadds(S0, S0, S3); 3557 __ vadds(S0, S0, S3);
(...skipping 25 matching lines...) Expand all
3584 __ StoreIntoObject(R2, 3583 __ StoreIntoObject(R2,
3585 FieldAddress(R2, GrowableObjectArray::data_offset()), 3584 FieldAddress(R2, GrowableObjectArray::data_offset()),
3586 R1); 3585 R1);
3587 __ PopList((1 << CTX) | (1 << LR)); 3586 __ PopList((1 << CTX) | (1 << LR));
3588 __ Ret(); 3587 __ Ret();
3589 } 3588 }
3590 3589
3591 } // namespace dart 3590 } // namespace dart
3592 3591
3593 #endif // defined TARGET_ARCH_ARM 3592 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698