[lkml]   [2003]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [BK+PATCH] remove __constant_memcpy
On Thu, Apr 17, 2003 at 09:07:45AM -0700, Linus Torvalds wrote:
> On 17 Apr 2003, Arjan van de Ven wrote:
> >
> > it can do that ANYWAY for all kinds of things.
> > We really should ask the gcc folks to add a
> > -fdontyoudareusefloatingpoint flag (well different name probably)
> Well, _most_ architectures actually have that flag already. It's not
> called -fdontyoudareusefloatingpoint on any of them, though ;)
> It's most commonly called "-mno-fpu", but sh calls it "-mno-implicit-fp",
> and alpha calls it "-mno-fp-regs".
> On x86, gcc doesn't have such an option, although "-mno-sse" and
> "-mno-sse2" probably come closest (and we should probably use them, but
> since older gcc's don't know about it and it hasn't been an issue yet we
> haven't).

gcc on x86 definitely wants a -fdontyoudareusefloatingpoint... The
following snippet from the -msoft-float docs isn't encouraging:

On machines where a function returns floating point results in the
80387 register stack, some floating point opcodes may be emitted
even if `-msoft-float' is used.
[yes, I realize it's an ABI constraint in this case, but IMO it's also
indicative in general of the difficulty in getting gcc to _never_
generate fp opcodes on x86, now or in the future]

Anyway, if you wanna play it safe WRT gcc future, the following
patch works.

-mno-3dnow is probably over-paranoia, because (IIRC) it doesn't contain
any integer instructions, but maybe I'm wrong. It can't hurt... :)

===== arch/i386/Makefile 1.49 vs edited =====
--- 1.49/arch/i386/Makefile Thu Apr 3 14:24:40 2003
+++ edited/arch/i386/Makefile Thu Apr 17 14:55:34 2003
@@ -27,6 +27,9 @@
# prevent gcc from keeping the stack 16 byte aligned
CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)

+# force gcc to always use general registers (only)
+CFLAGS += $(call check_gcc,-mno-mmx -mno-sse -mno-sse2 -mno-3dnow,)
align := $(subst -functions=0,,$(call check_gcc,-falign-functions=0,-malign-functions=0))

cflags-$(CONFIG_M386) += -march=i386
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:34    [W:0.086 / U:4.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site