[fpc-devel] Status of SEH in FPC

Sven Barth pascaldragon at googlemail.com
Sun Mar 3 17:52:05 CET 2013


On 03.03.2013 17:45, Flávio Etrusco wrote:
> On Sun, Mar 3, 2013 at 1:28 AM, Sergei Gorelkin <sergei_gorelkin at mail.ru> wrote:
>> 03.03.2013 2:53, Flávio Etrusco пишет:
>>
>>> Hello,
>>>
>>> what's the current state of the SEH in FPC trunk?
>>> IIRC - and according to wikipedia ;-) - SEH, at least for Windows, was
>>> in the 2.7 roadmap, but I can't find any related brach, or commit, or
>>> post.
>>> Also AFAIU would have some gains in both executable size and speed,
>>> correct?
>>>
>> By now SEH is fully implemented for Win64 target, but you need to cycle the
>> compiler with OPT=-dTEST_WIN64_SEH to enable it.
>> The most of it was committed in revision 20098.
>>
>> The effect of SEH is two-fold: it gives some performance gain when running
>> without exceptions, but big penalty when exceptions occur. It somewhat
>> reduces code size but at the same time adds some data, so executable size
>> may not reduce.
>>
>> The main advantage of SEH is the conformance with OS exception handing
>> scheme. Without it, it was almost impossible to use DLLs that raise
>> exceptions.
>>
>> Regards,
>> Sergei
>
> Thanks. And are there any plans to implement it for Win32?

I don't know whether there are any plans, but I hope so...

Note: It should also be rather easy to implement SEH for arm-wince (and 
a possible future arm-winrt), because on ARM a similar exception 
mechanism is used by Windows/MSVC.

Regards,
Sven




More information about the fpc-devel mailing list