From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH 2/7] target-ppc: Introduce gen_set_cr1_from_fpscr
Date: Tue, 04 Nov 2014 16:58:32 +0100 [thread overview]
Message-ID: <5458F7A8.30103@redhat.com> (raw)
In-Reply-To: <1415044877-17300-3-git-send-email-tommusta@gmail.com>
What tree are these patches based on? Alex's tree already has a
commit 15a6b218c221a34b12e81790f427efec3108dce9
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: Thu Aug 28 19:15:07 2014 +0200
ppc: rename gen_set_cr6_from_fpscr
It sets CR1, not CR6 (and the spec agrees).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Tom Musta <tommusta@gmail.com>
Tested-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
that conflicts (semantically) with this.
Paolo
On 03/11/2014 21:01, Tom Musta wrote:
> The Power ISA supports a mode in many floating point instructions whereby
> the Condition Register field 1 (CR[1]) receives a copy of the Floating
> Point Status (FPSCR) bits 32:35, also known as FX, FEX VX and OX.
>
> The existing QEMU code is mostly wrong -- CR[1] is set to the Floating
> Point Condition Code (FPSCR[FPCC]). Furthermore, this code is buried
> inside the code that generates the FPSCR[FPRF] code, which is awkward.
>
> Introduce a new generator utility that correctly sets CR[1] from the
> FPSCR bits. Subsequent patches will correct various segments of
> the defective code and will clean up the gen_compute_fprf()
> utility.
>
> Signed-off-by: Tom Musta <tommusta@gmail.com>
> ---
> target-ppc/translate.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index d03daea..7775bf4 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -249,6 +249,14 @@ static inline void gen_reset_fpstatus(void)
> gen_helper_reset_fpstatus(cpu_env);
> }
>
> +static inline void gen_set_cr1_from_fpscr(void)
> +{
> + TCGv_i32 t0 = tcg_temp_new_i32();
> + tcg_gen_trunc_tl_i32(t0, cpu_fpscr);
> + tcg_gen_shri_i32(cpu_crf[1], t0, 28);
> + tcg_temp_free_i32(t0);
> +}
> +
> static inline void gen_compute_fprf(TCGv_i64 arg, int set_fprf, int set_rc)
> {
> TCGv_i32 t0 = tcg_temp_new_i32();
>
next prev parent reply other threads:[~2014-11-04 15:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 20:01 [Qemu-devel] [PATCH 0/7] target-ppc: Assorted Floating Point Bugs and Cleanup Tom Musta
2014-11-03 20:01 ` [Qemu-devel] [PATCH 1/7] target-ppc: VXSQRT Should Not Be Set for NaNs Tom Musta
2014-11-03 20:01 ` [Qemu-devel] [PATCH 2/7] target-ppc: Introduce gen_set_cr1_from_fpscr Tom Musta
2014-11-04 15:58 ` Paolo Bonzini [this message]
2014-11-04 16:16 ` Alexander Graf
2014-11-04 16:26 ` Paolo Bonzini
2014-11-04 16:25 ` Tom Musta
2014-11-04 16:25 ` Paolo Bonzini
2014-11-03 20:01 ` [Qemu-devel] [PATCH 3/7] target-ppc: Fix Floating Point Move Instructions That Set CR1 Tom Musta
2014-11-03 20:01 ` [Qemu-devel] [PATCH 4/7] target-ppc: mffs. Should Set CR1 from FPSCR Bits Tom Musta
2014-11-03 20:01 ` [Qemu-devel] [PATCH 5/7] target-ppc: Fully Migrate to gen_set_cr1_from_fpscr Tom Musta
2014-11-03 20:01 ` [Qemu-devel] [PATCH 6/7] target-ppc: Eliminate set_fprf Argument From gen_compute_fprf Tom Musta
2014-11-03 20:01 ` [Qemu-devel] [PATCH 7/7] target-ppc: Eliminate set_fprf Argument From helper_compute_fprf Tom Musta
2014-11-04 15:49 ` [Qemu-devel] [PATCH 0/7] target-ppc: Assorted Floating Point Bugs and Cleanup Paolo Bonzini
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=5458F7A8.30103@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
/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 NNTP newsgroup(s).