public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix sysdeps/unix/sysv/linux/alpha/sysdep.h for GCC 3.2
@ 2003-01-06  1:02 Jakub Jelinek
  2003-01-06 23:55 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2003-01-06  1:02 UTC (permalink / raw)
  To: Ulrich Drepper, Richard Henderson; +Cc: Glibc hackers

Hi!

GCC 3.2 doesn't like asm ("" : "=" "r" (something)); (while GCC 3.3+ does).
The following patch fixes this by putting = into the constraint.
The linuxthreads Makefile is something I needed to make libpthread.so to
build on Alpha.

2003-01-06  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/sysdep.h
	(inline_syscall_r0_constraint): Rename to...
	(inline_syscall_r0_out_constraint): ... this.  Add =.
	(inline_syscall[0-6]): Use inline_syscall_r0_out_constraint
	instead of "=" inline_syscall_r0_constraint.
linuxthreads/
	* sysdeps/unix/sysv/linux/alpha/Makefile: New file.

--- libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.jj	2003-01-05 22:08:49.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/sysdep.h	2003-01-06 01:07:33.000000000 +0100
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -100,10 +101,10 @@
 
 #ifdef USE_TLS
 #define inline_syscall_r0_asm
-#define inline_syscall_r0_constraint	"v"
+#define inline_syscall_r0_out_constraint	"=v"
 #else
-#define inline_syscall_r0_asm		__asm__("$0")
-#define inline_syscall_r0_constraint	"r"
+#define inline_syscall_r0_asm			__asm__("$0")
+#define inline_syscall_r0_out_constraint	"=r"
 #endif
 
 /* It is moderately important optimization-wise to limit the lifetime
@@ -117,7 +118,7 @@
 								\
 	_sc_0 = __NR_##name;					\
 	__asm__("callsys # %0 %1 <= %2"				\
-		: "=" inline_syscall_r0_constraint (_sc_0),	\
+		: inline_syscall_r0_out_constraint (_sc_0),	\
 	          "=r"(_sc_19)					\
 		: "0"(_sc_0)					\
 		: inline_syscall_clobbers,			\
@@ -134,7 +135,7 @@
 	_sc_0 = __NR_##name;					\
 	_sc_16 = (long) (arg1);					\
 	__asm__("callsys # %0 %1 <= %2 %3"			\
-		: "=" inline_syscall_r0_constraint (_sc_0),	\
+		: inline_syscall_r0_out_constraint (_sc_0),	\
 		  "=r"(_sc_19), "=r"(_sc_16)			\
 		: "0"(_sc_0), "2"(_sc_16)			\
 		: inline_syscall_clobbers,			\
@@ -153,7 +154,7 @@
 	_sc_16 = (long) (arg1);					\
 	_sc_17 = (long) (arg2);					\
 	__asm__("callsys # %0 %1 <= %2 %3 %4"			\
-		: "=" inline_syscall_r0_constraint (_sc_0),	\
+		: inline_syscall_r0_out_constraint (_sc_0),	\
 		  "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17)	\
 		: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17)		\
 		: inline_syscall_clobbers,			\
@@ -174,7 +175,7 @@
 	_sc_17 = (long) (arg2);					\
 	_sc_18 = (long) (arg3);					\
 	__asm__("callsys # %0 %1 <= %2 %3 %4 %5"		\
-		: "=" inline_syscall_r0_constraint (_sc_0),	\
+		: inline_syscall_r0_out_constraint (_sc_0),	\
 		  "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17),	\
 		  "=r"(_sc_18)					\
 		: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17),		\
@@ -197,7 +198,7 @@
 	_sc_18 = (long) (arg3);					\
 	_sc_19 = (long) (arg4);					\
 	__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6"		\
-		: "=" inline_syscall_r0_constraint (_sc_0),	\
+		: inline_syscall_r0_out_constraint (_sc_0),	\
 		  "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17),	\
 		  "=r"(_sc_18)					\
 		: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17),		\
@@ -222,7 +223,7 @@
 	_sc_19 = (long) (arg4);					\
 	_sc_20 = (long) (arg5);					\
 	__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7"		\
-		: "=" inline_syscall_r0_constraint (_sc_0),	\
+		: inline_syscall_r0_out_constraint (_sc_0),	\
 		  "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17),	\
 		  "=r"(_sc_18),	"=r"(_sc_20)			\
 		: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17),		\
@@ -249,7 +250,7 @@
 	_sc_20 = (long) (arg5);					\
 	_sc_21 = (long) (arg6);					\
 	__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8"	\
-		: "=" inline_syscall_r0_constraint (_sc_0),	\
+		: inline_syscall_r0_out_constraint (_sc_0),	\
 		  "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17),	\
 		  "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21)	\
 		: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17),		\
--- libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile.jj	2003-01-05 22:08:49.000000000 +0100
+++ libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile	2003-01-06 01:07:33.000000000 +0100
@@ -0,0 +1,3 @@
+ifeq ($(subdir),linuxthreads)
+libpthread-routines += ptw-sysdep ptw-sigblock ptw-sigprocmask ptw-osf_sigprocmask
+endif

	Jakub

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

* Re: [PATCH] Fix sysdeps/unix/sysv/linux/alpha/sysdep.h for GCC 3.2
  2003-01-06  1:02 [PATCH] Fix sysdeps/unix/sysv/linux/alpha/sysdep.h for GCC 3.2 Jakub Jelinek
@ 2003-01-06 23:55 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-01-06 23:55 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Richard Henderson, Glibc hackers

Jakub Jelinek wrote:

> GCC 3.2 doesn't like asm ("" : "=" "r" (something)); (while GCC 3.3+ does).
> The following patch fixes this by putting = into the constraint.
> The linuxthreads Makefile is something I needed to make libpthread.so to
> build on Alpha.

Since rth didn't object I've applied the patch.  Thanks,

-- 
--------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------

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

end of thread, other threads:[~2003-01-06 23:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-06  1:02 [PATCH] Fix sysdeps/unix/sysv/linux/alpha/sysdep.h for GCC 3.2 Jakub Jelinek
2003-01-06 23:55 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).