From: Paul Mackerras <paulus@samba•org>
To: Andreas Schwab <schwab@linux-m68k•org>
Cc: linuxppc-dev@ozlabs•org, Alexander Graf <agraf@suse•de>,
kvm-ppc@vger•kernel.org, kvm@vger•kernel.org
Subject: Re: [PATCH] KVM: PPC: elide struct thread_struct instances from stack
Date: Tue, 1 Jun 2010 08:40:40 +1000 [thread overview]
Message-ID: <20100531224040.GA22927@brick.ozlabs.ibm.com> (raw)
In-Reply-To: <m26323onam.fsf@igel.home>
On Mon, May 31, 2010 at 09:59:13PM +0200, Andreas Schwab wrote:
> Instead of instantiating a whole thread_struct on the stack use only the
> required parts of it.
...
> +_GLOBAL(kvm_cvt_fd)
> + lfd 0,0(r5) /* load up fpscr value */
> + MTFSF_L(0)
> + lfs 0,0(r3)
> + stfd 0,0(r4)
> + mffs 0
> + stfd 0,0(r5) /* save new fpscr value */
> + blr
> +
> +_GLOBAL(kvm_cvt_df)
> + lfd 0,0(r5) /* load up fpscr value */
> + MTFSF_L(0)
> + lfd 0,0(r3)
> + stfs 0,0(r4)
> + mffs 0
> + stfd 0,0(r5) /* save new fpscr value */
> + blr
I re-read the relevant part of the PowerPC architecture spec
yesterday, and it seems pretty clear that the FPSCR doesn't affect the
behaviour of lfs and stfs, and is not affected by them. So in fact 4
out of the 7 instructions in each of those procedures are unnecessary
(and similarly for the cvt_fd/df used in the alignment fixup code).
Paul.
next prev parent reply other threads:[~2010-05-31 22:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 19:59 [PATCH] KVM: PPC: elide struct thread_struct instances from stack Andreas Schwab
2010-05-31 20:00 ` Alexander Graf
2010-05-31 22:40 ` Paul Mackerras [this message]
2010-05-31 23:27 ` Alexander Graf
2010-06-01 8:36 ` Andreas Schwab
2010-06-01 9:19 ` Alexander Graf
2010-06-02 16:00 ` Marcelo Tosatti
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=20100531224040.GA22927@brick.ozlabs.ibm.com \
--to=paulus@samba$(echo .)org \
--cc=agraf@suse$(echo .)de \
--cc=kvm-ppc@vger$(echo .)kernel.org \
--cc=kvm@vger$(echo .)kernel.org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=schwab@linux-m68k$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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