From owner-freebsd-hackers Thu Jun 11 17:45:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA15984 for freebsd-hackers-outgoing; Thu, 11 Jun 1998 17:45:09 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from gatekeeper.alcatel.com.au (gatekeeper.alcatel.com.au [203.17.66.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA15879 for ; Thu, 11 Jun 1998 17:44:38 -0700 (PDT) (envelope-from peter.jeremy@alcatel.com.au) Received: from mfg1.cim.alcatel.com.au ("port 2005"@[139.188.23.1]) by gatekeeper.alcatel.com.au (PMDF V5.1-7 #U2695) with ESMTP id <01IY58SA8LB40023GY@gatekeeper.alcatel.com.au> for hackers@FreeBSD.ORG; Fri, 12 Jun 1998 10:13:45 +1000 Received: from gsms01.alcatel.com.au by cim.alcatel.com.au (PMDF V5.1-10 #23324) with ESMTP id <01IY58EOPSWGC2RZQ1@cim.alcatel.com.au> for hackers@FreeBSD.ORG; Fri, 12 Jun 1998 10:02:22 +1000 Received: (from jeremyp@localhost) by gsms01.alcatel.com.au (8.8.8/8.7.3) id KAA15906 for hackers@FreeBSD.ORG; Fri, 12 Jun 1998 10:02:20 +1000 (EST) Date: Fri, 12 Jun 1998 10:02:20 +1000 (EST) From: Peter Jeremy Subject: Re: Making world with gcc-2.8.1 To: hackers@FreeBSD.ORG Message-id: <199806120002.KAA15906@gsms01.alcatel.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 11 Jun 1998 08:41:48 +0100, Timo Geusch 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 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