linamh/sys-libs/glibc/files/2.3.2/glibc-2.3.2-ia64-LOAD_ARGS-fixup.patch

97 lines
4.3 KiB
Diff
Raw Normal View History

From libc-alpha-return-13560-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Wed Sep 24 06:27:22 2003
Return-Path: <libc-alpha-return-13560-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
Delivered-To: listarch-libc-alpha at sources dot redhat dot com
Received: (qmail 23856 invoked by alias); 24 Sep 2003 06:27:20 -0000
Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
Precedence: bulk
List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
List-Post: <mailto:libc-alpha at sources dot redhat dot com>
List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
Sender: libc-alpha-owner at sources dot redhat dot com
Delivered-To: mailing list libc-alpha at sources dot redhat dot com
Received: (qmail 23847 invoked from network); 24 Sep 2003 06:27:16 -0000
Received: from unknown (HELO sccrmhc11.comcast.net) (204.127.202.55)
by sources dot redhat dot com with SMTP; 24 Sep 2003 06:27:16 -0000
Received: from lucon.org ([12.234.88.5])
by comcast dot net (sccrmhc11) with ESMTP
id <2003092406271601100ok1f3e>; Wed, 24 Sep 2003 06:27:16 +0000
Received: by lucon.org (Postfix, from userid 1000)
id 6B4D02C828; Tue, 23 Sep 2003 23:27:11 -0700 (PDT)
Date: Tue, 23 Sep 2003 23:27:11 -0700
From: "H dot J dot Lu" <hjl at lucon dot org>
To: Richard Henderson <rth at twiddle dot net>
Cc: GNU C Library <libc-alpha at sources dot redhat dot com>,
linux ia64 kernel <linux-ia64 at vger dot kernel dot org>
Subject: PATCH: Re: Inefficient ia64 system call implementation in glibc
Message-ID: <20030924062711.GA860@lucon.org>
References: <20030919163218.GA21480@lucon.org> <20030921210434.GA2280@twiddle.net> <20030922193918.GA1141@lucon.org> <20030922232123.GA17271@twiddle.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20030922232123 dot GA17271 at twiddle dot net>
User-Agent: Mutt/1.4.1i
On Mon, Sep 22, 2003 at 04:21:23PM -0700, Richard Henderson wrote:
> On Mon, Sep 22, 2003 at 12:39:18PM -0700, H. J. Lu wrote:
> > Can I get char * from char [300]?
>
> x+0 would work in this case; I'd guess it'd work for most of the
> cases that syscalls need to handle.
>
This patch works for me.
H.J.
---
2003-09-22 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/ia64/sysdep.h (LOAD_ARGS_1): Use
__typeof ((outX) + 0) instead of long.
(LOAD_ARGS_2): Likewise.
(LOAD_ARGS_3): Likewise.
(LOAD_ARGS_4): Likewise.
(LOAD_ARGS_5): Likewise.
(LOAD_ARGS_6): Likewise.
--- sysdeps/unix/sysv/linux/ia64/sysdep.h.inline 2003-08-21 07:05:30.000000000 -0700
+++ sysdeps/unix/sysv/linux/ia64/sysdep.h 2003-09-23 11:04:02.000000000 -0700
@@ -191,23 +191,23 @@
#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
#define LOAD_ARGS_0() do { } while (0)
-#define LOAD_ARGS_1(out0) \
- register long _out0 asm ("out0") = (long) (out0); \
+#define LOAD_ARGS_1(out0) \
+ register __typeof ((out0) + 0) _out0 asm ("out0") = (out0); \
LOAD_ARGS_0 ()
-#define LOAD_ARGS_2(out0, out1) \
- register long _out1 asm ("out1") = (long) (out1); \
+#define LOAD_ARGS_2(out0, out1) \
+ register __typeof ((out1) + 0) _out1 asm ("out1") = (out1); \
LOAD_ARGS_1 (out0)
-#define LOAD_ARGS_3(out0, out1, out2) \
- register long _out2 asm ("out2") = (long) (out2); \
+#define LOAD_ARGS_3(out0, out1, out2) \
+ register __typeof ((out2) + 0) _out2 asm ("out2") = (out2); \
LOAD_ARGS_2 (out0, out1)
-#define LOAD_ARGS_4(out0, out1, out2, out3) \
- register long _out3 asm ("out3") = (long) (out3); \
+#define LOAD_ARGS_4(out0, out1, out2, out3) \
+ register __typeof ((out3) + 0) _out3 asm ("out3") = (out3); \
LOAD_ARGS_3 (out0, out1, out2)
-#define LOAD_ARGS_5(out0, out1, out2, out3, out4) \
- register long _out4 asm ("out4") = (long) (out4); \
+#define LOAD_ARGS_5(out0, out1, out2, out3, out4) \
+ register __typeof ((out4) + 0) _out4 asm ("out4") = (out4); \
LOAD_ARGS_4 (out0, out1, out2, out3)
-#define LOAD_ARGS_6(out0, out1, out2, out3, out4, out5) \
- register long _out5 asm ("out5") = (long) (out5); \
+#define LOAD_ARGS_6(out0, out1, out2, out3, out4, out5) \
+ register __typeof ((out5) + 0) _out5 asm ("out5") = (out5); \
LOAD_ARGS_5 (out0, out1, out2, out3, out4)
#define ASM_OUTARGS_0