qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Ulrich Weigand <ulrich.weigand@de.ibm.com>,
	david@redhat.com, cohuck@redhat.com, thuth@redhat.com,
	qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2] target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL
Date: Mon, 28 Jun 2021 11:45:27 -0700	[thread overview]
Message-ID: <0ec4b69c-02cb-0b1c-e980-9b462ab3a615@linaro.org> (raw)
In-Reply-To: <20210628163520.GA15209@oc3748833570.ibm.com>

On 6/28/21 9:35 AM, Ulrich Weigand wrote:
> @@ -506,6 +534,7 @@ uint64_t HELPER(cgeb)(CPUS390XState *env, uint64_t v2, uint32_t m34)
>   {
>       int old_mode = s390_swap_bfp_rounding_mode(env, round_from_m34(m34));
>       int64_t ret = float32_to_int64(v2, &env->fpu_status);
> +    env->cc_op = set_cc_conv_f32(v2, &env->fpu_status);
>   
>       s390_restore_bfp_rounding_mode(env, old_mode);
>       handle_exceptions(env, xxc_from_m34(m34), GETPC());

Don't you need to wait until after handle_exceptions, and the handling of suppressing 
exceptions, to write back to cc_op?

I'm thinking that should be able to remove TCGv_i32 cc_op in the translator and manually 
write back to the slot instead.  We already do a good job of caching the value within 
DisasContext -- I imagine that the final code wouldn't even change too much.

Which would allow us to drop

> -DEF_HELPER_FLAGS_3(cgeb, TCG_CALL_NO_WG, i64, env, i64, i32)
> -DEF_HELPER_FLAGS_3(cgdb, TCG_CALL_NO_WG, i64, env, i64, i32)
> -DEF_HELPER_FLAGS_4(cgxb, TCG_CALL_NO_WG, i64, env, i64, i64, i32)
> -DEF_HELPER_FLAGS_3(cfeb, TCG_CALL_NO_WG, i64, env, i64, i32)
> -DEF_HELPER_FLAGS_3(cfdb, TCG_CALL_NO_WG, i64, env, i64, i32)
> -DEF_HELPER_FLAGS_4(cfxb, TCG_CALL_NO_WG, i64, env, i64, i64, i32)
> -DEF_HELPER_FLAGS_3(clgeb, TCG_CALL_NO_WG, i64, env, i64, i32)
> -DEF_HELPER_FLAGS_3(clgdb, TCG_CALL_NO_WG, i64, env, i64, i32)
> -DEF_HELPER_FLAGS_4(clgxb, TCG_CALL_NO_WG, i64, env, i64, i64, i32)
> -DEF_HELPER_FLAGS_3(clfeb, TCG_CALL_NO_WG, i64, env, i64, i32)
> -DEF_HELPER_FLAGS_3(clfdb, TCG_CALL_NO_WG, i64, env, i64, i32)
> -DEF_HELPER_FLAGS_4(clfxb, TCG_CALL_NO_WG, i64, env, i64, i64, i32)
> +DEF_HELPER_3(cgeb, i64, env, i64, i32)
> +DEF_HELPER_3(cgdb, i64, env, i64, i32)
> +DEF_HELPER_4(cgxb, i64, env, i64, i64, i32)
> +DEF_HELPER_3(cfeb, i64, env, i64, i32)
> +DEF_HELPER_3(cfdb, i64, env, i64, i32)
> +DEF_HELPER_4(cfxb, i64, env, i64, i64, i32)
> +DEF_HELPER_3(clgeb, i64, env, i64, i32)
> +DEF_HELPER_3(clgdb, i64, env, i64, i32)
> +DEF_HELPER_4(clgxb, i64, env, i64, i64, i32)
> +DEF_HELPER_3(clfeb, i64, env, i64, i32)
> +DEF_HELPER_3(clfdb, i64, env, i64, i32)
> +DEF_HELPER_4(clfxb, i64, env, i64, i64, i32)

this bit.

I'll experiment this afternoon.


r~


  reply	other threads:[~2021-06-28 18:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 16:35 [PATCH v2] target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL Ulrich Weigand
2021-06-28 18:45 ` Richard Henderson [this message]
2021-06-30 10:49   ` Ulrich Weigand
2021-06-30 13:32     ` Richard Henderson

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=0ec4b69c-02cb-0b1c-e980-9b462ab3a615@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=ulrich.weigand@de.ibm.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;
as well as URLs for NNTP newsgroup(s).