This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: [rfa?] Add frame_align(); Was: ARM stack alignment on hand called functions


> +/* Ensure that the ARM's stack pointer has the correct alignment for a
> +   new frame.  */
> +static CORE_ADDR
> +arm_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
> +{
> +  return (addr & -16);
> +}

Yuck, two's complement assumption.  I much prefer ~0xf in this case.

But why so much.  The maximum stack alignment you'll see on an ARM is 8 
bytes.

R.


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