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

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

Issue 2600153002: [ARM] Add vrecpe, vrecps, vrsqrte, vrsqrts instructions to assembler. (Closed)
Patch Set: Add a comment for vrecpe, vrsqrte. 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 float vrecpe[4], vrecps[4], vrsqrte[4], vrsqrts[4];
1292 uint32_t vtst[4], vceq[4], vceqf[4], vbsl[4]; 1293 uint32_t vtst[4], vceq[4], vceqf[4], vbsl[4];
1293 uint32_t vext[4]; 1294 uint32_t vext[4];
1294 uint32_t vzip8a[4], vzip8b[4], vzip16a[4], vzip16b[4], vzip32a[4], 1295 uint32_t vzip8a[4], vzip8b[4], vzip16a[4], vzip16b[4], vzip32a[4],
1295 vzip32b[4]; 1296 vzip32b[4];
1296 uint32_t vrev64_32[4], vrev64_16[4], vrev64_8[4]; 1297 uint32_t vrev64_32[4], vrev64_16[4], vrev64_8[4];
1297 uint32_t vrev32_16[4], vrev32_8[4]; 1298 uint32_t vrev32_16[4], vrev32_8[4];
1298 uint32_t vrev16_8[4]; 1299 uint32_t vrev16_8[4];
1299 uint32_t vtbl[2], vtbx[2]; 1300 uint32_t vtbl[2], vtbx[2];
1300 } T; 1301 } T;
1301 T t; 1302 T t;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 __ vsub(q1, q1, q0); 1476 __ vsub(q1, q1, q0);
1476 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vsubf)))); 1477 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vsubf))));
1477 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1478 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1478 // vmul (float). 1479 // vmul (float).
1479 __ vmov(s4, 2.0); 1480 __ vmov(s4, 2.0);
1480 __ vdup(q0, s4); 1481 __ vdup(q0, s4);
1481 __ vdup(q1, s4); 1482 __ vdup(q1, s4);
1482 __ vmul(q1, q1, q0); 1483 __ vmul(q1, q1, q0);
1483 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmulf)))); 1484 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmulf))));
1484 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1485 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1486 // vrecpe.
1487 __ vmov(s4, 2.0);
1488 __ vdup(q0, s4);
1489 __ vrecpe(q1, q0);
1490 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrecpe))));
1491 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1492 // vrecps.
1493 __ vmov(s4, 2.0);
1494 __ vdup(q0, s4);
1495 __ vmov(s4, 1.5);
1496 __ vdup(q1, s4);
1497 __ vrecps(q1, q0, q1);
1498 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrecps))));
1499 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1500 // vrsqrte.
1501 __ vmov(s4, 4.0);
1502 __ vdup(q0, s4);
1503 __ vrsqrte(q1, q0);
1504 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrsqrte))));
1505 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1506 // vrsqrts.
1507 __ vmov(s4, 2.0);
1508 __ vdup(q0, s4);
1509 __ vmov(s4, 2.5);
1510 __ vdup(q1, s4);
1511 __ vrsqrts(q1, q0, q1);
1512 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrsqrts))));
1513 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1485 // vceq (float). 1514 // vceq (float).
1486 __ vmov(s4, 1.0); 1515 __ vmov(s4, 1.0);
1487 __ vdup(q0, s4); 1516 __ vdup(q0, s4);
1488 __ vdup(q1, s4); 1517 __ vdup(q1, s4);
1489 __ vceq(q1, q1, q0); 1518 __ vceq(q1, q1, q0);
1490 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceqf)))); 1519 __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceqf))));
1491 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4)); 1520 __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
1492 1521
1493 // vadd (integer). 1522 // vadd (integer).
1494 __ mov(r4, Operand(0x81)); 1523 __ mov(r4, Operand(0x81));
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 CHECK_EQ_32X4(vabs_s16, 0x7f7f7f7fu, 0x01010101u, 0x00010001u, 0x7f807f80u); 1772 CHECK_EQ_32X4(vabs_s16, 0x7f7f7f7fu, 0x01010101u, 0x00010001u, 0x7f807f80u);
1744 CHECK_EQ_32X4(vabs_s32, 0x7f7f7f7fu, 0x01010101u, 0x00000001u, 0x7f7f7f80u); 1773 CHECK_EQ_32X4(vabs_s32, 0x7f7f7f7fu, 0x01010101u, 0x00000001u, 0x7f7f7f80u);
1745 CHECK_EQ_32X4(vneg_s8, 0x81818181u, 0xffffffffu, 0x01010101u, 0x80808080u); 1774 CHECK_EQ_32X4(vneg_s8, 0x81818181u, 0xffffffffu, 0x01010101u, 0x80808080u);
1746 CHECK_EQ_32X4(vneg_s16, 0x80818081u, 0xfefffeffu, 0x00010001u, 0x7f807f80u); 1775 CHECK_EQ_32X4(vneg_s16, 0x80818081u, 0xfefffeffu, 0x00010001u, 0x7f807f80u);
1747 CHECK_EQ_32X4(vneg_s32, 0x80808081u, 0xfefefeffu, 0x00000001u, 0x7f7f7f80u); 1776 CHECK_EQ_32X4(vneg_s32, 0x80808081u, 0xfefefeffu, 0x00000001u, 0x7f7f7f80u);
1748 1777
1749 CHECK_EQ_SPLAT(veor, 0x00ff00ffu); 1778 CHECK_EQ_SPLAT(veor, 0x00ff00ffu);
1750 CHECK_EQ_SPLAT(vaddf, 2.0); 1779 CHECK_EQ_SPLAT(vaddf, 2.0);
1751 CHECK_EQ_SPLAT(vsubf, -1.0); 1780 CHECK_EQ_SPLAT(vsubf, -1.0);
1752 CHECK_EQ_SPLAT(vmulf, 4.0); 1781 CHECK_EQ_SPLAT(vmulf, 4.0);
1782 CHECK_EQ_SPLAT(vrecpe, 0.5f); // 1 / 2
1783 CHECK_EQ_SPLAT(vrecps, -1.0f); // 2 - (2 * 1.5)
1784 CHECK_EQ_SPLAT(vrsqrte, 0.5f); // 1 / sqrt(4)
1785 CHECK_EQ_SPLAT(vrsqrts, -1.0f); // (3 - (2 * 2.5)) / 2
1753 CHECK_EQ_SPLAT(vceqf, 0xffffffffu); 1786 CHECK_EQ_SPLAT(vceqf, 0xffffffffu);
1754 CHECK_EQ_SPLAT(vadd8, 0x03030303u); 1787 CHECK_EQ_SPLAT(vadd8, 0x03030303u);
1755 CHECK_EQ_SPLAT(vadd16, 0x00030003u); 1788 CHECK_EQ_SPLAT(vadd16, 0x00030003u);
1756 CHECK_EQ_SPLAT(vadd32, 0x00000003u); 1789 CHECK_EQ_SPLAT(vadd32, 0x00000003u);
1757 CHECK_EQ_SPLAT(vsub8, 0xfefefefeu); 1790 CHECK_EQ_SPLAT(vsub8, 0xfefefefeu);
1758 CHECK_EQ_SPLAT(vsub16, 0xfffefffeu); 1791 CHECK_EQ_SPLAT(vsub16, 0xfffefffeu);
1759 CHECK_EQ_SPLAT(vsub32, 0xfffffffeu); 1792 CHECK_EQ_SPLAT(vsub32, 0xfffffffeu);
1760 CHECK_EQ_SPLAT(vmul8, 0x04040404u); 1793 CHECK_EQ_SPLAT(vmul8, 0x04040404u);
1761 CHECK_EQ_SPLAT(vmul16, 0x00040004u); 1794 CHECK_EQ_SPLAT(vmul16, 0x00040004u);
1762 CHECK_EQ_SPLAT(vmul32, 0x00000004u); 1795 CHECK_EQ_SPLAT(vmul32, 0x00000004u);
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after
3463 HandleScope scope(isolate); 3496 HandleScope scope(isolate);
3464 3497
3465 Assembler assm(isolate, NULL, 0); 3498 Assembler assm(isolate, NULL, 0);
3466 __ mov(r0, Operand(isolate->factory()->infinity_value())); 3499 __ mov(r0, Operand(isolate->factory()->infinity_value()));
3467 __ BlockConstPoolFor(1019); 3500 __ BlockConstPoolFor(1019);
3468 for (int i = 0; i < 1019; ++i) __ nop(); 3501 for (int i = 0; i < 1019; ++i) __ nop();
3469 __ vldr(d0, MemOperand(r0, 0)); 3502 __ vldr(d0, MemOperand(r0, 0));
3470 } 3503 }
3471 3504
3472 #undef __ 3505 #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