Commit 4720d5ca by John David Anglin Committed by John David Anglin

re PR target/25731 (Complex values passed in wrong registers)

	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.

From-SVN: r109894
parent 4325ca90
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> 2006-01-19 Alan Modra <amodra@bigpond.net.au>
* config/rs6000/rs6000.c (rs6000_assemble_integer): Correct * config/rs6000/rs6000.c (rs6000_assemble_integer): Correct
......
...@@ -846,10 +846,11 @@ hppa*-*-linux* | parisc*-*-linux*) ...@@ -846,10 +846,11 @@ hppa*-*-linux* | parisc*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \ tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \
pa/pa32-regs.h pa/pa32-linux.h" pa/pa32-regs.h pa/pa32-linux.h"
tmake_file="${tmake_file} pa/t-linux" tmake_file="${tmake_file} pa/t-linux"
# if not configured with --enable-sjlj-exceptions, bump the # Set the libgcc version number
# libgcc version number if test x$sjlj = x1; then
if test x$sjlj != x1; then tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
tmake_file="$tmake_file pa/t-slibgcc-elf-ver" else
tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
fi fi
;; ;;
# port not yet contributed. # port not yet contributed.
...@@ -900,8 +901,11 @@ hppa[12]*-*-hpux10*) ...@@ -900,8 +901,11 @@ hppa[12]*-*-hpux10*)
tmake_file="${tmake_file} pa/t-dce-thr" tmake_file="${tmake_file} pa/t-dce-thr"
;; ;;
esac esac
if test x$sjlj != x1; then # Set the libgcc version number
tmake_file="$tmake_file pa/t-slibgcc-elf-ver" 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 fi
use_collect2=yes use_collect2=yes
use_fixproto=yes use_fixproto=yes
...@@ -935,8 +939,11 @@ hppa*64*-*-hpux11*) ...@@ -935,8 +939,11 @@ hppa*64*-*-hpux11*)
pa/pa-hpux1010.opt pa/pa64-hpux.opt" pa/pa-hpux1010.opt pa/pa64-hpux.opt"
need_64bit_hwint=yes need_64bit_hwint=yes
tmake_file="pa/t-pa64 pa/t-pa-hpux pa/t-hpux-shlib" tmake_file="pa/t-pa64 pa/t-pa-hpux pa/t-hpux-shlib"
if test x$sjlj != x1; then # Set the libgcc version number
tmake_file="$tmake_file pa/t-slibgcc-elf-ver" 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 fi
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
case x${enable_threads} in case x${enable_threads} in
...@@ -961,8 +968,11 @@ hppa[12]*-*-hpux11*) ...@@ -961,8 +968,11 @@ hppa[12]*-*-hpux11*)
;; ;;
esac esac
tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib" tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
if test x$sjlj != x1; then # Set the libgcc version number
tmake_file="$tmake_file pa/t-slibgcc-elf-ver" 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 fi
case x${enable_threads} in case x${enable_threads} in
xyes | xposix ) xyes | xposix )
......
...@@ -8791,7 +8791,9 @@ function_value (tree valtype, tree func ATTRIBUTE_UNUSED) ...@@ -8791,7 +8791,9 @@ function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
{ {
enum machine_mode valmode; 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) if (TARGET_64BIT)
{ {
...@@ -8871,7 +8873,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, ...@@ -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 this routine should return zero. pa_arg_partial_bytes will
handle arguments which are split between regs and stack slots if handle arguments which are split between regs and stack slots if
the ABI mandates split arguments. */ the ABI mandates split arguments. */
if (! TARGET_64BIT) if (!TARGET_64BIT)
{ {
/* The 32-bit ABI does not split arguments. */ /* The 32-bit ABI does not split arguments. */
if (cum->words + arg_size > max_arg_words) if (cum->words + arg_size > max_arg_words)
...@@ -8906,7 +8908,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, ...@@ -8906,7 +8908,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
treatment. */ treatment. */
if (arg_size > 1 if (arg_size > 1
|| mode == BLKmode || 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) /* Double-extended precision (80-bit), quad-precision (128-bit)
and aggregates including complex numbers are aligned on and aggregates including complex numbers are aligned on
...@@ -8960,8 +8964,13 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, ...@@ -8960,8 +8964,13 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
objects. The data is right-justified and zero-extended objects. The data is right-justified and zero-extended
to 64 bits. This is opposite to the normal justification to 64 bits. This is opposite to the normal justification
used on big endian targets and requires special treatment. used on big endian targets and requires special treatment.
We now define BLOCK_REG_PADDING to pad these objects. */ We now define BLOCK_REG_PADDING to pad these objects.
if (mode == BLKmode || (type && AGGREGATE_TYPE_P (type))) 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, rtx loc = gen_rtx_EXPR_LIST (VOIDmode,
gen_rtx_REG (DImode, gpr_reg_base), gen_rtx_REG (DImode, gpr_reg_base),
...@@ -8984,9 +8993,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, ...@@ -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 /* If we are doing soft-float with portable runtime, then there
is no need to worry about FP regs. */ is no need to worry about FP regs. */
&& !TARGET_SOFT_FLOAT && !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. */ pass it in integer registers. */
&& FLOAT_MODE_P (mode) && GET_MODE_CLASS (mode) == MODE_FLOAT
/* The target function must not have a prototype. */ /* The target function must not have a prototype. */
&& cum->nargs_prototype <= 0 && cum->nargs_prototype <= 0
/* libcalls do not need to pass items in both FP and general /* 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, ...@@ -9002,7 +9011,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
&& !TARGET_GAS && !TARGET_GAS
&& !cum->incoming && !cum->incoming
&& cum->indirect && cum->indirect
&& FLOAT_MODE_P (mode))) && GET_MODE_CLASS (mode) == MODE_FLOAT))
{ {
retval retval
= gen_rtx_PARALLEL = gen_rtx_PARALLEL
...@@ -9025,9 +9034,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, ...@@ -9025,9 +9034,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
&& !TARGET_64BIT && !TARGET_64BIT
&& !TARGET_ELF32 && !TARGET_ELF32
&& cum->indirect) && cum->indirect)
/* If the parameter is not a floating point parameter, then /* If the parameter is not a scalar floating-point parameter,
it belongs in GPRs. */ then it belongs in GPRs. */
|| !FLOAT_MODE_P (mode) || GET_MODE_CLASS (mode) != MODE_FLOAT
/* Structure with single SFmode field belongs in GPR. */ /* Structure with single SFmode field belongs in GPR. */
|| (type && AGGREGATE_TYPE_P (type))) || (type && AGGREGATE_TYPE_P (type)))
retval = gen_rtx_REG (mode, gpr_reg_base); retval = gen_rtx_REG (mode, gpr_reg_base);
......
# Build a shared libgcc library. # Build a shared libgcc library.
SHLIB_EXT = .sl SHLIB_EXT = .sl
SHLIB_NAME = @shlib_base_name@.sl SHLIB_NAME = @shlib_base_name@$(SHLIB_EXT)
SHLIB_SONAME = @shlib_base_name@.1 SHLIB_SOVERSION = 1
SHLIB_SONAME = @shlib_base_name@.$(SHLIB_SOVERSION)
SHLIB_OBJS = @shlib_objs@ SHLIB_OBJS = @shlib_objs@
SHLIB_DIR = @multilib_dir@ SHLIB_DIR = @multilib_dir@
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
...@@ -16,7 +17,6 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ ...@@ -16,7 +17,6 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
mv $(SHLIB_DIR)/$(SHLIB_NAME).tmp $(SHLIB_DIR)/$(SHLIB_NAME) && \ mv $(SHLIB_DIR)/$(SHLIB_NAME).tmp $(SHLIB_DIR)/$(SHLIB_NAME) && \
$(LN_S) $(SHLIB_NAME) $(SHLIB_DIR)/$(SHLIB_SONAME) $(LN_S) $(SHLIB_NAME) $(SHLIB_DIR)/$(SHLIB_SONAME)
# $(slibdir) double quoted to protect it from expansion while building # $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time. # libgcc.mk. We want this delayed until actual install time.
SHLIB_INSTALL = \ SHLIB_INSTALL = \
......
# Set the version number of the shared libgcc library (DWARF2 EH).
SHLIB_SOVERSION = 4
# Bump the version number of the shared libgcc library
SHLIB_SOVERSION = 2
# Set the version number of the shared libgcc library (SJLJ EH).
SHLIB_SOVERSION = 3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment