Question about DRAP register and reserving hard registers
H.J. Lu
hjl.tools@gmail.com
Thu Jul 9 16:50:00 GMT 2015
On Thu, Jul 9, 2015 at 9:31 AM, Steve Ellcey <sellcey@imgtec.com> wrote:
> On Mon, 2015-06-29 at 11:10 +0100, Richard Henderson wrote:
>
>> > OK, I think I have this part of the code working on MIPS but
>> > crtl->drap_reg is used in the epilogue as well as the prologue even if
>> > it is not 'live' in between. If I understand the code correctly the x86
>> > prologue pushes the drap register on to the stack so that the epilogue
>> > can pop it off and use it to restore the stack pointer. Is my
>> > understanding correct?
>>
>> Yes. Although that saved copy is also used by unwind info.
>
> Do you know how and where this saved copy is used by the unwind info?
> I don't see any indication that the unwind library knows if a stack has
> been dynamically realigned and I don't see where unwind makes use of
> this value.
This is a very old patch for DRAP unwind with stack alignment:
https://gcc.gnu.org/ml/gcc-patches/2008-07/msg00651.html
You can also grep drap_reg in dwarf2out.c.
--
H.J.
More information about the Gcc
mailing list