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: [PATCH] Add sseregparm function attribute for x86


On Wed, Jun 08, 2005 at 02:50:45PM +0200, Richard Guenther wrote:
> + static tree
> + ix86_handle_sseregparm_attribute (tree *node, tree name,
...
> +     warning (0, "%qs attribute without SSE enabled changes the ABI",
> + 	     IDENTIFIER_POINTER (name));

Don't warn here.  I'm willing to allow sseregparm attributed functions
in system header files, so long as they're not actually used.

> !   /* Set up the number of SSE registers used for passing SFmode
> !      and DFmode arguments.  Warn for mismatching ABI.  */
> !   if (!cum->maybe_vaarg && !cum->fastcall
> !       && ix86_function_sseregparm (fntype, fndecl))
> !     {
> !       cum->sse_nregs = 8;
> !       cum->float_in_sse = true;
> !       if (!TARGET_SSE && fndecl)
> ! 	warning (0, "Calling %qD without SSE enabled", fndecl);

Here we want an error.  The error message should mention the sseregparm
attribute, so that its clearer why sse being disabled is relevant.

Do not set float_in_sse when you generate the error, which makes....

>   	case SFmode:
> ! 	  if (!TARGET_SSE || !cum->float_in_sse)

... these sorts of changes unnecessary.

> +   /* Floating point return values with sseregparm marked functions go
> +      in SSE registers.  */
> +   if (func && SSE_FLOAT_MODE_P (mode)
> +       && lookup_attribute ("sseregparm", TYPE_ATTRIBUTES (TREE_TYPE (func))))

ix86_function_sseregparm.


r~


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