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]

Re: Fix for alignment bug in assign_stack_local



  In message <19990416192534.06363@atrey.karlin.mff.cuni.cz>you write:
  > 
  > Hi
  > When you set alignment 32 for 16bit value (or any other case where size !=
  > align) and have FRAME_GROWS_DOWNWARD and big endian machine,
  > assign_stack_local always allocate slots in a way that they are missaligned
  > (i.e base-2, base-6, base-10 etc...). Also I expect that on the same setup
  > and little endian machines, the returned value will actually point outside
  > allocated slot!
  > 
  > I am not sure if this is feature and someone demands this behaviour, but
  > I expect this is a bug.  This patch changes function.c to allocate
  > slots nicely (i.e base-4, base-8, base-12 for big endian and base-2, base-10
  > etc for little endian, so it can be read as whole aligned 32bit value).
  > The behaviour is now same as for !FRAME_GROWS_DOWNWARD machines.
  > 
  > I also believe that this change is neccesary to make PREFFERED_STACK_BOUNDARY
  > changes work on long doubles.
This is very complex code.  I would prefer to see a testcase and additional
technical analysis.

jeff



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