macpas.pp disables floating-point exceptions for powerpc targets only
Original Reporter info from Mantis: Adriaan van Os
-
Reporter name: Adriaan van Os
Original Reporter info from Mantis: Adriaan van Os
- Reporter name: Adriaan van Os
Description:
macpas.pp has the following init code
{$ifdef cpupowerpc}
{$ifndef FPUNONE}
begin
asm
mtfsfi 6,1
end;
{$endif}
{$endif cpupowerpc}
end.
This disables floating-point exceptions for the powerpc only. However, given the many bugs in Mac OS X, floating-point exceptions have to be disabled for intel code also.
As an example, I recently got an EXC_ARITHMETIC exception inside CoreAudio in MusicDeviceMIDIEvent, on a CoreDuo MacBook Pro running Mac OS X 10.5.2. The crash was worked around by including the Math unit and calling SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]) at the start of the application.
Additional information:
svn fpc trunk revision 11218
Mantis conversion info:
- Mantis ID: 11516
- Version: 2.3.1
- Fixed in version: 2.2.4
- Fixed in revision: 12148 (#8356cd89)
- Target version: 2.2.4