Hi,

> > not too long ago I read on this list that you have to be extra careful
> > about using floating point in the kernel. Is the same true for MMX? If
> > so, would it be dangerous to compile a kernel module with -march=athlon?
> > AFAIK gcc-3.2 generates MMX instructions if the target CPU supports
> > them.
> 
> If so, the kernel will crash, eventually. However, I thought that gcc
> wouldn't use MMX on its own (ie that you have to use the MMX data types to
> get MMX operations). Not true?

Not. gcc (3.1+) will use MMX for integer, SSE for float code, even with
normal instructions, if both
- code optimization enabled (so it will recognize normal array operations
  (example: for(i=0;i<15;i++) y[i]+=x[i];) and replace them with SIMD)
- SIMD usage enabled (-msse, -mmmx, -msse2, -m3dnow,
  -mfpmath=sse (use SSE for float) / -mfpmath=sse,387 (use SSE and FPU in
   parallel for float)

so, by default it won't use SIMD.

> Many other architectures use a compiler flag like "-msoft-float" or
> "-mno-fpu" to explicitly tell gcc that it cannot use the FP unit. If gcc
> starts using MMX on its own, we'll have to find the switch that tells it

it has -mno-mmx, -mno-sse etc.

> not to do that. You might want to ask some gcc people about it..

ehh. i'm not gcc people... :)
(but i did RTFM :)


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to