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: ARM: Invalid Stack Alignment BUG



  In message <200003151343.NAA08727@cam-mail2.cambridge.arm.com>you write:
  > 
  > hubicka@atrey.karlin.mff.cuni.cz said:
  > > There is one purpose for doing the alignment to STACK_BOUNDARY in the
  > > backends anyway. There may be ways to use remaing few bytes as well as
  > > current scheme of aligning in reload is kind of wasting stack space
  > > (the stack boundary is repetativly aligned, not only in the last
  > > iteration). We was discussing this with Richard and I believe we
  > > concluded that proper way to handle this is to modify backends, but we
  > > wanted to do this later, so we did the "fix" to reload. 
  > 
  > Just because the current implementation is not particularly efficient in 
  > terms of stack usage doesn't mean that the rounding should be done in the 
  > backend.  Virtually every port has some definition for STACK_BOUNDARY, so 
  > it is a gross inefficiency if every port then has to also add code to 
  > correctly align the stack pointer.  Besides which, if backends are making 
  > adjustments to the amount of stack space pushed, how are they to know that 
  > they haven't altered a vital offset?  IMO this must be handled in a 
  > machine independent manner, based on the information already supplied.
Agreed,  if we are losing space due to inconvenient rounding, then we should
find a describe when rounding should occur so that we can write the code
once in the generic parts of the compiler rather than over and over again
in every backend.

jeff



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