On 07/20/16 21:00, Jeff Law wrote:
> On 07/20/2016 10:30 AM, Bernd Edlinger wrote:
>> On 07/20/16 18:15, Jeff Law wrote:
>>> On 07/20/2016 05:53 AM, Richard Biener wrote:
>>>>> Is it OK after boot-strap and regression-testing?
>>>>
>>>> I think the __builtin_setjmp change is wrong - __builtin_setjmp is
>>>> _not_ 'setjmp' it is part of the GCC internal machinery (using setjmp
>>>> and longjmp in the end) for SJLJ exception handing.
>>>>
>>>> Am I correct Eric?
>>> That is correct. __builtin_setjmp (and friends) are part of the SJLJ
>>> exception handling code. They use a fixed sized buffer (5 words) to
>>> store the key items (as opposed to the OS defined jmp_buf structure
>>> which is usually considerably larger).
>>>
>>> jeff
>>
>> Yes. __builtin_setjmp is declared in builtins.def:
>>
>> DEF_GCC_BUILTIN (BUILT_IN_SETJMP, "setjmp", BT_FN_INT_PTR,
>> ATTR_NOTHROW_LEAF_LIST)
>>
>> It is visible in C as __builtin_setjmp, and it special_function_p
>> adds the ECF_RETURNS_TWICE | ECF_LEAF.
>>
>> So it becomes equivalent to this:
>>
>> int __builtin_setjmp(void*) __attribute__((returns_twice, nothrow,
>> leaf))
>>
>> after special_function_p does it's magic.
>>
>> If I remove the recognition of "__builtin_" from special_function_p
>> I have to add the returns_twice attribute in the DEF_GCC_BUILTIN.
>> Otherwise, I would get wrong code on all platforms, because
>> __builtin_setjmp saves only IP, SP, and FP registers.
>>
>> Everything in the normal test suite keeps on going with the patch,
>> but is there anything that I have to do to make sure that the
>> SJLJ eh is still working? It is not the default on x86_64, right?
> Very few targets continue to use SJLJ eh (perhaps just cygwin/mingw).
> *But* I think the Ada front-end explicitly uses SJLJ EH, so if you want
> to get some smoke testing, the Ada testsuite is probably the place to go.
>
> Jeff
Good. I always include ada and go, just to be on the safe side.
The reg-test of the __builtin-setjmp patch is still running but the
ada part is already complete:
=== acats Summary ===
# of expected passes 2320
# of unexpected failures 0
Native configuration is x86_64-pc-linux-gnu
=== gnat tests ===
Running target unix
FAIL: gnat.dg/vect3.adb scan-tree-dump-times vect "vectorized 1 loops" 15
FAIL: gnat.dg/vect6.adb scan-tree-dump-times vect "vectorized 1 loops" 15
=== gnat Summary ===
# of expected passes 2511
# of unexpected failures 2
# of expected failures 22
# of unsupported tests 3
/home/ed/gnu/gcc-build/gcc/gnatmake version 7.0.0 20160720 (experimental)
the failures are already there since a few months.
Bernd.