OLD | NEW |
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 Loading... |
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 vtst[4], vceq[4], vceqf[4], vbsl[4]; | 1292 uint32_t vtst[4], vceq[4], vceqf[4], vcgef[4], vcgtf[4], vbsl[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]; |
1293 uint32_t vext[4]; | 1295 uint32_t vext[4]; |
1294 uint32_t vzip8a[4], vzip8b[4], vzip16a[4], vzip16b[4], vzip32a[4], | 1296 uint32_t vzip8a[4], vzip8b[4], vzip16a[4], vzip16b[4], vzip32a[4], |
1295 vzip32b[4]; | 1297 vzip32b[4]; |
1296 uint32_t vrev64_32[4], vrev64_16[4], vrev64_8[4]; | 1298 uint32_t vrev64_32[4], vrev64_16[4], vrev64_8[4]; |
1297 uint32_t vrev32_16[4], vrev32_8[4]; | 1299 uint32_t vrev32_16[4], vrev32_8[4]; |
1298 uint32_t vrev16_8[4]; | 1300 uint32_t vrev16_8[4]; |
1299 uint32_t vtbl[2], vtbx[2]; | 1301 uint32_t vtbl[2], vtbx[2]; |
1300 } T; | 1302 } T; |
1301 T t; | 1303 T t; |
1302 | 1304 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1482 __ vmul(q1, q1, q0); | 1484 __ vmul(q1, q1, q0); |
1483 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmulf)))); | 1485 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmulf)))); |
1484 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1486 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1485 // vceq (float). | 1487 // vceq (float). |
1486 __ vmov(s4, 1.0); | 1488 __ vmov(s4, 1.0); |
1487 __ vdup(q0, s4); | 1489 __ vdup(q0, s4); |
1488 __ vdup(q1, s4); | 1490 __ vdup(q1, s4); |
1489 __ vceq(q1, q1, q0); | 1491 __ vceq(q1, q1, q0); |
1490 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceqf)))); | 1492 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceqf)))); |
1491 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1493 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
| 1494 // vcge (float). |
| 1495 __ vmov(s0, 1.0); |
| 1496 __ vmov(s1, -1.0); |
| 1497 __ vmov(s2, -0.0); |
| 1498 __ vmov(s3, 0.0); |
| 1499 __ vdup(q1, s3); |
| 1500 __ vcge(q2, q1, q0); |
| 1501 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgef)))); |
| 1502 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4)); |
| 1503 __ vcgt(q2, q1, q0); |
| 1504 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgtf)))); |
| 1505 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4)); |
1492 | 1506 |
1493 // vadd (integer). | 1507 // vadd (integer). |
1494 __ mov(r4, Operand(0x81)); | 1508 __ mov(r4, Operand(0x81)); |
1495 __ vdup(Neon8, q0, r4); | 1509 __ vdup(Neon8, q0, r4); |
1496 __ mov(r4, Operand(0x82)); | 1510 __ mov(r4, Operand(0x82)); |
1497 __ vdup(Neon8, q1, r4); | 1511 __ vdup(Neon8, q1, r4); |
1498 __ vadd(Neon8, q1, q1, q0); | 1512 __ vadd(Neon8, q1, q1, q0); |
1499 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vadd8)))); | 1513 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vadd8)))); |
1500 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1514 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1501 __ mov(r4, Operand(0x8001)); | 1515 __ mov(r4, Operand(0x8001)); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1563 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1550 __ mov(r4, Operand(0x00000002)); | 1564 __ mov(r4, Operand(0x00000002)); |
1551 __ vdup(Neon32, q0, r4); | 1565 __ vdup(Neon32, q0, r4); |
1552 __ vmul(Neon32, q1, q0, q0); | 1566 __ vmul(Neon32, q1, q0, q0); |
1553 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmul32)))); | 1567 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmul32)))); |
1554 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1568 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1555 | 1569 |
1556 // vceq. | 1570 // vceq. |
1557 __ mov(r4, Operand(0x03)); | 1571 __ mov(r4, Operand(0x03)); |
1558 __ vdup(Neon8, q0, r4); | 1572 __ vdup(Neon8, q0, r4); |
1559 __ mov(r4, Operand(0x03)); | |
1560 __ vdup(Neon16, q1, r4); | 1573 __ vdup(Neon16, q1, r4); |
1561 __ vceq(Neon8, q1, q0, q1); | 1574 __ vceq(Neon8, q1, q0, q1); |
1562 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceq)))); | 1575 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceq)))); |
1563 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1576 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1564 | 1577 |
| 1578 // vcge/vcgt. |
| 1579 __ mov(r4, Operand(0x03)); |
| 1580 __ vdup(Neon16, q0, r4); |
| 1581 __ vdup(Neon8, q1, r4); |
| 1582 __ vcge(NeonS8, q2, q0, q1); |
| 1583 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcge_s8)))); |
| 1584 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4)); |
| 1585 __ vcgt(NeonS8, q2, q0, q1); |
| 1586 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgt_s8)))); |
| 1587 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4)); |
| 1588 __ mov(r4, Operand(0xff)); |
| 1589 __ vdup(Neon16, q0, r4); |
| 1590 __ vdup(Neon8, q1, r4); |
| 1591 __ vcge(NeonU16, q2, q0, q1); |
| 1592 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcge_u16)))); |
| 1593 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4)); |
| 1594 __ vcgt(NeonU16, q2, q0, q1); |
| 1595 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgt_u16)))); |
| 1596 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4)); |
| 1597 __ mov(r4, Operand(0xff)); |
| 1598 __ vdup(Neon32, q0, r4); |
| 1599 __ vdup(Neon8, q1, r4); |
| 1600 __ vcge(NeonS32, q2, q0, q1); |
| 1601 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcge_s32)))); |
| 1602 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4)); |
| 1603 __ vcgt(NeonS32, q2, q0, q1); |
| 1604 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgt_s32)))); |
| 1605 __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4)); |
| 1606 |
1565 // vtst. | 1607 // vtst. |
1566 __ mov(r4, Operand(0x03)); | 1608 __ mov(r4, Operand(0x03)); |
1567 __ vdup(Neon8, q0, r4); | 1609 __ vdup(Neon8, q0, r4); |
1568 __ mov(r4, Operand(0x02)); | 1610 __ mov(r4, Operand(0x02)); |
1569 __ vdup(Neon16, q1, r4); | 1611 __ vdup(Neon16, q1, r4); |
1570 __ vtst(Neon8, q1, q0, q1); | 1612 __ vtst(Neon8, q1, q0, q1); |
1571 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vtst)))); | 1613 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vtst)))); |
1572 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1614 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1573 | 1615 |
1574 // vbsl. | 1616 // vbsl. |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 CHECK_EQ_32X4(vabs_s32, 0x7f7f7f7fu, 0x01010101u, 0x00000001u, 0x7f7f7f80u); | 1786 CHECK_EQ_32X4(vabs_s32, 0x7f7f7f7fu, 0x01010101u, 0x00000001u, 0x7f7f7f80u); |
1745 CHECK_EQ_32X4(vneg_s8, 0x81818181u, 0xffffffffu, 0x01010101u, 0x80808080u); | 1787 CHECK_EQ_32X4(vneg_s8, 0x81818181u, 0xffffffffu, 0x01010101u, 0x80808080u); |
1746 CHECK_EQ_32X4(vneg_s16, 0x80818081u, 0xfefffeffu, 0x00010001u, 0x7f807f80u); | 1788 CHECK_EQ_32X4(vneg_s16, 0x80818081u, 0xfefffeffu, 0x00010001u, 0x7f807f80u); |
1747 CHECK_EQ_32X4(vneg_s32, 0x80808081u, 0xfefefeffu, 0x00000001u, 0x7f7f7f80u); | 1789 CHECK_EQ_32X4(vneg_s32, 0x80808081u, 0xfefefeffu, 0x00000001u, 0x7f7f7f80u); |
1748 | 1790 |
1749 CHECK_EQ_SPLAT(veor, 0x00ff00ffu); | 1791 CHECK_EQ_SPLAT(veor, 0x00ff00ffu); |
1750 CHECK_EQ_SPLAT(vaddf, 2.0); | 1792 CHECK_EQ_SPLAT(vaddf, 2.0); |
1751 CHECK_EQ_SPLAT(vsubf, -1.0); | 1793 CHECK_EQ_SPLAT(vsubf, -1.0); |
1752 CHECK_EQ_SPLAT(vmulf, 4.0); | 1794 CHECK_EQ_SPLAT(vmulf, 4.0); |
1753 CHECK_EQ_SPLAT(vceqf, 0xffffffffu); | 1795 CHECK_EQ_SPLAT(vceqf, 0xffffffffu); |
| 1796 // [0] >= [-1, 1, -0, 0] |
| 1797 CHECK_EQ_32X4(vcgef, 0u, 0xffffffffu, 0xffffffffu, 0xffffffffu); |
| 1798 CHECK_EQ_32X4(vcgtf, 0u, 0xffffffffu, 0u, 0u); |
1754 CHECK_EQ_SPLAT(vadd8, 0x03030303u); | 1799 CHECK_EQ_SPLAT(vadd8, 0x03030303u); |
1755 CHECK_EQ_SPLAT(vadd16, 0x00030003u); | 1800 CHECK_EQ_SPLAT(vadd16, 0x00030003u); |
1756 CHECK_EQ_SPLAT(vadd32, 0x00000003u); | 1801 CHECK_EQ_SPLAT(vadd32, 0x00000003u); |
1757 CHECK_EQ_SPLAT(vsub8, 0xfefefefeu); | 1802 CHECK_EQ_SPLAT(vsub8, 0xfefefefeu); |
1758 CHECK_EQ_SPLAT(vsub16, 0xfffefffeu); | 1803 CHECK_EQ_SPLAT(vsub16, 0xfffefffeu); |
1759 CHECK_EQ_SPLAT(vsub32, 0xfffffffeu); | 1804 CHECK_EQ_SPLAT(vsub32, 0xfffffffeu); |
1760 CHECK_EQ_SPLAT(vmul8, 0x04040404u); | 1805 CHECK_EQ_SPLAT(vmul8, 0x04040404u); |
1761 CHECK_EQ_SPLAT(vmul16, 0x00040004u); | 1806 CHECK_EQ_SPLAT(vmul16, 0x00040004u); |
1762 CHECK_EQ_SPLAT(vmul32, 0x00000004u); | 1807 CHECK_EQ_SPLAT(vmul32, 0x00000004u); |
1763 CHECK_EQ_SPLAT(vceq, 0x00ff00ffu); | 1808 CHECK_EQ_SPLAT(vceq, 0x00ff00ffu); |
| 1809 // [0, 3, 0, 3, ...] >= [3, 3, 3, 3, ...] |
| 1810 CHECK_EQ_SPLAT(vcge_s8, 0x00ff00ffu); |
| 1811 CHECK_EQ_SPLAT(vcgt_s8, 0u); |
| 1812 // [0x00ff, 0x00ff, ...] >= [0xffff, 0xffff, ...] |
| 1813 CHECK_EQ_SPLAT(vcge_u16, 0u); |
| 1814 CHECK_EQ_SPLAT(vcgt_u16, 0u); |
| 1815 // [0x000000ff, 0x000000ff, ...] >= [0xffffffff, 0xffffffff, ...] |
| 1816 CHECK_EQ_SPLAT(vcge_s32, 0xffffffffu); |
| 1817 CHECK_EQ_SPLAT(vcgt_s32, 0xffffffffu); |
1764 CHECK_EQ_SPLAT(vtst, 0x00ff00ffu); | 1818 CHECK_EQ_SPLAT(vtst, 0x00ff00ffu); |
1765 CHECK_EQ_SPLAT(vbsl, 0x02010201u); | 1819 CHECK_EQ_SPLAT(vbsl, 0x02010201u); |
1766 | 1820 |
1767 CHECK_EQ_32X4(vext, 0x06050403u, 0x0a090807u, 0x0e0d0c0bu, 0x0201000fu); | 1821 CHECK_EQ_32X4(vext, 0x06050403u, 0x0a090807u, 0x0e0d0c0bu, 0x0201000fu); |
1768 | 1822 |
1769 CHECK_EQ_32X4(vzip8a, 0x01010000u, 0x03030202u, 0x05050404u, 0x07070606u); | 1823 CHECK_EQ_32X4(vzip8a, 0x01010000u, 0x03030202u, 0x05050404u, 0x07070606u); |
1770 CHECK_EQ_32X4(vzip8b, 0x09090808u, 0x0b0b0a0au, 0x0d0d0c0cu, 0x0f0f0e0eu); | 1824 CHECK_EQ_32X4(vzip8b, 0x09090808u, 0x0b0b0a0au, 0x0d0d0c0cu, 0x0f0f0e0eu); |
1771 CHECK_EQ_32X4(vzip16a, 0x01000100u, 0x03020302u, 0x05040504u, 0x07060706u); | 1825 CHECK_EQ_32X4(vzip16a, 0x01000100u, 0x03020302u, 0x05040504u, 0x07060706u); |
1772 CHECK_EQ_32X4(vzip16b, 0x09080908u, 0x0b0a0b0au, 0x0d0c0d0cu, 0x0f0e0f0eu); | 1826 CHECK_EQ_32X4(vzip16b, 0x09080908u, 0x0b0a0b0au, 0x0d0c0d0cu, 0x0f0e0f0eu); |
1773 CHECK_EQ_32X4(vzip32a, 0x03020100u, 0x03020100u, 0x07060504u, 0x07060504u); | 1827 CHECK_EQ_32X4(vzip32a, 0x03020100u, 0x03020100u, 0x07060504u, 0x07060504u); |
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3463 HandleScope scope(isolate); | 3517 HandleScope scope(isolate); |
3464 | 3518 |
3465 Assembler assm(isolate, NULL, 0); | 3519 Assembler assm(isolate, NULL, 0); |
3466 __ mov(r0, Operand(isolate->factory()->infinity_value())); | 3520 __ mov(r0, Operand(isolate->factory()->infinity_value())); |
3467 __ BlockConstPoolFor(1019); | 3521 __ BlockConstPoolFor(1019); |
3468 for (int i = 0; i < 1019; ++i) __ nop(); | 3522 for (int i = 0; i < 1019; ++i) __ nop(); |
3469 __ vldr(d0, MemOperand(r0, 0)); | 3523 __ vldr(d0, MemOperand(r0, 0)); |
3470 } | 3524 } |
3471 | 3525 |
3472 #undef __ | 3526 #undef __ |
OLD | NEW |