From owner-freebsd-current Mon Sep 2 0:54:59 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 96F6937B400 for ; Mon, 2 Sep 2002 00:54:55 -0700 (PDT) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id E725C43E72 for ; Mon, 2 Sep 2002 00:54:54 -0700 (PDT) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (jake@localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.5/8.12.5) with ESMTP id g8281j8a086946; Mon, 2 Sep 2002 04:01:45 -0400 (EDT) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.5/8.12.5/Submit) id g8281jh7086945; Mon, 2 Sep 2002 04:01:45 -0400 (EDT) Date: Mon, 2 Sep 2002 04:01:45 -0400 From: Jake Burkholder To: Bruce Evans Cc: current@FreeBSD.ORG Subject: Re: aout support broken in gcc3 Message-ID: <20020902040144.H67527@locore.ca> References: <20020902141223.Y2138-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020902141223.Y2138-100000@gamplex.bde.org>; from bde@zeta.org.au on Mon, Sep 02, 2002 at 02:24:08PM +1000 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 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? > assignments to long longs and shifts of long longs by a non-constant > amount: > > %%% > $ cat z.c > long long x = 0; > int y; > > foo() > { > x = x << y; > } > $ cc -O -S -aout z.c > $ cat z.s > .file "z.c" > .globl _x > .data > .p2align 3 > .type _x,@object > .size _x,8 > _x: > .quad 0 > .text > .p2align 2,0x90 > .globl _foo > .type _foo,@function > _foo: > pushl %ebp > movl %esp, %ebp > movb _y, %cl > movl _x, %eax > movl _x+4, %edx > shldl %eax, %edx > sall %cl, %eax > testl $32, %ecx > je L2 > movl %eax, %edx > movl $0, %eax > L2: > movl %eax, _x > movl %edx, _x+4 > leave > ret > Lfe1: > .size _foo,Lfe1-_foo > .comm _y,4 > .ident "GCC: (GNU) 3.1 [FreeBSD] 20020509 (prerelease)" > %%% > > 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. > > Bruce > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message