sfp-machine.h (FP_HANDLE_EXCEPTIONS): Support Sun assembler syntax.

libgcc:
	* config/i386/32/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Support Sun
	assembler syntax.

	gcc:
	* config.gcc (i[34567]86-*-solaris2*): Default with_arch_32 to
	pentiumpro on Solaris 8/x86 with Sun as.
	* configure.ac (gcc_cv_as_hidden): Check for Solaris 9/x86 as
	hidden alias bug.
	(gcc_cv_as_ix86_quad): Check for .quad directive.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/i386/sol2.h (ASM_QUAD): Change guard to !HAVE_AS_IX86_QUAD.

From-SVN: r159569
This commit is contained in:
Rainer Orth 2010-05-19 15:31:00 +00:00 committed by Rainer Orth
parent 16e520b612
commit ed1041376a
8 changed files with 133 additions and 6 deletions

View File

@ -1,3 +1,14 @@
2010-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.gcc (i[34567]86-*-solaris2*): Default with_arch_32 to
pentiumpro on Solaris 8/x86 with Sun as.
* configure.ac (gcc_cv_as_hidden): Check for Solaris 9/x86 as
hidden alias bug.
(gcc_cv_as_ix86_quad): Check for .quad directive.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/sol2.h (ASM_QUAD): Change guard to !HAVE_AS_IX86_QUAD.
2010-05-19 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (ipa_print_node_jump_functions): Print jump functions

View File

@ -1225,7 +1225,19 @@ i[34567]86-*-solaris2*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h"
# Set default arch_32 to pentium4, tune_32 to generic like the other
# i386 targets, although config.guess defaults to i386-pc-solaris2*.
with_arch_32=${with_arch_32:-pentium4}
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
;;
*)
with_arch_32=${with_arch_32:-pentium4}
;;
esac
with_tune_32=${with_tune_32:-generic}
case ${target} in
*-*-solaris2.1[0-9]*)

View File

@ -315,6 +315,12 @@
#endif
/* Define if your assembler supports the .quad directive. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_IX86_QUAD
#endif
/* Define if your assembler supports the sahf mnemonic. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_IX86_SAHF

View File

@ -72,7 +72,7 @@ along with GCC; see the file COPYING3. If not see
#define LOCAL_LABEL_PREFIX "."
/* The 32-bit Solaris assembler does not support .quad. Do not use it. */
#ifndef TARGET_BI_ARCH
#ifndef HAVE_AS_IX86_QUAD
#undef ASM_QUAD
#endif

61
gcc/configure vendored
View File

@ -21258,7 +21258,35 @@ foobar:' > conftest.s
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then
gcc_cv_as_hidden=yes
# Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with
# STV_HIDDEN, so disable .hidden support if so.
case "${target}" in
i?86-*-solaris2*)
if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then
cat > conftest.s <<EOF
.globl hidden
.hidden hidden
hidden:
.globl default
.set default,hidden
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
&& $gcc_cv_objdump -t conftest.o 2>/dev/null | \
grep '\.hidden default' > /dev/null; then
gcc_cv_as_hidden=no
else
gcc_cv_as_hidden=yes
fi
else
# Assume bug is present if objdump is missing.
gcc_cv_as_hidden=no
fi
;;
*)
gcc_cv_as_hidden=yes
;;
esac
else
echo "configure: failed program was" >&5
cat conftest.s >&5
@ -23127,6 +23155,37 @@ if test $gcc_cv_as_ix86_ffreep = yes; then
$as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5
$as_echo_n "checking assembler for .quad directive... " >&6; }
if test "${gcc_cv_as_ix86_quad+set}" = set; then :
$as_echo_n "(cached) " >&6
else
gcc_cv_as_ix86_quad=no
if test x$gcc_cv_as != x; then
echo '.quad 0' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then
gcc_cv_as_ix86_quad=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_quad" >&5
$as_echo "$gcc_cv_as_ix86_quad" >&6; }
if test $gcc_cv_as_ix86_quad = yes; then
$as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5

View File

@ -2152,7 +2152,35 @@ gcc_GAS_CHECK_FEATURE([.nsubspa comdat], gcc_cv_as_nsubspa_comdat,
gcc_GAS_CHECK_FEATURE([.hidden], gcc_cv_as_hidden,
[elf,2,13,0],,
[ .hidden foobar
foobar:])
foobar:],[
# Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with
# STV_HIDDEN, so disable .hidden support if so.
case "${target}" in
i?86-*-solaris2*)
if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then
cat > conftest.s <<EOF
.globl hidden
.hidden hidden
hidden:
.globl default
.set default,hidden
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
&& $gcc_cv_objdump -t conftest.o 2>/dev/null | \
grep '\.hidden default' > /dev/null; then
gcc_cv_as_hidden=no
else
gcc_cv_as_hidden=yes
fi
else
# Assume bug is present if objdump is missing.
gcc_cv_as_hidden=no
fi
;;
*)
gcc_cv_as_hidden=yes
;;
esac])
changequote(,)dnl
if test $in_tree_ld != yes ; then
@ -3252,6 +3280,12 @@ foo: nop
[AC_DEFINE(HAVE_AS_IX86_FFREEP, 1,
[Define if your assembler supports the ffreep mnemonic.])])
gcc_GAS_CHECK_FEATURE([.quad directive],
gcc_cv_as_ix86_quad,,,
[.quad 0],,
[AC_DEFINE(HAVE_AS_IX86_QUAD, 1,
[Define if your assembler supports the .quad directive.])])
gcc_GAS_CHECK_FEATURE([sahf mnemonic],
gcc_cv_as_ix86_sahf,,,
[sahf],,

View File

@ -1,3 +1,8 @@
2010-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/i386/32/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Support Sun
assembler syntax.
2010-04-15 Thomas Schwinge <tschwinge@gnu.org>
* config.host <i[34567]86-*-gnu*>: Handle softfp as for Linux.

View File

@ -142,8 +142,8 @@ struct fenv
if (_fex & FP_EX_DIVZERO) \
{ \
float f = 1.0, g = 0.0; \
__asm__ __volatile__ ("fdivp" : "=t" (f) \
: "0" (f), "u" (g) \
__asm__ __volatile__ ("fdivp {%0, %y1|%y1, %0}" \
: "+t" (f) : "u" (g) \
: "st(1)"); \
__asm__ __volatile__ ("fwait"); \
} \