]> git.ipfire.org Git - thirdparty/gcc.git/commit
MIPS: Fix __builtin_longjmp (PR 64242)
authorAndrew Pinski <apinski@marvell.com>
Tue, 25 Aug 2020 06:17:52 +0000 (14:17 +0800)
committerChenghua Xu <paul.hua.gm@gmail.com>
Tue, 25 Aug 2020 07:39:28 +0000 (15:39 +0800)
commit68e605c93d57c17f07edd50f7e1c80f9216befd2
tree57946cbc9efab3a99a58db0eb275af789013ffd5
parent7fe2cec41bb2ccb499b6b6c513e00da1a270370f
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.

2020-08-25  Andrew Pinski  <apinski@marvell.com>

gcc/ChangeLog:

PR middle-end/64242
* config/mips/mips.md (builtin_longjmp): Restore the frame
pointer and stack pointer and gp.
gcc/config/mips/mips.md