This is the mail archive of the gcc@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]

Re: ACCUMULATE_OUTGOING_ARGS and the i386


On Mon, Oct 19, 1998 at 10:49:04AM +0200, Bernd Schmidt wrote:
> 
> I experimented with it once, mostly because the AMD K6 optimization manual
> said that pushing function args should be implemented by subtracting
> from the stack pointer and then using mov insns to set the arguments.

I did exactly the same in pgcc (Bernd, why didn't you tell me ;), and it was
neither a win for amdk6 (where it is recommended) nor on intel chips
(slowdown was in the 3-10% range). The code is still there (just disabled).

Of course, I had one subl per call, but I don't think thats was the major
performance bottleneck.

> Unfortunately, it didn't seem to be a win in the benchmarks I tried - most
> likely because the code size increased quite a bit.

I have no satisfactory explanation either, the subl/mov approach usually
requires the same or less cycles than many push'es.

      -----==-                                              |
      ----==-- _                                            |
      ---==---(_)__  __ ____  __       Marc Lehmann       +--
      --==---/ / _ \/ // /\ \/ /       pcg@goof.com       |e|
      -=====/_/_//_/\_,_/ /_/\_\                          --+
    The choice of a GNU generation                        |
                                                          |


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