1 /*
2  * This file is subject to the terms and conditions of the LGPL V2.1
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 2018 Kalray Inc.
7  */
8 
9 #ifndef _LINUX_KVX_SYSDEP_H
10 #define _LINUX_KVX_SYSDEP_H 1
11 
12 #include <common/sysdep.h>
13 
14 #define SYS_ify(syscall_name)  (__NR_##syscall_name)
15 
16 #ifdef	__ASSEMBLER__
17 
18 # define _ENTRY(name)                    \
19   .align 8;                              \
20   .globl C_SYMBOL_NAME(name);            \
21   .func  C_SYMBOL_NAME(name);            \
22   .type  C_SYMBOL_NAME(name), @function; \
23 C_SYMBOL_NAME(name):		   	 \
24 	        cfi_startproc;
25 
26 /* Define an entry point visible from C.  */
27 # ifdef PIC
28 # define ENTRY(name)                    \
29   .pic					\
30   _ENTRY(name)
31 
32 # else
33 # define ENTRY(name) _ENTRY(name)
34 # endif
35 
36 #endif
37 
38 /* Local label name for asm code.  */
39 # ifndef L
40 #  define L(name) $L##name
41 # endif
42 
43 #undef END
44 #define END(name) \
45   cfi_endproc;        \
46   .endfunc;           \
47   .size C_SYMBOL_NAME(name), .-C_SYMBOL_NAME(name)
48 
49 #endif //_LINUX_KVX_SYSDEP_H
50