summaryrefslogtreecommitdiff
path: root/libatomic
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-18 14:50:11 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-18 14:50:11 +0000
commit16ab6f9167bfa7d3bc5872371c2d910c6a4dc7bf (patch)
tree3ef9752a542301767b623ae7a0ea934a52f72ed6 /libatomic
parentd92ae4c67fce4f2984061aca84f7e0319e01d027 (diff)
downloadlinaro-gcc-16ab6f9167bfa7d3bc5872371c2d910c6a4dc7bf.tar.gz
linaro-gcc-16ab6f9167bfa7d3bc5872371c2d910c6a4dc7bf.tar.bz2
linaro-gcc-16ab6f9167bfa7d3bc5872371c2d910c6a4dc7bf.zip
* testsuite/libatomic.c/atomic-compare-exchange-1.c,
testsuite/libatomic.c/atomic-compare-exchange-2.c, testsuite/libatomic.c/atomic-compare-exchange-3.c, testsuite/libatomic.c/atomic-compare-exchange-4.c, testsuite/libatomic.c/atomic-compare-exchange-5.c, testsuite/libatomic.c/atomic-exchange-1.c, testsuite/libatomic.c/atomic-exchange-2.c, testsuite/libatomic.c/atomic-exchange-3.c, testsuite/libatomic.c/atomic-exchange-4.c, testsuite/libatomic.c/atomic-exchange-5.c, testsuite/libatomic.c/atomic-generic.c, testsuite/libatomic.c/atomic-load-1.c, testsuite/libatomic.c/atomic-load-2.c, testsuite/libatomic.c/atomic-load-3.c, testsuite/libatomic.c/atomic-load-4.c, testsuite/libatomic.c/atomic-load-5.c, testsuite/libatomic.c/atomic-op-1.c, testsuite/libatomic.c/atomic-op-2.c, testsuite/libatomic.c/atomic-op-3.c, testsuite/libatomic.c/atomic-op-4.c, testsuite/libatomic.c/atomic-op-5.c, testsuite/libatomic.c/atomic-store-1.c, testsuite/libatomic.c/atomic-store-2.c, testsuite/libatomic.c/atomic-store-3.c, testsuite/libatomic.c/atomic-store-4.c, testsuite/libatomic.c/atomic-store-5.c: Declare main as returning int. Do not require built-in sync support or add target-specific options. * testsuite/libatomic.c/atomic-exchange-1.c, testsuite/libatomic.c/atomic-exchange-2.c, testsuite/libatomic.c/atomic-exchange-3.c, testsuite/libatomic.c/atomic-exchange-4.c, testsuite/libatomic.c/atomic-exchange-5.c: Separate increments of count from expression using value of count. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204953 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libatomic')
-rw-r--r--libatomic/ChangeLog37
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-compare-exchange-1.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-compare-exchange-2.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-compare-exchange-3.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-compare-exchange-4.c3
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-compare-exchange-5.c4
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-exchange-1.c17
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-exchange-2.c17
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-exchange-3.c17
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-exchange-4.c18
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-exchange-5.c19
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-generic.c1
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-load-1.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-load-2.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-load-3.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-load-4.c3
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-load-5.c4
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-op-1.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-op-2.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-op-3.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-op-4.c3
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-op-5.c4
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-store-1.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-store-2.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-store-3.c2
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-store-4.c3
-rw-r--r--libatomic/testsuite/libatomic.c/atomic-store-5.c4
27 files changed, 118 insertions, 60 deletions
diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog
index 06aff7feb35..143a7292641 100644
--- a/libatomic/ChangeLog
+++ b/libatomic/ChangeLog
@@ -1,3 +1,40 @@
+2013-11-18 Joseph Myers <joseph@codesourcery.com>
+
+ * testsuite/libatomic.c/atomic-compare-exchange-1.c,
+ testsuite/libatomic.c/atomic-compare-exchange-2.c,
+ testsuite/libatomic.c/atomic-compare-exchange-3.c,
+ testsuite/libatomic.c/atomic-compare-exchange-4.c,
+ testsuite/libatomic.c/atomic-compare-exchange-5.c,
+ testsuite/libatomic.c/atomic-exchange-1.c,
+ testsuite/libatomic.c/atomic-exchange-2.c,
+ testsuite/libatomic.c/atomic-exchange-3.c,
+ testsuite/libatomic.c/atomic-exchange-4.c,
+ testsuite/libatomic.c/atomic-exchange-5.c,
+ testsuite/libatomic.c/atomic-generic.c,
+ testsuite/libatomic.c/atomic-load-1.c,
+ testsuite/libatomic.c/atomic-load-2.c,
+ testsuite/libatomic.c/atomic-load-3.c,
+ testsuite/libatomic.c/atomic-load-4.c,
+ testsuite/libatomic.c/atomic-load-5.c,
+ testsuite/libatomic.c/atomic-op-1.c,
+ testsuite/libatomic.c/atomic-op-2.c,
+ testsuite/libatomic.c/atomic-op-3.c,
+ testsuite/libatomic.c/atomic-op-4.c,
+ testsuite/libatomic.c/atomic-op-5.c,
+ testsuite/libatomic.c/atomic-store-1.c,
+ testsuite/libatomic.c/atomic-store-2.c,
+ testsuite/libatomic.c/atomic-store-3.c,
+ testsuite/libatomic.c/atomic-store-4.c,
+ testsuite/libatomic.c/atomic-store-5.c: Declare main as returning
+ int. Do not require built-in sync support or add target-specific
+ options.
+ * testsuite/libatomic.c/atomic-exchange-1.c,
+ testsuite/libatomic.c/atomic-exchange-2.c,
+ testsuite/libatomic.c/atomic-exchange-3.c,
+ testsuite/libatomic.c/atomic-exchange-4.c,
+ testsuite/libatomic.c/atomic-exchange-5.c: Separate increments of
+ count from expression using value of count.
+
2013-11-10 Uros Bizjak <ubizjak@gmail.com>
* config/x86/fenv.c: New file.
diff --git a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-1.c b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-1.c
index 2ac54e80887..33dba8640ea 100644
--- a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-1.c
+++ b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-1.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_compare_exchange_n builtin for a char. */
@@ -16,6 +15,7 @@ char zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-2.c b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-2.c
index 73b25977748..588f3d2faf7 100644
--- a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-2.c
+++ b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-2.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_compare_exchange_n builtin for a short. */
@@ -16,6 +15,7 @@ short zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-3.c b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-3.c
index 26097288c9d..f424c4a2fb1 100644
--- a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-3.c
+++ b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-3.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_long } */
/* Test the execution of the __atomic_compare_exchange_n builtin for an int. */
@@ -16,6 +15,7 @@ int zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-4.c b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-4.c
index b6c783ddaba..5274f8c44c7 100644
--- a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-4.c
+++ b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-4.c
@@ -1,9 +1,7 @@
/* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */
-/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* Test the execution of __atomic_compare_exchange_n builtin for a long_long. */
@@ -18,6 +16,7 @@ long long zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-5.c b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-5.c
index 4cc0209b33f..fd05ce7444e 100644
--- a/libatomic/testsuite/libatomic.c/atomic-compare-exchange-5.c
+++ b/libatomic/testsuite/libatomic.c/atomic-compare-exchange-5.c
@@ -1,8 +1,7 @@
/* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_128_runtime } */
-/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-require-effective-target int128 } */
/* Test the execution of __atomic_compare_exchange_n builtin for an int_128. */
@@ -17,6 +16,7 @@ __int128_t zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/libatomic/testsuite/libatomic.c/atomic-exchange-1.c b/libatomic/testsuite/libatomic.c/atomic-exchange-1.c
index fb78cdbca54..71c19807f37 100644
--- a/libatomic/testsuite/libatomic.c/atomic-exchange-1.c
+++ b/libatomic/testsuite/libatomic.c/atomic-exchange-1.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_exchange_n builtin for a char. */
@@ -9,25 +8,31 @@ extern void abort(void);
char v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/libatomic/testsuite/libatomic.c/atomic-exchange-2.c b/libatomic/testsuite/libatomic.c/atomic-exchange-2.c
index 153771a2cdc..e06d729517f 100644
--- a/libatomic/testsuite/libatomic.c/atomic-exchange-2.c
+++ b/libatomic/testsuite/libatomic.c/atomic-exchange-2.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_X builtin for a short. */
@@ -9,25 +8,31 @@ extern void abort(void);
short v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/libatomic/testsuite/libatomic.c/atomic-exchange-3.c b/libatomic/testsuite/libatomic.c/atomic-exchange-3.c
index fbf8f6b966c..56841d99bb7 100644
--- a/libatomic/testsuite/libatomic.c/atomic-exchange-3.c
+++ b/libatomic/testsuite/libatomic.c/atomic-exchange-3.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_long } */
/* Test the execution of the __atomic_X builtin for an int. */
@@ -9,25 +8,31 @@ extern void abort(void);
int v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/libatomic/testsuite/libatomic.c/atomic-exchange-4.c b/libatomic/testsuite/libatomic.c/atomic-exchange-4.c
index 13022dd38d2..db867d6e5d6 100644
--- a/libatomic/testsuite/libatomic.c/atomic-exchange-4.c
+++ b/libatomic/testsuite/libatomic.c/atomic-exchange-4.c
@@ -1,9 +1,7 @@
/* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */
-/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* Test the execution of the __atomic_X builtin for a long_long. */
@@ -11,25 +9,31 @@ extern void abort(void);
long long v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/libatomic/testsuite/libatomic.c/atomic-exchange-5.c b/libatomic/testsuite/libatomic.c/atomic-exchange-5.c
index b0c84b17fd3..02d4a8897f2 100644
--- a/libatomic/testsuite/libatomic.c/atomic-exchange-5.c
+++ b/libatomic/testsuite/libatomic.c/atomic-exchange-5.c
@@ -1,8 +1,7 @@
/* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_128_runtime } */
-/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-require-effective-target int128 } */
/* Test the execution of the __atomic_X builtin for a 16 byte value. */
@@ -10,25 +9,31 @@ extern void abort(void);
__int128_t v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/libatomic/testsuite/libatomic.c/atomic-generic.c b/libatomic/testsuite/libatomic.c/atomic-generic.c
index c3c486a0396..11ef6c5831d 100644
--- a/libatomic/testsuite/libatomic.c/atomic-generic.c
+++ b/libatomic/testsuite/libatomic.c/atomic-generic.c
@@ -22,6 +22,7 @@ test_struct a,b;
int size = sizeof (test_struct);
/* Test for consistency on sizes 1, 2, 4, 8, 16 and 32. */
+int
main ()
{
test_struct c;
diff --git a/libatomic/testsuite/libatomic.c/atomic-load-1.c b/libatomic/testsuite/libatomic.c/atomic-load-1.c
index 928f9b0f10b..d7e430434d3 100644
--- a/libatomic/testsuite/libatomic.c/atomic-load-1.c
+++ b/libatomic/testsuite/libatomic.c/atomic-load-1.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_load_n builtin for a char. */
@@ -10,6 +9,7 @@ extern void abort(void);
char v, count;
+int
main ()
{
v = 0;
diff --git a/libatomic/testsuite/libatomic.c/atomic-load-2.c b/libatomic/testsuite/libatomic.c/atomic-load-2.c
index 3d1df1cfffa..df2966be7a2 100644
--- a/libatomic/testsuite/libatomic.c/atomic-load-2.c
+++ b/libatomic/testsuite/libatomic.c/atomic-load-2.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_load_n builtin for a short. */
@@ -11,6 +10,7 @@ extern void abort(void);
short v, count;
+int
main ()
{
v = 0;
diff --git a/libatomic/testsuite/libatomic.c/atomic-load-3.c b/libatomic/testsuite/libatomic.c/atomic-load-3.c
index ec238be9e51..b54cc4b2c75 100644
--- a/libatomic/testsuite/libatomic.c/atomic-load-3.c
+++ b/libatomic/testsuite/libatomic.c/atomic-load-3.c
@@ -1,13 +1,13 @@
/* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_long } */
extern void abort(void);
int v, count;
+int
main ()
{
v = 0;
diff --git a/libatomic/testsuite/libatomic.c/atomic-load-4.c b/libatomic/testsuite/libatomic.c/atomic-load-4.c
index 032ad246fd0..97e46861d26 100644
--- a/libatomic/testsuite/libatomic.c/atomic-load-4.c
+++ b/libatomic/testsuite/libatomic.c/atomic-load-4.c
@@ -1,14 +1,13 @@
/* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */
-/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
extern void abort(void);
long long v, count;
+int
main ()
{
v = 0;
diff --git a/libatomic/testsuite/libatomic.c/atomic-load-5.c b/libatomic/testsuite/libatomic.c/atomic-load-5.c
index 31d806633e1..57053937638 100644
--- a/libatomic/testsuite/libatomic.c/atomic-load-5.c
+++ b/libatomic/testsuite/libatomic.c/atomic-load-5.c
@@ -1,13 +1,13 @@
/* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_128_runtime } */
-/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-require-effective-target int128 } */
extern void abort(void);
__int128_t v, count;
+int
main ()
{
v = 0;
diff --git a/libatomic/testsuite/libatomic.c/atomic-op-1.c b/libatomic/testsuite/libatomic.c/atomic-op-1.c
index bc1716f7799..56632291489 100644
--- a/libatomic/testsuite/libatomic.c/atomic-op-1.c
+++ b/libatomic/testsuite/libatomic.c/atomic-op-1.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_*OP builtin routines for a char. */
@@ -527,6 +526,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/libatomic/testsuite/libatomic.c/atomic-op-2.c b/libatomic/testsuite/libatomic.c/atomic-op-2.c
index 8755340cca2..436b206b422 100644
--- a/libatomic/testsuite/libatomic.c/atomic-op-2.c
+++ b/libatomic/testsuite/libatomic.c/atomic-op-2.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_*OP builtin routines for a short. */
@@ -528,6 +527,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/libatomic/testsuite/libatomic.c/atomic-op-3.c b/libatomic/testsuite/libatomic.c/atomic-op-3.c
index 69db4894b63..d72be2e9d30 100644
--- a/libatomic/testsuite/libatomic.c/atomic-op-3.c
+++ b/libatomic/testsuite/libatomic.c/atomic-op-3.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_long } */
/* Test the execution of the __atomic_*OP builtin routines for an int. */
@@ -527,6 +526,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/libatomic/testsuite/libatomic.c/atomic-op-4.c b/libatomic/testsuite/libatomic.c/atomic-op-4.c
index 7c4a819bfaa..0998c3a6548 100644
--- a/libatomic/testsuite/libatomic.c/atomic-op-4.c
+++ b/libatomic/testsuite/libatomic.c/atomic-op-4.c
@@ -1,9 +1,7 @@
/* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */
-/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* Test the execution of the __atomic_*OP builtin routines for long long. */
@@ -529,6 +527,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/libatomic/testsuite/libatomic.c/atomic-op-5.c b/libatomic/testsuite/libatomic.c/atomic-op-5.c
index e78d8150997..763880da0fc 100644
--- a/libatomic/testsuite/libatomic.c/atomic-op-5.c
+++ b/libatomic/testsuite/libatomic.c/atomic-op-5.c
@@ -1,8 +1,7 @@
/* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_128_runtime } */
-/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-require-effective-target int128 } */
/* Test the execution of the __atomic_*OP builtin routines for an int_128. */
@@ -528,6 +527,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/libatomic/testsuite/libatomic.c/atomic-store-1.c b/libatomic/testsuite/libatomic.c/atomic-store-1.c
index f99eb9c844f..019aa423f2e 100644
--- a/libatomic/testsuite/libatomic.c/atomic-store-1.c
+++ b/libatomic/testsuite/libatomic.c/atomic-store-1.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_store_n builtin for a char. */
@@ -9,6 +8,7 @@ extern void abort(void);
char v, count;
+int
main ()
{
v = 0;
diff --git a/libatomic/testsuite/libatomic.c/atomic-store-2.c b/libatomic/testsuite/libatomic.c/atomic-store-2.c
index da346fd7de4..278152788fb 100644
--- a/libatomic/testsuite/libatomic.c/atomic-store-2.c
+++ b/libatomic/testsuite/libatomic.c/atomic-store-2.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_store_n builtin for a short. */
@@ -9,6 +8,7 @@ extern void abort(void);
short v, count;
+int
main ()
{
v = 0;
diff --git a/libatomic/testsuite/libatomic.c/atomic-store-3.c b/libatomic/testsuite/libatomic.c/atomic-store-3.c
index b691da4592f..dbbb32d86cd 100644
--- a/libatomic/testsuite/libatomic.c/atomic-store-3.c
+++ b/libatomic/testsuite/libatomic.c/atomic-store-3.c
@@ -1,7 +1,6 @@
/* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_long } */
/* Test the execution of the __atomic_store_n builtin for an int. */
@@ -9,6 +8,7 @@ extern void abort(void);
int v, count;
+int
main ()
{
v = 0;
diff --git a/libatomic/testsuite/libatomic.c/atomic-store-4.c b/libatomic/testsuite/libatomic.c/atomic-store-4.c
index 0863be99d01..a69b9d07896 100644
--- a/libatomic/testsuite/libatomic.c/atomic-store-4.c
+++ b/libatomic/testsuite/libatomic.c/atomic-store-4.c
@@ -1,9 +1,7 @@
/* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */
-/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* Test the execution of the __atomic_store_n builtin for a long long. */
@@ -11,6 +9,7 @@ extern void abort(void);
long long v, count;
+int
main ()
{
v = 0;
diff --git a/libatomic/testsuite/libatomic.c/atomic-store-5.c b/libatomic/testsuite/libatomic.c/atomic-store-5.c
index 763d29e240c..16440ce0059 100644
--- a/libatomic/testsuite/libatomic.c/atomic-store-5.c
+++ b/libatomic/testsuite/libatomic.c/atomic-store-5.c
@@ -1,8 +1,7 @@
/* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */
/* { dg-do run } */
-/* { dg-require-effective-target sync_int_128_runtime } */
-/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-require-effective-target int128 } */
/* Test the execution of the __atomic_store_n builtin for a 16 byte value. */
@@ -10,6 +9,7 @@ extern void abort(void);
__int128_t v, count;
+int
main ()
{
v = 0;