This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR target/84277
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 7 Mar 2018 09:32:05 +0100
- Subject: Re: [patch] Fix PR target/84277
- Authentication-results: sourceware.org; auth=none
- References: <4011576.KGStx97QI1@polaris> <28688884.vNlrgLSUS2@polaris>
On Tue, Mar 6, 2018 at 6:29 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> this is the breakage of SEH on 64-bit Windows introduced by defaulting to
>> the -freorder-blocks-and-partition optimization. It is fixed by:
>> 1. Defining ASM_DECLARE_COLD_FUNCTION_NAME &
>> ASM_DECLARE_COLD_FUNCTION_SIZE, 2. Emitting a nop in one more case for SEH,
>> 3. Splitting the exception table into hot and cold parts; that's necessary
>> because the LSDA is referenced directly in the SEH scheme.
>>
>> Tested on x86-64/Windows, x86-64/Linux and IA-64/Linux, OK for mainline?
>
> Also tested on x86/Windows to verify that it doesn't break anything.
>
> Can anyone approve the middle-end bits? The rest effectively affects only the
> -freorder-blocks-and-partition optimization on x86-64/Windows, which has never
> worked in C++ or Ada, so I don't think that it can do any harm...
For the middle-end part I'd like to see output_function_exception_table take
an enum with two members with appropriate name - I see there wasn't
documentation for the function but your change doesn't make semantics
more clear, esp.
- output_one_function_exception_table (0);
- if (crtl->eh.call_site_record_v[1])
- output_one_function_exception_table (1);
+ output_one_function_exception_table (section);
looks like we now might output only once while we did twice before...
Looking at the two changed callers doesn't shed enough light on this either...
Richard.
> --
> Eric Botcazou