Re: [pre-2.3.51-2] memset problem on IA32

From: Philipp Thomas (pthomas@suse.de)
Date: Mon Mar 13 2000 - 01:31:47 EST


* Mike Galbraith (mikeg@weiden.de) [20000313 05:35]:

> If you take your hands off the wheel (don't tell the compiler exactly
> what to do), new snapshots will generate a libcall instead of using
> an internally defined inline memcpy() as it used to.

Well, there is a possible solution at the horizon for a freestanding
environment such as the kernel, -ffreestanding. Currently this just implies
-fno-builtin, i.e. disables builtins that don't begin with __builtin_. But
at the moment does not effect the libcalls the block mover generates. It
would be relatively easy to change gcc to also inhibit those, resulting in
an abort on such structure copies by assignment.

My reasoning would be to use -ffreestanding, as we don't have a standard C
library around and baning all 'struct_a = struct_b' from kernel code,
mandating either the use of struct_cpy() (which would have to be added to all
arcs other than i386) or the direct use of memcpy(), which would then be
inlined via the linux/string.h macro versions.

Philipp

-- 
Philipp Thomas <pthomas@suse.de>
SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany

#define NINODE 50 /* number of in core inodes */ #define NPROC 30 /* max number of processes */ -- Version 7 UNIX fuer PDP 11, /usr/include/sys/param.h

- 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/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:23 EST