This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SSE on PIII - gcc or gas bug?



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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]