mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-11-16 12:34:45 +00:00
implemented thiscall by copying logic from fastcall
implemented improved thiscall by using mov ecx instead of pop ecx include __thiscall and __thiscall__ as aliases remove fake line in test
This commit is contained in:
17
tests/thiscall/thiscall-test.c
Normal file
17
tests/thiscall/thiscall-test.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef __thiscall
|
||||
#define __thiscall __attribute__((thiscall))
|
||||
#endif
|
||||
#ifndef __cdecl
|
||||
#define __cdecl __attribute__((cdecl))
|
||||
#endif
|
||||
#ifndef __stdcall
|
||||
#define __stdcall __attribute__((stdcall))
|
||||
#endif
|
||||
|
||||
void ( __thiscall * const thisCall1 ) ( void * _this, int a ) = ( void ( __thiscall * ) ( void * _this, int a ) ) 0x4788a0;
|
||||
|
||||
int main() {
|
||||
thisCall1((void*) 0xDEADBEEF, 1000);
|
||||
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user