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 i386]: Implementation for call abi switching via attribute.


> >
> > Probably adding ABI argument to REGPARM_MAX/SSE_REGPARM_MAX would
> > help... Magic constants around the code are quite ugly..
> I agree, but what should we do with i386.md and co, where those macros
> are used everywhere?

I see just two uses.

In untyped_call I think one should pass default ABI (because untyped
calls should not have attributes to change ABI), while in
sse_prologue_save_insn SYSV ABI (since it is not used for MS)
> 
> >> @@ -4325,7 +4401,7 @@ function_arg_advance (CUMULATIVE_ARGS *c
> >>    if (type)
> >>      mode = type_natural_mode (type);
> >>
> >> -  if (TARGET_64BIT_MS_ABI)
> >> +  if (TARGET_64BIT && (cum ? cum->call_abi : DEFAULT_ABI) == MS_ABI)
> >
> > Testing cum for non-zero should not be needed here.
> >> +/* regclass.c  */
> >> +extern void init_regs (void);
> >> +
> >> +#define OVERRIDE_ABI_FORMAT(FNDECL) \
> >
> > Please move this offline.  Also the new hook and documentation needs
> > approval from RTL maintainer, so breaking it to separate patch would
> > help.
> As I told, Mark meant, that this part should be better part of the
> target implementation and he would take a look on it for approval. The
> documentation is added to tm.texi for the new hook.
OK.
> 
> > I would be happy with first version of patch simply sorrying out on the
> > MS->SYSV calls and we can handle it incrementally.
> Ok, I will do this in attribute check, is that ok?

Sure.

Honza
> 
> Cheers,
>   Kai
> 
> 
> -- 
> | (\_/) This is Bunny. Copy and paste
> | (='.'=) Bunny into your signature to help
> | (")_(") him gain world domination


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