From: Daniel Jacobowitz <dan@debian.org>
To: libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com
Subject: [patch] fix profiling in glibc for Linux/MIPS
Date: Thu, 26 Jul 2001 10:39:22 -0700 [thread overview]
Message-ID: <20010726103922.A6643@nevyn.them.org> (raw)
_mcount was doing awful things to its caller's stack frame.
Theoretically, we can get by with 16 bytes less of stack than I now
allocate, but GCC still considers functions that call _mcount to be leaf
functions, so that doesn't work. I think this is close enough; it only adds
one instruction. Is this OK? Do I need a "nop" after the subu? My MIPS
assembly knowledge is not that thorough.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
--- glibc-2.2.3/sysdeps/mips/machine-gmon.h.orig Wed Jul 25 20:09:20 2001
+++ glibc-2.2.3/sysdeps/mips/machine-gmon.h Wed Jul 25 21:14:09 2001
@@ -35,22 +35,23 @@
".set noreorder;" \
".set noat;" \
CPLOAD \
- "sw $4,8($29);" \
- "sw $5,12($29);" \
- "sw $6,16($29);" \
- "sw $7,20($29);" \
- "sw $1,0($29);" \
- "sw $31,4($29);" \
+ "subu $29,$29,40;" \
+ "sw $4,24($29);" \
+ "sw $5,28($29);" \
+ "sw $6,32($29);" \
+ "sw $7,36($29);" \
+ "sw $1,16($29);" \
+ "sw $31,20($29);" \
"move $5,$31;" \
"jal __mcount;" \
"move $4,$1;" \
- "lw $4,8($29);" \
- "lw $5,12($29);" \
- "lw $6,16($29);" \
- "lw $7,20($29);" \
- "lw $31,4($29);" \
- "lw $1,0($29);" \
- "addu $29,$29,8;" \
+ "lw $4,24($29);" \
+ "lw $5,28($29);" \
+ "lw $6,32($29);" \
+ "lw $7,36($29);" \
+ "lw $31,20($29);" \
+ "lw $1,16($29);" \
+ "addu $29,$29,48;" \
"j $31;" \
"move $31,$1;" \
".set reorder;" \
next reply other threads:[~2001-07-26 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-26 17:39 Daniel Jacobowitz [this message]
2001-07-27 0:48 ` [patch] fix profiling in glibc for Linux/MIPS Thiemo Seufer
2001-07-27 1:17 ` Daniel Jacobowitz
2001-07-27 2:21 ` Thiemo Seufer
2001-07-27 3:18 ` Ralf Baechle
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=20010726103922.A6643@nevyn.them.org \
--to=dan@debian.org \
--cc=libc-alpha@sources.redhat.com \
--cc=linux-mips@oss.sgi.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