This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
sysv4 varargs for altivec
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: 29 Nov 2001 18:43:00 -0600
- Subject: sysv4 varargs for altivec
hi david!
this is probably a typo/obvious fix rule, but just in case...
altivec specs say that vector arguments in the variable ("...") part, go
in memory. this patch corrects this minor oversight.
tested for regressions on a cross powerpc-elf build.
ok?
p.s. the altivec specs mention a rather complicated scheme for aix
and/or apple abi's with altivec support. stan has agreed to code that
part.
2001-11-29 Aldy Hernandez <aldyh@redhat.com>
* rs6000.c (function_arg): Unnamed vector arguments go in memory.
Remove unused attribute for named.
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.244
diff -c -p -r1.244 rs6000.c
*** rs6000.c 2001/11/27 01:35:23 1.244
--- rs6000.c 2001/11/30 00:29:02
*************** function_arg (cum, mode, type, named)
*** 2373,2379 ****
CUMULATIVE_ARGS *cum;
enum machine_mode mode;
tree type;
! int named ATTRIBUTE_UNUSED;
{
enum rs6000_abi abi = DEFAULT_ABI;
--- 2373,2379 ----
CUMULATIVE_ARGS *cum;
enum machine_mode mode;
tree type;
! int named;
{
enum rs6000_abi abi = DEFAULT_ABI;
*************** function_arg (cum, mode, type, named)
*** 2399,2405 ****
if (TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode))
{
! if (cum->vregno <= ALTIVEC_ARG_MAX_REG)
return gen_rtx_REG (mode, cum->vregno);
else
return NULL;
--- 2399,2405 ----
if (TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode))
{
! if (named && cum->vregno <= ALTIVEC_ARG_MAX_REG)
return gen_rtx_REG (mode, cum->vregno);
else
return NULL;