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

2021-06-30 Thread Richard Henderson
On 6/30/21 3:49 AM, Ulrich Weigand wrote: 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

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

2021-06-30 Thread Ulrich Weigand
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)); > >

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

2021-06-28 Thread Richard Henderson
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_

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

2021-06-28 Thread Ulrich Weigand
The FP-to-integer conversion instructions need to set CC 3 whenever a "special case" occurs; this is the case whenever the instruction also signals the IEEE invalid exception. (See e.g. figure 19-18 in the Principles of Operation.) However, qemu currently will set CC 3 only in the case where the