repo.or.cz
/
tinycc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
macos: Disable verbose linking output
[tinycc.git]
/
tests
/
asm-c-connect-1.c
blob
8a28d781fa0897e08e822c1d9fb450e8cc526168
1
#include <stdio.h>
2
3
#if defined _WIN32 && !defined __TINYC__
4
# define _
"_"
5
#else
6
# define _
7
#endif
8
9
static int
x1_c
(
void
)
10
{
11
printf
(
" x1"
);
12
return
1
;
13
}
14
15
asm
(
".text;"
_
"x1: call "
_
"x1_c; ret"
);
16
17
void
callx4
(
void
);
18
void
callx5_again
(
void
);
19
20
void
x6
()
21
{
22
printf
(
" x6-1"
);
23
}
24
25
int
main
(
int
argc
,
char
*
argv
[])
26
{
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
;
37
}
38
39
static
40
int
x2
(
void
)
41
{
42
printf
(
" x2"
);
43
return
2
;
44
}
45
46
extern
int
x3
(
void
);
47
48
void
x4
(
void
)
49
{
50
printf
(
" x4"
);
51
}
52
53
void
x5
(
void
);
54
void
x5
(
void
)
55
{
56
printf
(
" x5"
);
57
}