This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ACCUMULATE_OUTGOING_ARGS and the i386
- To: law at cygnus dot com
- Subject: Re: ACCUMULATE_OUTGOING_ARGS and the i386
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Sun, 18 Oct 98 22:47:38 PDT
- Cc: john at feith dot com, egcs at cygnus dot com
> > What are the tradeoffs involved in ACCUMULATE_OUTGOING_ARGS? Why
> > would I not want to implement it for the i386?
Jeff writes:
> Plusses:
>
> Stack pointer stays constant...
> A constant stack pointer makes it a lot easier for gdb to grok frame
> pointerless code. This may make it possible to turn on frame pointer
> elimination by default.
>
> 1. More efficient prologues & epilogues.
> 2. The compiler gets to use another register.
It seems that #2 would be a big win on the register-poor i386
architecture. Also, overhead for C++ exceptions should be reduced
substantially, right?
> Minuses:
>
> If the architecture has push insns and they're smaller/faster than
> using reg+d addresses, then ACCUMULATE_OUTGOING_ARGS may be a lose due
> to the increased cost to save arguments into the stack. Depends on the
> relative costs.
Given the other factors, this increased cost might be outweighed by
the benefits, but of course this would have to be measured. I suspect
that a push might even be slower on the new processors if there are
many separate stack adjustments, but I'm far from an x86 guru.