On Tue, Mar 6, 2018 at 6:29 PM, Eric Botcazou <ebotca...@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:
>> 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...


> --
> Eric Botcazou

Reply via email to