aboutsummaryrefslogtreecommitdiff
path: root/tinycc/tests/asm-c-connect-2.c
diff options
context:
space:
mode:
authorUneven Prankster <unevenprankster@protonmail.com>2023-07-17 01:34:34 -0300
committerUneven Prankster <unevenprankster@protonmail.com>2023-07-17 01:34:34 -0300
commit88d82c6eaee88398af1de57cddca692a1f74b087 (patch)
treedf492c2002a1820959703f4f481172cceafeb0a1 /tinycc/tests/asm-c-connect-2.c
parent111c133b939c15c57c90cd474d55e84928c6307a (diff)
Cleanup feels good! Big work coming up this week.
Diffstat (limited to 'tinycc/tests/asm-c-connect-2.c')
-rw-r--r--tinycc/tests/asm-c-connect-2.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/tinycc/tests/asm-c-connect-2.c b/tinycc/tests/asm-c-connect-2.c
deleted file mode 100644
index 654db0e..0000000
--- a/tinycc/tests/asm-c-connect-2.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <stdio.h>
-
-#if (defined _WIN32 || defined __APPLE__) && (!defined __TINYC__ || defined __leading_underscore)
-# define _ "_"
-#else
-# define _
-#endif
-
-#ifdef __clang__
-/* clang needs some help tp not throw functions away even at -O0 */
-#define __USED __attribute__((__used__))
-#else
-#define __USED
-#endif
-
-int x3(void)
-{
- printf(" x3");
- return 3;
-}
-
-/* That callx4 is defined globally (as if ".globl callx4")
- is a TCC extension. GCC doesn't behave like this. */
-void callx4(void);
-#if __i386__
-__asm__(_"callx4: call "_"x4; ret;"
-#else
-/* Keep stack aligned */
-__asm__(_"callx4: sub $8,%rsp; call "_"x4; add $8,%rsp; ret;"
-#endif
-#ifndef __TINYC__
- " .global "_"callx4"
-#endif
-);
-
-extern void x5(void);
-
-void callx5_again(void);
-void callx5_again(void)
-{
- x5();
- asm("call "_"x6");
-}
-
-static void __USED x6()
-{
- printf(" x6-2");
-}