[fpc-devel] Exception handling differences with Delphi
Sergei Gorelkin
sergei_gorelkin at mail.ru
Thu Nov 24 14:59:13 CET 2011
Hello,
There are some differences between FPC and Delphi exception handling (working on SEH support, one
would inevitably collect all of them):
1) Delphi uses EZeroDivide for floating-point division by zero, while FPC uses EDivByZero (the same
exception class is used for integer division by zero). Should it be fixed?
2) Delphi uses EUnderflow for floating-point underflow condition, while FPC uses EOverflow. Should
it be fixed?
3) Delphi halts in ExceptProc, while in FPC ExceptProc only prints the exception information and
then returns. I don't imagine why someone would call ExceptProc from the user code, still, is this
worth fixing?
4) Delphi resets FPU on every exception, while FPC does it only for FPU-related exceptions. Do we
really need to be different in this respect?
5) What is the 'Athlon prefetch bug' we're trying to handle? Should be an old thing, since it
originates from svn revision 1; googling for 'Athlon prefetch bug' does not give relevant
information, and my general knowledge tells that such code should normally reside in OS kernel, not
in RTL. Anyway, does it apply to x86_64 target?
Regards,
Sergei
More information about the fpc-devel
mailing list