Hi Thomas,
On 2/05/2005, you wrote:
Are there any projects up for grabs that I can look into ?
What about some advice on coding habits? I'd ask privately, but the answer will be of general interest anyway, both in the project I am currently working on and those in the future like OO and Kaffe.
Much old 68k code is fast and efficient because it relies on parameters like library and structure pointers remaining persistent in allocated 68k registers, eg a2, a6 always point to particular structures. In a big module consisting of dozens if not hundreds of very small functions, only one or two registers are ever used for volatile data. Most parameters are passed in assumed registers, so loading of arguments is minimised.
So what is a good way to maintain this register shortcut in a C version of a big program originally written in assembler? Obviously I can specify parameters to be passed in 68k registers, but I am trying to write this thing in a portable fashion, machine-independent.
I have no experience with PPC code yet. Is there a way to ask gcc to use registers for certain parameters, in a platform-independent way? I want the C code to remain pure ANSI-compliant. It would be nice to leave the code unchanged from its present SAS/C environment to PPC and gcc.
cheers