From: David Mosberger <davidm@napali.hpl.hp.com>
To: libc-hacker@sources.redhat.com
Subject: [resent patch] fix ia64 _mcount()
Date: Mon, 21 Mar 2005 22:04:00 -0000 [thread overview]
Message-ID: <16959.17616.893501.566504@napali.hpl.hp.com> (raw)
[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)
reply other threads:[~2005-03-21 22:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16959.17616.893501.566504@napali.hpl.hp.com \
--to=davidm@napali.hpl.hp.com \
--cc=davidm@hpl.hp.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).