[PATCH] MIPS: Fix __builtin_longjmp (PR 64242)

Jeff Law law@redhat.com
Mon Aug 24 22:06:09 GMT 2020


On Sun, 2020-07-12 at 14:27 +0800, Paul Hua wrote:
> From 589dbe8a1c2397bfafefa4e84abe5ec6e6798928 Mon Sep 17 00:00:00 2001
> From: Andrew Pinski <apinski@marvell.com>
> Date: Wed, 12 Feb 2020 11:42:57 +0000
> Subject: [PATCH] MIPS: Fix __builtin_longjmp (PR 64242)
> 
> The problem here is mips has its own builtin_longjmp
> pattern and it was not fixed when expand_builtin_longjmp
> was fixed.  We need to read the new fp and gp before
> restoring the stack as the buffer might be a local
> variable.
> 
> Change-Id: I3416568e260e6bde3ad5cc470fb4f2ecfa207f05
> Signed-off-by: Andrew Pinski <apinski@marvell.com>
> 
> This patch from Andrew, I bootstrapped and tested on mips64el-linux-gnu.
> 
> OK for master ?
> 
> gcc/ChangeLog:
> 
>         PR middle-end/64242
>         * config/mips/mips.md (builtin_longjmp): Restore the frame pointer
>            and stack pointer and gp.
OK
jeff



More information about the Gcc-patches mailing list