Re: Long long arithmetic

From: Dominik Kubla (dominik.kubla@uni-mainz.de)
Date: Fri Jun 09 2000 - 08:48:23 EST


On Thu, Jun 08, 2000 at 04:28:12PM -0700, H. Peter Anvin wrote:
> Followup to: <39400F10.36D1DDBF@quark.vpplus.com>
> By author: Brian Gerst <bgerst@quark.vpplus.com>
> In newsgroup: linux.dev.kernel
> >
> > GCC needs library functions for some 64-bit operations on 32-bit
> > crchitectures, which are not present in the kernel. 64-bit division is
> > a common example of this. If possible, limit your code to using adds
> > and shifts when working with long longs.
> >
>
> Is there any reason we don't link the kernel with libgcc? libgcc
> doesn't do system calls, so it should be safe to link the kernel with.

Yes: the resulting kernel may not work on maschines not identical to
the one the GCC was compiled for. You have this problem on all
architectures. Example: You compile a sparc32 kernel with a GCC built for
sparc64. In that case the sparc64 libgcc will contain code for sparc v9
which will not run on any sparc v8 or older. Or for the PC folks out
there simply replace sparc32 with 386 and and sparc64 with Pentium-III.

Yours,
  Dominik Kubla

-- 
  Networking Group,  Hospital of Johannes Gutenberg-University                  
  Obere Zahlbacher Straße 69, 55101 Mainz, Germany                              
  Tel: +49 (0)6131 17-2482   FAX: +49 (0)6131 17-5521                           

- 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 : Thu Jun 15 2000 - 21:00:18 EST