From mint-bounce@lists.fishpool.fi Tue Feb 5 16:06:32 2008 From: "Standa Opichal" To: "mint" References: <47A732CA.9000803@freesbee.fr> <47A85ECA.1040307@freesbee.fr> <000001c8681a$bf379b30$df7c110a@eng.vmware.com> <47A8A5FB.40903@freesbee.fr> Subject: Re: [MiNT] binutils 2.18 Date: Tue, 5 Feb 2008 15:57:03 -0500 Message-ID: <000901c86839$a943da40$df7c110a@eng.vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Mailer: Microsoft Office Outlook 11 Thread-Index: AchoLVf+q2/7Uq2lRQeiQge5P0kqIwACzltg In-Reply-To: <47A8A5FB.40903@freesbee.fr> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: opichals@seznam.cz Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id m15L6V6Y013643 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