I'd like to see register EDI point to Self on entry into a method rather than Self being on the stack. The reason is because setting the address of a point right before using it (ie what GPC does now) causes an address calculation stall (on any cpu risc or cisc). It would also be more convenient to simply reference the pointer using a preset register. Doing this would also remove about 3 or 4 unnnecessary 32-bit instructions which means smaller code size (why does GPC save Self on the stack when it already is?).
See ya! Orlando Llanes
"Meine Damen und Herren, Elvis hat soeben das Gebaeude verlassen!"
"Look out fo' flyeeng feet" O__/ a010111t@bc.seflin.org /|____. O <__. /> / \ ____________|_________ http://ourworld.compuserve.com/homepages/Monkey414
Orlando Llanes wrote:
I'd like to see register EDI point to Self on entry into a method
rather than Self being on the stack. [...]
I just tried to tell GPC to pass this parameter through a register, but this seems not to be possible - at least on the Pentium which has quite few registers. All I could achieve is to load `Self' into a register at the beginning of a method and to keep it there - which is done automatically anyway when optimizing.
But I think it is not that crucial: If you want to have `Self' in a register at the beginning of some assembler part, tell GPC to load it into one using the "input parameters" section of the `asm' statement.
Good luck,
Peter
PS: If anybody can show me how to tell GCC to pass a pointer parameter through a register, I can try to teach GPC to do the same.
On Fri, 18 Dec 1998, Peter Gerwinski wrote:
I just tried to tell GPC to pass this parameter through a ... optimizing.
That's interesting, I'm so used to compiling without any optimization :}
But I think it is not that crucial: If you want to have `Self' ... same.
I suppose so. I'm going to be using a lot of external assembly routines tho. But don't think I'm an ingrate, I'm glad there's *some* way to get Self :)
See ya! Orlando Llanes
"Meine Damen und Herren, Elvis hat soeben das Gebaeude verlassen!"
"Look out fo' flyeeng feet" O__/ a010111t@bc.seflin.org /|____. O <__. /> / \ ____________|_________ http://ourworld.compuserve.com/homepages/Monkey414