config.gcc (i[34567]86-*-solaris2*): Default with_arch_32 to pentiumpro on Solaris 8 and 9/x86.

gcc:
	* config.gcc (i[34567]86-*-solaris2*): Default with_arch_32 to
	pentiumpro on Solaris 8 and 9/x86.
	* doc/install.texi (Specific, i?86-*-solaris2.[89]): Recommend GNU as.
	Document SSE/SSE2 support.
	* doc/sourcebuild.texi (Effective-Target Keywords): Document sse.

	gcc/testsuite:
	* lib/target-supports.exp (check_effective_target_sse): New proc.
	* gcc.target/i386/sol2-check.h: New file.
	* gcc.target/i386/sse-check.h (ILL_INSN, ILL_INSN_LEN): Define.
	Include sol2-check.h.
	(main) Only run do_test () if sol2_check ().
	* gcc.target/i386/sse2-check.h: Likewise.
	* gcc.target/i386/sse3-check.h: Likewise.
	* gcc.dg/vect/tree-vect.h (check_vect) [__i386__ || __x86_64__]
	[__sun__ && __svr4__]: Execute SSE2 instruction.
	* gcc.target/i386/math-torture/math-torture.exp: Only add options
	with -msse to MATH_TORTURE_OPTIONS if check_effective_target_sse.
	* g++.dg/debug/dwarf2/const2b.C: Use dg-require-effective-target sse.
	* g++.dg/ext/vector14.C: Likewise.
	* g++.dg/other/mmintrin.C: Likewise.
	* gcc.dg/20020418-1.c: Likewise.
	* gcc.dg/debug/dwarf2/const-2b.c: Likewise.
	* gcc.dg/format/ms_unnamed-1.c: Likewise.
	* gcc.dg/format/unnamed-1.c: Likewise.
	Adapt dg-warning line number.
	* gcc.dg/graphite/pr40281.c: Likewise.
	* gcc.dg/pr32176.c: Likewise.
	* gcc.dg/pr40550.c: Likewise.
	* gcc.dg/prefetch-loop-arrays-1.c: Likewise.
	* gcc.dg/torture/pr36891.c: Likewise.
	* gcc.target/i386/20020218-1.c: Likewise.
	* gcc.target/i386/20020523.c: Likewise.
	* gcc.target/i386/abi-1.c: Likewise.
	* gcc.target/i386/brokensqrt.c: Likewise.
	* gcc.target/i386/fastcall-sseregparm.c: Likewise.
	* gcc.target/i386/pr13366.c: Likewise.
	* gcc.target/i386/pr13685.c: Likewise.
	* gcc.target/i386/pr24306.c: Likewise.
	* gcc.target/i386/pr31486.c: Likewise.
	* gcc.target/i386/pr32065-1.c: Likewise.
	* gcc.target/i386/pr32065-2.c: Likewise.
	* gcc.target/i386/pr32389.c: Likewise.
	* gcc.target/i386/pr38824.c: Likewise.
	* gcc.target/i386/pr38931.c: Likewise.
	* gcc.target/i386/pr39592-1.c: Likewise.
	* gcc.target/i386/pr43766.c: Likewise.
	* gcc.target/i386/recip-divf.c: Likewise.
	* gcc.target/i386/recip-sqrtf.c: Likewise.
	* gcc.target/i386/recip-vec-divf.c: Likewise.
	* gcc.target/i386/recip-vec-sqrtf.c: Likewise.
	* gcc.target/i386/sse-1.c: Likewise.
	* gcc.target/i386/sse-16.c: Likewise.
	* gcc.target/i386/sse-2.c: Likewise.
	* gcc.target/i386/sse-20.c: Likewise.
	* gcc.target/i386/sse-3.c: Likewise.
	* gcc.target/i386/sse-7.c: Likewise.
	* gcc.target/i386/sse-9.c: Likewise.
	* gcc.target/i386/sse-addps-1.c: Likewise.
	* gcc.target/i386/sse-addss-1.c: Likewise.
	* gcc.target/i386/sse-andnps-1.c: Likewise.
	* gcc.target/i386/sse-andps-1.c: Likewise.
	* gcc.target/i386/sse-cmpss-1.c: Likewise.
	* gcc.target/i386/sse-comiss-1.c: Likewise.
	* gcc.target/i386/sse-comiss-2.c: Likewise.
	* gcc.target/i386/sse-comiss-3.c: Likewise.
	* gcc.target/i386/sse-comiss-4.c: Likewise.
	* gcc.target/i386/sse-comiss-5.c: Likewise.
	* gcc.target/i386/sse-comiss-6.c: Likewise.
	* gcc.target/i386/sse-copysignf-vec.c: Likewise.
	* gcc.target/i386/sse-cvtsi2ss-1.c: Likewise.
	* gcc.target/i386/sse-cvtsi2ss-2.c: Likewise.
	* gcc.target/i386/sse-cvtss2si-1.c: Likewise.
	* gcc.target/i386/sse-cvtss2si-2.c: Likewise.
	* gcc.target/i386/sse-cvttss2si-1.c: Likewise.
	* gcc.target/i386/sse-cvttss2si-2.c: Likewise.
	* gcc.target/i386/sse-divps-1.c: Likewise.
	* gcc.target/i386/sse-divss-1.c: Likewise.
	* gcc.target/i386/sse-init-v4hi-1.c: Likewise.
	* gcc.target/i386/sse-init-v4sf-1.c: Likewise.
	* gcc.target/i386/sse-maxps-1.c: Likewise.
	* gcc.target/i386/sse-maxss-1.c: Likewise.
	* gcc.target/i386/sse-minps-1.c: Likewise.
	* gcc.target/i386/sse-minss-1.c: Likewise.
	* gcc.target/i386/sse-movaps-1.c: Likewise.
	* gcc.target/i386/sse-movaps-2.c: Likewise.
	* gcc.target/i386/sse-movhlps-1.c: Likewise.
	* gcc.target/i386/sse-movhps-1.c: Likewise.
	* gcc.target/i386/sse-movhps-2.c: Likewise.
	* gcc.target/i386/sse-movlhps-1.c: Likewise.
	* gcc.target/i386/sse-movmskps-1.c: Likewise.
	* gcc.target/i386/sse-movntps-1.c: Likewise.
	* gcc.target/i386/sse-movss-1.c: Likewise.
	* gcc.target/i386/sse-movss-2.c: Likewise.
	* gcc.target/i386/sse-movss-3.c: Likewise.
	* gcc.target/i386/sse-movups-1.c: Likewise.
	* gcc.target/i386/sse-movups-2.c: Likewise.
	* gcc.target/i386/sse-mulps-1.c: Likewise.
	* gcc.target/i386/sse-mulss-1.c: Likewise.
	* gcc.target/i386/sse-orps-1.c: Likewise.
	* gcc.target/i386/sse-rcpps-1.c: Likewise.
	* gcc.target/i386/sse-recip-vec.c: Likewise.
	* gcc.target/i386/sse-recip.c: Likewise.
	* gcc.target/i386/sse-rsqrtps-1.c: Likewise.
	* gcc.target/i386/sse-set-ps-1.c: Likewise.
	* gcc.target/i386/sse-sqrtps-1.c: Likewise.
	* gcc.target/i386/sse-subps-1.c: Likewise.
	* gcc.target/i386/sse-subss-1.c: Likewise.
	* gcc.target/i386/sse-ucomiss-1.c: Likewise.
	* gcc.target/i386/sse-ucomiss-2.c: Likewise.
	* gcc.target/i386/sse-ucomiss-3.c: Likewise.
	* gcc.target/i386/sse-ucomiss-4.c: Likewise.
	* gcc.target/i386/sse-ucomiss-5.c: Likewise.
	* gcc.target/i386/sse-ucomiss-6.c: Likewise.
	* gcc.target/i386/sse-unpckhps-1.c: Likewise.
	* gcc.target/i386/sse-unpcklps-1.c: Likewise.
	* gcc.target/i386/sse-xorps-1.c: Likewise.
	* gcc.target/i386/ssefn-1.c: Likewise.
	* gcc.target/i386/ssefn-3.c: Likewise.
	* gcc.target/i386/sseregparm-1.c: Likewise.
	* gcc.target/i386/stackalign/return-3.c: Likewise.
	* gcc.target/i386/vectorize1.c: Likewise.
	* gcc.target/i386/vperm-v4sf-1.c: Likewise.
	* gcc.target/i386/xorps-sse.c: Likewise.
	* gfortran.dg/pr28158.f90: Likewise.
	* gfortran.dg/pr30667.f: Likewise.
	* gnat.dg/loop_optimization7.adb: Likewise.
	* gnat.dg/sse_nolib.adb: Likewise.

	libgfortran:
	* config/fpu-387.h [__sun__ && __svr4__] Include <signal.h>,
	<ucontext.h>.
	(sigill_caught): New.
	(sigill_hdlr): New function
	(has_sse) [__sun__ && __svr4__]: Check if SSE instruction causes
	SIGILL.

From-SVN: r162073
This commit is contained in:
Rainer Orth 2010-07-12 11:32:42 +00:00 committed by Rainer Orth
parent e56d9a76ea
commit ae6a053582
122 changed files with 421 additions and 20 deletions

View File

@ -1,3 +1,11 @@
2010-07-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.gcc (i[34567]86-*-solaris2*): Default with_arch_32 to
pentiumpro on Solaris 8 and 9/x86.
* doc/install.texi (Specific, i?86-*-solaris2.[89]): Recommend GNU as.
Document SSE/SSE2 support.
* doc/sourcebuild.texi (Effective-Target Keywords): Document sse.
2010-07-12 Andi Kleen <ak@linux.intel.com>
* lto-symtab.c (lto_symtab_merge_decls_1): Use fatal_error

View File

@ -1253,13 +1253,10 @@ i[34567]86-*-solaris2*)
# Set default arch_32 to pentium4, tune_32 to generic like the other
# i386 targets, although config.guess defaults to i386-pc-solaris2*.
case ${target} in
*-*-solaris2.8*)
if test x$gas = xyes; then
with_arch_32=${with_arch_32:-pentium4}
else
# Solaris 8/x86 as cannot handle sse2.
with_arch_32=${with_arch_32:-pentiumpro}
fi
*-*-solaris2.[89]*)
# Solaris 8 and 9/x86 cannot execute SSE/SSE2 instructions by
# default.
with_arch_32=${with_arch_32:-pentiumpro}
;;
*)
with_arch_32=${with_arch_32:-pentium4}

View File

@ -2898,6 +2898,8 @@ information are.
@item
@uref{#ix86-x-linux,,i?86-*-linux*}
@item
@uref{#ix86-x-solaris289,,i?86-*-solaris2.[89]}
@item
@uref{#ix86-x-solaris210,,i?86-*-solaris2.10}
@item
@uref{#ia64-x-linux,,ia64-*-linux}
@ -3470,6 +3472,26 @@ If you receive Signal 11 errors when building on GNU/Linux, then it is
possible you have a hardware problem. Further information on this can be
found on @uref{http://www.bitwizard.nl/sig11/,,www.bitwizard.nl}.
@html
<hr />
@end html
@heading @anchor{ix86-x-solaris289}i?86-*-solaris2.[89]
The Sun assembler in Solaris 8 and 9 has several bugs and limitations.
While GCC works around them, several features are missing, so it is
@c FIXME: which ones?
recommended to use the GNU assembler instead. There is no bundled
version, but the current version, from GNU binutils 2.20.1, is known to
work.
Solaris~2/x86 doesn't support the execution of SSE/SSE2 instructions
before Solaris~9 4/04, even if the CPU supports them. Programs will
receive @code{SIGILL} if they try. The fix is available both in
Solaris~9 Update~6 and kernel patch 112234-12 or newer. There is no
corresponding patch for Solaris 8. To avoid this problem,
@option{-march} defaults to @samp{pentiumpro} on Solaris 8 and 9. If
you have the patch installed, you can configure GCC with an appropriate
@option{--with-arch} option, but need GNU @command{as} for SSE2 support.
@html
<hr />
@end html

View File

@ -1604,6 +1604,9 @@ Target uses a ColdFire FPU.
@item hard_float
Target supports FPU instructions.
@item sse
Target supports compiling @code{sse} instructions.
@item sse2
Target supports compiling @code{sse2} instructions.

View File

@ -1,3 +1,127 @@
2010-07-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/target-supports.exp (check_effective_target_sse): New proc.
* gcc.target/i386/sol2-check.h: New file.
* gcc.target/i386/sse-check.h (ILL_INSN, ILL_INSN_LEN): Define.
Include sol2-check.h.
(main) Only run do_test () if sol2_check ().
* gcc.target/i386/sse2-check.h: Likewise.
* gcc.target/i386/sse3-check.h: Likewise.
* gcc.dg/vect/tree-vect.h (check_vect) [__i386__ || __x86_64__]
[__sun__ && __svr4__]: Execute SSE2 instruction.
* gcc.target/i386/math-torture/math-torture.exp: Only add options
with -msse to MATH_TORTURE_OPTIONS if check_effective_target_sse.
* g++.dg/debug/dwarf2/const2b.C: Use dg-require-effective-target sse.
* g++.dg/ext/vector14.C: Likewise.
* g++.dg/other/mmintrin.C: Likewise.
* gcc.dg/20020418-1.c: Likewise.
* gcc.dg/debug/dwarf2/const-2b.c: Likewise.
* gcc.dg/format/ms_unnamed-1.c: Likewise.
* gcc.dg/format/unnamed-1.c: Likewise.
Adapt dg-warning line number.
* gcc.dg/graphite/pr40281.c: Likewise.
* gcc.dg/pr32176.c: Likewise.
* gcc.dg/pr40550.c: Likewise.
* gcc.dg/prefetch-loop-arrays-1.c: Likewise.
* gcc.dg/torture/pr36891.c: Likewise.
* gcc.target/i386/20020218-1.c: Likewise.
* gcc.target/i386/20020523.c: Likewise.
* gcc.target/i386/abi-1.c: Likewise.
* gcc.target/i386/brokensqrt.c: Likewise.
* gcc.target/i386/fastcall-sseregparm.c: Likewise.
* gcc.target/i386/pr13366.c: Likewise.
* gcc.target/i386/pr13685.c: Likewise.
* gcc.target/i386/pr24306.c: Likewise.
* gcc.target/i386/pr31486.c: Likewise.
* gcc.target/i386/pr32065-1.c: Likewise.
* gcc.target/i386/pr32065-2.c: Likewise.
* gcc.target/i386/pr32389.c: Likewise.
* gcc.target/i386/pr38824.c: Likewise.
* gcc.target/i386/pr38931.c: Likewise.
* gcc.target/i386/pr39592-1.c: Likewise.
* gcc.target/i386/pr43766.c: Likewise.
* gcc.target/i386/recip-divf.c: Likewise.
* gcc.target/i386/recip-sqrtf.c: Likewise.
* gcc.target/i386/recip-vec-divf.c: Likewise.
* gcc.target/i386/recip-vec-sqrtf.c: Likewise.
* gcc.target/i386/sse-1.c: Likewise.
* gcc.target/i386/sse-16.c: Likewise.
* gcc.target/i386/sse-2.c: Likewise.
* gcc.target/i386/sse-20.c: Likewise.
* gcc.target/i386/sse-3.c: Likewise.
* gcc.target/i386/sse-7.c: Likewise.
* gcc.target/i386/sse-9.c: Likewise.
* gcc.target/i386/sse-addps-1.c: Likewise.
* gcc.target/i386/sse-addss-1.c: Likewise.
* gcc.target/i386/sse-andnps-1.c: Likewise.
* gcc.target/i386/sse-andps-1.c: Likewise.
* gcc.target/i386/sse-cmpss-1.c: Likewise.
* gcc.target/i386/sse-comiss-1.c: Likewise.
* gcc.target/i386/sse-comiss-2.c: Likewise.
* gcc.target/i386/sse-comiss-3.c: Likewise.
* gcc.target/i386/sse-comiss-4.c: Likewise.
* gcc.target/i386/sse-comiss-5.c: Likewise.
* gcc.target/i386/sse-comiss-6.c: Likewise.
* gcc.target/i386/sse-copysignf-vec.c: Likewise.
* gcc.target/i386/sse-cvtsi2ss-1.c: Likewise.
* gcc.target/i386/sse-cvtsi2ss-2.c: Likewise.
* gcc.target/i386/sse-cvtss2si-1.c: Likewise.
* gcc.target/i386/sse-cvtss2si-2.c: Likewise.
* gcc.target/i386/sse-cvttss2si-1.c: Likewise.
* gcc.target/i386/sse-cvttss2si-2.c: Likewise.
* gcc.target/i386/sse-divps-1.c: Likewise.
* gcc.target/i386/sse-divss-1.c: Likewise.
* gcc.target/i386/sse-init-v4hi-1.c: Likewise.
* gcc.target/i386/sse-init-v4sf-1.c: Likewise.
* gcc.target/i386/sse-maxps-1.c: Likewise.
* gcc.target/i386/sse-maxss-1.c: Likewise.
* gcc.target/i386/sse-minps-1.c: Likewise.
* gcc.target/i386/sse-minss-1.c: Likewise.
* gcc.target/i386/sse-movaps-1.c: Likewise.
* gcc.target/i386/sse-movaps-2.c: Likewise.
* gcc.target/i386/sse-movhlps-1.c: Likewise.
* gcc.target/i386/sse-movhps-1.c: Likewise.
* gcc.target/i386/sse-movhps-2.c: Likewise.
* gcc.target/i386/sse-movlhps-1.c: Likewise.
* gcc.target/i386/sse-movmskps-1.c: Likewise.
* gcc.target/i386/sse-movntps-1.c: Likewise.
* gcc.target/i386/sse-movss-1.c: Likewise.
* gcc.target/i386/sse-movss-2.c: Likewise.
* gcc.target/i386/sse-movss-3.c: Likewise.
* gcc.target/i386/sse-movups-1.c: Likewise.
* gcc.target/i386/sse-movups-2.c: Likewise.
* gcc.target/i386/sse-mulps-1.c: Likewise.
* gcc.target/i386/sse-mulss-1.c: Likewise.
* gcc.target/i386/sse-orps-1.c: Likewise.
* gcc.target/i386/sse-rcpps-1.c: Likewise.
* gcc.target/i386/sse-recip-vec.c: Likewise.
* gcc.target/i386/sse-recip.c: Likewise.
* gcc.target/i386/sse-rsqrtps-1.c: Likewise.
* gcc.target/i386/sse-set-ps-1.c: Likewise.
* gcc.target/i386/sse-sqrtps-1.c: Likewise.
* gcc.target/i386/sse-subps-1.c: Likewise.
* gcc.target/i386/sse-subss-1.c: Likewise.
* gcc.target/i386/sse-ucomiss-1.c: Likewise.
* gcc.target/i386/sse-ucomiss-2.c: Likewise.
* gcc.target/i386/sse-ucomiss-3.c: Likewise.
* gcc.target/i386/sse-ucomiss-4.c: Likewise.
* gcc.target/i386/sse-ucomiss-5.c: Likewise.
* gcc.target/i386/sse-ucomiss-6.c: Likewise.
* gcc.target/i386/sse-unpckhps-1.c: Likewise.
* gcc.target/i386/sse-unpcklps-1.c: Likewise.
* gcc.target/i386/sse-xorps-1.c: Likewise.
* gcc.target/i386/ssefn-1.c: Likewise.
* gcc.target/i386/ssefn-3.c: Likewise.
* gcc.target/i386/sseregparm-1.c: Likewise.
* gcc.target/i386/stackalign/return-3.c: Likewise.
* gcc.target/i386/vectorize1.c: Likewise.
* gcc.target/i386/vperm-v4sf-1.c: Likewise.
* gcc.target/i386/xorps-sse.c: Likewise.
* gfortran.dg/pr28158.f90: Likewise.
* gfortran.dg/pr30667.f: Likewise.
* gnat.dg/loop_optimization7.adb: Likewise.
* gnat.dg/sse_nolib.adb: Likewise.
2010-07-11 Tobias Burnus <burnus@net-b.de>
PR fortran/44702

View File

@ -1,5 +1,6 @@
/* { dg-do compile { target i386*-*-* } } */
/* { dg-options "-O -gdwarf-2 -dA -msse" } */
/* { dg-require-effective-target sse } */
/* { dg-final { scan-assembler "DW_AT_const_value" } } */
typedef float FloatVect __attribute__((__vector_size__(16)));

View File

@ -1,6 +1,7 @@
// PR c++/35758
// { dg-do compile }
// { dg-options "-msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
// { dg-options "-msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
// { dg-require-effective-target sse }
// Ignore warning on some powerpc-linux configurations.
// { dg-prune-output "non-standard ABI extension" }
// { dg-prune-output "mangled name" }

View File

@ -1,4 +1,5 @@
// { dg-do compile { target i?86-*-* x86_64-*-* } }
// { dg-options "-msse" }
// { dg-require-effective-target sse }
#include <xmmintrin.h>

View File

@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -msse -ffast-math" { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target sse { target i?86-*-* x86_64-*-* } } */
void bar (float *a, float *b);

View File

@ -1,5 +1,6 @@
/* { dg-do compile { target i386*-*-* } } */
/* { dg-options "-O -gdwarf-2 -dA -msse" } */
/* { dg-require-effective-target sse } */
/* { dg-final { scan-assembler "DW_AT_const_value" } } */
typedef float FloatVect __attribute__((__vector_size__(16)));

View File

@ -3,6 +3,7 @@
/* { dg-do compile { target { *-*-mingw* } } } */
/* { dg-options "-Wformat" } */
/* { dg-options "-Wformat -msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
/* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#define USE_SYSTEM_FORMATS
#include "format.h"

View File

@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-Wformat" } */
/* { dg-options "-Wformat -msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
/* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#include "format.h"
@ -20,5 +21,5 @@ f (TItype x)
{
printf("%d", x); /* { dg-warning "expects type" } */
printf("%d", 141592653589793238462643383279502884197169399375105820974944); /* { dg-warning "expects type" } */
/* { dg-warning "unsigned only|too large" "constant" { target *-*-* } 22 } */
/* { dg-warning "unsigned only|too large" "constant" { target *-*-* } 23 } */
}

View File

@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O -fprefetch-loop-arrays -w" } */
/* { dg-options "-O -fprefetch-loop-arrays -march=i686 -msse -w" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
/* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
void foo(int);
void bar(int n)

View File

@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fprefetch-loop-arrays -w" } */
/* { dg-options "-O2 -fprefetch-loop-arrays -march=i686 -msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
/* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
void foo (void)
{

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
/* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#ifdef __i386__
#include "cpuid.h"

View File

@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fprefetch-loop-arrays -w" } */
/* { dg-options "-O2 -fprefetch-loop-arrays -march=i686 -msse -w" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
/* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
__extension__ typedef __SIZE_TYPE__ size_t;

View File

@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-ffast-math" } */
/* { dg-options "-ffast-math -msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
/* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#define __vector __attribute__((vector_size(16) ))
__vector float f(void);

View File

@ -41,6 +41,11 @@ check_vect (void)
want_level = 1, want_c = bit_SSSE3, want_d = 0;
# else
want_level = 1, want_c = 0, want_d = bit_SSE2;
# if defined(__sun__) && defined(__svr4__)
/* Before Solaris 9 4/04, trying to execute an SSE2 instruction gives
SIGILL even if the CPU can handle them. */
asm volatile ("unpcklpd %xmm0,%xmm2");
# endif
# endif
if (!__get_cpuid (want_level, &a, &b, &c, &d)

View File

@ -1,6 +1,7 @@
/* Verify that X86-64 only SSE registers aren't restored on IA-32. */
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-require-effective-target sse } */
/* { dg-options "-O2 -msse" } */
/* { dg-final { scan-assembler-not "xmm8" } } */

View File

@ -4,6 +4,7 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse -mfpmath=sse -ffast-math" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,6 +1,7 @@
/* Make certain that we pass V2DF in the correct register for SSE1. */
/* { dg-do compile } */
/* { dg-options "-O1 -msse -mno-sse2" } */
/* { dg-require-effective-target sse } */
typedef double v2df __attribute__((vector_size (16)));
v2df foo (void) { return (v2df){ 1.0, 2.0 }; }

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -ffast-math -msse -mfpmath=sse -mrecip" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"
extern float sqrtf (float);

View File

@ -1,6 +1,7 @@
/* { dg-do run } */
/* { dg-options "-mpreferred-stack-boundary=4 -msse" } */
/* { dg-require-effective-target ilp32 } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -28,19 +28,23 @@ if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
set MATH_TORTURE_OPTIONS [list \
{ -O0 } \
{ -O0 -mfpmath=387 } \
{ -O0 -msse -mno-sse2 -mfpmath=sse } \
{ -O0 -msse -mno-sse2 -mfpmath=sse,387 } \
{ -O0 -mfpmath=387 -ffast-math } \
{ -O0 -msse -mno-sse2 -mfpmath=sse -ffast-math } \
{ -O0 -msse -mno-sse2 -mfpmath=sse,387 -ffast-math } \
{ -O2 } \
{ -O2 -mfpmath=387 } \
{ -O2 -mfpmath=387 -ffast-math } \
]
if { [check_effective_target_sse] } {
lappend MATH_TORTURE_OPTIONS \
{ -O0 -msse -mno-sse2 -mfpmath=sse } \
{ -O0 -msse -mno-sse2 -mfpmath=sse,387 } \
{ -O0 -msse -mno-sse2 -mfpmath=sse -ffast-math } \
{ -O0 -msse -mno-sse2 -mfpmath=sse,387 -ffast-math } \
{ -O2 -msse -mno-sse2 -mfpmath=sse } \
{ -O2 -msse -mno-sse2 -mfpmath=sse,387 } \
{ -O2 -mfpmath=387 -ffast-math } \
{ -O2 -msse -mno-sse2 -mfpmath=sse -ffast-math } \
{ -O2 -msse -mno-sse2 -mfpmath=sse,387 -ffast-math } \
]
}
if { [check_effective_target_sse2] } {
lappend MATH_TORTURE_OPTIONS \

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O -msse" } */
/* { dg-require-effective-target sse } */
#include <xmmintrin.h>

View File

@ -1,6 +1,7 @@
/* PR target/13685 */
/* { dg-do run } */
/* { dg-options "-Os -msse" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-msse" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-msse -mno-sse2" } */
/* { dg-require-effective-target sse } */
typedef double __v2df __attribute__ ((vector_size (16)));

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target dfp } */
/* { dg-require-effective-target sse } */
/* { dg-options "-msse -std=gnu99" } */
_Decimal128 test (void)

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target dfp } */
/* { dg-require-effective-target sse } */
/* { dg-options "-Os -msse -std=gnu99" } */
#include "sse-check.h"

View File

@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-require-effective-target sse } */
/* { dg-options "-msse" } */
double f1();

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
typedef float v4sf __attribute__ ((__vector_size__ (16)));

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
typedef int __m64 __attribute__ ((__vector_size__ (8)));

View File

@ -2,6 +2,7 @@
39592. */
/* { dg-do compile } */
/* { dg-options "-ansi -msse" } */
/* { dg-require-effective-target sse } */
double
foo (unsigned long var)

View File

@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -msse -mregparm=3" { target ilp32 } } */
/* { dg-require-effective-target sse } */
void p (int *a, int i)
{

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -msse -mfpmath=sse -mrecip" } */
/* { dg-require-effective-target sse } */
float t1(float a, float b)
{

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -msse -mfpmath=sse -mrecip" } */
/* { dg-require-effective-target sse } */
extern float sqrtf (float);

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse -mfpmath=sse -mrecip" } */
/* { dg-require-effective-target sse } */
float a[16];
float b[16];

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse -mfpmath=sse -mrecip" } */
/* { dg-require-effective-target sse } */
float a[16];
float b[16];

View File

@ -0,0 +1,48 @@
#if defined(__sun__) && defined(__svr4__)
/* Make sure sigaction() is declared even with -std=c99. */
#define __EXTENSIONS__
#include <signal.h>
#include <ucontext.h>
static volatile sig_atomic_t sigill_caught;
static void
sigill_hdlr (int sig __attribute((unused)),
siginfo_t *sip __attribute__((unused)),
ucontext_t *ucp)
{
sigill_caught = 1;
/* Set PC to the instruction after the faulting one to skip over it,
otherwise we enter an infinite loop. */
ucp->uc_mcontext.gregs[EIP] += ILL_INSN_LEN;
setcontext (ucp);
}
#endif
/* Solaris 2 before Solaris 9 4/04 cannot execute SSE/SSE2 instructions
even if the CPU supports them. Programs receive SIGILL instead, so
check for that at runtime. */
static int
sol2_check (void)
{
#if defined(__sun__) && defined(__svr4__)
struct sigaction act, oact;
act.sa_handler = sigill_hdlr;
sigemptyset (&act.sa_mask);
/* Need to set SA_SIGINFO so a ucontext_t * is passed to the handler. */
act.sa_flags = SA_SIGINFO;
sigaction (SIGILL, &act, &oact);
ILL_INSN;
sigaction (SIGILL, &oact, NULL);
if (sigill_caught)
exit (0);
else
return 1;
#else
return 1;
#endif /* __sun__ && __svr4__ */
}

View File

@ -1,6 +1,7 @@
/* PR 12902 */
/* { dg-do compile } */
/* { dg-options "-O1 -msse" } */
/* { dg-require-effective-target sse } */
#include <xmmintrin.h>

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O0 -msse" } */
/* { dg-require-effective-target sse } */
typedef float __vr __attribute__ ((vector_size (16)));

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -msse" } */
/* { dg-require-effective-target sse } */
#include <xmmintrin.h>
static const __m128 v_sign = {-.0f, -.0f, -.0f, -.0f};
static const __m128 v_half = {0.5f, 0.5f, 0.5f, 0.5f};

View File

@ -1,5 +1,6 @@
/* PR target/13685 */
/* { dg-options "-Os -msse" } */
/* { dg-require-effective-target sse } */
typedef float __m128 __attribute__ ((vector_size (16)));
typedef int __m64 __attribute__ ((vector_size (8)));

View File

@ -1,6 +1,7 @@
/* PR target/21149 */
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,9 +1,14 @@
#include <stdio.h>
#include <stdlib.h>
#include "m128-check.h"
#include "cpuid.h"
/* We need a single SSE instruction here so the handler can safely skip
over it. */
#define ILL_INSN __asm__ volatile ("movss %xmm2,%xmm1")
#define ILL_INSN_LEN 4
#include "sol2-check.h"
static void sse_test (void);
static void
@ -22,7 +27,7 @@ main ()
return 0;
/* Run SSE test only if host has SSE support. */
if (edx & bit_SSE)
if ((edx & bit_SSE) && sol2_check ())
do_test ();
return 0;

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse -std=c99" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -ftree-vectorize -msse" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target lp64 } */
/* { dg-require-effective-target sse } */
/* { dg-options "-O2 -msse" } */
#ifndef CHECK_H

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target lp64 } */
/* { dg-require-effective-target sse } */
/* { dg-options "-O2 -msse" } */
#ifndef CHECK_H

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target lp64 } */
/* { dg-require-effective-target sse } */
/* { dg-options "-O2 -msse" } */
#ifndef CHECK_H

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse -mfpmath=sse -mrecip" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -ffast-math -msse -mfpmath=sse -mrecip" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#include "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

View File

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -msse" } */
/* { dg-require-effective-target sse } */
#ifndef CHECK_H
#define CHECK_H "sse-check.h"

Some files were not shown because too many files have changed in this diff Show More