libgcc:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 May 2010 15:31:00 +0000 (15:31 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 May 2010 15:31:00 +0000 (15:31 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159569 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config.in
gcc/config/i386/sol2.h
gcc/configure
gcc/configure.ac
libgcc/ChangeLog
libgcc/config/i386/32/sfp-machine.h

index c725ab9..35d39a0 100644 (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
index 2c4d121..30c15ad 100644 (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]*)
index 64632e8..a1c117a 100644 (file)
 #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
index cb663a1..6a01465 100644 (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
 
index 2384f42..82f6504 100755 (executable)
@@ -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
@@ -23129,6 +23157,37 @@ $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
 $as_echo_n "checking assembler for sahf mnemonic... " >&6; }
 if test "${gcc_cv_as_ix86_sahf+set}" = set; then :
index 743798e..15b126f 100644 (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],,
index 3a3844d..de90f40 100644 (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.
index ccff314..1600a7f 100644 (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");                                 \
       }                                                                        \