+2018-10-26 Bill Schmidt <wschmidt@linux.ibm.com>
+ Jinsong Ji <jji@us.ibm.com>
+
+ * gcc.target/powerpc/sse-addss-1.c: Call abort under DEBUG also;
+ formatting cleanup.
+ * gcc.target/powerpc/sse-pavgw-1.c: Likewise.
+ * gcc.target/powerpc/sse2-addsd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvtdq2pd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvtpd2dq-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvtpd2ps-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvtps2dq-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvtps2pd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvtsd2si-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvtsd2si-2.c: Likewise.
+ * gcc.target/powerpc/sse2-cvtsd2ss-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvtss2sd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvttpd2dq-1.c: Likewise.
+ * gcc.target/powerpc/sse2-cvttsd2si-1.c: Likewise.
+ * gcc.target/powerpc/sse2-divpd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-divsd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-maxsd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-minsd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-movmskpd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-movq-1.c: Likewise.
+ * gcc.target/powerpc/sse2-movsd-3.c: Likewise.
+ * gcc.target/powerpc/sse2-mulpd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-mulsd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-packssdw-1.c: Likewise.
+ * gcc.target/powerpc/sse2-packsswb-1.c: Likewise.
+ * gcc.target/powerpc/sse2-packuswb-1.c: Likewise.
+ * gcc.target/powerpc/sse2-paddsb-1.c: Likewise.
+ * gcc.target/powerpc/sse2-paddsw-1.c: Likewise.
+ * gcc.target/powerpc/sse2-paddusb-1.c: Likewise.
+ * gcc.target/powerpc/sse2-pmovmskb-1.c: Likewise.
+ * gcc.target/powerpc/sse2-pmulhw-1.c: Likewise.
+ * gcc.target/powerpc/sse2-pmuludq1.c: Likewise.
+ * gcc.target/powerpc/sse2-psadbw-1.c: Likewise.
+ * gcc.target/powerpc/sse2-pshufd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-pshufhw-1.c: Likewise.
+ * gcc.target/powerpc/sse2-pshuflw-1.c: Likewise.
+ * gcc.target/powerpc/sse2-pslld-2.c: Likewise.
+ * gcc.target/powerpc/sse2-pslldq-1.c: Likewise.
+ * gcc.target/powerpc/sse2-psrld-1.c: Likewise.
+ * gcc.target/powerpc/sse2-psrld-2.c: Likewise.
+ * gcc.target/powerpc/sse2-psrldq-1.c: Likewise.
+ * gcc.target/powerpc/sse2-psubusb-1.c: Likewise.
+ * gcc.target/powerpc/sse2-sqrtpd-1.c: Likewise.
+ * gcc.target/powerpc/sse2-subsd-1.c: Likewise.
+
2018-10-26 Paul A. Clarke <pc@us.ibm.com>
* gcc.target/powerpc/ssse3-check.h: New file.
e[3] = s1.a[3];
if (check_union128 (u, e))
-#if DEBUG
{
- printf ("sse_test_addss_1; check_union128 failed\n");
- printf ("\t add ([%f,%f,%f,%f], [%f,%f,%f,%f]) -> [%f,%f,%f,%F]\n",
- s1.x[0], s1.x[1], s1.x[2], s1.x[3],
- s2.x[0], s2.x[1], s2.x[2], s2.x[3],
- u.x[0], u.x[1], u.x[2], u.x[3]);
- printf ("\t expect [%f,%f,%f%f]\n",
- e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
+#if DEBUG
+ printf ("sse_test_addss_1; check_union128 failed\n");
+ printf ("\t add ([%f,%f,%f,%f], [%f,%f,%f,%f]) -> [%f,%f,%f,%F]\n",
+ s1.x[0], s1.x[1], s1.x[2], s1.x[3],
+ s2.x[0], s2.x[1], s2.x[2], s2.x[3],
+ u.x[0], u.x[1], u.x[2], u.x[3]);
+ printf ("\t expect [%f,%f,%f%f]\n",
+ e[0], e[1], e[2], e[3]);
#endif
+ abort ();
+ }
}
}
if (u.as_m64 != e.as_m64)
-#if DEBUG
{
+#if DEBUG
printf ("test_mmx_pavgw_1; failed\n");
printf ("\t _mm_avg_pu16 (%llx, %llx) -> %llx != %llx\n", s1.as_m64,
s2.as_m64, u.as_m64, e.as_m64);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = s1.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_addsd_1; check_union128d failed\n");
printf ("\t [%f,%f] + [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
s2.a[1], u.a[0], u.a[1]);
printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = (double)s.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_cvtepi32_pd; check_union128d failed\n");
printf ("\t [%d,%d, %d, %d] -> [%f,%f]\n",
- s.a[0], s.a[1], s.a[2], s.a[3],
- u.a[0], u.a[1]);
- printf ("\t expect [%f,%f]\n",
- e[0], e[1]);
- }
-#else
- abort ();
+ s.a[0], s.a[1], s.a[2], s.a[3],
+ u.a[0], u.a[1]);
+ printf ("\t expect [%f,%f]\n", e[0], e[1]);
#endif
+ abort ();
+ }
#endif
}
e[1] = (int)(s.a[1] + 0.5);
if (check_union128i_d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_cvtpd_epi32; check_union128i_d failed\n");
printf ("\t [%f,%f] -> [%d,%d,%d,%d]\n", s.a[0], s.a[1], u.a[0], u.a[1],
u.a[2], u.a[3]);
printf ("\t expect [%d,%d,%d,%d]\n", e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = (float)s.a[1];
if (check_union128 (u, e))
+ {
#if DEBUG
- {
- printf ("sse2_test_cvtpd_ps; check_union128 failed\n");
+ printf ("sse2_test_cvtpd_ps; check_union128 failed\n");
printf ("\t [%f,%f] -> [%f,%f,%f,%f]\n", s.a[0], s.a[1], u.a[0], u.a[1],
u.a[2], u.a[3]);
printf ("\t expect [%f,%f,%f,%f]\n", e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[3] = (int)(s.a[3] + 0.5);
if (check_union128i_d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_cvtps2dq_1; check_union128i_d failed\n");
printf ("\t [%f,%f,%f,%f] -> [%d,%d,%d,%d]\n", s.a[0], s.a[1], s.a[2],
s.a[3], u.a[0], u.a[1], u.a[2], u.a[3]);
printf ("\t expect [%d,%d,%d,%d]\n", e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = (double)s.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_cvtps2pd_1; check_union128d failed\n");
printf ("\t cvt\t [%f,%f,%f,%f] -> [%f,%f]\n", s.a[0], s.a[1], s.a[2],
s.a[3], u.a[0], u.a[1]);
printf ("\t expect\t [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e = (int)(s.a[0] + 0.5);
if (d != e)
+ {
#if DEBUG
- {
printf ("sse2_test_cvtsd2si_1; failed\n");
printf ("\t [%f,%f] -> [%d]\n", s.a[0], s.a[1], d);
printf ("\t expect [%d]\n", e);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e = (long long)(s.a[0] + 0.5);
if (d != e)
+ {
#if DEBUG
- {
printf ("sse2_test_cvtsd2si_2; failed\n");
printf ("\t [%f,%f] -> [%ld]\n", s.a[0], s.a[1], d);
printf ("\t expect [%ld]\n", e);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[0] = (float)source1[0];
if (check_union128(u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_cvtsd2ss_1; check_union128 failed\n");
printf ("\t [%f,%f,%f,%f],[%f,%f]\n", s2.a[0], s2.a[1], s2.a[2], s2.a[3],
- s1.a[0], s1.a[1]);
+ s1.a[0], s1.a[1]);
printf ("\t -> \t[%f,%f,%f,%f]\n", u.a[0], u.a[1], u.a[2], u.a[3]);
printf ("\texpect\t[%f,%f,%f,%f]\n", e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = s1.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_cvtss2sd_1; check_union128d failed\n");
- printf ("\t [%f,%f], [%f,%f,%f,%f]\n", s1.a[0], s1.a[1], s2.a[0], s2.a[1],
- s2.a[2], s2.a[3]);
+ printf ("\t [%f,%f], [%f,%f,%f,%f]\n", s1.a[0], s1.a[1],
+ s2.a[0], s2.a[1], s2.a[2], s2.a[3]);
printf ("\t -> \t[%f,%f]\n", u.a[0], u.a[1]);
printf ("\texpect\t[%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = (int)s.a[1];
if (check_union128i_d (u, e))
+ {
#if DEBUG
- {
- printf ("sse2_test_cvttpd_epi32; check_union128i_d failed\n");
+ printf ("sse2_test_cvttpd_epi32; check_union128i_d failed\n");
printf ("\t [%f,%f] -> [%d,%d,%d,%d]\n", s.a[0], s.a[1], u.a[0], u.a[1],
u.a[2], u.a[3]);
printf ("\t expect [%d,%d,%d,%d]\n", e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e = (int)(s.a[0]);
if (d != e)
+ {
#if DEBUG
- {
printf ("sse2_test_cvttsd2si_1; failed\n");
printf ("\t [%f,%f] -> [%d]\n", s.a[0], s.a[1], d);
printf ("\t expect [%d]\n", e);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = s1.a[1] / s2.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
- printf ("sse2_test_divpd_1; check_union128d failed\n");
- printf ("\t [%f,%f] * [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
+ printf ("sse2_test_divpd_1; check_union128d failed\n");
+ printf ("\t [%f,%f] * [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
s2.a[1], u.a[0], u.a[1]);
- printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
+ printf ("\t expect [%f,%f]\n", e[0], e[1]);
#endif
+ abort ();
+ }
}
e[1] = s1.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
- printf ("sse2_test_divsd_1; check_union128d failed\n");
- printf ("\t [%f,%f] / [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
+ printf ("sse2_test_divsd_1; check_union128d failed\n");
+ printf ("\t [%f,%f] / [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
s2.a[1], u.a[0], u.a[1]);
- printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
+ printf ("\t expect [%f,%f]\n", e[0], e[1]);
#endif
+ abort ();
+ }
}
e[1] = s1.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_maxsd_3; check_union128d failed\n");
printf ("\t [%f,%f] + [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
s2.a[1], u.a[0], u.a[1]);
printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = s1.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_minsd_3; check_union128d failed\n");
printf ("\t [%f,%f] + [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
s2.a[1], u.a[0], u.a[1]);
printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e |= 1 << 1;
if (checkVi (&d, &e, 1))
+ {
#if DEBUG
- {
- printf ("sse2_test_movmskpd_1; check_union128d failed\n");
- printf ("\t [%f,%f] -> [%d]\n",
- s1.a[0], s1.a[1], d);
- printf ("\t expect [%d]\n",
- e);
- }
-#else
- abort ();
+ printf ("sse2_test_movmskpd_1; check_union128d failed\n");
+ printf ("\t [%f,%f] -> [%d]\n", s1.a[0], s1.a[1], d);
+ printf ("\t expect [%d]\n", e);
#endif
+ abort ();
+ }
#endif
}
e[0] = s1.a[0];
if (check_union128i_q (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_movq_1; check_union128i_q failed\n");
printf ("\t move_epi64 ([%llx, %llx]) -> [%llx, %llx]\n", s1.a[0],
s1.a[1], u.a[0], u.a[1]);
printf ("\t expect [%llx, %llx]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
u.x = test (s1.x, s2.x);
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_movsd_3; check_union128d failed\n");
printf ("\t [%f,%f], [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
s2.a[1], u.a[0], u.a[1]);
printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = s1.a[1] * s2.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_mul_pd_1; check_union128d failed\n");
printf ("\t [%f,%f] * [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
s2.a[1], u.a[0], u.a[1]);
printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = s1.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_mul_sd_1; check_union128d failed\n");
printf ("\t [%f,%f] * [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
s2.a[1], u.a[0], u.a[1]);
printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
}
if (check_union128i_w (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_packssdw_1; check_union128i_w failed\n");
- printf (
- "\t ([%x,%x,%x,%x], [%x,%x,%x,%x]) -> [%x,%x,%x,%x, %x,%x,%x,%x]\n",
- s1.a[0], s1.a[1], s1.a[2], s1.a[3], s2.a[0], s2.a[1], s2.a[2],
- s2.a[3], u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6],
- u.a[7]);
+ printf ("\t ([%x,%x,%x,%x], [%x,%x,%x,%x])"
+ " -> [%x,%x,%x,%x, %x,%x,%x,%x]\n",
+ s1.a[0], s1.a[1], s1.a[2], s1.a[3], s2.a[0], s2.a[1], s2.a[2],
+ s2.a[3], u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6],
+ u.a[7]);
printf ("\t expect [%x,%x,%x,%x, %x,%x,%x,%x]\n", e[0], e[1], e[2], e[3],
- e[4], e[5], e[6], e[7]);
- }
-#else
- abort ();
+ e[4], e[5], e[6], e[7]);
#endif
+ abort ();
+ }
}
}
if (check_union128i_b (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_packsswb_1; check_union128i_w failed\n");
printf ("\t ([%x,%x,%x,%x, %x,%x,%x,%x], [%x,%x,%x,%x, %x,%x,%x,%x])\n",
s1.a[0], s1.a[1], s1.a[2], s1.a[3], s1.a[4], s1.a[5], s1.a[6],
u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7],
u.a[8], u.a[9], u.a[10], u.a[11], u.a[12], u.a[13], u.a[14],
u.a[15]);
- printf (
- "\t expect [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
- e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10],
- e[11], e[12], e[13], e[14], e[15]);
- }
-#else
- abort ();
+ printf ("\t expect [%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x]\n",
+ e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9],
+ e[10], e[11], e[12], e[13], e[14], e[15]);
#endif
+ abort ();
+ }
}
}
if (check_union128i_ub (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_packuswb_1; check_union128i_w failed\n");
printf ("\t ([%x,%x,%x,%x, %x,%x,%x,%x], [%x,%x,%x,%x, %x,%x,%x,%x])\n",
s1.a[0], s1.a[1], s1.a[2], s1.a[3], s1.a[4], s1.a[5], s1.a[6],
u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7],
u.a[8], u.a[9], u.a[10], u.a[11], u.a[12], u.a[13], u.a[14],
u.a[15]);
- printf (
- "\t expect [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
- e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10],
- e[11], e[12], e[13], e[14], e[15]);
- }
-#else
- abort ();
+ printf ("\t expect [%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x]\n",
+ e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9],
+ e[10], e[11], e[12], e[13], e[14], e[15]);
#endif
+ abort ();
+ }
}
}
if (check_union128i_b (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_paddsb_1; check_union128i_b failed\n");
- printf (
- "\tadds\t([%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x],\n",
+ printf ("\tadds\t([%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x],\n",
s1.a[0], s1.a[1], s1.a[2], s1.a[3], s1.a[4], s1.a[5], s1.a[6],
- s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12], s1.a[13],
- s1.a[14], s1.a[15]);
+ s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12],
+ s1.a[13], s1.a[14], s1.a[15]);
printf ("\t\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x])\n",
s2.a[0], s2.a[1], s2.a[2], s2.a[3], s2.a[4], s2.a[5], s2.a[6],
- s2.a[7], s2.a[8], s2.a[9], s2.a[10], s2.a[11], s2.a[12], s2.a[13],
- s2.a[14], s2.a[15]);
+ s2.a[7], s2.a[8], s2.a[9], s2.a[10], s2.a[11], s2.a[12],
+ s2.a[13], s2.a[14], s2.a[15]);
printf ("\t ->\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7],
u.a[8], u.a[9], u.a[10], u.a[11], u.a[12], u.a[13], u.a[14],
u.a[15]);
- printf (
- "\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
- e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10],
- e[11], e[12], e[13], e[14], e[15]);
- }
-#else
- abort ();
+ printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x]\n",
+ e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9],
+ e[10], e[11], e[12], e[13], e[14], e[15]);
#endif
+ abort ();
+ }
}
}
if (check_union128i_w (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_paddsw_1; check_union128i_w failed\n");
printf ("\tadds\t([%x,%x,%x,%x, %x,%x,%x,%x],\n", s1.a[0], s1.a[1],
s1.a[2], s1.a[3], s1.a[4], s1.a[5], s1.a[6], s1.a[7]);
s2.a[3], s2.a[4], s2.a[5], s2.a[6], s2.a[7]);
printf ("\t ->\t [%x,%x,%x,%x, %x,%x,%x,%x]\n", u.a[0], u.a[1], u.a[2],
u.a[3], u.a[4], u.a[5], u.a[6], u.a[7]);
- printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x]\n", e[0], e[1], e[2], e[3],
- e[4], e[5], e[6], e[7]);
- }
-#else
- abort ();
+ printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x]\n", e[0], e[1], e[2],
+ e[3], e[4], e[5], e[6], e[7]);
#endif
+ abort ();
+ }
}
}
if (check_union128i_b (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_paddusb_1; check_union128i_b failed\n");
- printf (
- "\tadds\t([%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x],\n",
+ printf ("\tadds\t([%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x],\n",
s1.a[0], s1.a[1], s1.a[2], s1.a[3], s1.a[4], s1.a[5], s1.a[6],
- s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12], s1.a[13],
- s1.a[14], s1.a[15]);
+ s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12],
+ s1.a[13], s1.a[14], s1.a[15]);
printf ("\t\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x])\n",
s2.a[0], s2.a[1], s2.a[2], s2.a[3], s2.a[4], s2.a[5], s2.a[6],
- s2.a[7], s2.a[8], s2.a[9], s2.a[10], s2.a[11], s2.a[12], s2.a[13],
- s2.a[14], s2.a[15]);
+ s2.a[7], s2.a[8], s2.a[9], s2.a[10], s2.a[11], s2.a[12],
+ s2.a[13], s2.a[14], s2.a[15]);
printf ("\t ->\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7],
u.a[8], u.a[9], u.a[10], u.a[11], u.a[12], u.a[13], u.a[14],
u.a[15]);
- printf (
- "\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
- e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10],
- e[11], e[12], e[13], e[14], e[15]);
- }
-#else
- abort ();
+ printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x]\n",
+ e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9],
+ e[10], e[11], e[12], e[13], e[14], e[15]);
#endif
+ abort ();
+ }
}
e = e | (1<<i);
if (checkVi (&u, &e, 1))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_pmovmskb_1; checkVi failed\n");
- printf ("\t ([%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x], -> %x)\n",
+ printf ("\t ([%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x], -> %x)\n",
s1.a[0], s1.a[1], s1.a[2], s1.a[3], s1.a[4], s1.a[5], s1.a[6],
- s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12], s1.a[13],
- s1.a[14], s1.a[15], u);
+ s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12],
+ s1.a[13], s1.a[14], s1.a[15], u);
printf ("\t expect %x\n", e);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
#endif
}
}
if (check_union128i_w (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_pmulhw_1; check_union128i_w failed\n");
printf ("\tmulhi\t([%x,%x,%x,%x, %x,%x,%x,%x],\n", s1.a[0], s1.a[1],
s1.a[2], s1.a[3], s1.a[4], s1.a[5], s1.a[6], s1.a[7]);
s2.a[3], s2.a[4], s2.a[5], s2.a[6], s2.a[7]);
printf ("\t ->\t [%x,%x,%x,%x, %x,%x,%x,%x]\n", u.a[0], u.a[1], u.a[2],
u.a[3], u.a[4], u.a[5], u.a[6], u.a[7]);
- printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x]\n", e[0], e[1], e[2], e[3],
- e[4], e[5], e[6], e[7]);
- }
-#else
- abort ();
+ printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x]\n", e[0], e[1], e[2],
+ e[3], e[4], e[5], e[6], e[7]);
#endif
+ abort ();
+ }
}
e[1] = s1.a[2] * s2.a[2];
if (check_union128i_q (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_pmuludq_1; check_union128i_q failed\n");
printf ("\t ([%x,%x,%x,%x], [%x,%x,%x,%x], -> [%llx, %llx])\n", s1.a[0],
s1.a[1], s1.a[2], s1.a[3], s2.a[0], s2.a[1], s2.a[2], s2.a[3],
u.a[0], u.a[1]);
printf ("\t expect [%llx, %llx]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
if (check_union128i_w (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_psadbw_1; check_union128i_w failed\n");
- printf (
- "\tadds\t([%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x],\n",
+ printf ("\tadds\t([%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x],\n",
s1.a[0], s1.a[1], s1.a[2], s1.a[3], s1.a[4], s1.a[5], s1.a[6],
- s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12], s1.a[13],
- s1.a[14], s1.a[15]);
+ s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12],
+ s1.a[13], s1.a[14], s1.a[15]);
printf ("\t\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x])\n",
s2.a[0], s2.a[1], s2.a[2], s2.a[3], s2.a[4], s2.a[5], s2.a[6],
- s2.a[7], s2.a[8], s2.a[9], s2.a[10], s2.a[11], s2.a[12], s2.a[13],
- s2.a[14], s2.a[15]);
+ s2.a[7], s2.a[8], s2.a[9], s2.a[10], s2.a[11], s2.a[12],
+ s2.a[13], s2.a[14], s2.a[15]);
printf ("\t ->\t [%x,%x,%x,%x, %x,%x,%x,%x]\n", u.a[0], u.a[1], u.a[2],
u.a[3], u.a[4], u.a[5], u.a[6], u.a[7]);
- printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x]\n", e[0], e[1], e[2], e[3],
- e[4], e[5], e[6], e[7]);
- }
-#else
- abort ();
+ printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x]\n", e[0], e[1], e[2],
+ e[3], e[4], e[5], e[6], e[7]);
#endif
+ abort ();
+ }
}
e[i] = s1.a[((N & (0x3<<(2*i)))>>(2*i))];
if (check_union128i_d(u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_pshufd_1; check_union128i_d failed\n");
printf ("\t ([%x,%x,%x,%x]) -> [%x,%x,%x,%x]\n", s1.a[0], s1.a[1],
s1.a[2], s1.a[3], u.a[0], u.a[1], u.a[2], u.a[3]);
printf ("\t expect [%x,%x,%x,%x]\n", e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[i+4] = (s1.a[1] >> (16 * m2[i])) & 0xffff;
if (check_union128i_w(u, e))
+ {
#if DEBUG
- {
- union128i_w s;
- s.x = s1.x;
- printf ("sse2_test_pshufhw_1; check_union128i_w failed\n");
- printf ("\t ([%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx])\n", s.a[0], s.a[1],
+ union128i_w s;
+ s.x = s1.x;
+ printf ("sse2_test_pshufhw_1; check_union128i_w failed\n");
+ printf ("\t ([%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx])\n", s.a[0], s.a[1],
s.a[2], s.a[3], s.a[4], s.a[5], s.a[6], s.a[7]);
- printf ("\t\t -> [%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx]\n", u.a[0], u.a[1],
+ printf ("\t\t -> [%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx]\n", u.a[0], u.a[1],
u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7]);
- printf ("\t expect [%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx]\n", e[0], e[1],
+ printf ("\t expect [%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx]\n", e[0], e[1],
e[2], e[3], e[4], e[5], e[6], e[7]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[i] = (s1.a[0] >> (16 * m2[i])) & 0xffff;
if (check_union128i_w(u, e))
+ {
#if DEBUG
- {
- union128i_w s;
- s.x = s1.x;
- printf ("sse2_test_pshuflw_1; check_union128i_w failed\n");
- printf ("\t ([%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx])\n", s.a[0], s.a[1],
+ union128i_w s;
+ s.x = s1.x;
+ printf ("sse2_test_pshuflw_1; check_union128i_w failed\n");
+ printf ("\t ([%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx])\n", s.a[0], s.a[1],
s.a[2], s.a[3], s.a[4], s.a[5], s.a[6], s.a[7]);
- printf ("\t\t -> [%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx]\n", u.a[0], u.a[1],
+ printf ("\t\t -> [%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx]\n", u.a[0], u.a[1],
u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7]);
- printf ("\t expect [%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx]\n", e[0], e[1],
+ printf ("\t expect [%hx,%hx,%hx,%hx, %hx,%hx,%hx,%hx]\n", e[0], e[1],
e[2], e[3], e[4], e[5], e[6], e[7]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[i] = s.a[i] << c.a[0];
if (check_union128i_d (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_pslld_2; check_union128i_d failed\n");
printf ("\tsll\t([%x,%x,%x,%x], [%llx,%llx]\n", s.a[0], s.a[1], s.a[2],
s.a[3], c.a[0], c.a[1]);
printf ("\t ->\t [%x,%x,%x,%x]\n", u.a[0], u.a[1], u.a[2], u.a[3]);
printf ("\texpect\t [%x,%x,%x,%x]\n", e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[i + N] = src[i];
if (check_union128i_b (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_pslldq_1; check_union128i_b failed\n");
-
printf ("\t s ([%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x])\n",
s.a[0], s.a[1], s.a[2], s.a[3], s.a[4], s.a[5], s.a[6], s.a[7],
s.a[8], s.a[9], s.a[10], s.a[11], s.a[12], s.a[13], s.a[14],
s.a[15]);
- printf (
- "\t u ->\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
- u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7],
- u.a[8], u.a[9], u.a[10], u.a[11], u.a[12], u.a[13], u.a[14], u.a[15]);
- printf (
- "\t expect\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
- e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10],
- e[11], e[12], e[13], e[14], e[15]);
- }
-#else
- abort ();
+ printf ("\t u ->\t [%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x]\n",
+ u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7],
+ u.a[8], u.a[9], u.a[10], u.a[11], u.a[12], u.a[13], u.a[14],
+ u.a[15]);
+ printf ("\t expect\t [%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x]\n",
+ e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9],
+ e[10], e[11], e[12], e[13], e[14], e[15]);
#endif
+ abort ();
+ }
}
}
if (check_union128i_d (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_psrld_1; check_union128i_d failed\n");
printf ("\tsrl\t([%x,%x,%x,%x],%d\n", s.a[0], s.a[1], s.a[2], s.a[3], N);
printf ("\t ->\t [%x,%x,%x,%x]\n", u.a[0], u.a[1], u.a[2], u.a[3]);
printf ("\texpect\t [%x,%x,%x,%x]\n", e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
}
if (check_union128i_d (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_psrld_2; check_union128i_d failed\n");
printf ("\tsrld\t([%x,%x,%x,%x], [%llx,%llx]\n", s.a[0], s.a[1], s.a[2],
s.a[3], c.a[0], c.a[1]);
printf ("\t ->\t [%x,%x,%x,%x]\n", u.a[0], u.a[1], u.a[2], u.a[3]);
printf ("\texpect\t [%x,%x,%x,%x]\n", e[0], e[1], e[2], e[3]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[i] = src[i+N];
if (check_union128i_b (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_psrldq_1; check_union128i_b failed\n");
- printf ("\tsrl\t([%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x],\n",
+ printf ("\tsrl\t([%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x],\n",
s.a[0], s.a[1], s.a[2], s.a[3], s.a[4], s.a[5], s.a[6], s.a[7],
s.a[8], s.a[9], s.a[10], s.a[11], s.a[12], s.a[13], s.a[14],
s.a[15]);
u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7],
u.a[8], u.a[9], u.a[10], u.a[11], u.a[12], u.a[13], u.a[14],
u.a[15]);
- printf (
- "\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
- e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10],
- e[11], e[12], e[13], e[14], e[15]);
- }
-#else
- abort ();
+ printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x]\n",
+ e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9],
+ e[10], e[11], e[12], e[13], e[14], e[15]);
#endif
+ abort ();
+ }
}
}
if (check_union128i_b (u, e))
-#if DEBUG
{
+#if DEBUG
printf ("sse2_test_psubusb_1; check_union128i_b failed\n");
- printf (
- "\tadds\t([%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x],\n",
+ printf ("\tadds\t([%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x],\n",
s1.a[0], s1.a[1], s1.a[2], s1.a[3], s1.a[4], s1.a[5], s1.a[6],
- s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12], s1.a[13],
- s1.a[14], s1.a[15]);
+ s1.a[7], s1.a[8], s1.a[9], s1.a[10], s1.a[11], s1.a[12],
+ s1.a[13], s1.a[14], s1.a[15]);
printf ("\t\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x])\n",
s2.a[0], s2.a[1], s2.a[2], s2.a[3], s2.a[4], s2.a[5], s2.a[6],
- s2.a[7], s2.a[8], s2.a[9], s2.a[10], s2.a[11], s2.a[12], s2.a[13],
- s2.a[14], s2.a[15]);
+ s2.a[7], s2.a[8], s2.a[9], s2.a[10], s2.a[11], s2.a[12],
+ s2.a[13], s2.a[14], s2.a[15]);
printf ("\t ->\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
u.a[0], u.a[1], u.a[2], u.a[3], u.a[4], u.a[5], u.a[6], u.a[7],
u.a[8], u.a[9], u.a[10], u.a[11], u.a[12], u.a[13], u.a[14],
u.a[15]);
- printf (
- "\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x, %x,%x,%x,%x]\n",
- e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10],
- e[11], e[12], e[13], e[14], e[15]);
- }
-#else
- abort ();
+ printf ("\texpect\t [%x,%x,%x,%x, %x,%x,%x,%x,"
+ " %x,%x,%x,%x, %x,%x,%x,%x]\n",
+ e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9],
+ e[10], e[11], e[12], e[13], e[14], e[15]);
#endif
+ abort ();
+ }
}
}
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_sqrt_pd_1; check_union128d failed\n");
printf ("\t [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], u.a[0], u.a[1]);
printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}
e[1] = s1.a[1];
if (check_union128d (u, e))
+ {
#if DEBUG
- {
printf ("sse2_test_subsd_1; check_union128d failed\n");
printf ("\t [%f,%f] - [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
s2.a[1], u.a[0], u.a[1]);
printf ("\t expect [%f,%f]\n", e[0], e[1]);
- }
-#else
- abort ();
#endif
+ abort ();
+ }
}