From owner-freebsd-current Mon Sep 2 4: 6:32 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E19C037B400 for ; Mon, 2 Sep 2002 04:06:28 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DA7A43E42 for ; Mon, 2 Sep 2002 04:06:28 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id LAA01471; Mon, 2 Sep 2002 11:06:16 GMT Date: Mon, 2 Sep 2002 21:13:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Jake Burkholder Cc: current@FreeBSD.ORG Subject: Re: aout support broken in gcc3 In-Reply-To: <20020902040144.H67527@locore.ca> Message-ID: <20020902205828.I3195-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 2 Sep 2002, Jake Burkholder wrote: > Apparently, On Mon, Sep 02, 2002 at 02:24:08PM +1000, > Bruce Evans said words to the effect of; > > > aout support is still required for a few things (mainly for compiling > > some boot blocks), but is broken in gcc3 for at least compile-time > > Which boot blocks? Oops, perhaps only mine. (I use my version of biosboot which is like pc98/boot2 except it supports loading elf kernels and some local things, and it hasn't been converted to elf at the source level.) When I wrote the above I thought that several standard boot blocks used OBJFORMAT=-aout. They actually just have a lot of ${OBJFORMAT} == aout ifdefs and elf2aout conversions. Most of aout support at the source level seems to have been broken some time ago by using new gas features in assembler code. > > The above assembler output has two syntax errors: > > - ".quad 0". .quad is not supported by the old aout assembler. > > - "shldl %eax, %edx". The old aout assembler only accepts the correct > > syntax of "shldl %cl,%eax,%edx". Note that gcc doesn't elide the > > similarly implicit %cl register for the sall instruction. Wrong fixes for .quad are easy and are already done for some systems (e.g., OpenBSD) by #undefing ASM_QUAD. The following hack seems to fix shld (the breakage seems to be intentional): %%% Index: i386.md =================================================================== RCS file: /home/ncvs/src/contrib/gcc/config/i386/i386.md,v retrieving revision 1.12 diff -u -2 -r1.12 i386.md --- i386.md 1 Sep 2002 21:13:32 -0000 1.12 +++ i386.md 2 Sep 2002 05:51:30 -0000 @@ -10768,5 +10768,5 @@ "@ shld{l}\t{%2, %1, %0|%0, %1, %2} - shld{l}\t{%s2%1, %0|%0, %1, %2}" + shld{l}\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "ishift") (set_attr "prefix_0f" "1") %%% I forgot to make the corresponding change for shrd. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message