qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL


From: Ulrich Weigand
Subject: Re: [PATCH v2] target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL
Date: Wed, 30 Jun 2021 12:49:26 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jun 28, 2021 at 11:45:27AM -0700, Richard Henderson wrote:
> 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?

Good point.  I'll post an updated v3 with this change.

> 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.

I see.  If this works out, I'll update my patch accordingly
-- please let me know.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]