Unified · Split
| @@ -7,12 +7,12 @@ · 6 unmodified lines | |||
| 7 | #ifdef __TINYC__ | 7 | #ifdef __TINYC__ |
| 8 | 8 | ||
| 9 | /* syscall wrapper */ | 9 | /* syscall wrapper */ |
| 10 | unsigned syscall(unsigned syscall_nr, ...); | 10 | unsigned _tccsyscall(unsigned syscall_nr, ...); |
| 11 | 11 | ||
| 12 | /* arm-tcc supports only fake asm currently */ | 12 | /* arm-tcc supports only fake asm currently */ |
| 13 | __asm__( | 13 | __asm__( |
| 14 | ".global syscall\n" | 14 | ".global _tccsyscall\n" |
| 15 | "syscall:\n" | 15 | "_tccsyscall:\n" |
| 16 | ".int 0xe92d4080\n" // push {r7, lr} | 16 | ".int 0xe92d4080\n" // push {r7, lr} |
| 17 | ".int 0xe1a07000\n" // mov r7, r0 | 17 | ".int 0xe1a07000\n" // mov r7, r0 |
| 18 | ".int 0xe1a00001\n" // mov r0, r1 | 18 | ".int 0xe1a00001\n" // mov r0, r1 |
| @@ -31,6 +31,8 @@ __asm__( · 12 unmodified lines | |||
| 31 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) | 31 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) |
| 32 | #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) | 32 | #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) |
| 33 | 33 | ||
| 34 | #define syscall _tccsyscall | ||
| 35 | |||
| 34 | #else | 36 | #else |
| 35 | 37 | ||
| 36 | #define _GNU_SOURCE | 38 | #define _GNU_SOURCE |