Mail Archives: djgpp/1998/06/09/12:46:15
Eric Rudd wrote:
>
> I have isolated what I think is a register-allocation bug in gcc
Sorry, the attachment got lost on my end; here it is:
.file "bad.c"
gcc2_compiled.:
___gnu_compiled_c:
.text
.align 4
.globl _alias
_alias:
pushl %ebp
movl %esp,%ebp
pushl %esi
pushl %ebx
movl 8(%ebp),%esi
movl %esi,%eax
movl 12(%ebp),%ebx
/APP
xorl %eax, %eax
xorl %edx, %edx
xorl %ecx, %ecx
/NO_APP
movl 16(%ebp),%ebx <= points to arg3
movl 20(%ebp),%ebx <= overwrites pointer (??)
movl %edx,(%ebx)
movl %eax,(%ebx) <= writes to *arg4 instead of *arg3
leal -8(%ebp),%esp
popl %ebx
popl %esi
movl %ebp,%esp
popl %ebp
ret
- Raw text -