Fix sub-int returns on x86-64 and i386
[tinycc.git] / tests / asm-c-connect-1.c
blob8a28d781fa0897e08e822c1d9fb450e8cc526168
1 #include <stdio.h>
3 #if defined _WIN32 && !defined __TINYC__
4 # define _ "_"
5 #else
6 # define _
7 #endif
9 static int x1_c(void)
11 printf(" x1");
12 return 1;
15 asm(".text;"_"x1: call "_"x1_c; ret");
17 void callx4(void);
18 void callx5_again(void);
20 void x6()
22 printf(" x6-1");
25 int main(int argc, char *argv[])
27 printf("*");
28 asm("call "_"x1");
29 asm("call "_"x2");
30 asm("call "_"x3");
31 callx4();
32 asm("call "_"x5");
33 callx5_again();
34 x6();
35 printf(" *\n");
36 return 0;
39 static
40 int x2(void)
42 printf(" x2");
43 return 2;
46 extern int x3(void);
48 void x4(void)
50 printf(" x4");
53 void x5(void);
54 void x5(void)
56 printf(" x5");