This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
SSE parameter passing patch (again)
- To: gcc-patches at gcc dot gnu dot org, patches at x86-64 dot org, rth at cygnus dot com
- Subject: SSE parameter passing patch (again)
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 21 Feb 2001 19:07:17 +0100
Oops, I've choosen wrong list!
Hi
I am trying to get trought the bulk of patches for SSE stack alignment posted
to list by Daniel Berlin and put them in shape easier for review and
integration, since I need them for my SSE work too.
This patch adds just unrelated bit in the patch to pass SSE arguments in SSE
registers.
I am not quite concerned if this is good idea by default - don't we want to
support these types in varargs?
But definitly as __attribute__ ((sseregparm)) it is usefull extension and
part of the code in i386.h is already in the tree.
I am also not sure about the authors in ChangeLog entry - I feel strange to
write myself there. I came to conclusion that I probably should put my name
there, since I am taking responsibility for the breakage if I install the
patch, or it is OK to keep there just Catherine and Bernd?
Honza
Wed Feb 21 18:57:28 CET 2001 Catherine Moore <clm@redhat.com>
Bernd Schmidt <bernds@redhat.com>
Jan Hubicka <jh@suse.cz>
* i386.c (function_arg_advance): Pass SSE arguments in registers.
(function_arg): Likewise.
*** /boot/home/write/egcs/gcc/config/i386/i386.c Tue Jan 2 19:24:27 2001
--- i386.c Wed Jan 3 14:21:17 2001
*************** function_arg_advance (cum, mode, type, n
*** 917,933 ****
fprintf (stderr,
"function_adv (sz=%d, wds=%2d, nregs=%d, mode=%s, named=%d)\n\n",
words, cum->words, cum->nregs, GET_MODE_NAME (mode), named);
! cum->words += words;
! cum->nregs -= words;
! cum->regno += words;
!
! if (cum->nregs <= 0)
! {
! cum->nregs = 0;
! cum->regno = 0;
! }
!
return;
}
--- 933,961 ----
fprintf (stderr,
"function_adv (sz=%d, wds=%2d, nregs=%d, mode=%s, named=%d)\n\n",
words, cum->words, cum->nregs, GET_MODE_NAME (mode), named);
+ if (TARGET_SSE && mode == TImode)
+ {
+ cum->sse_words += words;
+ cum->sse_nregs -= 1;
+ cum->sse_regno += 1;
+ if (cum->sse_nregs <= 0)
+ {
+ cum->sse_nregs = 0;
+ cum->sse_regno = 0;
+ }
+ }
+ else
+ {
+ cum->words += words;
+ cum->nregs -= words;
+ cum->regno += words;
! if (cum->nregs <= 0)
! {
! cum->nregs = 0;
! cum->regno = 0;
! }
! }
return;
}
*************** function_arg (cum, mode, type, named)
*** 970,975 ****
--- 998,1007 ----
if (words <= cum->nregs)
ret = gen_rtx_REG (mode, cum->regno);
break;
+ case TImode:
+ if (cum->sse_nregs)
+ ret = gen_rtx_REG (mode, cum->sse_regno);
+ break;
}
if (TARGET_DEBUG_ARG)