On Sun, 10 Nov 2002 11:26:25 -0800 (PST) Linus Torvalds <[EMAIL PROTECTED]> wrote:
> > On Sun, 10 Nov 2002, Felix Kühling wrote: > > > > 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? I saw this in the context of a gcc-3.2 bug where it mixed FPU and MMX instructions. It used "movd" to move some value temporarily to %mm0. Adding "-mno-mmx -mno-3dnow" to the commandline disabled the use of movd. I thought the gcc bug was that it mixed MMX with FPU instructions. But it seems the bug was that it used MMX instructions at all. In the 2.4.19 kernel sources I added "-S" to the CFLAGS in arch/i386/Makefile and ran "make clean" and "make -k bzImage modules". Then I grepped for "%mm" in all .o files. The only one I found was arch/i386/lib/mmx.o (explicit MMX inline assembly). > 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 > not to do that. You might want to ask some gcc people about it.. > > Linus Felix __\|/__ ___ ___ ___ __Tschüß_______\_6 6_/___/__ \___/__ \___/___\___You can do anything,___ _____Felix_______\Ä/\ \_____\ \_____\ \______U___just not everything____ [EMAIL PROTECTED] >o<__/ \___/ \___/ at the same time! ------------------------------------------------------- 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