RE: [GD-General] calling functions generically
Brought to you by:
vexxed72
From: Stefan B. <ste...@di...> - 2004-02-15 10:49:19
|
> Thanks Ignacio and Ivan-Assen for the links, both were helpful. I now have > my Windows version working. I'm now trying to get the PS2 and GameCube up > and running. I got the Application Binary Interface specs for both > machines and implemented the PS2 version, but CodeWarrior generates > different code than me in certain circumstances that I can't quite work > out. I implemented something like this a few years ago for a data-driven Lua script integration. There are several different MIPS ABI's and I can't recall precisely which one the PS2 uses. I wrote the code for my previous company so I don't have access to the code in order to check either unfortunately. I based my code on an existing library -- libffi. It contains implementations for PowerPC (worked fine on GameCube), Intel and MIPS (including the MIPS ABI variation which the PS2 uses). I based my code on the 2.0 release which I think I got from the pnet code tree. > Just curious, does anybody know if the PS2 has some variance to the normal > MIPS ABI? I don't know about CodeWarrior, but I have a vague memory that the PS2 GCC compiler seemed to have a slight variation when passing structures by value. Other than that, it was just one of the standard MIPS ABI's supported by libffi. /Stefan Stefan Boberg Chief Technical Officer Digital Illusions CE AB |