Victory? (was Re: Mac Intel)

Mikael Pettersson mikpe@REDACTED
Thu Aug 17 14:01:08 CEST 2006

Mikael Pettersson writes:
 > Mikael Pettersson writes:
 >  > On Tue, 15 Aug 2006 13:22:14 +0100, Joel Reymont wrote:
 >  > > When do you think this will happen?
 >  > > 
 >  > > On Aug 15, 2006, at 1:15 PM, Mikael Pettersson wrote:
 >  > > 
 >  > > >> I might tackle the stack alignment eventually, if you don't get to  
 >  > > >> it.
 >  > > >
 >  > > > I'll handle that bit.
 >  > 
 >  > This week, in a day or two.
 > Completed. Download the following URLs:
 > otp-0804 is a current snapshot from the branch that will become R11B-1
 > fairly soon, tests-0804 is the corresponding snapshot of the HiPE test
 > suite, and patch-otp-0804-1-x86-aligned-c-stack is the patch to make
 > the runtime system maintain a 16-byte aligned C stack on x86-32.

I've now uploaded two more patches:

The second patch updates the FP exception feature test code and the actual
implementation to support exceptions from SSE2 FP instructions on x86-32.
It is known to work on Linux (build Erlang with "-O2 -msse2 -mfpmath=sse"
as CFLAGS). The patch is not final (indicated by the absence of a patch number
and the "-wip" (work-in-progress) suffix), but the only thing missing is a safety
check to see if the CPU has SSE2 or not before SSE2 FP exceptions are enabled.

The first patch fixes a latent bug in the existing x86-64 SSE2 FP exception
handling that I found while preparing the x86-32 SSE2 support. The bug could
cause SSE2 exception handling to be invoked when an x87 exception had occurred,
which would result in an abort() from skip_sse2_insn(). The error would never
occur on normal x86-64 systems, but it is easy to trigger on systems that use
SSE2 for computations and x87 for parameter passing, like OSX/x86-32.

More information about the erlang-questions mailing list