diff mbox

[uclibc-ng-devel] uClibc-ng - small C library for embedded systems branch master updated. v1.0.16-1-g0550ecc

Message ID 20160704190024.A794C10117@helium.openadk.org
State Not Applicable
Headers show

Commit Message

wbx July 4, 2016, 7 p.m. UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".

The branch, master has been updated
       via  0550ecce0e6580c5ad34e9a9a39ff18ccf8774f9 (commit)
      from  aebdbb727362a92437b772e5d749d6650e5b823f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0550ecce0e6580c5ad34e9a9a39ff18ccf8774f9
Author: Waldemar Brodkorb <wbx@uclibc-ng.org>
Date:   Sun Jul 3 19:54:47 2016 +0200

    arm: cleanup redundant macros for syscalls
    
    In uClibc-ng the syscall macros are in bits/syscalls.h.

-----------------------------------------------------------------------

Summary of changes:
 libc/sysdeps/linux/arm/bits/syscalls.h |   4 ++
 libc/sysdeps/linux/arm/sysdep.h        | 111 ---------------------------------
 2 files changed, 4 insertions(+), 111 deletions(-)



hooks/post-receive
diff mbox

Patch

diff --git a/libc/sysdeps/linux/arm/bits/syscalls.h b/libc/sysdeps/linux/arm/bits/syscalls.h
index e447a7b..5b30564 100644
--- a/libc/sysdeps/linux/arm/bits/syscalls.h
+++ b/libc/sysdeps/linux/arm/bits/syscalls.h
@@ -83,6 +83,10 @@ 
      }									\
      (int) __internal_sys_result; }) \
 )
+
+#undef INTERNAL_SYSCALL_ARM
+#define INTERNAL_SYSCALL_ARM(name, err, nr, args...)           \
+	INTERNAL_SYSCALL_NCS(__ARM_NR_##name, err, nr, args)
 #endif
 
 #define INTERNAL_SYSCALL_ERROR_P(val, err) \
diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h
index 1452989..cdc276c 100644
--- a/libc/sysdeps/linux/arm/sysdep.h
+++ b/libc/sysdeps/linux/arm/sysdep.h
@@ -276,117 +276,6 @@  __local_syscall_error:						\
 #define UNDOARGS_6 ldmfd sp!, {r4, r5};
 #define UNDOARGS_7 ldmfd sp!, {r4, r5, r6};
 
-#else /* not __ASSEMBLER__ */
-/* Define a macro which expands into the inline wrapper code for a system
-   call.  */
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...)					\
-  ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args);	\
-     if (unlikely (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, )))	\
-       {									\
-	 __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, ));		\
-	 _inline_sys_result = (unsigned int) -1;				\
-       }									\
-     (int) _inline_sys_result; })
-
-#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
-
-#undef INTERNAL_SYSCALL_RAW
-#if defined(__thumb__)
-/* Hide the use of r7 from the compiler, this would be a lot
- * easier but for the fact that the syscalls can exceed 255.
- * For the moment the LOAD_ARG_7 is sacrificed.
- * We can't use push/pop inside the asm because that breaks
- * unwinding (ie. thread cancellation).
- */
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
-  ({ unsigned int _internal_sys_result;				\
-    {								\
-      int _sys_buf[2];						\
-      register int __a1 __asm__ ("a1");				\
-      register int *_v3 __asm__ ("v3") = _sys_buf;		\
-      LOAD_ARGS_##nr (args)					\
-      *_v3 = (int) (name);					\
-      __asm__ __volatile__ ("str	r7, [v3, #4]\n"		\
-                    "\tldr      r7, [v3]\n"			\
-                    "\tswi      0       @ syscall " #name "\n"	\
-                    "\tldr      r7, [v3, #4]"			\
-                   : "=r" (__a1)				\
-                    : "r" (_v3) ASM_ARGS_##nr			\
-                    : "memory");				\
-      _internal_sys_result = __a1;				\
-    }								\
-    (int) _internal_sys_result; })
-#elif defined(__ARM_EABI__)
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
-  ({unsigned int _internal_sys_result;				\
-     {								\
-       register int __a1 __asm__ ("r0"), _nr __asm__ ("r7");	\
-       LOAD_ARGS_##nr (args)					\
-       _nr = name;						\
-       __asm__ __volatile__ ("swi	0x0 @ syscall " #name	\
-		     : "=r" (__a1)				\
-		     : "r" (_nr) ASM_ARGS_##nr			\
-		     : "memory");				\
-       _internal_sys_result = __a1;				\
-     }								\
-     (int) _internal_sys_result; })
-#else /* !defined(__ARM_EABI__) */
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
-  ({ unsigned int _internal_sys_result;				\
-     {								\
-       register int __a1 __asm__ ("a1");			\
-       LOAD_ARGS_##nr (args)					\
-       __asm__ __volatile__ ("swi	%1 @ syscall " #name	\
-		     : "=r" (__a1)				\
-		     : "i" (name) ASM_ARGS_##nr			\
-		     : "memory");				\
-       _internal_sys_result = __a1;				\
-     }								\
-     (int) _internal_sys_result; })
-#endif
-
-#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...)		\
-	INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
-
-#undef INTERNAL_SYSCALL_ARM
-#define INTERNAL_SYSCALL_ARM(name, err, nr, args...)		\
-	INTERNAL_SYSCALL_RAW(__ARM_NR_##name, err, nr, args)
-
-#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err) \
-  ((unsigned int) (val) >= 0xfffff001u)
-
-#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err)	(-(val))
-
-#if defined(__ARM_EABI__)
-#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...)		\
-	INTERNAL_SYSCALL_RAW(number, err, nr, args)
-#else
-/* We can't implement non-constant syscalls directly since the syscall
-   number is normally encoded in the instruction.  So use SYS_syscall.  */
-#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...)		\
-	INTERNAL_SYSCALL_NCS_##nr (number, err, args)
-
-#define INTERNAL_SYSCALL_NCS_0(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 1, number, args)
-#define INTERNAL_SYSCALL_NCS_1(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 2, number, args)
-#define INTERNAL_SYSCALL_NCS_2(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 3, number, args)
-#define INTERNAL_SYSCALL_NCS_3(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 4, number, args)
-#define INTERNAL_SYSCALL_NCS_4(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 5, number, args)
-#define INTERNAL_SYSCALL_NCS_5(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 6, number, args)
-#endif
-
 #endif	/* __ASSEMBLER__ */
 
 /* Pointer mangling is not yet supported for ARM.  */