[Bug target/87807] passing float/double vectors as variadic args fails on-64bit SPARC

2018-11-29 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87807

--- Comment #4 from Eric Botcazou  ---
Author: ebotcazou
Date: Thu Nov 29 23:08:09 2018
New Revision: 266651

URL: https://gcc.gnu.org/viewcvs?rev=266651&root=gcc&view=rev
Log:
PR target/87807
* config/sparc/sparc-modes.def: Minor tweak.
* config/sparc/sparc.c: Minor reordering.
(sparc_pass_by_reference): Move around.
(traverse_record_type): Change offset from HOST_WIDE_INT to int.
(classify_registers): Likewise for bitpos.
(function_arg_slotno): Remove dead test and tweak comments.
: Remove useless assertion and test whether the
parameter is named in order to pass it in FP registers.  Return
the regno for floating-point vector types.
(compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
(compute_fp_layout): Likewise.
(count_registers): Likewise.
(assign_int_registers): Likewise.
(assign_fp_registers): Likewise.
(assign_registers): Likewise.
(function_arg_record_value): Change size from HOST_WIDE_INT to int
and use CEIL_NWORDS to compute the number of registers.
(function_arg_union_value): Minor tweaks.
(function_arg_vector_value): Add slotno and named parameters, use
CEIL_NWORDS to compute the number of registers.
(sparc_function_arg_1): Rework handling of vector types.  Change
size from HOST_WIDE_INT to int.
(sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
with vector types for the 64-bt ABI.
(sparc_function_arg_advance): Likewise.
(sparc_return_in_memory): Add reference to -fpcc-struct-return.
(sparc_struct_value_rtx): Return NULL_RTX instead of 0.
(sparc_function_value_1): Rework handling of vector types.  Change
size from HOST_WIDE_INT to int.

Added:
trunk/gcc/testsuite/gcc.target/sparc/20181129-1.c
trunk/gcc/testsuite/gcc.target/sparc/20181129-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sparc/sparc-modes.def
trunk/gcc/config/sparc/sparc.c
trunk/gcc/testsuite/ChangeLog

[Bug target/87807] passing float/double vectors as variadic args fails on-64bit SPARC

2018-11-29 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87807

Eric Botcazou  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |9.0

--- Comment #5 from Eric Botcazou  ---
Thanks for reporting the problem.

[Bug target/87807] passing float/double vectors as variadic args fails on-64bit SPARC

2018-11-30 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87807

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #5 from Eric Botcazou  ---
> Thanks for reporting the problem.

Great, thanks for the quick fix.

Rainer

[Bug target/87807] passing float/double vectors as variadic args fails on-64bit SPARC

2018-11-18 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87807

Eric Botcazou  changed:

   What|Removed |Added

 Target|sparc-sun-solaris2.*|sparc64-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-18
Summary|Passing float, double   |passing float/double
   |vectors as variadic args|vectors as variadic args
   |fails on sparcv9|fails on-64bit SPARC
 Ever confirmed|0   |1

--- Comment #2 from Eric Botcazou  ---
This very likely has never worked indeed.

[Bug target/87807] passing float/double vectors as variadic args fails on-64bit SPARC

2018-11-18 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87807

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ebotcazou at gcc dot 
gnu.org

--- Comment #3 from Eric Botcazou  ---
Investigating.