This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
gas bug
- To: binutils at sourceware dot cygnus dot com
- Subject: gas bug
- From: Andrew Morton <andrewm at uow dot edu dot au>
- Date: Thu, 06 Apr 2000 11:34:09 +0000
- CC: expert at linux-mandrake dot com
The gas which comes with Mandrake 7.0 is generating bad code for me.
mnm:/home/morton> uname -a
Linux mnm.uow.edu.au 2.2.14-15mdk #1 Tue Jan 4 22:24:20 CET 2000 i686 unknown
mnm:/home/morton> which as
/usr/bin/as
mnm:/home/morton> rpm -qf /usr/bin/as
binutils-2.9.5.0.16-2mdk
mnm:/home/morton> rpm -V binutils
mnm:/home/morton> as -v
GNU assembler version 2.9.5 (i686-pc-linux-gnu) using BFD version 2.9.5.0.16
Here's the input:
movb %dl,373(%ebp)
movl %ebx,368(%ebp)
movw 328(%esp),%dx
addw $14,%dx
movl $2048,%eax
#APP
outw %ax,%dx
#NO_APP
xorl %ebx,%ebx
movw 328(%esp),%cx
addw $10,%cx
.align 4
.L4148:
movl %ebx,%eax
addw $560,%ax
movl %ecx,%edx
#APP
outw %ax,%dx
#NO_APP
Here's the output from objdump -D:
715: 88 95 75 01 00 00 mov %dl,0x175(%ebp)
71b: 89 9d 70 01 00 00 mov %ebx,0x170(%ebp)
721: 66 8b 94 24 48 01 00 mov 0x148(%esp,1),%dx
728: 00
729: 66 83 c2 0e add $0xe,%dx
72d: b8 00 08 00 00 mov $0x800,%eax
732: 66 ef out %ax,(%dx)
734: 31 db xor %ebx,%ebx
736: 66 8b 8c 24 48 01 00 mov 0x148(%esp,1),%cx
73d: 00
73e: 66 83 c1 0a add $0xa,%cx
742: 00 00 add %al,(%eax) <<<------- Ouch!
744: 89 d8 mov %ebx,%eax
746: 66 05 30 02 add $0x230,%ax
74a: 89 ca mov %ecx,%edx
74c: 66 ef out %ax,(%dx)
I've put the assembler source file up at http://www.uow.edu.au/~andrewm/3c59x.s.gz
The code section which I have shown above starts at line 1068 of 3c59x.s.
I am assembling it with
as -V -Qy -o 3c59x.o 3c59x.s
Thanks.
--
-akpm-