patch to handle i386 stack alignment using PREFERRED_STACK_BOUNDARY

John Wehle john@feith.com
Wed Mar 31 18:59:00 GMT 1999


>> The results were generally quite negative.  A ~8% drop in spec92fp with
>> the majority of tests getting slower and very few improving.
>> 
>> I suspect somewhere we get an unaligned stack, and it just propagates
>> through all the code and we lose badly.
>
> If the code is all of a piece, it would be nice to track this down
> and fix it.  I'd rather not give up on this so easily.

At the time I was working on this I noticed that:

  int subr1(int a, int b, int c);

  int subr2(int a, int b, int c);

  void
  func(a, b)
    {

    printf("a = %d  b = %d  subr1 = %d  subr2 = %d\n",
      a, b, subr1(a, b, 1), subr2(a, b, 1));
    }

resulted in a mis-aligned stack when using PREFERRED_STACK_BOUNDARY with
the x86.  Apparently calls.c couldn't deal with the nested function calls.
I don't know if this is still true.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------




More information about the Gcc-patches mailing list