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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 uint32_t vmov_from_scalar_s16, vmov_from_scalar_u16; | 1277 uint32_t vmov_from_scalar_s16, vmov_from_scalar_u16; |
1278 uint32_t vmov_from_scalar_32; | 1278 uint32_t vmov_from_scalar_32; |
1279 uint32_t vmov[4], vmvn[4]; | 1279 uint32_t vmov[4], vmvn[4]; |
1280 int32_t vcvt_s32_f32[4]; | 1280 int32_t vcvt_s32_f32[4]; |
1281 uint32_t vcvt_u32_f32[4]; | 1281 uint32_t vcvt_u32_f32[4]; |
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], vand[4], vorr[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]; | 1292 uint32_t vceq[4], vceqf[4], vcgef[4], vcgtf[4]; |
1293 uint32_t vcge_s8[4], vcge_u16[4], vcge_s32[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]; | 1294 uint32_t vcgt_s8[4], vcgt_u16[4], vcgt_s32[4]; |
1295 float vrecpe[4], vrecps[4], vrsqrte[4], vrsqrts[4]; | 1295 float vrecpe[4], vrecps[4], vrsqrte[4], vrsqrts[4]; |
1296 uint32_t vtst[4], vbsl[4]; | 1296 uint32_t vtst[4], vbsl[4]; |
1297 uint32_t vext[4]; | 1297 uint32_t vext[4]; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vneg_s8)))); | 1449 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vneg_s8)))); |
1450 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1450 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1451 __ vneg(Neon16, q1, q0); | 1451 __ vneg(Neon16, q1, q0); |
1452 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vneg_s16)))); | 1452 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vneg_s16)))); |
1453 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1453 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1454 __ vneg(Neon32, q1, q0); | 1454 __ vneg(Neon32, q1, q0); |
1455 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vneg_s32)))); | 1455 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vneg_s32)))); |
1456 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1456 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1457 | 1457 |
1458 // veor. | 1458 // veor. |
1459 __ mov(r4, Operand(0x00aa)); | 1459 __ mov(r4, Operand(0xaa)); |
1460 __ vdup(Neon16, q0, r4); | 1460 __ vdup(Neon16, q0, r4); |
1461 __ mov(r4, Operand(0x0055)); | 1461 __ mov(r4, Operand(0x55)); |
1462 __ vdup(Neon16, q1, r4); | 1462 __ vdup(Neon16, q1, r4); |
1463 __ veor(q1, q1, q0); | 1463 __ veor(q1, q1, q0); |
1464 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, veor)))); | 1464 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, veor)))); |
1465 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1465 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
| 1466 // vand. |
| 1467 __ mov(r4, Operand(0xff)); |
| 1468 __ vdup(Neon16, q0, r4); |
| 1469 __ mov(r4, Operand(0xfe)); |
| 1470 __ vdup(Neon16, q1, r4); |
| 1471 __ vand(q1, q1, q0); |
| 1472 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vand)))); |
| 1473 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
| 1474 // vorr. |
| 1475 __ mov(r4, Operand(0xaa)); |
| 1476 __ vdup(Neon16, q0, r4); |
| 1477 __ mov(r4, Operand(0x55)); |
| 1478 __ vdup(Neon16, q1, r4); |
| 1479 __ vorr(q1, q1, q0); |
| 1480 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vorr)))); |
| 1481 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1466 | 1482 |
1467 // vadd (float). | 1483 // vadd (float). |
1468 __ vmov(s4, 1.0); | 1484 __ vmov(s4, 1.0); |
1469 __ vdup(q0, s4); | 1485 __ vdup(q0, s4); |
1470 __ vdup(q1, s4); | 1486 __ vdup(q1, s4); |
1471 __ vadd(q1, q1, q0); | 1487 __ vadd(q1, q1, q0); |
1472 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vaddf)))); | 1488 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vaddf)))); |
1473 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); | 1489 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); |
1474 // vsub (float). | 1490 // vsub (float). |
1475 __ vmov(s4, 2.0); | 1491 __ vmov(s4, 2.0); |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 CHECK_EQ_32X4(vnegf, 1.0, 0.0, -0.0, -1.0); | 1828 CHECK_EQ_32X4(vnegf, 1.0, 0.0, -0.0, -1.0); |
1813 // src: [0x7f7f7f7f, 0x01010101, 0xffffffff, 0x80808080] | 1829 // src: [0x7f7f7f7f, 0x01010101, 0xffffffff, 0x80808080] |
1814 CHECK_EQ_32X4(vabs_s8, 0x7f7f7f7fu, 0x01010101u, 0x01010101u, 0x80808080u); | 1830 CHECK_EQ_32X4(vabs_s8, 0x7f7f7f7fu, 0x01010101u, 0x01010101u, 0x80808080u); |
1815 CHECK_EQ_32X4(vabs_s16, 0x7f7f7f7fu, 0x01010101u, 0x00010001u, 0x7f807f80u); | 1831 CHECK_EQ_32X4(vabs_s16, 0x7f7f7f7fu, 0x01010101u, 0x00010001u, 0x7f807f80u); |
1816 CHECK_EQ_32X4(vabs_s32, 0x7f7f7f7fu, 0x01010101u, 0x00000001u, 0x7f7f7f80u); | 1832 CHECK_EQ_32X4(vabs_s32, 0x7f7f7f7fu, 0x01010101u, 0x00000001u, 0x7f7f7f80u); |
1817 CHECK_EQ_32X4(vneg_s8, 0x81818181u, 0xffffffffu, 0x01010101u, 0x80808080u); | 1833 CHECK_EQ_32X4(vneg_s8, 0x81818181u, 0xffffffffu, 0x01010101u, 0x80808080u); |
1818 CHECK_EQ_32X4(vneg_s16, 0x80818081u, 0xfefffeffu, 0x00010001u, 0x7f807f80u); | 1834 CHECK_EQ_32X4(vneg_s16, 0x80818081u, 0xfefffeffu, 0x00010001u, 0x7f807f80u); |
1819 CHECK_EQ_32X4(vneg_s32, 0x80808081u, 0xfefefeffu, 0x00000001u, 0x7f7f7f80u); | 1835 CHECK_EQ_32X4(vneg_s32, 0x80808081u, 0xfefefeffu, 0x00000001u, 0x7f7f7f80u); |
1820 | 1836 |
1821 CHECK_EQ_SPLAT(veor, 0x00ff00ffu); | 1837 CHECK_EQ_SPLAT(veor, 0x00ff00ffu); |
| 1838 CHECK_EQ_SPLAT(vand, 0x00fe00feu); |
| 1839 CHECK_EQ_SPLAT(vorr, 0x00ff00ffu); |
1822 CHECK_EQ_SPLAT(vaddf, 2.0); | 1840 CHECK_EQ_SPLAT(vaddf, 2.0); |
1823 CHECK_EQ_SPLAT(vsubf, -1.0); | 1841 CHECK_EQ_SPLAT(vsubf, -1.0); |
1824 CHECK_EQ_SPLAT(vmulf, 4.0); | 1842 CHECK_EQ_SPLAT(vmulf, 4.0); |
1825 CHECK_EQ_SPLAT(vrecpe, 0.5f); // 1 / 2 | 1843 CHECK_EQ_SPLAT(vrecpe, 0.5f); // 1 / 2 |
1826 CHECK_EQ_SPLAT(vrecps, -1.0f); // 2 - (2 * 1.5) | 1844 CHECK_EQ_SPLAT(vrecps, -1.0f); // 2 - (2 * 1.5) |
1827 CHECK_EQ_SPLAT(vrsqrte, 0.5f); // 1 / sqrt(4) | 1845 CHECK_EQ_SPLAT(vrsqrte, 0.5f); // 1 / sqrt(4) |
1828 CHECK_EQ_SPLAT(vrsqrts, -1.0f); // (3 - (2 * 2.5)) / 2 | 1846 CHECK_EQ_SPLAT(vrsqrts, -1.0f); // (3 - (2 * 2.5)) / 2 |
1829 CHECK_EQ_SPLAT(vceqf, 0xffffffffu); | 1847 CHECK_EQ_SPLAT(vceqf, 0xffffffffu); |
1830 // [0] >= [-1, 1, -0, 0] | 1848 // [0] >= [-1, 1, -0, 0] |
1831 CHECK_EQ_32X4(vcgef, 0u, 0xffffffffu, 0xffffffffu, 0xffffffffu); | 1849 CHECK_EQ_32X4(vcgef, 0u, 0xffffffffu, 0xffffffffu, 0xffffffffu); |
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3551 HandleScope scope(isolate); | 3569 HandleScope scope(isolate); |
3552 | 3570 |
3553 Assembler assm(isolate, NULL, 0); | 3571 Assembler assm(isolate, NULL, 0); |
3554 __ mov(r0, Operand(isolate->factory()->infinity_value())); | 3572 __ mov(r0, Operand(isolate->factory()->infinity_value())); |
3555 __ BlockConstPoolFor(1019); | 3573 __ BlockConstPoolFor(1019); |
3556 for (int i = 0; i < 1019; ++i) __ nop(); | 3574 for (int i = 0; i < 1019; ++i) __ nop(); |
3557 __ vldr(d0, MemOperand(r0, 0)); | 3575 __ vldr(d0, MemOperand(r0, 0)); |
3558 } | 3576 } |
3559 | 3577 |
3560 #undef __ | 3578 #undef __ |
OLD | NEW |