SSE on PIII - gcc or gas bug?

Alan Modra alan@SPRI.Levels.UniSA.Edu.Au
Tue Jan 18 01:16:00 GMT 2000


On Tue, 18 Jan 2000, Ilan Finci wrote:

> I'm trying to use the new Pentium III extension (SSE - what came after
> MMX) using inline assembly.
> 
> I managed to get the program to compile just fine (no warning or
> errors), but when trying to run the program, I get an error "Illegal
> instruction (core dumped)". I've tried it on more then one PIII.
> 
> I've checked that SSE is enabled (using CPUID, with ax=1 and checking
> the 25th bit of dx) - it is enabled.

To run SIMD instructions you need to check that

a) CPUID.XMM(EDX bit 25) = 1
   (processor supports Streaming SIMD Extensions)

b) CR0.EM(bit 2) = 0
   (emulation disabled)

c) CR4.OSFXSR(bit 9) = 1
   (OS supports saving SIMD floating-point state during context switches)

Maybe you're missing b) or c)?  I also recommend a newer binutils
http://sourceware.cygnus.com/binutils/ or
ftp.varesearch.com/pub/support/hjl/binutils/



More information about the Gcc-bugs mailing list