Re: Sparc CFLAGS question relating to 2.2.x

David S. Miller (davem@redhat.com)
Tue, 24 Aug 1999 18:04:45 -0700


Date: Tue, 24 Aug 1999 17:32:36 -0700 (PDT)
From: Robert Dinse <nanook@eskimo.com>

In arch/sparc/Makefile, CFLAGS has amoung other things
-mno-fpu.

It was my understanding that no floating point math was
allowed in the kernel anyway, so I fail to understand the need for
that flag.

The compiler can emit floating point load/stores during high register
pressure to move variables around if you don't tell it otherwise.

On the other hand, there seems to be no detection for version
8 Sparc and the inclusion of -mv8. It would seem to make sense to
use hardware to do interger multiply/divides if it exists?

The single 32-bit Sparc kernel image runs on sun4/sun4c/sun4m systems,
so adding this compiler option is not allowed.

However, the only real gain from -mv8 is that hardware divide,
remainer, and multiply instructions are used. And if you check the
kernel bootup sequence we patch the ".umul", ".udiv" etc. routines to
use the instructions on sun4m systems which have it.

Furthermore, floating point operations are fully allowed in the kernel
on sparc64. In fact we use it heavily for high-bandwidth
memcpy/memset/csum_partial/csum_partial_copy since floating point
allows us to use the high-bandwidth non-cache-polluting loads and
stores provides by UltraSparc's VIS.

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/