[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r2438 - in /fsf/trunk/ports: ChangeLog.mips sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h



Author: eglibc
Date: Fri Jun  8 00:04:09 2007
New Revision: 2438

Log:
Import glibc-ports-mainline for 2007-06-08

Modified:
    fsf/trunk/ports/ChangeLog.mips
    fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h

Modified: fsf/trunk/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/ports/ChangeLog.mips (original)
+++ fsf/trunk/ports/ChangeLog.mips Fri Jun  8 00:04:09 2007
@@ -1,3 +1,9 @@
+2007-06-07  Daniel Jacobowitz  <dan@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (ARGIFY): New.
+	(internal_syscall1, internal_syscall2, internal_syscall3,
+	internal_syscall4, internal_syscall5, internal_syscall6): Use it.
+
 2007-06-06  Daniel Jacobowitz  <dan@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h Fri Jun  8 00:04:09 2007
@@ -43,6 +43,10 @@
 #endif
 
 #else   /* ! __ASSEMBLER__ */
+
+/* Convert X to a long long, without losing any bits if it is one
+   already or warning if it is a 32-bit pointer.  */
+#define ARGIFY(X) ((long long) (__typeof__ ((X) - (X))) (X))
 
 /* Define a macro which expands into the inline wrapper code for a system
    call.  */
@@ -102,7 +106,7 @@
 									\
 	{								\
 	register long long __v0 asm("$2") ncs_init;			\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
+	register long long __a0 asm("$4") = ARGIFY (arg1); 		\
 	register long long __a3 asm("$7"); 				\
 	__asm__ volatile ( 						\
 	".set\tnoreorder\n\t" 						\
@@ -124,8 +128,8 @@
 									\
 	{								\
 	register long long __v0 asm("$2") ncs_init;			\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
+	register long long __a0 asm("$4") = ARGIFY (arg1); 		\
+	register long long __a1 asm("$5") = ARGIFY (arg2); 		\
 	register long long __a3 asm("$7"); 				\
 	__asm__ volatile ( 						\
 	".set\tnoreorder\n\t" 						\
@@ -147,9 +151,9 @@
 									\
 	{								\
 	register long long __v0 asm("$2") ncs_init;			\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
-	register long long __a2 asm("$6") = (long long) arg3; 		\
+	register long long __a0 asm("$4") = ARGIFY (arg1); 		\
+	register long long __a1 asm("$5") = ARGIFY (arg2); 		\
+	register long long __a2 asm("$6") = ARGIFY (arg3); 		\
 	register long long __a3 asm("$7"); 				\
 	__asm__ volatile ( 						\
 	".set\tnoreorder\n\t" 						\
@@ -171,10 +175,10 @@
 									\
 	{								\
 	register long long __v0 asm("$2") ncs_init;			\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
-	register long long __a2 asm("$6") = (long long) arg3; 		\
-	register long long __a3 asm("$7") = (long long) arg4; 		\
+	register long long __a0 asm("$4") = ARGIFY (arg1); 		\
+	register long long __a1 asm("$5") = ARGIFY (arg2); 		\
+	register long long __a2 asm("$6") = ARGIFY (arg3); 		\
+	register long long __a3 asm("$7") = ARGIFY (arg4); 		\
 	__asm__ volatile ( 						\
 	".set\tnoreorder\n\t" 						\
 	cs_init								\
@@ -195,11 +199,11 @@
 									\
 	{								\
 	register long long __v0 asm("$2") ncs_init;			\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
-	register long long __a2 asm("$6") = (long long) arg3; 		\
-	register long long __a3 asm("$7") = (long long) arg4; 		\
-	register long long __a4 asm("$8") = (long long) arg5; 		\
+	register long long __a0 asm("$4") = ARGIFY (arg1); 		\
+	register long long __a1 asm("$5") = ARGIFY (arg2); 		\
+	register long long __a2 asm("$6") = ARGIFY (arg3); 		\
+	register long long __a3 asm("$7") = ARGIFY (arg4); 		\
+	register long long __a4 asm("$8") = ARGIFY (arg5); 		\
 	__asm__ volatile ( 						\
 	".set\tnoreorder\n\t" 						\
 	cs_init								\
@@ -220,12 +224,12 @@
 									\
 	{								\
 	register long long __v0 asm("$2") ncs_init;			\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
-	register long long __a2 asm("$6") = (long long) arg3; 		\
-	register long long __a3 asm("$7") = (long long) arg4; 		\
-	register long long __a4 asm("$8") = (long long) arg5; 		\
-	register long long __a5 asm("$9") = (long long) arg6; 		\
+	register long long __a0 asm("$4") = ARGIFY (arg1); 		\
+	register long long __a1 asm("$5") = ARGIFY (arg2); 		\
+	register long long __a2 asm("$6") = ARGIFY (arg3); 		\
+	register long long __a3 asm("$7") = ARGIFY (arg4); 		\
+	register long long __a4 asm("$8") = ARGIFY (arg5); 		\
+	register long long __a5 asm("$9") = ARGIFY (arg6); 		\
 	__asm__ volatile ( 						\
 	".set\tnoreorder\n\t" 						\
 	cs_init								\