On 02.06.21 11:50, David Hildenbrand wrote:
On 01.06.21 23:27, Richard Henderson wrote:
On 5/17/21 7:27 AM, David Hildenbrand wrote:
@@ -634,6 +664,9 @@ uint64_t HELPER(clfxb)(CPUS390XState *env, uint64_t h,
uint64_t l, uint32_t m34)
s390_restore_bfp_rounding_mode(env, old_mode);
handle_exceptions(env, xxc_from_m34(m34), GETPC());
+ if (float128_is_any_nan(make_float128(h, l))) {
+ return 0;
+ }
I wonder if handle_exceptions should return s390_exc.
Then you can test
exc = handle_exceptions(...);
if (unlikely(exc & S390_IEEE_MASK_INVALID)) {
ret = 0;
}
return ret;
I'll give it a thought if that makes things easier.
Looking at partsN(float_to_uint), we also raise float_flag_invalid in
other cases, for example with float_class_inf. So IIUC, your proposal
would also set "ret = 0" in case our input is +inf, which would be wrong.
--
Thanks,
David / dhildenb