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:
	* 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: r159581
This commit is contained in:
Rainer Orth 2010-05-19 15:56:56 +00:00 committed by Rainer Orth
parent a134381373
commit eddd960d04
7 changed files with 120 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2010-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* 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-17 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Delete

View File

@ -274,6 +274,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

63
gcc/configure vendored
View File

@ -21359,7 +21359,35 @@ foobar:' > conftest.s
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }
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
@ -22923,6 +22951,39 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_IX86_FFREEP 1
_ACEOF
fi
echo "$as_me:$LINENO: checking assembler for .quad directive" >&5
echo $ECHO_N "checking assembler for .quad directive... $ECHO_C" >&6
if test "${gcc_cv_as_ix86_quad+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&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 -o conftest.o conftest.s >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }
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
echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_quad" >&5
echo "${ECHO_T}$gcc_cv_as_ix86_quad" >&6
if test $gcc_cv_as_ix86_quad = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_IX86_QUAD 1
_ACEOF
fi
echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5

View File

@ -2094,7 +2094,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])
AC_CACHE_CHECK(linker for .hidden support, gcc_cv_ld_hidden,
[if test $in_tree_ld = yes ; then
@ -2991,6 +3019,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-29 Release Manager
* GCC 4.4.4 released.

View File

@ -145,8 +145,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"); \
} \