[fpc-devel] Status of SEH in FPC

2013-03-02 Thread 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?

-Flávio
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Status of SEH in FPC

2013-03-02 Thread Sergei Gorelkin

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
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Status of SEH in FPC

2013-03-03 Thread Flávio Etrusco
On Sun, Mar 3, 2013 at 1:28 AM, Sergei Gorelkin  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?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Status of SEH in FPC

2013-03-03 Thread Sven Barth

On 03.03.2013 17:45, Flávio Etrusco wrote:

On Sun, Mar 3, 2013 at 1:28 AM, Sergei Gorelkin  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

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Status of SEH in FPC

2013-03-03 Thread Sven Barth

On 03.03.2013 17:52, Sven Barth wrote:

On 03.03.2013 17:45, Flávio Etrusco wrote:

On Sun, Mar 3, 2013 at 1:28 AM, Sergei Gorelkin
 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...


Just so that nobody misunderstands it: this does not mean that Sergei 
must be the one that implements it...


Regards,
Sven

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel