This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Prototype for SSE2 calling convention libm on ia32


On Tue, Jun 07, 2005 at 07:21:18PM +0200, Richard Guenther wrote:
> It does so by first exposing a new function attribute "fpregparm" that
> changes calling conventions for a single function, and second, patching
> optabs and builtin decls and honouring it at expansion time.

I think we need a different name than fpregparm.  There was another
patch that was submitted that would pass fp arguments on the fpu stack.
It didn't get reviewed, but...

Perhaps "sseregparm".

> 	* calls.c (expand_call_1): New function from expand_call
> 	with extra dispatch location argument.
> 	(expand_call): Wrapper to expand_call_1 with NULL_RTX
> 	dispatch location.
> 	* builtins.c (expand_builtin_mathfn_3): Honour optabs
> 	libfunc entry via expand_call_1.

What in the world is this for?!?

> +   if (!TARGET_SSE2)
> +     {
> +       error ("%qs attribute only can be used with -msse2",
> + 	     IDENTIFIER_POINTER (name));

No, all data types are supported with moves in -msse1.  See commentary
elsewhere about minimizing the number of abis.

Perhaps you only want to enable some of the libcalls with sse2, but 
this attribute is user visible.  And I'd like this attribute to go
in separate from any libcall tweakage.

> +   /* Use SSE registers to pass SFmode and DFmode arguments if requested
> +      by the fpregparm attribute.  */
> +   if (fntype && lookup_attribute ("fpregparm", TYPE_ATTRIBUTES (fntype)))
> +     {
> +       cum->sse_nregs = 8;
> +       cum->float_in_sse = true;
> +     }
> + 
>     /* For local functions, pass SFmode (and DFmode for SSE2) arguments
>        in SSE registers even for 32-bit mode and not just 3, but up to
>        8 SSE arguments in registers.  */
> !   else if (!TARGET_64BIT && !cum->maybe_vaarg && !cum->fastcall
>         && cum->sse_nregs == SSE_REGPARM_MAX && fndecl
>         && TARGET_SSE_MATH && flag_unit_at_a_time && !profile_flag)

We should handle this in a separate function like ix86_function_regparm.



r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]