diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-20 22:36:23 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-22 20:35:40 +0200 |
commit | 4c3023bc803012656cf45749960282351efc8020 (patch) | |
tree | 979feef511fde3dbe564e5362e89a2e8b793909e /libc/sysdeps/linux/xtensa/sysdep.h | |
parent | 51f9b66d2fee1c7c1088b548751ac64131220b6e (diff) |
xtensa: add support for NPTL
Changes from:
https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl
Author: Chris Zankel <chris@zankel.net>
Author: Baruch Siach <baruch@tkos.co.il>
Diffstat (limited to 'libc/sysdeps/linux/xtensa/sysdep.h')
-rw-r--r-- | libc/sysdeps/linux/xtensa/sysdep.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/libc/sysdeps/linux/xtensa/sysdep.h b/libc/sysdeps/linux/xtensa/sysdep.h index afe95cc6a..cab4a2f8d 100644 --- a/libc/sysdeps/linux/xtensa/sysdep.h +++ b/libc/sysdeps/linux/xtensa/sysdep.h @@ -16,6 +16,10 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#ifndef _LINUX_XTENSA_SYSDEP_H +#define _LINUX_XTENSA_SYSDEP_H 1 + +#include <common/sysdep.h> #include <sys/syscall.h> #ifdef __ASSEMBLER__ @@ -24,12 +28,6 @@ #define ASM_TYPE_DIRECTIVE(name, typearg) .type name, typearg #define ASM_SIZE_DIRECTIVE(name) .size name, . - name -#ifdef __STDC__ -#define C_LABEL(name) name : -#else -#define C_LABEL(name) name/**/: -#endif - #define ENTRY(name) \ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name), @function); \ @@ -52,6 +50,15 @@ #undef END #define END(name) ASM_SIZE_DIRECTIVE(name) +/* Local label name for asm code. */ +#ifndef L +# ifdef HAVE_ELF +# define L(name) .L##name +# else +# define L(name) name +# endif +#endif + /* Define a macro for this directive so it can be removed in a few places. */ #define LITERAL_POSITION .literal_position @@ -123,19 +130,7 @@ #define PSEUDO_END_ERRVAL(name) \ END (name) -#undef ret_ERRVAL -#define ret_ERRVAL retw - -#if defined RTLD_PRIVATE_ERRNO -# define SYSCALL_ERROR_HANDLER \ -0: movi a4, rtld_errno; \ - neg a2, a2; \ - s32i a2, a4, 0; \ - movi a2, -1; \ - j .Lpseudo_end; - -#elif defined _LIBC_REENTRANT - +#if defined _LIBC_REENTRANT # if defined USE___THREAD # ifndef NOT_IN_libc # define SYSCALL_ERROR_ERRNO __libc_errno @@ -170,3 +165,9 @@ #endif /* _LIBC_REENTRANT */ #endif /* __ASSEMBLER__ */ + +/* Pointer mangling is not yet supported for Xtensa. */ +#define PTR_MANGLE(var) (void) (var) +#define PTR_DEMANGLE(var) (void) (var) + +#endif /* _LINUX_XTENSA_SYSDEP_H */ |