Mail Archives: djgpp/1999/11/29/19:30:22
Anton Helm (tony AT dictator DOT nt DOT tuwien DOT ac DOT at) wrote:
> At 07:40 PM 11/24/99 +0100, you wrote:
> Well, if you know what you are looking for, you probably find it. I
> don't. Program crashes at _GR_shift_scanline+99 while running the
> first inline asm part. This is somewhat mysterious as 99 is
> definitely out of this inline asm part. (See the second asm file
> attached below.)
No, it isn't. That '99' is decimal, I think, i.e. it's the code found
at address 0x63 in the disassembled listing, and that code is
movb (%ecx),%ah
and comes from the inline asm part of the routine. To quote the 2.81
disassembly:
56: 8a 2e movb (%esi),%ch
58: eb 06 jmp 60 <__GR_shift_scanline+60>
5a: 8d b6 00 00 00 leal 0x0(%esi),%esi
5f: 00
60: 4e decl %esi
61: 88 e8 movb %ch,%al
63: 8a 26 movb (%esi),%ah
65: 88 e5 movb %ah,%ch
That's the beginning of the inline assembly block. As you see, %esi was
chosen for term '%3' of the inline assembly. Same part, in 2.95 asm:
51: 8a 29 movb (%ecx),%ch
53: eb 0b jmp 60 <L7+3f>
55: 8d 74 26 00 leal 0x0(%esi,1),%esi
59: 8d bc 27 00 00 leal 0x0(%edi,1),%edi
5e: 00 00
60: 49 decl %ecx
61: 88 e8 movb %ch,%al
63: 8a 21 movb (%ecx),%ah
65: 88 e5 movb %ah,%ch
I.e., it chose %ecx for %3. But that's *wrong*. It shouldn't have done
that, as %ch which is explicitly used is part of %ecx, and thus %ecx
is not available for holding an input/output expression.
So it looks like putting '%ch' into the output register list of that asm
block was not enough. Whole %ecx will have to be put there... I don't
know the exact syntax, though...
It's really time for the grx23 code to be patched, accordingly, or at
least an 'official' patch should be made available, by its
maintainers, on their web site.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -