Subject: Re: build failure on bootxx_msdos
To: Tom Spindler <>
From: David Laight <>
List: current-users
Date: 12/02/2006 10:32:18
On Fri, Dec 01, 2006 at 04:46:10PM -0800, Tom Spindler wrote:
> I've just committed a fix to src/sys/lib/libsa/dosfs.c; here's the diff,
> so I don't have to type out the comment again:
> +#ifdef BOOTXX
> +       /* due to __internal_memset_ causing all sorts of register spillage
> +          (and being completely unoptimized for zeroing small amounts of
> +          memory), if we hand-initialize the remaining members of f to zero,
> +          the code size drops 68 bytes. This makes no sense, admittedly. */
> +       f->offset = 0;
> +       f->c = 0;
> +#else
>         bzero(f, sizeof(DOS_FILE));
> +#endif

Gah - how on earth goes gcc manage to expand bzero to that many bytes!
I'll have to look!

I know I made ld.elf_so run faster by not using the builtin memcmp/strcmp
(can't remember which) but be calling a C function.

Also i386 the inlined code for memcpy() is seriously sub-optimal.
(you don't want to be doing the 'rep movsb' with cx 0/1/2/3)


David Laight: