* [resent patch] fix ia64 _mcount()
@ 2005-03-21 22:04 David Mosberger
0 siblings, 0 replies; only message in thread
From: David Mosberger @ 2005-03-21 22:04 UTC (permalink / raw)
To: libc-hacker
[I sent a similar mail a bit earlier while in the middle of a system
upgrade and I think the mail may have been lost because of that (at
least, it doesn't up anywhere as having been sent. My apologies if
this turns out to be a duplicate.]
On recent kernels, -pg-style profiling doesn't work anymore because
such kernels enforce the rule that systems-calls must be invoked with
at most 8 output registers. Unfortunately, the _mcount() helper stub
had the effect of allocating 9 output registers. The patch below
fixes the problem.
Thanks,
--david
2005-03-21 David Mosberger <davidm@hpl.hp.com>
* sysdeps/ia64/_mcount.S: Newer kernels don't like register-frames
with more than 8 output registers. Fix this by passing original
ar.pfs to _mcount_ret_helper via r3.
Index: sysdeps/ia64/_mcount.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/ia64/_mcount.S,v
retrieving revision 1.4
diff -u -r1.4 _mcount.S
--- sysdeps/ia64/_mcount.S 6 Jul 2001 04:55:54 -0000 1.4
+++ sysdeps/ia64/_mcount.S 21 Mar 2005 21:15:55 -0000
@@ -72,6 +72,7 @@
mov b7 = loc0
mov rp = in2
;;
+ mov r3 = in0
mov r8 = loc2
mov r15 = loc3
mov b6 = r2
@@ -81,10 +82,10 @@
LOCAL_LEAF(_mcount_ret_helper)
.prologue
.altrp b7
- .save ar.pfs, r40
+ .save ar.pfs, r3
.body
- alloc r2 = ar.pfs, 0, 0, 9, 0
- mov ar.pfs = r40
+ alloc r2 = ar.pfs, 0, 0, 8, 0
+ mov ar.pfs = r3
br b7
END(_mcount_ret_helper)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-21 22:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-21 22:04 [resent patch] fix ia64 _mcount() David Mosberger
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).