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

Side by Side Diff: test/cctest/test-assembler-arm.cc

Issue 2602293002: [ARM] Add vcge, vcgt instructions to assembler. (Closed)
Patch Set: Rebase. Created 3 years, 11 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
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | test/cctest/test-disasm-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 float vcvt_f32_s32[4], vcvt_f32_u32[4]; 1282 float vcvt_f32_s32[4], vcvt_f32_u32[4];
1283 uint32_t vdup8[4], vdup16[4], vdup32[4]; 1283 uint32_t vdup8[4], vdup16[4], vdup32[4];
1284 float vabsf[4], vnegf[4]; 1284 float vabsf[4], vnegf[4];
1285 uint32_t vabs_s8[4], vabs_s16[4], vabs_s32[4]; 1285 uint32_t vabs_s8[4], vabs_s16[4], vabs_s32[4];
1286 uint32_t vneg_s8[4], vneg_s16[4], vneg_s32[4]; 1286 uint32_t vneg_s8[4], vneg_s16[4], vneg_s32[4];
1287 uint32_t veor[4]; 1287 uint32_t veor[4];
1288 float vdupf[4], vaddf[4], vsubf[4], vmulf[4]; 1288 float vdupf[4], vaddf[4], vsubf[4], vmulf[4];
1289 uint32_t vadd8[4], vadd16[4], vadd32[4]; 1289 uint32_t vadd8[4], vadd16[4], vadd32[4];
1290 uint32_t vsub8[4], vsub16[4], vsub32[4]; 1290 uint32_t vsub8[4], vsub16[4], vsub32[4];
1291 uint32_t vmul8[4], vmul16[4], vmul32[4]; 1291 uint32_t vmul8[4], vmul16[4], vmul32[4];
1292 uint32_t vceq[4], vceqf[4], vcgef[4], vcgtf[4];
1293 uint32_t vcge_s8[4], vcge_u16[4], vcge_s32[4];
1294 uint32_t vcgt_s8[4], vcgt_u16[4], vcgt_s32[4];
1292 float vrecpe[4], vrecps[4], vrsqrte[4], vrsqrts[4]; 1295 float vrecpe[4], vrecps[4], vrsqrte[4], vrsqrts[4];
1293 uint32_t vtst[4], vceq[4], vceqf[4], vbsl[4]; 1296 uint32_t vtst[4], vbsl[4];
1294 uint32_t vext[4]; 1297 uint32_t vext[4];
1295 uint32_t vzip8a[4], vzip8b[4], vzip16a[4], vzip16b[4], vzip32a[4], 1298 uint32_t vzip8a[4], vzip8b[4], vzip16a[4], vzip16b[4], vzip32a[4],
1296 vzip32b[4]; 1299 vzip32b[4];
1297 uint32_t vrev64_32[4], vrev64_16[4], vrev64_8[4]; 1300 uint32_t vrev64_32[4], vrev64_16[4], vrev64_8[4];
1298 uint32_t vrev32_16[4], vrev32_8[4]; 1301 uint32_t vrev32_16[4], vrev32_8[4];
1299 uint32_t vrev16_8[4]; 1302 uint32_t vrev16_8[4];
1300 uint32_t vtbl[2], vtbx[2]; 1303 uint32_t vtbl[2], vtbx[2];
1301 } T; 1304 } T;
1302 T t; 1305 T t;
1303 1306
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 __ vrsqrts(q1, q0, q1); 1514 __ vrsqrts(q1, q0, q1);
1512 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrsqrts)))); 1515 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrsqrts))));
1513 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1516 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1514 // vceq (float). 1517 // vceq (float).
1515 __ vmov(s4, 1.0); 1518 __ vmov(s4, 1.0);
1516 __ vdup(q0, s4); 1519 __ vdup(q0, s4);
1517 __ vdup(q1, s4); 1520 __ vdup(q1, s4);
1518 __ vceq(q1, q1, q0); 1521 __ vceq(q1, q1, q0);
1519 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceqf)))); 1522 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceqf))));
1520 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1523 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1524 // vcge (float).
1525 __ vmov(s0, 1.0);
1526 __ vmov(s1, -1.0);
1527 __ vmov(s2, -0.0);
1528 __ vmov(s3, 0.0);
1529 __ vdup(q1, s3);
1530 __ vcge(q2, q1, q0);
1531 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgef))));
1532 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
1533 __ vcgt(q2, q1, q0);
1534 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgtf))));
1535 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
1521 1536
1522 // vadd (integer). 1537 // vadd (integer).
1523 __ mov(r4, Operand(0x81)); 1538 __ mov(r4, Operand(0x81));
1524 __ vdup(Neon8, q0, r4); 1539 __ vdup(Neon8, q0, r4);
1525 __ mov(r4, Operand(0x82)); 1540 __ mov(r4, Operand(0x82));
1526 __ vdup(Neon8, q1, r4); 1541 __ vdup(Neon8, q1, r4);
1527 __ vadd(Neon8, q1, q1, q0); 1542 __ vadd(Neon8, q1, q1, q0);
1528 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vadd8)))); 1543 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vadd8))));
1529 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1544 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1530 __ mov(r4, Operand(0x8001)); 1545 __ mov(r4, Operand(0x8001));
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1593 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1579 __ mov(r4, Operand(0x00000002)); 1594 __ mov(r4, Operand(0x00000002));
1580 __ vdup(Neon32, q0, r4); 1595 __ vdup(Neon32, q0, r4);
1581 __ vmul(Neon32, q1, q0, q0); 1596 __ vmul(Neon32, q1, q0, q0);
1582 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmul32)))); 1597 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmul32))));
1583 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1598 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1584 1599
1585 // vceq. 1600 // vceq.
1586 __ mov(r4, Operand(0x03)); 1601 __ mov(r4, Operand(0x03));
1587 __ vdup(Neon8, q0, r4); 1602 __ vdup(Neon8, q0, r4);
1588 __ mov(r4, Operand(0x03));
1589 __ vdup(Neon16, q1, r4); 1603 __ vdup(Neon16, q1, r4);
1590 __ vceq(Neon8, q1, q0, q1); 1604 __ vceq(Neon8, q1, q0, q1);
1591 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceq)))); 1605 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceq))));
1592 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1606 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1593 1607
1608 // vcge/vcgt.
1609 __ mov(r4, Operand(0x03));
1610 __ vdup(Neon16, q0, r4);
1611 __ vdup(Neon8, q1, r4);
1612 __ vcge(NeonS8, q2, q0, q1);
1613 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcge_s8))));
1614 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
1615 __ vcgt(NeonS8, q2, q0, q1);
1616 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgt_s8))));
1617 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
1618 __ mov(r4, Operand(0xff));
1619 __ vdup(Neon16, q0, r4);
1620 __ vdup(Neon8, q1, r4);
1621 __ vcge(NeonU16, q2, q0, q1);
1622 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcge_u16))));
1623 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
1624 __ vcgt(NeonU16, q2, q0, q1);
1625 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgt_u16))));
1626 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
1627 __ mov(r4, Operand(0xff));
1628 __ vdup(Neon32, q0, r4);
1629 __ vdup(Neon8, q1, r4);
1630 __ vcge(NeonS32, q2, q0, q1);
1631 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcge_s32))));
1632 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
1633 __ vcgt(NeonS32, q2, q0, q1);
1634 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgt_s32))));
1635 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
1636
1594 // vtst. 1637 // vtst.
1595 __ mov(r4, Operand(0x03)); 1638 __ mov(r4, Operand(0x03));
1596 __ vdup(Neon8, q0, r4); 1639 __ vdup(Neon8, q0, r4);
1597 __ mov(r4, Operand(0x02)); 1640 __ mov(r4, Operand(0x02));
1598 __ vdup(Neon16, q1, r4); 1641 __ vdup(Neon16, q1, r4);
1599 __ vtst(Neon8, q1, q0, q1); 1642 __ vtst(Neon8, q1, q0, q1);
1600 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vtst)))); 1643 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vtst))));
1601 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1644 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1602 1645
1603 // vbsl. 1646 // vbsl.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 1820
1778 CHECK_EQ_SPLAT(veor, 0x00ff00ffu); 1821 CHECK_EQ_SPLAT(veor, 0x00ff00ffu);
1779 CHECK_EQ_SPLAT(vaddf, 2.0); 1822 CHECK_EQ_SPLAT(vaddf, 2.0);
1780 CHECK_EQ_SPLAT(vsubf, -1.0); 1823 CHECK_EQ_SPLAT(vsubf, -1.0);
1781 CHECK_EQ_SPLAT(vmulf, 4.0); 1824 CHECK_EQ_SPLAT(vmulf, 4.0);
1782 CHECK_EQ_SPLAT(vrecpe, 0.5f); // 1 / 2 1825 CHECK_EQ_SPLAT(vrecpe, 0.5f); // 1 / 2
1783 CHECK_EQ_SPLAT(vrecps, -1.0f); // 2 - (2 * 1.5) 1826 CHECK_EQ_SPLAT(vrecps, -1.0f); // 2 - (2 * 1.5)
1784 CHECK_EQ_SPLAT(vrsqrte, 0.5f); // 1 / sqrt(4) 1827 CHECK_EQ_SPLAT(vrsqrte, 0.5f); // 1 / sqrt(4)
1785 CHECK_EQ_SPLAT(vrsqrts, -1.0f); // (3 - (2 * 2.5)) / 2 1828 CHECK_EQ_SPLAT(vrsqrts, -1.0f); // (3 - (2 * 2.5)) / 2
1786 CHECK_EQ_SPLAT(vceqf, 0xffffffffu); 1829 CHECK_EQ_SPLAT(vceqf, 0xffffffffu);
1830 // [0] >= [-1, 1, -0, 0]
1831 CHECK_EQ_32X4(vcgef, 0u, 0xffffffffu, 0xffffffffu, 0xffffffffu);
1832 CHECK_EQ_32X4(vcgtf, 0u, 0xffffffffu, 0u, 0u);
1787 CHECK_EQ_SPLAT(vadd8, 0x03030303u); 1833 CHECK_EQ_SPLAT(vadd8, 0x03030303u);
1788 CHECK_EQ_SPLAT(vadd16, 0x00030003u); 1834 CHECK_EQ_SPLAT(vadd16, 0x00030003u);
1789 CHECK_EQ_SPLAT(vadd32, 0x00000003u); 1835 CHECK_EQ_SPLAT(vadd32, 0x00000003u);
1790 CHECK_EQ_SPLAT(vsub8, 0xfefefefeu); 1836 CHECK_EQ_SPLAT(vsub8, 0xfefefefeu);
1791 CHECK_EQ_SPLAT(vsub16, 0xfffefffeu); 1837 CHECK_EQ_SPLAT(vsub16, 0xfffefffeu);
1792 CHECK_EQ_SPLAT(vsub32, 0xfffffffeu); 1838 CHECK_EQ_SPLAT(vsub32, 0xfffffffeu);
1793 CHECK_EQ_SPLAT(vmul8, 0x04040404u); 1839 CHECK_EQ_SPLAT(vmul8, 0x04040404u);
1794 CHECK_EQ_SPLAT(vmul16, 0x00040004u); 1840 CHECK_EQ_SPLAT(vmul16, 0x00040004u);
1795 CHECK_EQ_SPLAT(vmul32, 0x00000004u); 1841 CHECK_EQ_SPLAT(vmul32, 0x00000004u);
1796 CHECK_EQ_SPLAT(vceq, 0x00ff00ffu); 1842 CHECK_EQ_SPLAT(vceq, 0x00ff00ffu);
1843 // [0, 3, 0, 3, ...] >= [3, 3, 3, 3, ...]
1844 CHECK_EQ_SPLAT(vcge_s8, 0x00ff00ffu);
1845 CHECK_EQ_SPLAT(vcgt_s8, 0u);
1846 // [0x00ff, 0x00ff, ...] >= [0xffff, 0xffff, ...]
1847 CHECK_EQ_SPLAT(vcge_u16, 0u);
1848 CHECK_EQ_SPLAT(vcgt_u16, 0u);
1849 // [0x000000ff, 0x000000ff, ...] >= [0xffffffff, 0xffffffff, ...]
1850 CHECK_EQ_SPLAT(vcge_s32, 0xffffffffu);
1851 CHECK_EQ_SPLAT(vcgt_s32, 0xffffffffu);
1797 CHECK_EQ_SPLAT(vtst, 0x00ff00ffu); 1852 CHECK_EQ_SPLAT(vtst, 0x00ff00ffu);
1798 CHECK_EQ_SPLAT(vbsl, 0x02010201u); 1853 CHECK_EQ_SPLAT(vbsl, 0x02010201u);
1799 1854
1800 CHECK_EQ_32X4(vext, 0x06050403u, 0x0a090807u, 0x0e0d0c0bu, 0x0201000fu); 1855 CHECK_EQ_32X4(vext, 0x06050403u, 0x0a090807u, 0x0e0d0c0bu, 0x0201000fu);
1801 1856
1802 CHECK_EQ_32X4(vzip8a, 0x01010000u, 0x03030202u, 0x05050404u, 0x07070606u); 1857 CHECK_EQ_32X4(vzip8a, 0x01010000u, 0x03030202u, 0x05050404u, 0x07070606u);
1803 CHECK_EQ_32X4(vzip8b, 0x09090808u, 0x0b0b0a0au, 0x0d0d0c0cu, 0x0f0f0e0eu); 1858 CHECK_EQ_32X4(vzip8b, 0x09090808u, 0x0b0b0a0au, 0x0d0d0c0cu, 0x0f0f0e0eu);
1804 CHECK_EQ_32X4(vzip16a, 0x01000100u, 0x03020302u, 0x05040504u, 0x07060706u); 1859 CHECK_EQ_32X4(vzip16a, 0x01000100u, 0x03020302u, 0x05040504u, 0x07060706u);
1805 CHECK_EQ_32X4(vzip16b, 0x09080908u, 0x0b0a0b0au, 0x0d0c0d0cu, 0x0f0e0f0eu); 1860 CHECK_EQ_32X4(vzip16b, 0x09080908u, 0x0b0a0b0au, 0x0d0c0d0cu, 0x0f0e0f0eu);
1806 CHECK_EQ_32X4(vzip32a, 0x03020100u, 0x03020100u, 0x07060504u, 0x07060504u); 1861 CHECK_EQ_32X4(vzip32a, 0x03020100u, 0x03020100u, 0x07060504u, 0x07060504u);
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after
3496 HandleScope scope(isolate); 3551 HandleScope scope(isolate);
3497 3552
3498 Assembler assm(isolate, NULL, 0); 3553 Assembler assm(isolate, NULL, 0);
3499 __ mov(r0, Operand(isolate->factory()->infinity_value())); 3554 __ mov(r0, Operand(isolate->factory()->infinity_value()));
3500 __ BlockConstPoolFor(1019); 3555 __ BlockConstPoolFor(1019);
3501 for (int i = 0; i < 1019; ++i) __ nop(); 3556 for (int i = 0; i < 1019; ++i) __ nop();
3502 __ vldr(d0, MemOperand(r0, 0)); 3557 __ vldr(d0, MemOperand(r0, 0));
3503 } 3558 }
3504 3559
3505 #undef __ 3560 #undef __
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | test/cctest/test-disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698