summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/xtensa/sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/xtensa/sysdep.h')
-rw-r--r--libc/sysdeps/linux/xtensa/sysdep.h39
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 */