From owner-freebsd-current Sun Sep 1 21:17:20 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 2CBD237B400 for ; Sun, 1 Sep 2002 21:17:17 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1396143E65 for ; Sun, 1 Sep 2002 21:17:16 -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 EAA11444 for ; Mon, 2 Sep 2002 04:17:05 GMT Date: Mon, 2 Sep 2002 14:24:08 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: current@freebsd.org Subject: aout support broken in gcc3 Message-ID: <20020902141223.Y2138-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 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 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