This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: goodbye, MD_CALL_PROTOTYPES
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: goodbye, MD_CALL_PROTOTYPES
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 26 Feb 2000 13:32:49 -0700
- cc: gcc-patches at gcc dot gnu dot org, ghazi at caip dot rutgers dot edu
- Reply-To: law at cygnus dot com
In message <20000224005726.G1098@wolery.cumb.org>you write:
> This patch eliminates the MD_CALL_PROTOTYPES macro, and causes
> gen_call and friends to be prototyped with the rest of the gen_insn
> functions. With this done, an i386 native build has only 50 or so
> -W(strict,missing)-prototypes warnings, most of which are in libgcc2.
>
> MD_CALL_PROTOTYPES was avoiding a problem with our intermediate
> representation. The 'call' insn is not an accurate model of any real
> machine's subroutine-call instruction. calls.c imagines a call insn
> that looks something like
>
> gen_call (symbol, stack_space_for_args, next_arg_register, struct_value_siz
> e)
>
> Most .md files have been written as if that function took only two
> arguments. Rather than change them all, I chose to change calls.c and
> builtins.c so that it does. For the seven platforms that need the
> extra info, we now have "xcall" and "xcall_value" insns. (Suggestions
> for better names will be gladly accepted.)
I would rather fix the md files -- IMHO, they're what's broken. Adding
an additional pattern (xcall) is just avoiding the problem IMHO. It may be
a pain, but let's fix the md files correctly.
jeff