Re: [BK+PATCH] remove __constant_memcpy

H. Peter Anvin (hpa@zytor.com)
17 Apr 2003 13:01:52 -0700


Followup to: <1050585430.31390.32.camel@dhcp22.swansea.linux.org.uk>
By author: Alan Cox <alan@lxorguk.ukuu.org.uk>
In newsgroup: linux.dev.kernel
>
> You are assuming the compiler is smart about stuff - it doesnt know
> SSE/MMX for page copies etc. For small copies it should alays win, but
> isn't it best if so to use __builtin_memcpy without our existing
> macros not just trust the compiler ?
>

For large or variable-sized copies __builtin_memcpy() just generates a
call to memcpy(). What's more, if you don't specify
-fno-builtin-memcpy memcpy() defaults to __builtin_memcpy()
automatically unless you override it (which Linux does with its
macros.)

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/