]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix -freorder-blocks-and-partition glitch with Windows SEH
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 11 Feb 2021 23:16:49 +0000 (00:16 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Thu, 11 Feb 2021 23:21:29 +0000 (00:21 +0100)
commit15278fb2877184c75a6ee3a6def09efbb191968b
treef4c2bf4c918605b0d067ebef3ed37c94afee1e18
parent9d3b9a3e70e634c7c48bb12bb35ec8219024f98b
Fix -freorder-blocks-and-partition glitch with Windows SEH

Since GCC 8, the -freorder-blocks-and-partition pass can split a function
into hot and cold parts, thus generating 2 CIEs for a single function in
DWARF for exception purposes and doing an equivalent trick for Windows SEH.

Now the Windows system unwinder is picky when it comes to the boundary
between an active EH region and the end of the function and, therefore,
a nop may need to be added in specific cases.

gcc/
* config/i386/winnt.c (i386_pe_seh_unwind_emit): When switching to
the cold section, emit a nop before the directive if the previous
active instruction can throw.
gcc/config/i386/winnt.c