Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 1998 10:02:20 +1000 (EST)
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        hackers@FreeBSD.ORG
Subject:   Re: Making world with gcc-2.8.1
Message-ID:  <199806120002.KAA15906@gsms01.alcatel.com.au>

next in thread | raw e-mail | index | archive | help
On Thu, 11 Jun 1998 08:41:48 +0100, Timo Geusch <freebsd@timog.prestel.co.uk> wrote:
>I can confirm this problem on 2.2.6-stable; it is not possible to link a kernel
>with the -stable gcc-2.8.1 port. It complains about some missing functions
>that seem to be necessary for handling quadwords (__qdiv? - has been some
>time, I'm not sure any more).
I had forgotten about that problem - I had fixed it already.

I am not aware of any cases where gcc 2.8.1 generates incorrect code.  I
have identified 3 cases where it generates sub-optimal code:
a) A long-long variable divided by a constant power-of-2 generates an
   unnecessary call to __cmpdi2.  This prevents a 2.2.5-R (and presumably
   2.2.6-R or -stable) kernel from linking because __cmpdi2 is not
   included in the kernel support library.  This is presumably the problem
   referred to by Timo.
b) The code for random() does divide and modulo operations which gcc-2.7
   merges into a single idivl instruction, whilst 2.8.1 generates additional
   code to `optimise' the division.
c) In some cases where gcc converts a loop index multiplied by a constant
   into a temporary variable incremented by the constant, gcc 2.8.1
   unnecessarily splits the addition into two pieces.

For the first problem, I have a patch (posted to freebsd-ports on 13th
April) that fixes this by extending the code in the expmed.c to
open-code the 64-bit compare.  It's about 500 lines.

Richard Kenner <kenner@vlsi1.ultra.nyu.edu> developed patches for the
other two problems and mailed them to me.  I don't know what further
distribution has been made.  They total about 50 lines.

If there's sufficient interest, I can post the patches.

I am currently running (though not stressing) 2.2.5-R and 2.2.6-R
kernels built with gcc 2.8.1 and I haven't identified any problems
as yet.

Peter
--
Peter Jeremy (VK2PJ)                    peter.jeremy@alcatel.com.au
Alcatel Australia Limited
41 Mandible St                          Phone: +61 2 9690 5019
ALEXANDRIA  NSW  2015                   Fax:   +61 2 9690 5247

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806120002.KAA15906>