Commit 8a0678fa by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

Handle recent changes in default atomics for cris*-*-linux*.

	* gcc.target/cris/torture/sync-mis-xchg-i-1ml.c,
	gcc.target/cris/torture/sync-mis-xchg-i-2ml.c,
	gcc.target/cris/torture/sync-mis-xchg-i-3ml.c,
	gcc.target/cris/torture/sync-mis-xchg-s-1ml.c,
	gcc.target/cris/torture/sync-mis-op-i-1ml.c,
	gcc.target/cris/torture/sync-mis-op-i-2ml.c,
	gcc.target/cris/torture/sync-mis-op-i-3ml.c,
	gcc.target/cris/torture/sync-mis-op-s-1ml.c: New tests.
	* gcc.target/cris/torture/sync-mis-op-i-2a.c: Make sure
	-mno-unaligned-atomic-may-use-library is in effect for
	cris*-*-linux*.
	* gcc.target/cris/torture/sync-mis-xchg-i-1.c,
	gcc.target/cris/torture/sync-mis-xchg-i-2.c,
	gcc.target/cris/torture/sync-mis-xchg-i-3.c,
	gcc.target/cris/torture/sync-mis-xchg-i-2a.c,
	gcc.target/cris/torture/sync-mis-xchg-s-1.c,
	gcc.target/cris/torture/sync-mis-op-i-1.c,
	gcc.target/cris/torture/sync-mis-op-i-2.c,
	gcc.target/cris/torture/sync-mis-op-i-1a.c,
	gcc.target/cris/torture/sync-mis-op-i-3.c,
	gcc.target/cris/torture/sync-mis-op-i-3a.c,
	gcc.target/cris/torture/sync-mis-op-s-1a.c,
	gcc.target/cris/torture/sync-mis-xchg-i-1a.c,
	gcc.target/cris/torture/sync-mis-xchg-i-3a.c,
	gcc.target/cris/torture/sync-mis-xchg-s-1a.c: Similar.
	* gcc.target/cris/torture/sync-mis-op-s-1.c: Ditto.
	(main): Remove local variable x.
	[mis_ok]: Check that atomics don't fail.

From-SVN: r189757
parent 888b670f
2012-07-22 Hans-Peter Nilsson <hp@axis.com>
Handle recent changes in default atomics for cris*-*-linux*.
* gcc.target/cris/torture/sync-mis-xchg-i-1ml.c,
gcc.target/cris/torture/sync-mis-xchg-i-2ml.c,
gcc.target/cris/torture/sync-mis-xchg-i-3ml.c,
gcc.target/cris/torture/sync-mis-xchg-s-1ml.c,
gcc.target/cris/torture/sync-mis-op-i-1ml.c,
gcc.target/cris/torture/sync-mis-op-i-2ml.c,
gcc.target/cris/torture/sync-mis-op-i-3ml.c,
gcc.target/cris/torture/sync-mis-op-s-1ml.c: New tests.
* gcc.target/cris/torture/sync-mis-op-i-2a.c: Make sure
-mno-unaligned-atomic-may-use-library is in effect for
cris*-*-linux*.
* gcc.target/cris/torture/sync-mis-xchg-i-1.c,
gcc.target/cris/torture/sync-mis-xchg-i-2.c,
gcc.target/cris/torture/sync-mis-xchg-i-3.c,
gcc.target/cris/torture/sync-mis-xchg-i-2a.c,
gcc.target/cris/torture/sync-mis-xchg-s-1.c,
gcc.target/cris/torture/sync-mis-op-i-1.c,
gcc.target/cris/torture/sync-mis-op-i-2.c,
gcc.target/cris/torture/sync-mis-op-i-1a.c,
gcc.target/cris/torture/sync-mis-op-i-3.c,
gcc.target/cris/torture/sync-mis-op-i-3a.c,
gcc.target/cris/torture/sync-mis-op-s-1a.c,
gcc.target/cris/torture/sync-mis-xchg-i-1a.c,
gcc.target/cris/torture/sync-mis-xchg-i-3a.c,
gcc.target/cris/torture/sync-mis-xchg-s-1a.c: Similar.
* gcc.target/cris/torture/sync-mis-op-s-1.c: Ditto.
(main): Remove local variable x.
[mis_ok]: Check that atomics don't fail.
2012-07-21 Andrew Pinski <apinski@cavium.com>
* gcc.dg/tree-ssa/vrp72.c: New test.
......
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=int" } */
/* { dg-options "-Dop -Dtype=int -mno-unaligned-atomic-may-use-library" } */
#include "sync-mis-op-s-1.c"
......@@ -2,4 +2,5 @@
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=int -DTRAP_USING_ABORT -mno-trap-using-break8" } */
/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=int -Dmis_ok" } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=int -Dmisalignment=2" } */
/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -mno-unaligned-atomic-may-use-library" } */
#include "sync-mis-op-s-1.c"
......@@ -2,4 +2,5 @@
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -Dmis_ok" } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=int -Dmisalignment=3" } */
/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -mno-unaligned-atomic-may-use-library" } */
#include "sync-mis-op-s-1.c"
......@@ -2,4 +2,5 @@
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -Dmis_ok" } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=short" } */
/* { dg-options "-Dop -Dtype=short -mno-unaligned-atomic-may-use-library" } */
/* Make sure we get a SIGTRAP or equivalent when passing unaligned
but otherwise valid pointers to the atomic builtins. */
......@@ -76,7 +76,6 @@ void trap_handler(int signum)
int main(void)
{
type x = 0;
type ret;
#ifndef TRAP_USING_ABORT
......@@ -86,7 +85,9 @@ int main(void)
#endif
#endif
#ifndef mis_ok
trap_expected = 1;
#endif
#if op
sfa (&s.i, &s.i, 42);
......@@ -98,10 +99,24 @@ int main(void)
should do it. */
trap_expected = 0;
#ifdef mis_ok
/* We're missing a sequence point, but we shouldn't have the initial
value. */
if (s.i == (type) 0xdeadbeef)
abort ();
exit (0);
#endif
sfa (&x, &x, 1);
#else
acen (&s.i, &x, &ret);
#ifdef mis_ok
if (s.i != 2 || x != 2 || ret != (type) 0xdeadbeef)
abort ();
exit (0);
#endif
trap_expected = 0;
acen (&x, &x, &ret);
......
......@@ -2,4 +2,5 @@
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=short -DTRAP_USING_ABORT -mno-trap-using-break8" } */
/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dop -Dtype=short -Dmis_ok" } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=int" } */
/* { dg-options "-Dxchg -Dtype=int -mno-unaligned-atomic-may-use-library" } */
#include "sync-mis-op-s-1.c"
......@@ -2,4 +2,5 @@
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=int -DTRAP_USING_ABORT -mno-trap-using-break8" } */
/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=int -Dmis_ok" } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2" } */
/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -mno-unaligned-atomic-may-use-library" } */
#include "sync-mis-op-s-1.c"
......@@ -2,4 +2,5 @@
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -Dmis_ok" } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3" } */
/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -mno-unaligned-atomic-may-use-library" } */
#include "sync-mis-op-s-1.c"
......@@ -2,4 +2,5 @@
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -Dmis_ok" } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=short" } */
/* { dg-options "-Dxchg -Dtype=short -mno-unaligned-atomic-may-use-library" } */
#include "sync-mis-op-s-1.c"
......@@ -2,4 +2,5 @@
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=short -DTRAP_USING_ABORT -mno-trap-using-break8" } */
/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
#include "sync-mis-op-s-1.c"
/* { dg-do run { target *-*-linux* } } */
/* { dg-additional-sources "../sync-1.c" } */
/* { dg-options "-Dxchg -Dtype=short -Dmis_ok" } */
#include "sync-mis-op-s-1.c"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment