This is the mail archive of the
mailing list for the GCC project.
Re: Question about DRAP register and reserving hard registers
- From: Richard Henderson <rth at redhat dot com>
- To: Steve Ellcey <sellcey at imgtec dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 19 Jun 2015 09:09:30 -0400
- Subject: Re: Question about DRAP register and reserving hard registers
- Authentication-results: sourceware.org; auth=none
- References: <163e6dcd-b157-47a1-aed3-01eb1b287851 at BAMAIL02 dot ba dot imgtec dot org>
On 06/16/2015 07:05 PM, Steve Ellcey wrote:
I have a question about the DRAP register (used for dynamic stack alignment)
and about reserving/using hard registers in general. I am trying to understand
where, if a drap register is allocated, GCC is told not to use it during
general register allocation. There must be some code somewhere for this
but I cannot find it.
There isn't. Because the vDRAP register is a pseudo. The DRAP register is
only live from somewhere in the middle of the prologue to the end of the prologue.
See ix86_get_drap_rtx, wherein we coordinate with the to-be-generated prologue
(crtl->drap_reg), allocate the pseudo, and emit the hard-reg-to-pseudo copy at