Port-m68k archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Xamiga segfaults with 16 bit on CV64
David Laight wrote:
> On Sun, Jan 06, 2008 at 02:43:00PM +0100, Frank Wille wrote:
>>
>> Disassembly of the crash location: [...]
>> 0x91bd4 <cfb16FillBoxTile32sCopy+56>: moveal %a1@(16),%a0 0x91bd8
>> <cfb16FillBoxTile32sCopy+60>: movel %a1,%sp@- 0x91bda
>> <cfb16FillBoxTile32sCopy+62>: moveal %a0@(372),%a0 0x91bde
>> <cfb16FillBoxTile32sCopy+66>: jsr %a0@ 0x91be0
>> <cfb16FillBoxTile32sCopy+68>: addql #4,%sp 0x91be2
>> <cfb16FillBoxTile32sCopy+70>: movel %a0@(32),%fp@(-24) <-- HERE [...]
>>
>> The code looks to me like a compiler bug (unless the sub-routine is meant
>> to return a result in a0). Register a0 is reused for deferencing after a
>> sub- routine call, although it is definitely a volatile register (and
>> zero after returning from the sub-routine).
>
> %a0 is used to return a pointer from a function.
> So it looks as though the called function returned 'NULL' and it wasn't
> checked for.
Thanks for the explanation. I wasn't aware that NetBSD follows a different ABI
than AmigaOS, which always uses d0 for return values.
Then I have to find out which function pointer is NULL here...
--
_ Frank Wille (frank%phoenix.owl.de@localhost)
_ // http://sun.hasenbraten.de/~frank/
\X/ Phx @ #AmigaGer
Home |
Main Index |
Thread Index |
Old Index