qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Helge Deller <deller@gmx.de>, qemu-devel@nongnu.org
Subject: Re: [PATCH] target/hppa: Fix fid instruction emulation
Date: Thu, 27 Oct 2022 19:48:38 +1000	[thread overview]
Message-ID: <c7d806c1-3f3b-f29b-0578-0b562ca9d3bf@linaro.org> (raw)
In-Reply-To: <Y1ol0OCotNwb6ccV@p100>

On 10/27/22 16:31, Helge Deller wrote:
> The fid instruction (Floating-Point Identify) puts the FPU model and
> revision into the Status Register. Since those values shouldn't be 0,
> store values there which a PCX-L2 (for 32-bit) or a PCX-W2 (for 64-bit)
> would return.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode
> index c7a7e997f9..3ba5f9885a 100644
> --- a/target/hppa/insns.decode
> +++ b/target/hppa/insns.decode
> @@ -388,10 +388,8 @@ fmpyfadd_d      101110 rm1:5 rm2:5 ... 0 1 ..0 0 0 neg:1 t:5    ra3=%rc32
> 
>   # Floating point class 0
> 
> -# FID.  With r = t = 0, which via fcpy puts 0 into fr0.
> -# This is machine/revision = 0, which is reserved for simulator.

Is there something in particular for which this is failing?
Per the manual, 0 means simulator, which we are.
So far we haven't identified as a particular cpu, have we?


> +static bool trans_fid_f(DisasContext *ctx, arg_fid_f *a)
> +{
> +    nullify_over(ctx);
> +#if TARGET_REGISTER_BITS == 64
> +    save_frd(0, tcg_const_i64(0x13080000000000)); /* PA8700 (PCX-W2) */
> +#else
> +    save_frd(0, tcg_const_i64(0x0f080000000000)); /* PA7300LC (PCX-L2) */
> +#endif
> +    return nullify_end(ctx);
> +}

Missing ULL suffix.


r~


  reply	other threads:[~2022-10-27  9:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27  6:31 [PATCH] target/hppa: Fix fid instruction emulation Helge Deller
2022-10-27  9:48 ` Richard Henderson [this message]
2022-10-27 10:00   ` Helge Deller

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=c7d806c1-3f3b-f29b-0578-0b562ca9d3bf@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=deller@gmx.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).