windows style fastcall (Filip Navara)
This commit is contained in:
6
tcc.c
6
tcc.c
@ -249,6 +249,7 @@ typedef struct AttributeDef {
|
||||
#define FUNC_FASTCALL1 2 /* first param in %eax */
|
||||
#define FUNC_FASTCALL2 3 /* first parameters in %eax, %edx */
|
||||
#define FUNC_FASTCALL3 4 /* first parameter in %eax, %edx, %ecx */
|
||||
#define FUNC_FASTCALLW 5 /* first parameter in %ecx, %edx */
|
||||
|
||||
/* field 'Sym.t' for macros */
|
||||
#define MACRO_OBJ 0 /* object like macro */
|
||||
@ -6428,6 +6429,11 @@ static void parse_attribute(AttributeDef *ad)
|
||||
ad->func_call = FUNC_FASTCALL1 + n - 1;
|
||||
skip(')');
|
||||
break;
|
||||
case TOK_FASTCALL1:
|
||||
case TOK_FASTCALL2:
|
||||
case TOK_FASTCALL3:
|
||||
ad->func_call = FUNC_FASTCALLW;
|
||||
break;
|
||||
#endif
|
||||
case TOK_DLLEXPORT:
|
||||
ad->dllexport = 1;
|
||||
|
||||
Reference in New Issue
Block a user