_thiscall Calling Convention as Specfile option or via register

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Wed May 14 02:34:49 CDT 2003


>>>>> "Alexandre" == Alexandre Julliard <julliard at winehq.com> writes:

    Alexandre> Uwe Bonnes <bon at elektron.ikp.physik.tu-darmstadt.de> writes:
    >> as Jason noticed, in MSVCRT there is a _thiscall calling convention
    >> that uses the ECX register for the 'this' pointer. Should we have
    >> another Specfile keyword in our spec files or should the _thiscall
    >> calling convention be implemented via the 'register" keyword?

    Alexandre> I don't think it can be done in the spec file, since this
    Alexandre> would break the mingw build. If there are many of them we
    Alexandre> could create inline asm macros to make them easier to use
    Alexandre> than with full-blown register functions. Do we have a list of
    Alexandre> the offending functions?

A quick scan through dlls/m,svcrt/cpp.c for appearances of _this gives:

void MSVCRT_exception_ctor(exception * _this, const char ** name)
void MSVCRT_exception_copy_ctor(exception * _this, const exception * rhs)
void MSVCRT_exception_default_ctor(exception * _this)
void MSVCRT_exception_dtor(exception * _this
exception * MSVCRT_exception_opequals(exception * _this, const exception *rhs)
void * MSVCRT_exception__unknown_E(exception * _this, unsigned int arg1)
void * MSVCRT_exception__unknown_G(exception * _this, unsigned int arg
const char * MSVCRT_what_exception(exception * _this
void MSVCRT_bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs)
void MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * name)
void MSVCRT_bad_typeid_dtor(bad_typeid * _this)
bad_typeid * MSVCRT_bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs)
void MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object * _this,
void MSVCRT___non_rtti_object_ctor(__non_rtti_object * _this,
void MSVCRT___non_rtti_object_dtor(__non_rtti_object * _this
__non_rtti_object * MSVCRT___non_rtti_object_opequals(__non_rtti_object * _this,
void * MSVCRT___non_rtti_object__unknown_E(__non_rtti_object * _this, unsigned int arg1)
void * MSVCRT___non_rtti_object__unknown_G(__non_rtti_object * _this,
void MSVCRT_bad_cast_ctor(bad_cast * _this
void MSVCRT_bad_cast_copy_ctor(bad_cast * _this,const bad_cast * rhs
void MSVCRT_bad_cast_dtor(bad_cast * _this)
bad_cast * MSVCRT_bad_cast_opequals(bad_cast * _this, const bad_cast * rhs)
int __stdcall MSVCRT_type_info_opequals_equals(type_info * _this, const type_info * rhs)
int __stdcall MSVCRT_type_info_opnot_equals(type_info * _this, consttype_info * rhs)
void MSVCRT_type_info_dtor(type_info * _this)
const char * __stdcall MSVCRT_type_info_name(type_info * _this)
const char * __stdcall MSVCRT_type_info_raw_name(type_info * _this)

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the wine-devel mailing list