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

Re: [MiNT] binutils 2.18



Hi!

Any FreeMiNT loadable module is loaded this way. As long as the kernel and
the modules are compiled with the same compiler and the same binutils it
would be nice to not to have to do any extra register magic in the module
loader. This is only because for some reason the d4 is used until now (not a
scratch register).

If we use a register that gcc defines as scratch (isn't that d0-d2/a0-a1?)
then we can use plain gcc compiled/binutils linked modules. We would reduce
the necessary supporting code and some headaches we had figuring out 'what
is wrong' with the kernel. This one took us quite a long time to figure out.

I would vote that the next available FreeMiNT binutils .rpm package should
have this one fixed.

Best Regards

Standa


-----Original Message-----
From: mint-bounce@lists.fishpool.fi [mailto:mint-bounce@lists.fishpool.fi]
On Behalf Of Vincent Rivière
Sent: Tuesday, February 05, 2008 1:08 PM
To: mint
Subject: Re: [MiNT] binutils 2.18

Hello, Standa !

> Could we make the new binutils not to use d4 for the initial jump 
> behind the file format header (the instruction in the first few bytes in a
binary)?
> This is the thing
> that makes us do some extra registry save/restore for kernel modules.

Of course, it would be easy to use for example d0 instead of d4.
I don't know the XIF binary specification. The "main" program of the XIF
module is a classical function, taking 2 pointers, clobbering d0-d1/a0-a1,
and returning with rts, right ?

If everyone consider it is a good thing, that register change could be done
in the next binutils patch !

--
Vincent Rivière