This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [mips] Rotate stack checking loop
- From: "Moore, Catherine" <Catherine_Moore at mentor dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Date: Wed, 2 Dec 2015 15:36:19 +0000
- Subject: RE: [mips] Rotate stack checking loop
- Authentication-results: sourceware.org; auth=none
- References: <1772089 dot OR2LVoZBqb at polaris>
> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@gcc.gnu.org] On Behalf Of Eric Botcazou
> Sent: Thursday, November 12, 2015 4:51 PM
> To: gcc-patches@gcc.gnu.org
> Subject: [mips] Rotate stack checking loop
>
> Hi,
>
> this patch rotates the loop generated in the prologue to do stack checking
> when -fstack-check is specified, thereby saving one branch instruction. It
> was initially implemented as a WHILE loop to match the generic
> implementation but can be turned into a DO-WHILE loop because the
> amount of stack to be checked is known at compile time (since it's the static
> part of the frame).
>
> Unfortunately I don't have access to MIPS hardware any more so I only
> verified
> that the assembly code is as expected and can be assembled. OK for
> mainline?
>
>
> 2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
>
> * config/mips/mips.c (mips_emit_probe_stack_range): Adjust.
> (mips_output_probe_stack_range): Rotate the loop and simplify.
>
This is OK.