Browse Source

arm: thumb1: Fix conflicting types for _v3

In file included from ./include/sys/syscall.h:33:0,
                 from libc/sysdeps/linux/common/sync_file_range.c:10:
libc/sysdeps/linux/common/sync_file_range.c: In function '__sync_file_range_nocancel':
./include/bits/syscalls.h:144:16: error: conflicting types for '_v3'
   register int _v3 __asm__ ("v3") = _v3tmp;
                ^
./libc/sysdeps/linux/arm/sysdep.h:281:7: note: in expansion of macro 'LOAD_ARGS_7'
       LOAD_ARGS_##nr (args)     \
       ^
./libc/sysdeps/linux/arm/sysdep.h:324:2: note: in expansion of macro 'INTERNAL_SYSCALL_RAW'
  INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
  ^
./libc/sysdeps/linux/arm/sysdep.h:256:40: note: in expansion of macro 'INTERNAL_SYSCALL'
   ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args); \
                                        ^
libc/sysdeps/linux/common/sync_file_range.c:32:9: note: in expansion of macro 'INLINE_SYSCALL'
  return INLINE_SYSCALL(sync_file_range, 7, fd, 0,
         ^
In file included from ./libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h:18:0,
                 from ./include/cancel.h:58,
                 from libc/sysdeps/linux/common/sync_file_range.c:15:
./libc/sysdeps/linux/arm/sysdep.h:280:21: note: previous definition of '_v3' was here
       register int *_v3 __asm__ ("v3") = _sys_buf;  \
...

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 10 years ago
parent
commit
c78cc48514
1 changed files with 12 additions and 12 deletions
  1. 12 12
      libc/sysdeps/linux/arm/bits/syscalls.h

+ 12 - 12
libc/sysdeps/linux/arm/bits/syscalls.h

@@ -87,15 +87,15 @@
     {									\
     {									\
       int _sys_buf[2];							\
       int _sys_buf[2];							\
       register int __a1 __asm__ ("a1");					\
       register int __a1 __asm__ ("a1");					\
-      register int *_v3 __asm__ ("v3") = _sys_buf;			\
-      *_v3 = (int) (name);						\
+      register int *__v3 __asm__ ("v3") = _sys_buf;			\
+      *__v3 = (int) (name);						\
       LOAD_ARGS_##nr (args)						\
       LOAD_ARGS_##nr (args)						\
       __asm__ __volatile__ ("str	r7, [v3, #4]\n"			\
       __asm__ __volatile__ ("str	r7, [v3, #4]\n"			\
 		    "\tldr	r7, [v3]\n"				\
 		    "\tldr	r7, [v3]\n"				\
 		    "\tswi	0	@ syscall " #name "\n"		\
 		    "\tswi	0	@ syscall " #name "\n"		\
 		    "\tldr	r7, [v3, #4]"				\
 		    "\tldr	r7, [v3, #4]"				\
 		    : "=r" (__a1)					\
 		    : "=r" (__a1)					\
-		    : "r" (_v3) ASM_ARGS_##nr				\
+		    : "r" (__v3) ASM_ARGS_##nr				\
                     : "memory");					\
                     : "memory");					\
 	__internal_sys_result = __a1;					\
 	__internal_sys_result = __a1;					\
     }									\
     }									\
@@ -129,20 +129,20 @@
   register int __a4 __asm__ ("a4") = __a4tmp;
   register int __a4 __asm__ ("a4") = __a4tmp;
 #define ASM_ARGS_4	ASM_ARGS_3, "r" (__a4)
 #define ASM_ARGS_4	ASM_ARGS_3, "r" (__a4)
 #define LOAD_ARGS_5(a1, a2, a3, a4, a5)		\
 #define LOAD_ARGS_5(a1, a2, a3, a4, a5)		\
-  int _v1tmp = (int) (a5);			\
+  int __v1tmp = (int) (a5);			\
   LOAD_ARGS_4 (a1, a2, a3, a4)			\
   LOAD_ARGS_4 (a1, a2, a3, a4)			\
-  register int _v1 __asm__ ("v1") = _v1tmp;
-#define ASM_ARGS_5	ASM_ARGS_4, "r" (_v1)
+  register int __v1 __asm__ ("v1") = __v1tmp;
+#define ASM_ARGS_5	ASM_ARGS_4, "r" (__v1)
 #define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)	\
 #define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)	\
-  int _v2tmp = (int) (a6);			\
+  int __v2tmp = (int) (a6);			\
   LOAD_ARGS_5 (a1, a2, a3, a4, a5)		\
   LOAD_ARGS_5 (a1, a2, a3, a4, a5)		\
-  register int _v2 __asm__ ("v2") = _v2tmp;
-#define ASM_ARGS_6	ASM_ARGS_5, "r" (_v2)
+  register int __v2 __asm__ ("v2") = __v2tmp;
+#define ASM_ARGS_6	ASM_ARGS_5, "r" (__v2)
 #define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7)	\
 #define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7)	\
-  int _v3tmp = (int) (a7);			\
+  int __v3tmp = (int) (a7);			\
   LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6)		\
   LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6)		\
-  register int _v3 __asm__ ("v3") = _v3tmp;
-#define ASM_ARGS_7	ASM_ARGS_6, "r" (_v3)
+  register int __v3 __asm__ ("v3") = __v3tmp;
+#define ASM_ARGS_7	ASM_ARGS_6, "r" (__v3)
 
 
 
 
 #endif /* __ASSEMBLER__ */
 #endif /* __ASSEMBLER__ */