Date: Mon, 2 Sep 2002 04:01:45 -0400 From: Jake Burkholder <jake@locore.ca> To: Bruce Evans <bde@zeta.org.au> Cc: current@FreeBSD.ORG Subject: Re: aout support broken in gcc3 Message-ID: <20020902040144.H67527@locore.ca> In-Reply-To: <20020902141223.Y2138-100000@gamplex.bde.org>; from bde@zeta.org.au on Mon, Sep 02, 2002 at 02:24:08PM %2B1000 References: <20020902141223.Y2138-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020902040144.H67527>
