This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Introduce emit_frame_chain
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Thu, 26 Oct 2017 16:58:48 +0100
- Subject: Re: [PATCH][AArch64] Introduce emit_frame_chain
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com;
- Nodisclaimer: True
- References: <DB6PR0801MB2053AB7E1E0160244B33D51B83B60@DB6PR0801MB2053.eurprd08.prod.outlook.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Fri, Aug 04, 2017 at 01:26:15PM +0100, Wilco Dijkstra wrote:
> The current frame code combines the separate concepts of a frame chain
> (saving old FP,LR in a record and pointing new FP to it) and a frame
> pointer used to access locals. Add emit_frame_chain to the aarch64_frame
> descriptor and use it in the prolog and epilog code. For now just
> initialize it as before, so generated code is identical.
>
> Also correctly set EXIT_IGNORE_STACK. The current AArch64 epilog code
> restores SP from FP if alloca is used. If a frame pointer is used but
> there is no alloca, SP must remain valid for the epilog to work correctly.
OK.
Reviewed by: James Greenhalgh <james.greenhalgh@arm.com>
Thanks,
James
>
> ChangeLog:
> 2017-08-03 Wilco Dijkstra <wdijkstr@arm.com>
>
> gcc/
> * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
> (aarch64_frame): Add emit_frame_chain boolean.
> * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
> Move eh_return case to aarch64_layout_frame.
> (aarch64_layout_frame): Initialize emit_frame_chain.
> (aarch64_expand_prologue): Use emit_frame_chain.
>