Marcus Meissner wrote:
On second thought... What about abusing the "regparm(3)" attribute for this.
It gets eax, edx, ecx, stackparam1, stackparam2, ...
So what about using a construct like this (cloaked in some macros)?
#define THISCALL0(name,this) __thiscall_#name(int unused_eax,int unused_edx, void *this) #define THISCALL1(name,this,p1) __thiscall_#name(int unused_eax,int unused_edx, void *this, int p1)
I'm sure you meant to include the regparm attribute in the macro? :)
I admit that it looks better than the current hack - but it's still a hack... I'd still prefer a long-term solution in GCC.
Felix