Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2013-03

Status of SEH in FPC

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

Reply by email

Sergei Gorelkin
to Flávio Etrusco

03.03.2013 2:53, Flávio Etrusco пишет:

Show quoted text 8 lines
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

Reply by email

Flávio Etrusco
to Sergei Gorelkin
Sergei Gorelkin wrote 26 lines
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?

Reply by email

Sven Barth
to Flávio Etrusco
Flávio Etrusco wrote 29 lines
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

Reply by email

Sven Barth
to Sven Barth
Sven Barth wrote 36 lines
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

Reply by email