All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: syscall register clobber list
@ 2002-10-24 16:10 Ed Swarthout
  0 siblings, 0 replies; 3+ messages in thread
From: Ed Swarthout @ 2002-10-24 16:10 UTC (permalink / raw)
  To: Franz.Sirl-ppc; +Cc: linuxppc-dev


Franz wrote:
> I'm currently testing a more comprehensive patch, which I will
> submit soon (see the stuff in current glibc cvs to get a glimpse).

Great.

> Out of interest, what are you building that needs these macros?

Just defining __KERNEL_SYSCALLS__ and including linux/unistd.h
causes the errors.  linux/init/main.c does this.

Ed


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: syscall register clobber list
  2002-10-23 22:24 Ed Swarthout
@ 2002-10-24  8:01 ` Franz Sirl
  0 siblings, 0 replies; 3+ messages in thread
From: Franz Sirl @ 2002-10-24  8:01 UTC (permalink / raw)
  To: Ed Swarthout; +Cc: linuxppc-dev


At 00:24 24.10.2002, Ed Swarthout wrote:

>asm-ppc/unistd.h is sloppy with the register clobber list for some of
>the _syscallX macros.  gcc with this fix:
>
>    http://gcc.gnu.org/ml/gcc/2002-09/msg00741.html
>
>will issue a bunch of error messages like this:
>
>   include/asm/unistd.h:439: error:
>   asm-specifier for variable `__sc_4' conflicts with asm clobber list

I'm currently testing a more comprehensive patch, which I will submit soon
(see the stuff in current glibc cvs to get a glimpse).

Out of interest, what are you building that needs these macros?

Franz.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* syscall register clobber list
@ 2002-10-23 22:24 Ed Swarthout
  2002-10-24  8:01 ` Franz Sirl
  0 siblings, 1 reply; 3+ messages in thread
From: Ed Swarthout @ 2002-10-23 22:24 UTC (permalink / raw)
  To: linuxppc-dev


asm-ppc/unistd.h is sloppy with the register clobber list for some of
the _syscallX macros.  gcc with this fix:

   http://gcc.gnu.org/ml/gcc/2002-09/msg00741.html

will issue a bunch of error messages like this:

  include/asm/unistd.h:439: error:
  asm-specifier for variable `__sc_4' conflicts with asm clobber list

Here's a patch:

Index: unistd.h
===================================================================
RCS file: /cvsroot/linuxppc/linuxppc_2_4_devel/include/asm-ppc/unistd.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 unistd.h
--- unistd.h	2002/09/14 05:22:43	1.1.1.2
+++ unistd.h	2002/10/23 21:56:45
@@ -249,8 +249,16 @@
 	return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), \
 	       (type) __sc_ret

-#define __syscall_clobbers \
+#define __syscall_clobbers_4_12 \
 	"r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12"
+#define __syscall_clobbers_5_12 \
+	"r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12"
+#define __syscall_clobbers_6_12 \
+	"r6", "r7", "r8", "r9", "r10", "r11", "r12"
+#define __syscall_clobbers_7_12 \
+	"r7", "r8", "r9", "r10", "r11", "r12"
+#define __syscall_clobbers_8_12 \
+	"r8", "r9", "r10", "r11", "r12"

 #define _syscall0(type,name)						\
 type name(void)								\
@@ -266,7 +274,7 @@
 			 "mfcr %1      "				\
 			: "=&r" (__sc_3), "=&r" (__sc_0)		\
 			: "0"   (__sc_3), "1"   (__sc_0)		\
-			: __syscall_clobbers);				\
+			: __syscall_clobbers_4_12);		       	\
 		__sc_ret = __sc_3;					\
 		__sc_err = __sc_0;					\
 	}								\
@@ -288,7 +296,7 @@
 			 "mfcr %1      "				\
 			: "=&r" (__sc_3), "=&r" (__sc_0)		\
 			: "0"   (__sc_3), "1"   (__sc_0)		\
-			: __syscall_clobbers);				\
+			: __syscall_clobbers_4_12);			\
 		__sc_ret = __sc_3;					\
 		__sc_err = __sc_0;					\
 	}								\
@@ -313,7 +321,7 @@
 			: "=&r" (__sc_3), "=&r" (__sc_0)		\
 			: "0"   (__sc_3), "1"   (__sc_0),		\
 			  "r"   (__sc_4)				\
-			: __syscall_clobbers);				\
+			: __syscall_clobbers_5_12);			\
 		__sc_ret = __sc_3;					\
 		__sc_err = __sc_0;					\
 	}								\
@@ -341,7 +349,7 @@
 			: "0"   (__sc_3), "1"   (__sc_0),		\
 			  "r"   (__sc_4),				\
 			  "r"   (__sc_5)				\
-			: __syscall_clobbers);				\
+			: __syscall_clobbers_6_12);			\
 		__sc_ret = __sc_3;					\
 		__sc_err = __sc_0;					\
 	}								\
@@ -372,7 +380,7 @@
 			  "r"   (__sc_4),				\
 			  "r"   (__sc_5),				\
 			  "r"   (__sc_6)				\
-			: __syscall_clobbers);				\
+			: __syscall_clobbers_7_12);			\
 		__sc_ret = __sc_3;					\
 		__sc_err = __sc_0;					\
 	}								\
@@ -406,7 +414,7 @@
 			  "r"   (__sc_5),				\
 			  "r"   (__sc_6),				\
 			  "r"   (__sc_7)				\
-			: __syscall_clobbers);				\
+			: __syscall_clobbers_8_12);			\
 		__sc_ret = __sc_3;					\
 		__sc_err = __sc_0;					\
 	}								\


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-24 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-24 16:10 syscall register clobber list Ed Swarthout
  -- strict thread matches above, loose matches on Subject: below --
2002-10-23 22:24 Ed Swarthout
2002-10-24  8:01 ` Franz Sirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.