tcc-stupidos/tests/asm-c-connect-1.c
Michael Matz 3494e5de3a Adjust asm-c-connect testcase for Windows
Calling conventions are different, let's use functions without
any arguments.
2017-11-27 01:09:50 +01:00

32 lines
403 B
C

#include <stdio.h>
#if defined _WIN32 && !defined __TINYC__
# define _ "_"
#else
# define _
#endif
static int x1_c(void)
{
printf("x1\n");
return 1;
}
asm(".text;"_"x1: call "_"x1_c; ret");
int main(int argc, char *argv[])
{
asm("call "_"x1");
asm("call "_"x2");
asm("call "_"x3");
return 0;
}
static
int x2(void)
{
printf("x2\n");
return 2;
}
extern int x3(void);