1 #ifndef _LINUX_SPARC_SYSDEP_H 2 #define _LINUX_SPARC_SYSDEP_H 1 3 4 #include <common/sysdep.h> 5 6 #undef ENTRY 7 #undef END 8 9 #ifdef __ASSEMBLER__ 10 11 #define LOADSYSCALL(x) mov __NR_##x, %g1 12 13 #define ENTRY(name) \ 14 .align 4; \ 15 .global C_SYMBOL_NAME(name); \ 16 .type name, @function; \ 17 C_LABEL(name) \ 18 cfi_startproc; 19 20 #define ENTRY_NOCFI(name) \ 21 .align 4; \ 22 .global C_SYMBOL_NAME(name); \ 23 .type name, @function; \ 24 C_LABEL(name) 25 26 #define END_NOCFI(name) \ 27 .size name, . - name 28 29 #define END(name) \ 30 cfi_endproc; \ 31 .size name, . - name 32 33 #define LOC(name) .L##name 34 35 /* If the offset to __syscall_error fits into a signed 22-bit 36 * immediate branch offset, the linker will relax the call into 37 * a normal branch. 38 */ 39 #undef PSEUDO 40 #undef PSEUDO_END 41 #undef PSEUDO_NOERRNO 42 #undef PSEUDO_ERRVAL 43 44 #define PSEUDO(name, syscall_name, args) \ 45 .text; \ 46 .globl __syscall_error; \ 47 ENTRY(name); \ 48 LOADSYSCALL(syscall_name); \ 49 ta 0x10; \ 50 bcc 1f; \ 51 mov %o7, %g1; \ 52 call __syscall_error; \ 53 mov %g1, %o7; \ 54 1: 55 56 #define PSEUDO_NOERRNO(name, syscall_name, args)\ 57 .text; \ 58 ENTRY(name); \ 59 LOADSYSCALL(syscall_name); \ 60 ta 0x10; 61 62 #define PSEUDO_ERRVAL(name, syscall_name, args) \ 63 .text; \ 64 ENTRY(name); \ 65 LOADSYSCALL(syscall_name); \ 66 ta 0x10; 67 68 #define PSEUDO_END(name) \ 69 END(name) 70 71 72 #endif /* __ASSEMBLER__ */ 73 #endif 74