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

Unified Diff: gcc/gcc/testsuite/gcc.target/i386/sse5-nmaccXX.c

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/testsuite/gcc.target/i386/sse5-maccXX.c ('k') | gcc/gcc/testsuite/gcc.target/i386/sse5-pcmov.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/testsuite/gcc.target/i386/sse5-nmaccXX.c
diff --git a/gcc/gcc/testsuite/gcc.target/i386/sse5-nmaccXX.c b/gcc/gcc/testsuite/gcc.target/i386/sse5-nmaccXX.c
deleted file mode 100644
index 0614977365137fdf9b7389bd4e77c47adca0df2d..0000000000000000000000000000000000000000
--- a/gcc/gcc/testsuite/gcc.target/i386/sse5-nmaccXX.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/* { dg-do run } */
-/* { dg-require-effective-target sse5 } */
-/* { dg-options "-O2 -msse5" } */
-
-#include "sse5-check.h"
-
-#include <bmmintrin.h>
-#include <string.h>
-
-#define NUM 20
-
-union
-{
- __m128 x[NUM];
- float f[NUM * 4];
- __m128d y[NUM];
- double d[NUM * 2];
-} dst, res, src1, src2, src3;
-
-/* Note that in macc*,msub*,mnmacc* and mnsub* instructions, the intermdediate
- product is not rounded, only the addition is rounded. */
-
-static void
-init_nmaccps ()
-{
- int i;
- for (i = 0; i < NUM * 4; i++)
- {
- src1.f[i] = i;
- src2.f[i] = i + 10;
- src3.f[i] = i + 20;
- }
-}
-
-static void
-init_nmaccpd ()
-{
- int i;
- for (i = 0; i < NUM * 4; i++)
- {
- src1.d[i] = i;
- src2.d[i] = i + 10;
- src3.d[i] = i + 20;
- }
-}
-
-static int
-check_nmaccps ()
-{
- int i, j, check_fails = 0;
- for (i = 0; i < NUM * 4; i = i + 4)
- for (j = 0; j < 4; j++)
- {
- res.f[i + j] = - (src1.f[i + j] * src2.f[i + j]) + src3.f[i + j];
- if (dst.f[i + j] != res.f[i + j])
- check_fails++;
- }
- return check_fails++;
-}
-
-static int
-check_nmaccpd ()
-{
- int i, j, check_fails = 0;
- for (i = 0; i < NUM * 2; i = i + 2)
- for (j = 0; j < 2; j++)
- {
- res.d[i + j] = - (src1.d[i + j] * src2.d[i + j]) + src3.d[i + j];
- if (dst.d[i + j] != res.d[i + j])
- check_fails++;
- }
- return check_fails++;
-}
-
-
-static int
-check_nmaccss ()
-{
- int i, j, check_fails = 0;
- for (i = 0; i < NUM * 4; i = i + 4)
- {
- res.f[i] = - (src1.f[i] * src2.f[i]) + src3.f[i];
- if (dst.f[i] != res.f[i])
- check_fails++;
- }
- return check_fails++;
-}
-
-static int
-check_nmaccsd ()
-{
- int i, j, check_fails = 0;
- for (i = 0; i < NUM * 2; i = i + 2)
- {
- res.d[i] = - (src1.d[i] * src2.d[i]) + src3.d[i];
- if (dst.d[i] != res.d[i])
- check_fails++;
- }
- return check_fails++;
-}
-
-static void
-sse5_test (void)
-{
- int i;
-
- /* Check nmaccps */
- init_nmaccps ();
-
- for (i = 0; i < NUM; i++)
- dst.x[i] = _mm_nmacc_ps (src1.x[i], src2.x[i], src3.x[i]);
-
- if (check_nmaccps ())
- abort ();
-
- /* check nmaccss */
- for (i = 0; i < NUM; i++)
- dst.x[i] = _mm_nmacc_ss (src1.x[i], src2.x[i], src3.x[i]);
-
- if (check_nmaccss ())
- abort ();
-
- /* Check nmaccpd */
- init_nmaccpd ();
-
- for (i = 0; i < NUM; i++)
- dst.y[i] = _mm_nmacc_pd (src1.y[i], src2.y[i], src3.y[i]);
-
- if (check_nmaccpd ())
- abort ();
-
- /* Check nmaccps */
- for (i = 0; i < NUM; i++)
- dst.y[i] = _mm_nmacc_sd (src1.y[i], src2.y[i], src3.y[i]);
-
- if (check_nmaccsd ())
- abort ();
-
-}
« no previous file with comments | « gcc/gcc/testsuite/gcc.target/i386/sse5-maccXX.c ('k') | gcc/gcc/testsuite/gcc.target/i386/sse5-pcmov.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698