diff options
| author | Uneven Prankster <unevenprankster@protonmail.com> | 2023-07-17 01:34:34 -0300 |
|---|---|---|
| committer | Uneven Prankster <unevenprankster@protonmail.com> | 2023-07-17 01:34:34 -0300 |
| commit | 88d82c6eaee88398af1de57cddca692a1f74b087 (patch) | |
| tree | df492c2002a1820959703f4f481172cceafeb0a1 /tinycc/tests/asm-c-connect-1.c | |
| parent | 111c133b939c15c57c90cd474d55e84928c6307a (diff) | |
Cleanup feels good! Big work coming up this week.
Diffstat (limited to 'tinycc/tests/asm-c-connect-1.c')
| -rw-r--r-- | tinycc/tests/asm-c-connect-1.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/tinycc/tests/asm-c-connect-1.c b/tinycc/tests/asm-c-connect-1.c deleted file mode 100644 index 90f59c8..0000000 --- a/tinycc/tests/asm-c-connect-1.c +++ /dev/null @@ -1,69 +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 - -static int __USED x1_c (void) -{ - printf(" x1"); - return 1; -} - -#if __i386__ -asm(".text;"_"x1: call "_"x1_c; ret"); -#else -/* Keep stack aligned */ -asm(".text;"_"x1: sub $8,%rsp; call "_"x1_c; add $8,%rsp; ret"); -#endif - -void callx4(void); -void callx5_again(void); - -void x6() -{ - printf(" x6-1"); -} - -int main(int argc, char *argv[]) -{ - printf("*"); - asm("call "_"x1"); - asm("call "_"x2"); - asm("call "_"x3"); - callx4(); - asm("call "_"x5"); - callx5_again(); - x6(); - printf(" *\n"); - return 0; -} - -static -int __USED x2(void) -{ - printf(" x2"); - return 2; -} - -extern int x3(void); - -void x4(void) -{ - printf(" x4"); -} - -void x5(void); -void x5(void) -{ - printf(" x5"); -} |
