* ia64: a few more unwind-related fixes
@ 2003-03-29 19:20 David Mosberger
2003-03-30 5:35 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: David Mosberger @ 2003-03-29 19:20 UTC (permalink / raw)
To: libc-hacker
Below are a couple of more unwind-related fixes to ia64-specific code.
"make check" passes as before.
--david
2003-03-27 David Mosberger <davidm@hpl.hp.com>
* sysdeps/ia64/dl-machine.h (RTLD_START): Wrap ".save rp, r0"
directive into empty .prologue region to ensure that call-chain
is terminated even for the first instruction.
* sysdeps/ia64/elf/start.S (_start): Use ".save rp, r0" idiom
to terminate call-chain right from the get-go.
* sysdeps/unix/sysv/linux/ia64/fork.S (fork): Remove unnecessary
stop bit between compare & branch.
* sysdeps/unix/sysv/linux/ia64/sysdep.S (__syscall_error):
Bring register usage in sync with unwind info (ar.pfs is saved
in r33, according to unwind info).
Index: sysdeps/ia64/dl-machine.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/ia64/dl-machine.h,v
retrieving revision 1.22
diff -u -r1.22 dl-machine.h
--- sysdeps/ia64/dl-machine.h 12 Jan 2003 08:54:00 -0000 1.22
+++ sysdeps/ia64/dl-machine.h 29 Mar 2003 06:53:06 -0000
@@ -301,8 +301,10 @@
"_start:\n" \
"0: { .mii\n" \
" .prologue\n" \
-" .save ar.pfs, r32\n" \
" .save rp, r0\n" \
+" .body\n" \
+" .prologue\n" \
+" .save ar.pfs, r32\n" \
" alloc loc0 = ar.pfs, 0, 3, 4, 0\n" \
" .body\n" \
" mov r2 = ip\n" \
@@ -332,8 +334,10 @@
" .proc _dl_start_user#\n" \
"_dl_start_user:\n" \
" .prologue\n" \
-" .save ar.pfs, r32\n" \
" .save rp, r0\n" \
+" .body\n" \
+" .prologue\n" \
+" .save ar.pfs, r32\n" \
" .body\n" \
" { .mii\n" \
" /* Save the pointer to the user entry point fptr in loc2. */\n" \
Index: sysdeps/ia64/elf/start.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/ia64/elf/start.S,v
retrieving revision 1.11
diff -u -r1.11 start.S
--- sysdeps/ia64/elf/start.S 9 Dec 2002 20:37:21 -0000 1.11
+++ sysdeps/ia64/elf/start.S 29 Mar 2003 06:53:06 -0000
@@ -40,6 +40,9 @@
.type _start,@function
_start:
.prologue
+ .save rp, r0
+ .body
+ .prologue
{ .mlx
alloc r2 = ar.pfs,0,0,7,0
movl r3 = FPSR_DEFAULT
@@ -76,8 +79,7 @@
{ .mmi
ld8 out3 = [out3] /* pointer to `init' function descriptor */
ld8 out4 = [out4] /* pointer to `fini' function descriptor */
- .save rp, r4
- mov r4 = r0 /* terminate unwind chain with a NULL return-pointer */
+ nop 0
}
.body
{ .mib
Index: sysdeps/unix/sysv/linux/ia64/fork.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/ia64/fork.S,v
retrieving revision 1.6
diff -u -r1.6 fork.S
--- sysdeps/unix/sysv/linux/ia64/fork.S 31 Dec 2002 20:37:30 -0000 1.6
+++ sysdeps/unix/sysv/linux/ia64/fork.S 29 Mar 2003 06:53:07 -0000
@@ -32,7 +32,6 @@
;;
DO_CALL (SYS_ify (clone))
cmp.eq p6,p0=-1,r10
- ;;
(p6) br.cond.spnt.few __syscall_error
ret
PSEUDO_END(__libc_fork)
Index: sysdeps/unix/sysv/linux/ia64/sysdep.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/ia64/sysdep.S,v
retrieving revision 1.5
diff -u -r1.5 sysdep.S
--- sysdeps/unix/sysv/linux/ia64/sysdep.S 11 Oct 2002 10:51:24 -0000 1.5
+++ sysdeps/unix/sysv/linux/ia64/sysdep.S 29 Mar 2003 06:53:07 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
@@ -23,18 +23,19 @@
ENTRY(__syscall_error)
#ifdef _LIBC_REENTRANT
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(0)
- alloc r35=ar.pfs, 0, 4, 0, 0
+ alloc r33=ar.pfs, 0, 4, 0, 0
mov r32=rp
- mov r33=r8
+ .body
+ mov r35=r8
mov r34=r1
;;
- br.call.sptk.many b0 = __errno_location#
+ br.call.sptk.many b0 = __errno_location
.Lret0: /* force new bundle */
- st4 [r8]=r33
+ st4 [r8]=r35
mov r1=r34
mov rp=r32
mov r8=-1
- mov ar.pfs=r35
+ mov ar.pfs=r33
#else /* _LIBC_REENTRANT */
/*
* Note that the gp has to be set properly for this to work.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ia64: a few more unwind-related fixes
2003-03-29 19:20 ia64: a few more unwind-related fixes David Mosberger
@ 2003-03-30 5:35 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-03-30 5:35 UTC (permalink / raw)
To: davidm; +Cc: libc-hacker
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Mosberger wrote:
> Below are a couple of more unwind-related fixes to ia64-specific code.
> "make check" passes as before.
I've applied the patch, thanks.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+hfHk2ijCOnn/RHQRAqvjAJsEBGieZ6PPrIGFVugKE0b3heHXqgCgkVnP
OnVuIeFsV+NQOVmpBzDvVrg=
=Zb8W
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-29 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-29 19:20 ia64: a few more unwind-related fixes David Mosberger
2003-03-30 5:35 ` 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).