Date: Sat, 10 Nov 2001 18:26:30 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Peter Wemm <peter@wemm.org> Cc: Poul-Henning Kamp <phk@FreeBSD.org>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/libkern adddi3.c anddi3.c cmpdi2.c iordi3.c locc.c lshldi3.c muldi3.c negdi2.c notdi2.c subdi3.c xordi3.c Message-ID: <20011110180424.R16253-100000@delplex.bde.org> In-Reply-To: <20011109235657.AD00E380A@overcee.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 9 Nov 2001, Peter Wemm wrote:
> Bruce Evans wrote:
> > On Mon, 5 Nov 2001, Poul-Henning Kamp wrote:
> > > ...
> > > Removed files:
> > > sys/libkern adddi3.c anddi3.c cmpdi2.c iordi3.c
> > > locc.c lshldi3.c muldi3.c negdi2.c
> > > notdi2.c subdi3.c xordi3.c
> > ...
> > Please back this out.
>
> Yes:
> peter@daintree[3:48pm]~src/contrib/gcc-102> grep -r adddi3 . | wc -l
> 29
> peter@daintree[3:49pm]~src/contrib/gcc-103> grep -r anddi3 . | wc -l
> 14
> peter@daintree[3:49pm]~src/contrib/gcc-105> grep -r cmpdi2 . | wc -l
> 5
> peter@daintree[3:49pm]~src/contrib/gcc-106> grep -r iordi3 . | wc -l
> 12
> peter@daintree[3:50pm]~src/contrib/gcc-108> grep -r lshldi3 . | wc -l
> 0
This is still in libgcc2.c in a 2 week old contrib/gcc.
> peter@daintree[3:50pm]~src/contrib/gcc-109> grep -r muldi3 . | wc -l
> 16
> peter@daintree[3:50pm]~src/contrib/gcc-110> grep -r negdi2 . | wc -l
> 17
> peter@daintree[3:50pm]~src/contrib/gcc-111> grep -r notdi2 . | wc -l
> 0
This apparently went away from the real libgcc a long time ago.
> peter@daintree[3:50pm]~src/contrib/gcc-112> grep -r subdi3 . | wc -l
> 15
> peter@daintree[3:51pm]~src/contrib/gcc-113> grep -r xordi3 . | wc -l
> 18
>
> notdi2 and lshldi3 probably should go. I'm not sure about locc.c, but
> there are no apparent references to locc().
locc() is unrelated to gcc, so it can go. It isn't used in Lite2 either.
> Sample references:
> ./config/alpha/alpha.md:(define_insn "xordi3"
> ./config/i386/i386.md:(define_insn "xordi3"
> ...
> ./config/alpha/alpha.c: seq = emit_insn (gen_subdi3 (stack_pointer_rtx, stack_pointer_rtx,
> ./config/alpha/alpha.md: emit_insn (gen_subdi3 (tmp, op1, op2));
> ./config/alpha/alpha.md: emit_insn (gen_subdi3 (gen_lowpart (DImode, operands[0]), op1, op2));
> ./config/alpha/alpha.md:(define_insn "subdi3"
> ./config/alpha/alpha.md: emit_insn (gen_subdi3 (want, stack_pointer_rtx,
> ./config/i386/i386.md:(define_insn "subdi3"
> ./config/sparc/sparc.md:(define_expand "subdi3"
> ...
> ./config/alpha/alpha.md:(define_insn "muldi3"
> ...
> ./config/alpha/alpha.md:(define_insn "iordi3"
> ./config/i386/i386.md:(define_insn "iordi3"
> ./config/sparc/sparc.md:(define_expand "iordi3"
> ...
> etc. Therre are lots and lots of possible ways to generate references to
> these on architectures that we do care about. We just dont have code in
> the kernel that triggers calls to them at the moment.
I think most of the above are false positives. E.g., "adddi3" is just
the name of the add-double-integer-with-3-args instruction class, and
it is when it is in ${MACHINE}.md that the corresponding library call is
least likely to be needed.
> Please do back this commit out. These are here so that people dont feel
> the temptation to pull in GPL'ed code from libgcc.a.
My feeling is that there is negative point in making libkern or libc/quad
cleaner than libgcc.a. It would be a lot of work to decide exactly
which libcalls aren't needed for every arch.
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011110180424.R16253-100000>
