From: Daniel Jacobowitz <dan@debian.org>
To: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Cc: linux-mips@oss.sgi.com, linux-alpha@sources.redhat.com
Subject: Re: [patch] fix profiling in glibc for Linux/MIPS
Date: Thu, 26 Jul 2001 18:17:41 -0700 [thread overview]
Message-ID: <20010726181740.A8070@nevyn.them.org> (raw)
In-Reply-To: <20010727024820.B27008@rembrandt.csv.ica.uni-stuttgart.de>; from ica2_ts@csv.ica.uni-stuttgart.de on Fri, Jul 27, 2001 at 02:48:20AM +0200
On Fri, Jul 27, 2001 at 02:48:20AM +0200, Thiemo Seufer wrote:
> Daniel Jacobowitz wrote:
> > _mcount was doing awful things to its caller's stack frame.
>
> Maybe I'm missing something, but both the old and the new code
> add 8 byte more to sp than they subtracted before. How is this
> supposed to work?
It's supposed to do that, according to GCC. Build something with -S
-pg and look at it.
> [snip]
> > I think this is close enough; it only adds
> > one instruction. Is this OK?
>
> Why do you save and restore $6, $7, seemingly without using them?
Because they were already there; I was trying to keep this patch
minimal. My MIPS assembly knowledge, as I said, is a little scanty.
> > Do I need a "nop" after the subu?
>
> It works here since it is expanded in an
>
> addiu $29,$29,-40
>
> which is executed in one cycle. The usual suspects for hazards
> to be NOPed are load/store insns and branches.
Ahh, OK. I see.
> [snip]
> > + "sw $31,20($29);" \
> > "move $5,$31;" \
> > "jal __mcount;" \
> > "move $4,$1;" \
> ^
> Some stylistic issue: In ".set noreorder" assembly it helps to
> indent the insns in a branch delay slot by one blank to avoid
> confusion about their non-sequential nature.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2001-07-27 1:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-26 17:39 [patch] fix profiling in glibc for Linux/MIPS Daniel Jacobowitz
2001-07-27 0:48 ` Thiemo Seufer
2001-07-27 1:17 ` Daniel Jacobowitz [this message]
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=20010726181740.A8070@nevyn.them.org \
--to=dan@debian.org \
--cc=ica2_ts@csv.ica.uni-stuttgart.de \
--cc=linux-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