Wrapping around stdcall
Felix Nawothnig
felix.nawothnig at t-online.de
Tue Jul 5 16:01:57 CDT 2005
Marcus Meissner wrote:
>>>Adding "thiscall" to gcc would perhaps help in the long run ... :/ Fun fun
>>>fun...
>>Considering that gcc already knows regparm and we just need regparm(1)
>>with ecx instead eax hacking in "thiscall" for C code shouldn't be too
>>hard I think.
>>But since this would be a very Wine-specific hack I doubt it would get
>>into GCC. The right way would probably to extend the regparm attribute
>>to allow specifying arbitrary registers...
> No, we could just propose thiscall to the gcc folks.
We can propose whatever we want - that's no argument at all. :-)
My point is, as pointed out before, "thiscall" doesn't really make sense
in C context. The only use for this would be binary-compatibility with
MSVC C++ when using C - even more since true MSVC C++ compatiblity would
still be missing.
I don't think such an application-specific hack belongs into a compiler
- especially if it can be avoided by extending an already existing
feature (regparm) in a generic way.
This would also allow binary-compatibility to the ABI of FooSoft which
thought it would be nifty to pass the first argument in EDX.
> In short and mid term this needs to be fixed with above hack or so.
You mean the macros we are using right now? Sure.
Felix
More information about the wine-devel
mailing list