PR target/25731
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Jan 2006 15:44:57 +0000 (15:44 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Jan 2006 15:44:57 +0000 (15:44 +0000)
* config.gcc (hppa*-*-linux*, hppa[12]*-*-hpux10*, hppa*64*-*-hpux11*,
hppa[12]*-*-hpux11*): Override default shared libgcc version for both
sjlj and dwarf2 exception handling.
* pa/t-hpux-shlib (SHLIB_SOVERSION): New make variable.
Rework to allow overriding SHLIB_EXT and SHLIB_SOVERSION.
* pa/pa.c (function_value): Treat complex and vector types as
aggregates.
(function_arg): Likewise.  Only pass scalar floats in the floating
point argument registers.
* pa/t-slibgcc-dwarf-ver: New file.
* pa/t-slibgcc-sjlj-ver: New file.
* pa/t-slibgcc-elf-ver: Delete file.

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

gcc/ChangeLog
gcc/config.gcc
gcc/config/pa/pa.c
gcc/config/pa/t-hpux-shlib
gcc/config/pa/t-slibgcc-dwarf-ver [new file with mode: 0644]
gcc/config/pa/t-slibgcc-elf-ver [deleted file]
gcc/config/pa/t-slibgcc-sjlj-ver [new file with mode: 0644]

index 79cdd17..04a67b7 100644 (file)
@@ -1,3 +1,19 @@
+2006-01-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR target/25731
+       * config.gcc (hppa*-*-linux*, hppa[12]*-*-hpux10*, hppa*64*-*-hpux11*,
+       hppa[12]*-*-hpux11*): Override default shared libgcc version for both
+       sjlj and dwarf2 exception handling.
+       * pa/t-hpux-shlib (SHLIB_SOVERSION): New make variable.
+       Rework to allow overriding SHLIB_EXT and SHLIB_SOVERSION.
+       * pa/pa.c (function_value): Treat complex and vector types as
+       aggregates.
+       (function_arg): Likewise.  Only pass scalar floats in the floating
+       point argument registers.
+       * pa/t-slibgcc-dwarf-ver: New file.
+       * pa/t-slibgcc-sjlj-ver: New file.
+       * pa/t-slibgcc-elf-ver: Delete file.
+
 2006-01-19  Alan Modra  <amodra@bigpond.net.au>
 
        * config/rs6000/rs6000.c (rs6000_assemble_integer): Correct
index 5e2216c..6e29abb 100644 (file)
@@ -846,10 +846,11 @@ hppa*-*-linux* | parisc*-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \
                 pa/pa32-regs.h pa/pa32-linux.h"
        tmake_file="${tmake_file} pa/t-linux"
-       # if not configured with --enable-sjlj-exceptions, bump the
-       # libgcc version number
-       if test x$sjlj != x1; then
-           tmake_file="$tmake_file pa/t-slibgcc-elf-ver"
+       # Set the libgcc version number
+       if test x$sjlj = x1; then
+           tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
+       else
+           tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
        fi
        ;;
 # port not yet contributed.
@@ -900,8 +901,11 @@ hppa[12]*-*-hpux10*)
            tmake_file="${tmake_file} pa/t-dce-thr"
            ;;
        esac
-       if test x$sjlj != x1; then
-           tmake_file="$tmake_file pa/t-slibgcc-elf-ver"
+       # Set the libgcc version number
+       if test x$sjlj = x1; then
+           tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
+       else
+           tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
        fi
        use_collect2=yes
        use_fixproto=yes
@@ -935,8 +939,11 @@ hppa*64*-*-hpux11*)
                       pa/pa-hpux1010.opt pa/pa64-hpux.opt"
        need_64bit_hwint=yes
        tmake_file="pa/t-pa64 pa/t-pa-hpux pa/t-hpux-shlib"
-       if test x$sjlj != x1; then
-           tmake_file="$tmake_file pa/t-slibgcc-elf-ver"
+       # Set the libgcc version number
+       if test x$sjlj = x1; then
+           tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
+       else
+           tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
        fi
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
        case x${enable_threads} in
@@ -961,8 +968,11 @@ hppa[12]*-*-hpux11*)
                ;;
        esac
        tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
-       if test x$sjlj != x1; then
-           tmake_file="$tmake_file pa/t-slibgcc-elf-ver"
+       # Set the libgcc version number
+       if test x$sjlj = x1; then
+           tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
+       else
+           tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
        fi
        case x${enable_threads} in
        xyes | xposix )
index 0d8ec24..1b90e6b 100644 (file)
@@ -8791,7 +8791,9 @@ function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
 {
   enum machine_mode valmode;
 
-  if (AGGREGATE_TYPE_P (valtype))
+  if (AGGREGATE_TYPE_P (valtype)
+      || TREE_CODE (valtype) == COMPLEX_TYPE
+      || TREE_CODE (valtype) == VECTOR_TYPE)
     {
       if (TARGET_64BIT)
        {
@@ -8871,7 +8873,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
      this routine should return zero.  pa_arg_partial_bytes will
      handle arguments which are split between regs and stack slots if
      the ABI mandates split arguments.  */
-  if (! TARGET_64BIT)
+  if (!TARGET_64BIT)
     {
       /* The 32-bit ABI does not split arguments.  */
       if (cum->words + arg_size > max_arg_words)
@@ -8906,7 +8908,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
         treatment.  */
       if (arg_size > 1
          || mode == BLKmode
-         || (type && AGGREGATE_TYPE_P (type)))
+         || (type && (AGGREGATE_TYPE_P (type)
+                      || TREE_CODE (type) == COMPLEX_TYPE
+                      || TREE_CODE (type) == VECTOR_TYPE)))
        {
          /* Double-extended precision (80-bit), quad-precision (128-bit)
             and aggregates including complex numbers are aligned on
@@ -8960,8 +8964,13 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
             objects.  The data is right-justified and zero-extended
             to 64 bits.  This is opposite to the normal justification
             used on big endian targets and requires special treatment.
-            We now define BLOCK_REG_PADDING to pad these objects.  */
-         if (mode == BLKmode || (type && AGGREGATE_TYPE_P (type)))
+            We now define BLOCK_REG_PADDING to pad these objects.
+            Aggregates, complex and vector types are passed in the same
+            manner as structures.  */
+         if (mode == BLKmode
+             || (type && (AGGREGATE_TYPE_P (type)
+                          || TREE_CODE (type) == COMPLEX_TYPE
+                          || TREE_CODE (type) == VECTOR_TYPE)))
            {
              rtx loc = gen_rtx_EXPR_LIST (VOIDmode,
                                           gen_rtx_REG (DImode, gpr_reg_base),
@@ -8984,9 +8993,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
        /* If we are doing soft-float with portable runtime, then there
          is no need to worry about FP regs.  */
        && !TARGET_SOFT_FLOAT
-       /* The parameter must be some kind of float, else we can just
+       /* The parameter must be some kind of scalar float, else we just
          pass it in integer registers.  */
-       && FLOAT_MODE_P (mode)
+       && GET_MODE_CLASS (mode) == MODE_FLOAT
        /* The target function must not have a prototype.  */
        && cum->nargs_prototype <= 0
        /* libcalls do not need to pass items in both FP and general
@@ -9002,7 +9011,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
          && !TARGET_GAS
          && !cum->incoming
          && cum->indirect
-         && FLOAT_MODE_P (mode)))
+         && GET_MODE_CLASS (mode) == MODE_FLOAT))
     {
       retval
        = gen_rtx_PARALLEL
@@ -9025,9 +9034,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
              && !TARGET_64BIT
              && !TARGET_ELF32
              && cum->indirect)
-         /* If the parameter is not a floating point parameter, then
-            it belongs in GPRs.  */
-         || !FLOAT_MODE_P (mode)
+         /* If the parameter is not a scalar floating-point parameter,
+            then it belongs in GPRs.  */
+         || GET_MODE_CLASS (mode) != MODE_FLOAT
          /* Structure with single SFmode field belongs in GPR.  */
          || (type && AGGREGATE_TYPE_P (type)))
        retval = gen_rtx_REG (mode, gpr_reg_base);
index 9673c8e..4bb9d67 100644 (file)
@@ -1,7 +1,8 @@
 # Build a shared libgcc library.
 SHLIB_EXT = .sl
-SHLIB_NAME = @shlib_base_name@.sl
-SHLIB_SONAME = @shlib_base_name@.1
+SHLIB_NAME = @shlib_base_name@$(SHLIB_EXT)
+SHLIB_SOVERSION = 1
+SHLIB_SONAME = @shlib_base_name@.$(SHLIB_SOVERSION)
 SHLIB_OBJS = @shlib_objs@
 SHLIB_DIR = @multilib_dir@
 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
@@ -16,7 +17,6 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared  -nodefaultlibs \
        mv $(SHLIB_DIR)/$(SHLIB_NAME).tmp $(SHLIB_DIR)/$(SHLIB_NAME) && \
         $(LN_S) $(SHLIB_NAME) $(SHLIB_DIR)/$(SHLIB_SONAME)
 
-
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
 SHLIB_INSTALL = \
diff --git a/gcc/config/pa/t-slibgcc-dwarf-ver b/gcc/config/pa/t-slibgcc-dwarf-ver
new file mode 100644 (file)
index 0000000..fa4688d
--- /dev/null
@@ -0,0 +1,3 @@
+# Set the version number of the shared libgcc library (DWARF2 EH).
+
+SHLIB_SOVERSION = 4
diff --git a/gcc/config/pa/t-slibgcc-elf-ver b/gcc/config/pa/t-slibgcc-elf-ver
deleted file mode 100644 (file)
index 6aac37c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Bump the version number of the shared libgcc library
-
-SHLIB_SOVERSION = 2
diff --git a/gcc/config/pa/t-slibgcc-sjlj-ver b/gcc/config/pa/t-slibgcc-sjlj-ver
new file mode 100644 (file)
index 0000000..00140cf
--- /dev/null
@@ -0,0 +1,3 @@
+# Set the version number of the shared libgcc library (SJLJ EH).
+
+SHLIB_SOVERSION = 3