[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] modules hang 1.16.1 kernel



Le Sun, 29 Jan 2006 21:53:01 +0100
Petr Stehlik <joy@sophics.cz> a écrit:

> > IMHO this is actually a bug in our binutils adaptation. When I save
> > only the d4 it is enough to get FreeMiNT running. And it is caused
> > by this the following binutils-2.13.2.1-mint.patch (from the RPM):
> 
> If saving d4 fixes loading of FreeMiNT modules then I suppose the
> original code saved d0-d3 only. The question is why didn't it save all
> (d0-a6) registers? Are we short of space on stack?
> 
> Is there a rule for module authors to not use the d4-d7 registers
> without saving and restoring them? Even if it was I would still think
> that the OS should always try to protect itself and save all registers
> it needs for its own run before executing external programs.

According to compendium, all functions in a xdd/xfs can use d2-d7/a2-a6
provided they are backup/restored, and d0-d1/a0-a1 as scratch registers.

But, it does not say which registers can be used/must be saved in the
initialization function, if any. And this init function is used by most
drivers.

-- 
Patrice Mandin
WWW: http://pmandin.atari.org/
Programmeur Linux, Atari
Spécialité: Développement, jeux