This is the mail archive of the
mailing list for the GCC project.
Re: RFC: Patch to implement Aarch64 SIMD ABI
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Richard Sandiford <Richard dot Sandiford at arm dot com>, "sellcey at cavium dot com" <sellcey at cavium dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, James Greenhalgh <James dot Greenhalgh at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, nd <nd at arm dot com>
- Date: Fri, 20 Jul 2018 11:11:35 +0000
- Subject: Re: RFC: Patch to implement Aarch64 SIMD ABI
- References: <email@example.com> <firstname.lastname@example.org>,<email@example.com>
Steve Ellcey wrote:
> Yes, I see where I missed this in aarch64_push_regs
> and aarch64_pop_regs. I think that is why the second of
> Wilco's two examples (f2) is wrong. I am unclear about
> exactly what is meant by writeback and why we have it and
> how that and callee_adjust are used. Any chance someone
> could help me understand this part of the prologue/epilogue
> code better? The comments in aarch64.c/aarch64.h aren't
> really helping me understand what the code is doing or
> why it is doing it.
Writeback is the same as a base update in a load or store. When
creating the frame there are 3 stack adjustments to be made:
creating stack for locals, pushing callee-saves and reserving space
for outgoing arguments. We merge these stack adjustments as much as
possible and use load/store with writeback for codesize and performance.
See the last part in layout_frame for the different cases.
In many common cases the frame is small and there are no outgoing
arguments, so we emit an STP with writeback to store the first 2 callee saves
and create th full frame in a single instruction. In this case callee_adjust will
be the frame size and initial_adjust will be zero.
push_regs and pop_regs need to be passed a mode since layout_frame
will use STP with writeback of floating point callee-saves if there are no integer
callee-saves. Note if there is only 1 or odd number of callee-save it may use
LDR/STR with writeback, so we need to support TFmode for these too.