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]
Other format: [Raw text]

Re: [PATCH 6/9] Emit the prologue/epilogue using frame offsets.


On 08/05/2010 11:19 AM, H.J. Lu wrote:
> It is interesting. I saw it on 32bit host with 32bit HOST_WIDE_INT. Is it
> a signed vs. unsigned issue? stack_alignment_needed is unsigned.

Yes, signed is the issue.  Previously we'd have

  -stack_alignment_needed / 8
  -256u / 8
  0xffffff00u / 8
  0x1fffffe0u

If you receive a memory layout such that the stack is <= 0x1fffffff,
the program will happen to work.  With the cast we get -32 and not
a large unsigned number, which is what we really wanted.


r~


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