From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622088963; cv=none; d=zohomail.com; s=zohoarc; b=aPWJRzfWAY3ITax1J6kIm31LDJzdRzDDXtmWjf7t+LGKIA1rveCA9bvh2/6P7XUm86tbKt2DQD2Fs5kSuoyZ2BhcPlz0uP62YK9Vc0s0xLrJgr8fHkwP5lespXtBr+7VB9tRZrxS7LS7lxZJUF+Qb17hkgXDX3RksQyWJXbaIJc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622088963; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=l7C6tS9XhSbsAFvRiiUPAt7TYUWb/CAkxQde5RCfZGI=; b=DZvYXd/XqigrcscHIffeGBwUUdqJVx8IudXF+4XJCNctes1+jQp4khUtPFfTWS1ru1hKAkBxmSL3llmPzRpHrzwvVaSvb0cUFYpDODJMB3q3DIDqGOPGx8f1V+iEvJ2MGGFtmIo3s/9OytDiNuy42hcdg7UeNXWPzwQLH2z4YwQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622088963584285.33210676297665; Wed, 26 May 2021 21:16:03 -0700 (PDT) Received: from localhost ([::1]:40626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7RC-0004HZ-BG for importer@patchew.org; Thu, 27 May 2021 00:16:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PP-0001Yb-Ep for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:12 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:46036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PM-0007A3-Hv for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:11 -0400 Received: by mail-pj1-x1035.google.com with SMTP id ne24-20020a17090b3758b029015f2dafecb0so1593640pjb.4 for ; Wed, 26 May 2021 21:14:08 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l7C6tS9XhSbsAFvRiiUPAt7TYUWb/CAkxQde5RCfZGI=; b=kTO33F8H6UUuBkXWa9om7KdmjxscNDLHmOIWTtxx2D6kf44Ii9V3yfLkKUSRfJCgJz eC0DMIrWwdDXogFfGO4zJFw4jEHODsRWUMybyjhlDDIQ5DYUujoZhNKb6dB/YM5QAFDY x6/vmcdvzdpbUrag5BLvc1gLyg1dgkj09aaNBECMqJnxL2+xy9FMVYWKhdeuiwxMFio8 CV342hYxKrNHbZ/R1vTwmAJXuusDQtH33bXgUW8H4ge9iqQ7rqRaxSlvulUtjehDEuKy YDBZwN3IY9/fAhLjLAM+Dh/Nv/f9xvsW/Ozwcr5Dhg1OUo9gYjjsWlv488vUiwecfk5a Tjeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l7C6tS9XhSbsAFvRiiUPAt7TYUWb/CAkxQde5RCfZGI=; b=hryQLn+T9ZxLPpqu1z/UDvvPDeLt7ux1VOOvJRppke1pI8hwXg+MH63tqHp+LRqHt9 3xAsPT1LG86EB/p+5SK2NOqLpf93jhtKFvawRMny4PSwbzlEcu84ZPXR9Rq6qAUcaGIc qEM5P+/aKLk50bQEvF30+PftvElLc8veja5nznygOQdrPXcmnc2CS6uXT+6rKk7yITsr 90Pewb83pXvRuvP7NJoWRM6DAtEReztSA1c2WE8wbYs5+9ps0fU6s1Dc0CbciBwOhs4n 1m8lh/Zi7qX767HBSlDNV39k82RcqosNCHj3RtsNMR1+5Q/PaTTF4EdgYJie2/jcbDX1 Lkig== X-Gm-Message-State: AOAM532LwBMOKAegZAIBxLABdfB8TD9bLapQ8QlrtVG+smCJeJY6968k rv7jf+isrgR3XKjel4T+WJF8VyKkDnoZ6g== X-Google-Smtp-Source: ABdhPJyN2I5sesFHEdg7YLA0LEPyWYTCAzdZ1MUl9gGgzGqxReRZrKlm5pZTu3VRLHZfqVy3YpNkiA== X-Received: by 2002:a17:90a:8d82:: with SMTP id d2mr1674317pjo.200.1622088847082; Wed, 26 May 2021 21:14:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 01/11] softfloat: Rename float_flag_input_denormal to float_flag_iflush_denormal Date: Wed, 26 May 2021 21:13:55 -0700 Message-Id: <20210527041405.391567-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The new name emphasizes that the input denormal has been flushed to zero. Patch created mechanically using: sed -i s,float_flag_input_denormal,float_flag_iflush_denormal,g \ $(git grep -l float_flag_input_denormal) Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/fpu/softfloat-types.h | 2 +- fpu/softfloat.c | 4 ++-- target/arm/sve_helper.c | 6 +++--- target/arm/vfp_helper.c | 10 +++++----- target/i386/tcg/fpu_helper.c | 6 +++--- target/mips/tcg/msa_helper.c | 2 +- target/rx/op_helper.c | 2 +- fpu/softfloat-parts.c.inc | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 1f83378c20..719b4d2531 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -148,7 +148,7 @@ enum { float_flag_overflow =3D 8, float_flag_underflow =3D 16, float_flag_inexact =3D 32, - float_flag_input_denormal =3D 64, + float_flag_iflush_denormal =3D 64, float_flag_output_denormal =3D 128 }; =20 diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 79b2205070..fa3a691a5a 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -132,7 +132,7 @@ this code that are retained. if (unlikely(soft_t ## _is_denormal(*a))) { \ *a =3D soft_t ## _set_sign(soft_t ## _zero, \ soft_t ## _is_neg(*a)); \ - float_raise(float_flag_input_denormal, s); \ + float_raise(float_flag_iflush_denormal, s); \ } \ } =20 @@ -4441,7 +4441,7 @@ float128 float128_silence_nan(float128 a, float_statu= s *status) static bool parts_squash_denormal(FloatParts64 p, float_status *status) { if (p.exp =3D=3D 0 && p.frac !=3D 0) { - float_raise(float_flag_input_denormal, status); + float_raise(float_flag_iflush_denormal, status); return true; } =20 diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index 40af3024df..16b055a34f 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -4774,7 +4774,7 @@ static int16_t do_float16_logb_as_int(float16 a, floa= t_status *s) return -15 - clz32(frac); } /* flush to zero */ - float_raise(float_flag_input_denormal, s); + float_raise(float_flag_iflush_denormal, s); } } else if (unlikely(exp =3D=3D 0x1f)) { if (frac =3D=3D 0) { @@ -4802,7 +4802,7 @@ static int32_t do_float32_logb_as_int(float32 a, floa= t_status *s) return -127 - clz32(frac); } /* flush to zero */ - float_raise(float_flag_input_denormal, s); + float_raise(float_flag_iflush_denormal, s); } } else if (unlikely(exp =3D=3D 0xff)) { if (frac =3D=3D 0) { @@ -4830,7 +4830,7 @@ static int64_t do_float64_logb_as_int(float64 a, floa= t_status *s) return -1023 - clz64(frac); } /* flush to zero */ - float_raise(float_flag_input_denormal, s); + float_raise(float_flag_iflush_denormal, s); } } else if (unlikely(exp =3D=3D 0x7ff)) { if (frac =3D=3D 0) { diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c index 01b9d8557f..0a43ccc6fa 100644 --- a/target/arm/vfp_helper.c +++ b/target/arm/vfp_helper.c @@ -52,7 +52,7 @@ static inline int vfp_exceptbits_from_host(int host_bits) if (host_bits & float_flag_inexact) { target_bits |=3D 0x10; } - if (host_bits & float_flag_input_denormal) { + if (host_bits & float_flag_iflush_denormal) { target_bits |=3D 0x80; } return target_bits; @@ -79,7 +79,7 @@ static inline int vfp_exceptbits_to_host(int target_bits) host_bits |=3D float_flag_inexact; } if (target_bits & 0x80) { - host_bits |=3D float_flag_input_denormal; + host_bits |=3D float_flag_iflush_denormal; } return host_bits; } @@ -92,9 +92,9 @@ static uint32_t vfp_get_fpscr_from_host(CPUARMState *env) i |=3D get_float_exception_flags(&env->vfp.standard_fp_status); /* FZ16 does not generate an input denormal exception. */ i |=3D (get_float_exception_flags(&env->vfp.fp_status_f16) - & ~float_flag_input_denormal); + & ~float_flag_iflush_denormal); i |=3D (get_float_exception_flags(&env->vfp.standard_fp_status_f16) - & ~float_flag_input_denormal); + & ~float_flag_iflush_denormal); return vfp_exceptbits_from_host(i); } =20 @@ -1124,7 +1124,7 @@ uint64_t HELPER(fjcvtzs)(float64 value, void *vstatus) inexact =3D sign; if (frac !=3D 0) { if (status->flush_inputs_to_zero) { - float_raise(float_flag_input_denormal, status); + float_raise(float_flag_iflush_denormal, status); } else { float_raise(float_flag_inexact, status); inexact =3D 1; diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 4e11965067..c402daf659 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -148,7 +148,7 @@ static void merge_exception_flags(CPUX86State *env, uin= t8_t old_flags) (new_flags & float_flag_overflow ? FPUS_OE : 0) | (new_flags & float_flag_underflow ? FPUS_UE : 0) | (new_flags & float_flag_inexact ? FPUS_PE : 0) | - (new_flags & float_flag_input_denormal ? FPUS_DE : = 0))); + (new_flags & float_flag_iflush_denormal ? FPUS_DE := 0))); } =20 static inline floatx80 helper_fdiv(CPUX86State *env, floatx80 a, floatx80 = b) @@ -1742,7 +1742,7 @@ void helper_fxtract(CPUX86State *env) int shift =3D clz64(temp.l.lower); temp.l.lower <<=3D shift; expdif =3D 1 - EXPBIAS - shift; - float_raise(float_flag_input_denormal, &env->fp_status); + float_raise(float_flag_iflush_denormal, &env->fp_status); } else { expdif =3D EXPD(temp) - EXPBIAS; } @@ -2991,7 +2991,7 @@ void update_mxcsr_from_sse_status(CPUX86State *env) uint8_t flags =3D get_float_exception_flags(&env->sse_status); /* * The MXCSR denormal flag has opposite semantics to - * float_flag_input_denormal (the softfloat code sets that flag + * float_flag_iflush_denormal (the softfloat code sets that flag * only when flushing input denormals to zero, but SSE sets it * only when not flushing them to zero), so is not converted * here. diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index 04af54f66d..992d348aa3 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -6230,7 +6230,7 @@ static inline int update_msacsr(CPUMIPSState *env, in= t action, int denormal) enable =3D GET_FP_ENABLE(env->active_tc.msacsr) | FP_UNIMPLEMENTED; =20 /* Set Inexact (I) when flushing inputs to zero */ - if ((ieee_exception_flags & float_flag_input_denormal) && + if ((ieee_exception_flags & float_flag_iflush_denormal) && (env->active_tc.msacsr & MSACSR_FS_MASK) !=3D 0) { if (action & CLEAR_IS_INEXACT) { mips_exception_flags &=3D ~FP_INEXACT; diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index 4d315b4449..eb2c4a41fb 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -97,7 +97,7 @@ static void update_fpsw(CPURXState *env, float32 ret, uin= tptr_t retaddr) if (xcpt & float_flag_inexact) { SET_FPSW(X); } - if ((xcpt & (float_flag_input_denormal + if ((xcpt & (float_flag_iflush_denormal | float_flag_output_denormal)) && !FIELD_EX32(env->fpsw, FPSW, DN)) { env->fpsw =3D FIELD_DP32(env->fpsw, FPSW, CE, 1); diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index 801aa86ff9..be29ba0aa3 100644 --- a/fpu/softfloat-parts.c.inc +++ b/fpu/softfloat-parts.c.inc @@ -112,7 +112,7 @@ static void partsN(canonicalize)(FloatPartsN *p, float_= status *status, if (likely(frac_eqz(p))) { p->cls =3D float_class_zero; } else if (status->flush_inputs_to_zero) { - float_raise(float_flag_input_denormal, status); + float_raise(float_flag_iflush_denormal, status); p->cls =3D float_class_zero; frac_clear(p); } else { --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622089109; cv=none; d=zohomail.com; s=zohoarc; b=IxP5EDXC4nkLKjAOPW4k/AlGvSS2qsOc8rPhfjT9eKGR8F+jQt1OilXOLTX58PsbzIkA0P7R40CK6T9fc/B9BrdKLA9KpMcoWrzn7Iduh0Mt6jXduqZEKQx7+ZqQwRAOc6CMLCFavpOCwV6/ELwgp/FtaUAbAgQz2SadvQ2nddM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622089109; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yeOiXbtTOrQ1HO+ZU3eJmyLjRTBzgH1M55NyXilFo1c=; b=ZCgaZiKzw63xyUU1csImZAf5JRcIUJboYr3DVjXjXalbe2sl1prtD22fI2PBHrILZ6RUOljlJ0BuxbD+j28ogSa96G01NNF+swkMAggFytZFG1aMaSFhbEzRRqogbsMsryClLcrSXlUBKN05kuoOkHRBD5OwfpLllC6c08uNY1w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622089109909433.9132632747237; Wed, 26 May 2021 21:18:29 -0700 (PDT) Received: from localhost ([::1]:49078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7TY-0001WM-Sa for importer@patchew.org; Thu, 27 May 2021 00:18:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PQ-0001Yw-GF for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:14 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:35726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PN-0007A7-8Q for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:12 -0400 Received: by mail-pf1-x429.google.com with SMTP id g18so2661065pfr.2 for ; Wed, 26 May 2021 21:14:08 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yeOiXbtTOrQ1HO+ZU3eJmyLjRTBzgH1M55NyXilFo1c=; b=DOeGpaJ9PQVKA0HzYycc+VcRYAoAX5WrELrsJQX0YoYUEbTVPgixqgKIol+Or2Z3AD NmDTaf5vKx5p435eqr9srgNPLgTarWewQavwlqHaTk12CZ6qsPNR8W8L1Dgtx0gJ5tqE dSIOA6Y0362AZhlf2SVj5wR56RxgyMxXKwPPlaP/9twHazWe7XSW7A7TN5PLdwU0jFmY XBJ9VLsRb4CqGClcG0sgD7Ymnof2Efv3cQy5dKZetn2s3y9XhJipmxlghwxQDbIusoVK I2XT+aimc9MNfiQBrPi8wZDPu3FO0o4dvQH0vVMaTvwkkMXYwnXVPnqoAOALU8qfly63 3XFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yeOiXbtTOrQ1HO+ZU3eJmyLjRTBzgH1M55NyXilFo1c=; b=m4wc6EZwmcN3b5a6FZj3zW/BuT8D3pKR7hgwV40UMkogsoUzEMrOoqzE58tXFGx5lS 0uU1MysM0HoDcXp0b1etGkEEdhCI0ShqRBTyo5Pmhh9FmBN2+yBmdsXRAxhTJqXjZKWk EDIBSNnUTU5VKejaf8ynnLiSQ3X32fSgSAgioLMCZysyXHxpe4cleH1Hz12G73xkS3f5 2VnBXsUZj8E2k3XYpias39JGD53mFQY7unhAuFdG4JxgP6Sv8Qns1Q61nyLDsUUqQV3b tiK8knDGas84g7lJt/NfW1LQr9JDJvxPdPrWk7XbCXs2B9BjXReLXg5cVYpYfh5KVoXv KdnQ== X-Gm-Message-State: AOAM531diZ0p5BJC7HZ0XuBzP1DcRhx6WFjr2w7FLsULT36cDobH5dYO KPmQhTDWFlwrZfLPp5086EvxXvIOCBwcmA== X-Google-Smtp-Source: ABdhPJw1Lf/slX24ydCi1ORLXxAzv4NkI3nHNeFjNFsgfyHfPvQcAtzr/yv87JX+7LFlFTCEDDatSw== X-Received: by 2002:aa7:9a0e:0:b029:2dc:70d1:2224 with SMTP id w14-20020aa79a0e0000b02902dc70d12224mr1846798pfj.1.1622088847737; Wed, 26 May 2021 21:14:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 02/11] softfloat: Rename float_flag_output_denormal to float_flag_oflush_denormal Date: Wed, 26 May 2021 21:13:56 -0700 Message-Id: <20210527041405.391567-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The new name emphasizes that the output denormal has been flushed to zero. Patch created mechanically using: sed -i s,float_flag_output_denormal,float_flag_oflush_denormal,g \ $(git grep -l float_flag_output_denormal) Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/fpu/softfloat-types.h | 2 +- fpu/softfloat.c | 2 +- target/arm/vfp_helper.c | 2 +- target/i386/tcg/fpu_helper.c | 2 +- target/mips/tcg/msa_helper.c | 2 +- target/rx/op_helper.c | 2 +- target/tricore/fpu_helper.c | 6 +++--- fpu/softfloat-parts.c.inc | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 719b4d2531..e2d70ff556 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -149,7 +149,7 @@ enum { float_flag_underflow =3D 16, float_flag_inexact =3D 32, float_flag_iflush_denormal =3D 64, - float_flag_output_denormal =3D 128 + float_flag_oflush_denormal =3D 128 }; =20 /* diff --git a/fpu/softfloat.c b/fpu/softfloat.c index fa3a691a5a..cb077cf111 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -4591,7 +4591,7 @@ floatx80 roundAndPackFloatx80(FloatX80RoundPrec round= ingPrecision, bool zSign, } if ( zExp <=3D 0 ) { if (status->flush_to_zero) { - float_raise(float_flag_output_denormal, status); + float_raise(float_flag_oflush_denormal, status); return packFloatx80(zSign, 0, 0); } isTiny =3D status->tininess_before_rounding diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c index 0a43ccc6fa..5864553718 100644 --- a/target/arm/vfp_helper.c +++ b/target/arm/vfp_helper.c @@ -46,7 +46,7 @@ static inline int vfp_exceptbits_from_host(int host_bits) if (host_bits & float_flag_overflow) { target_bits |=3D 4; } - if (host_bits & (float_flag_underflow | float_flag_output_denormal)) { + if (host_bits & (float_flag_underflow | float_flag_oflush_denormal)) { target_bits |=3D 8; } if (host_bits & float_flag_inexact) { diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index c402daf659..c9779a9fe0 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -3001,7 +3001,7 @@ void update_mxcsr_from_sse_status(CPUX86State *env) (flags & float_flag_overflow ? FPUS_OE : 0) | (flags & float_flag_underflow ? FPUS_UE : 0) | (flags & float_flag_inexact ? FPUS_PE : 0) | - (flags & float_flag_output_denormal ? FPUS_UE | FPUS_PE= : + (flags & float_flag_oflush_denormal ? FPUS_UE | FPUS_PE= : 0)); } =20 diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index 992d348aa3..51791f946b 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -6240,7 +6240,7 @@ static inline int update_msacsr(CPUMIPSState *env, in= t action, int denormal) } =20 /* Set Inexact (I) and Underflow (U) when flushing outputs to zero */ - if ((ieee_exception_flags & float_flag_output_denormal) && + if ((ieee_exception_flags & float_flag_oflush_denormal) && (env->active_tc.msacsr & MSACSR_FS_MASK) !=3D 0) { mips_exception_flags |=3D FP_INEXACT; if (action & CLEAR_FS_UNDERFLOW) { diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index eb2c4a41fb..ef904eb5f9 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -98,7 +98,7 @@ static void update_fpsw(CPURXState *env, float32 ret, uin= tptr_t retaddr) SET_FPSW(X); } if ((xcpt & (float_flag_iflush_denormal - | float_flag_output_denormal)) + | float_flag_oflush_denormal)) && !FIELD_EX32(env->fpsw, FPSW, DN)) { env->fpsw =3D FIELD_DP32(env->fpsw, FPSW, CE, 1); } diff --git a/target/tricore/fpu_helper.c b/target/tricore/fpu_helper.c index cb7ee7dd35..7c826f9b7b 100644 --- a/target/tricore/fpu_helper.c +++ b/target/tricore/fpu_helper.c @@ -43,7 +43,7 @@ static inline uint8_t f_get_excp_flags(CPUTriCoreState *e= nv) & (float_flag_invalid | float_flag_overflow | float_flag_underflow - | float_flag_output_denormal + | float_flag_oflush_denormal | float_flag_divbyzero | float_flag_inexact); } @@ -99,7 +99,7 @@ static void f_update_psw_flags(CPUTriCoreState *env, uint= 8_t flags) some_excp =3D 1; } =20 - if (flags & float_flag_underflow || flags & float_flag_output_denormal= ) { + if (flags & float_flag_underflow || flags & float_flag_oflush_denormal= ) { env->FPU_FU =3D 1 << 31; some_excp =3D 1; } @@ -109,7 +109,7 @@ static void f_update_psw_flags(CPUTriCoreState *env, ui= nt8_t flags) some_excp =3D 1; } =20 - if (flags & float_flag_inexact || flags & float_flag_output_denormal) { + if (flags & float_flag_inexact || flags & float_flag_oflush_denormal) { env->PSW |=3D 1 << 26; some_excp =3D 1; } diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index be29ba0aa3..72e2b24539 100644 --- a/fpu/softfloat-parts.c.inc +++ b/fpu/softfloat-parts.c.inc @@ -227,7 +227,7 @@ static void partsN(uncanon_normal)(FloatPartsN *p, floa= t_status *s, } frac_shr(p, frac_shift); } else if (s->flush_to_zero) { - flags |=3D float_flag_output_denormal; + flags |=3D float_flag_oflush_denormal; p->cls =3D float_class_zero; exp =3D 0; frac_clear(p); --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622089109; cv=none; d=zohomail.com; s=zohoarc; b=lXv/LcW+L8SJMCiLWSbrj6gAPjeGLZXbVOZB2YQWjyAh4w11ddRBA0dZWOi8lhOwpn1Nd6plP/MYrKcznzX9lDfK8d2xNarvSeoIhPld0jq+PXPTA5yKCmD/nbISj9HkJ/WdWVKvw1riuGGoVRxabhBr5AbulQmMoZer/Yn3QqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622089109; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u4kpsKTdjq/zX6a8j112MCdu1Vy0D0wqzYtCbnaww7Q=; b=mmQNozi4F5eLxUkV3IGuHte+V9tug0Eete5zQ78wVDfr+RrWZCuFhiFPgRsoHokbPvzPMmIT7M7Dw4suJspKwMwTFHRBgaoXcdOdWew21AjAG9plcRiGqUS1iLguodJE5IOYvEMnAsJ4qvdF2+M6wpOyxCQibwvfNAmdhxMTen0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622089109887651.4691468341084; Wed, 26 May 2021 21:18:29 -0700 (PDT) Received: from localhost ([::1]:48966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7TY-0001Rt-QW for importer@patchew.org; Thu, 27 May 2021 00:18:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PP-0001Yd-S8 for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:12 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:42969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PN-0007AL-JQ for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:11 -0400 Received: by mail-pf1-x429.google.com with SMTP id x18so2640519pfi.9 for ; Wed, 26 May 2021 21:14:09 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u4kpsKTdjq/zX6a8j112MCdu1Vy0D0wqzYtCbnaww7Q=; b=aC5L/ZYqCS5HefgxX0l/HV4IqbfBrDB5Io10H1OKw0HccdKWMv/R5n2etKcRh41xuC Jq76wCKYfGRWfbNYlDuxAx977LquvacbEgHI615MBUqH7AXGQtV/cxDEzW6eFCbOTv4V AN8DK/s66AnwpGRESmmilBZxZ/BDxvTuYace48rwHPLNJr9/4wkMI5L9+imp+Ll3mt/2 zuDelYZTOBLwk22wLsZ6Wi6qpkIyxuAhiWAq+azVjA4PEScD9hodYaltdonY6xcOSjNb Dmorkd9UBqkZNahV0hkJeAFoesG7nLVc7ld2cd7aEMlRkLInrH4nM7OaF282jDfIH/lA whKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u4kpsKTdjq/zX6a8j112MCdu1Vy0D0wqzYtCbnaww7Q=; b=seN7o0d/JbhL8x5H1ZJuCUjsXPyGtvgD18WpsLS/GTuOjU5wUenNQycvAQBO38jKl/ dirgOlO4n5oFKplHo3Nlmv8x5YYAs+9ewsgK762l2vCXGzUIegTTVq+uvuRKplYIpfbM D8K9VAObgSw3UHKPmp3I6kQ71wAz90pT+J5l0GFo7eaToCRv9o1K4Aii/sPDPqu4Vyh+ PkPgUQnrsBldzgbqk0XCqXXaOTeIlpNoYbk8QdHQofj8z7lGgqYkw4TFjN48BAf/Qw9X iYFuRu7s0lgFPZgI32plhRvmBbcSaRZuz0moVXPoDH2JAl4I3SUkzfnbjcPh7Yiw+ppl 0bFw== X-Gm-Message-State: AOAM532pjFstsLrCZkHHtue3/DB2OnHj5tYmfQK15PZ3uSlZYfFzLdBK Jiec5mCYjtWDdfUD3ucECyDCROm+6z6kKg== X-Google-Smtp-Source: ABdhPJxGqtsd84nHNfr0MfqgucRVbL538gKhvqzGjzGPXAK9P6BCvxtuPeNaIyinJ9P2ZyoARaIdMw== X-Received: by 2002:aa7:8506:0:b029:2e4:dae2:9d89 with SMTP id v6-20020aa785060000b02902e4dae29d89mr1797802pfn.78.1622088848315; Wed, 26 May 2021 21:14:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 03/11] softfloat: Introduce float_flag_inorm_denormal Date: Wed, 26 May 2021 21:13:57 -0700 Message-Id: <20210527041405.391567-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Create a new exception flag for reporting input denormals that are not flushed to zero, they are normalized and treated as normal numbers. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- include/fpu/softfloat-types.h | 15 ++++--- fpu/softfloat.c | 84 +++++++++++------------------------ fpu/softfloat-parts.c.inc | 1 + 3 files changed, 36 insertions(+), 64 deletions(-) diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index e2d70ff556..174100e50e 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -143,13 +143,14 @@ typedef enum __attribute__((__packed__)) { */ =20 enum { - float_flag_invalid =3D 1, - float_flag_divbyzero =3D 4, - float_flag_overflow =3D 8, - float_flag_underflow =3D 16, - float_flag_inexact =3D 32, - float_flag_iflush_denormal =3D 64, - float_flag_oflush_denormal =3D 128 + float_flag_invalid =3D 0x0001, + float_flag_divbyzero =3D 0x0002, + float_flag_overflow =3D 0x0004, + float_flag_underflow =3D 0x0008, + float_flag_inexact =3D 0x0010, + float_flag_inorm_denormal =3D 0x0020, /* denormal input, normalized = */ + float_flag_iflush_denormal =3D 0x0040, /* denormal input, flushed to = zero */ + float_flag_oflush_denormal =3D 0x0080, /* denormal result, flushed to= zero */ }; =20 /* diff --git a/fpu/softfloat.c b/fpu/softfloat.c index cb077cf111..e54cdb274d 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -126,61 +126,23 @@ this code that are retained. * denormal/inf/NaN; (2) when operands are not guaranteed to lead to a 0 r= esult * and the result is < the minimum normal. */ -#define GEN_INPUT_FLUSH__NOCHECK(name, soft_t) \ + +#define GEN_INPUT_FLUSH(name, soft_t) \ static inline void name(soft_t *a, float_status *s) \ { \ if (unlikely(soft_t ## _is_denormal(*a))) { \ - *a =3D soft_t ## _set_sign(soft_t ## _zero, \ - soft_t ## _is_neg(*a)); \ - float_raise(float_flag_iflush_denormal, s); \ + if (s->flush_inputs_to_zero) { \ + *a =3D soft_t ## _set_sign(0, soft_t ## _is_neg(*a)); \ + float_raise(float_flag_iflush_denormal, s); \ + } else { \ + float_raise(float_flag_inorm_denormal, s); \ + } \ } \ } =20 -GEN_INPUT_FLUSH__NOCHECK(float32_input_flush__nocheck, float32) -GEN_INPUT_FLUSH__NOCHECK(float64_input_flush__nocheck, float64) -#undef GEN_INPUT_FLUSH__NOCHECK - -#define GEN_INPUT_FLUSH1(name, soft_t) \ - static inline void name(soft_t *a, float_status *s) \ - { \ - if (likely(!s->flush_inputs_to_zero)) { \ - return; \ - } \ - soft_t ## _input_flush__nocheck(a, s); \ - } - -GEN_INPUT_FLUSH1(float32_input_flush1, float32) -GEN_INPUT_FLUSH1(float64_input_flush1, float64) -#undef GEN_INPUT_FLUSH1 - -#define GEN_INPUT_FLUSH2(name, soft_t) \ - static inline void name(soft_t *a, soft_t *b, float_status *s) \ - { \ - if (likely(!s->flush_inputs_to_zero)) { \ - return; \ - } \ - soft_t ## _input_flush__nocheck(a, s); \ - soft_t ## _input_flush__nocheck(b, s); \ - } - -GEN_INPUT_FLUSH2(float32_input_flush2, float32) -GEN_INPUT_FLUSH2(float64_input_flush2, float64) -#undef GEN_INPUT_FLUSH2 - -#define GEN_INPUT_FLUSH3(name, soft_t) \ - static inline void name(soft_t *a, soft_t *b, soft_t *c, float_status = *s) \ - { \ - if (likely(!s->flush_inputs_to_zero)) { \ - return; \ - } \ - soft_t ## _input_flush__nocheck(a, s); \ - soft_t ## _input_flush__nocheck(b, s); \ - soft_t ## _input_flush__nocheck(c, s); \ - } - -GEN_INPUT_FLUSH3(float32_input_flush3, float32) -GEN_INPUT_FLUSH3(float64_input_flush3, float64) -#undef GEN_INPUT_FLUSH3 +GEN_INPUT_FLUSH(float32_input_flush, float32) +GEN_INPUT_FLUSH(float64_input_flush, float64) +#undef GEN_INPUT_FLUSH =20 /* * Choose whether to use fpclassify or float32/64_* primitives in the gene= rated @@ -353,7 +315,8 @@ float32_gen2(float32 xa, float32 xb, float_status *s, goto soft; } =20 - float32_input_flush2(&ua.s, &ub.s, s); + float32_input_flush(&ua.s, s); + float32_input_flush(&ub.s, s); if (unlikely(!pre(ua, ub))) { goto soft; } @@ -384,7 +347,8 @@ float64_gen2(float64 xa, float64 xb, float_status *s, goto soft; } =20 - float64_input_flush2(&ua.s, &ub.s, s); + float64_input_flush(&ua.s, s); + float64_input_flush(&ub.s, s); if (unlikely(!pre(ua, ub))) { goto soft; } @@ -2161,7 +2125,9 @@ float32_muladd(float32 xa, float32 xb, float32 xc, in= t flags, float_status *s) goto soft; } =20 - float32_input_flush3(&ua.s, &ub.s, &uc.s, s); + float32_input_flush(&ua.s, s); + float32_input_flush(&ub.s, s); + float32_input_flush(&uc.s, s); if (unlikely(!f32_is_zon3(ua, ub, uc))) { goto soft; } @@ -2232,7 +2198,9 @@ float64_muladd(float64 xa, float64 xb, float64 xc, in= t flags, float_status *s) goto soft; } =20 - float64_input_flush3(&ua.s, &ub.s, &uc.s, s); + float64_input_flush(&ua.s, s); + float64_input_flush(&ub.s, s); + float64_input_flush(&uc.s, s); if (unlikely(!f64_is_zon3(ua, ub, uc))) { goto soft; } @@ -3988,7 +3956,8 @@ float32_hs_compare(float32 xa, float32 xb, float_stat= us *s, bool is_quiet) goto soft; } =20 - float32_input_flush2(&ua.s, &ub.s, s); + float32_input_flush(&ua.s, s); + float32_input_flush(&ub.s, s); if (isgreaterequal(ua.h, ub.h)) { if (isgreater(ua.h, ub.h)) { return float_relation_greater; @@ -4038,7 +4007,8 @@ float64_hs_compare(float64 xa, float64 xb, float_stat= us *s, bool is_quiet) goto soft; } =20 - float64_input_flush2(&ua.s, &ub.s, s); + float64_input_flush(&ua.s, s); + float64_input_flush(&ub.s, s); if (isgreaterequal(ua.h, ub.h)) { if (isgreater(ua.h, ub.h)) { return float_relation_greater; @@ -4230,7 +4200,7 @@ float32 QEMU_FLATTEN float32_sqrt(float32 xa, float_s= tatus *s) goto soft; } =20 - float32_input_flush1(&ua.s, s); + float32_input_flush(&ua.s, s); if (QEMU_HARDFLOAT_1F32_USE_FP) { if (unlikely(!(fpclassify(ua.h) =3D=3D FP_NORMAL || fpclassify(ua.h) =3D=3D FP_ZERO) || @@ -4257,7 +4227,7 @@ float64 QEMU_FLATTEN float64_sqrt(float64 xa, float_s= tatus *s) goto soft; } =20 - float64_input_flush1(&ua.s, s); + float64_input_flush(&ua.s, s); if (QEMU_HARDFLOAT_1F64_USE_FP) { if (unlikely(!(fpclassify(ua.h) =3D=3D FP_NORMAL || fpclassify(ua.h) =3D=3D FP_ZERO) || diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index 72e2b24539..16d4425419 100644 --- a/fpu/softfloat-parts.c.inc +++ b/fpu/softfloat-parts.c.inc @@ -119,6 +119,7 @@ static void partsN(canonicalize)(FloatPartsN *p, float_= status *status, int shift =3D frac_normalize(p); p->cls =3D float_class_normal; p->exp =3D fmt->frac_shift - fmt->exp_bias - shift + 1; + float_raise(float_flag_inorm_denormal, status); } } else if (likely(p->exp < fmt->exp_max) || fmt->arm_althp) { p->cls =3D float_class_normal; --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622089222; cv=none; d=zohomail.com; s=zohoarc; b=Qe0qFjmSysgQZEujfy39rwa/cZNly7gZdhCGdeRuJRsv0oLemT1737DbK9TIcWcMG4UgiKccCDQvNxauHXt8oM8T9JT5jInS5/Owo3mJoWopJYpGZFPQoNYqZzeAisY6ggmXEdL29LzvIG98mJXh9r/mCgBvf9mqSTh/9de+m9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622089221; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=prrVCPPqFq5mBd19RF3H8SGsVxMT7ZBmHrhUofi0h9k=; b=Nga99Kk2qpCafW2xBal9Yf4/Jvr5/9+fHVnp6sHH6TA3ihgzNgwkDZUl5q4yTyxmPbYVvIU4pfQI269ND5MMZZ5fe5p+ILTk4rnfTAADBYKNOoNVXnGcf1SRa47dVnEXv85YA3lxlO810yNHxKd3+EiQj5Mhr8OH7UTub51X9vs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622089221993685.4834354522685; Wed, 26 May 2021 21:20:21 -0700 (PDT) Received: from localhost ([::1]:57506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7VM-00075W-Ut for importer@patchew.org; Thu, 27 May 2021 00:20:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PQ-0001Yz-TA for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:14 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:33610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PO-0007Bs-8w for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:12 -0400 Received: by mail-pg1-x534.google.com with SMTP id i5so2759353pgm.0 for ; Wed, 26 May 2021 21:14:09 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=prrVCPPqFq5mBd19RF3H8SGsVxMT7ZBmHrhUofi0h9k=; b=nvO+VL5TdeV4l/lVsc5SVfS6lED5u+mQiXi5Cl/f5Zy81rUQ7erxRU0sM5Yvs0wSk4 uuWuhBBNvUWfdL8NDajxnf2HdcxIyz5L1MLgHu1TPOSVKA6XJLmcqrmd4oCG0F5jMoak 4OfiAAkXk9cmrUgYGcLwOtQXeX6DC/7kvpyWxfHx923UPVAvSlp1E7zPmwKHNbs4t903 oFfKKCGFoO/T0uWlsamz1gzkkec19aZm7Mx4jyz8MwiXDAKQvkm2Rj895aj4ON20RsZS /7H+OuLP0Gl/RW2RFFDEQgvNpzZvdRauFyifrNXSn12FXLBXtt94kstH44dqJaA4Il0c DdaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=prrVCPPqFq5mBd19RF3H8SGsVxMT7ZBmHrhUofi0h9k=; b=MVsBmxPkJlciCYzfIzn2VVdMQfS2wiu5+lDlAGf2gTl3RT5JcMEvdFdxgsLh166eON EuAo+CdzbdwS4k2MKytEYC85UqfVm8flN8lC9SqQhySyoY82c4prjl7C7z6VmpZAWZpB u7GBoQMU45iz34s84NS5XfKP5UWomras/HAk/8e0S/V41ZQAYbxBzuDA0jKlj9eDPVxt RQ+1TRys9ovvTYDiQYLROKK+Xx1RfIYt/fMLn3c5nr+hvwKO5qY3plJCkfZ/snMrxa95 Ol3r9hSEA2/yYWuANzYCgF7O1gei7wY86BfEE2Xv+S4HJ6O1etaYR1TJxcaYx/aFZ89U iCGw== X-Gm-Message-State: AOAM532e8e4vyracev6Z+LXaUMt+/RtCHkR5xfVrnF/jLN+7n70c7GI/ UjQlVgGqQ/iUEyJMzKwjcxY0Y6DGLWugVw== X-Google-Smtp-Source: ABdhPJyfLy3N+pVrFmSVt2TqeW00bbVy+Ro4M8oLatImKnoMwbjoUSds5h+FGvnwr5nJMj/y/KVZMA== X-Received: by 2002:a63:4b52:: with SMTP id k18mr1885959pgl.190.1622088848899; Wed, 26 May 2021 21:14:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 04/11] softfloat: Introduce float_flag_result_denormal Date: Wed, 26 May 2021 21:13:58 -0700 Message-Id: <20210527041405.391567-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Create a new exception flag for reporting output denormals that are not flushed to zero. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/fpu/softfloat-types.h | 3 ++- fpu/softfloat-parts.c.inc | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 174100e50e..83632aa09f 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -151,6 +151,7 @@ enum { float_flag_inorm_denormal =3D 0x0020, /* denormal input, normalized = */ float_flag_iflush_denormal =3D 0x0040, /* denormal input, flushed to = zero */ float_flag_oflush_denormal =3D 0x0080, /* denormal result, flushed to= zero */ + float_flag_result_denormal =3D 0x0100, /* denormal result, not flushe= d */ }; =20 /* @@ -170,8 +171,8 @@ typedef enum __attribute__((__packed__)) { */ =20 typedef struct float_status { + uint16_t float_exception_flags; FloatRoundMode float_rounding_mode; - uint8_t float_exception_flags; FloatX80RoundPrec floatx80_rounding_precision; bool tininess_before_rounding; /* should denormalised results go to zero and set the inexact flag? */ diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index 16d4425419..a21fcec3e5 100644 --- a/fpu/softfloat-parts.c.inc +++ b/fpu/softfloat-parts.c.inc @@ -276,8 +276,12 @@ static void partsN(uncanon_normal)(FloatPartsN *p, flo= at_status *s, if (is_tiny && (flags & float_flag_inexact)) { flags |=3D float_flag_underflow; } - if (exp =3D=3D 0 && frac_eqz(p)) { - p->cls =3D float_class_zero; + if (exp =3D=3D 0) { + if (frac_eqz(p)) { + p->cls =3D float_class_zero; + } else { + flags |=3D float_flag_result_denormal; + } } } p->exp =3D exp; --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622089221; cv=none; d=zohomail.com; s=zohoarc; b=JjB2ANNfBB7FFfkwhFSqE6SKKdKU+7J+EkqrANOl/hTbAWOYPADAeNTiy74qk79yKYwygVR2m0Uu3kcpPUAPAstQ+nqULZwQZtudTbq401+BDyPP/DlcB/GmEVSt5q+2wZoBfnD9Xw8RzJIAkWXdNe2oB90KqO5D4siMgKHO7ig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622089221; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nT+GpFTOsWsQfC1YmI7kL70ZhWTUUU2ohdIk/CWngKU=; b=fmYxYZ2PNyXF2apiuGGsfIjKPcTYQJbFgfcXnH7mtMkIzCZYe1qx/Lexfq+g4haPlPOL5181NuqqMbS85/tBnSiEPvP8RBp909tMGDh2RA+hYiA2W/N29eRz2p/XF95BD4O5d+tgHASpv/NquRDj4n/92nfofWjVMYuv0S+q3iI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622089221254361.88158863795127; Wed, 26 May 2021 21:20:21 -0700 (PDT) Received: from localhost ([::1]:57470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7VM-00073x-7e for importer@patchew.org; Thu, 27 May 2021 00:20:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PS-0001ZO-F6 for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:16 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:40923) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PP-0007Cz-2t for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:14 -0400 Received: by mail-pj1-x102a.google.com with SMTP id lr4-20020a17090b4b84b02901600455effdso433645pjb.5 for ; Wed, 26 May 2021 21:14:10 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nT+GpFTOsWsQfC1YmI7kL70ZhWTUUU2ohdIk/CWngKU=; b=CMIL1BD0VotPQt8sA4mlXbiVKdWSM9vCbWTxOZqHQzzNQnnyKJHL1bD+6m2bgDdO8w ATqsrrr7nLMo+f4pzLkY8rpnStSOFLnrXp2jVc3j/wYHWRFqgPKO6HQxEYPszJJA8Hfl NBSWn9tUt+nIzBqglE0AAuuXPQ7anU2bcJ8vmCsDjXN/wEHOJZ9r2QJwu/mvf5WG/dDq GIdNrGpo6BkMNu9qqDh5uoBbb4huKTFJnydcK29c71EL9avBgoctoaG92/KQxOUV9i7b ozdtmzkERH4dlFOmHOaDNYmelBhTLtIS7f1BAah0BhddXOV0HDI64EuR33hP9IJe+ogQ uhHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nT+GpFTOsWsQfC1YmI7kL70ZhWTUUU2ohdIk/CWngKU=; b=pCGNC2KDg47SJhk8HVG3zWq3Z6hIrQShCmJbz7F9GgBjnBChu8eCyFT+cwHwj9Oaux Hm+CZCKdNOSbFMfvXwGJ1i9CbzYRg6TVzwXfzlLRmpF90/cFAUI4AHPXxwzH8Se7CDI/ tRU8qAo3nGRNgxqqUP4IPjP2zZi99pzaMaT/7FFHoicvfncPH3OwMueLGJzJINzh8kO3 VnOt4X3oKdckr6KPYDg53nTyuJWrsnFjxlZNELm0JPxlyya8/H689VSqIciM9dt2mZkX fPYSURjdFWmy1ZxnfJagxOgJikVdeFIiAZsLECzKfcWluQ5BAOoR48Nj0mV2iTvLdRro hX2w== X-Gm-Message-State: AOAM533AgSkn7ztRz1uCb4HCwUlDY+w7Ol9oJl2MRUgupglwsP3/Pbsr pbl2L1CuvVGeTuOMvA1z+Gn7kxIIClzMfQ== X-Google-Smtp-Source: ABdhPJz71wpr2YSKFkULOeZHUwoG35USy3mqd2w2hZinuNsCxa8vAyYMI7zQYLrIh8GgCKOEf3o6Mw== X-Received: by 2002:a17:90a:4105:: with SMTP id u5mr1594803pjf.45.1622088849541; Wed, 26 May 2021 21:14:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 05/11] target/i386: Use float_flag_inorm_denormal Date: Wed, 26 May 2021 21:13:59 -0700 Message-Id: <20210527041405.391567-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The FSR and MXCSR DE flags have the semantics of the new flag. We get to remove a big fixme in update_mxcsr_from_sse_status vs float_flag_iflush_denormal. Reported-by: Michael Morrell Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index c9779a9fe0..edc550de55 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -148,7 +148,7 @@ static void merge_exception_flags(CPUX86State *env, uin= t8_t old_flags) (new_flags & float_flag_overflow ? FPUS_OE : 0) | (new_flags & float_flag_underflow ? FPUS_UE : 0) | (new_flags & float_flag_inexact ? FPUS_PE : 0) | - (new_flags & float_flag_iflush_denormal ? FPUS_DE := 0))); + (new_flags & float_flag_inorm_denormal ? FPUS_DE : = 0))); } =20 static inline floatx80 helper_fdiv(CPUX86State *env, floatx80 a, floatx80 = b) @@ -1742,7 +1742,7 @@ void helper_fxtract(CPUX86State *env) int shift =3D clz64(temp.l.lower); temp.l.lower <<=3D shift; expdif =3D 1 - EXPBIAS - shift; - float_raise(float_flag_iflush_denormal, &env->fp_status); + float_raise(float_flag_inorm_denormal, &env->fp_status); } else { expdif =3D EXPD(temp) - EXPBIAS; } @@ -2976,7 +2976,8 @@ void update_mxcsr_status(CPUX86State *env) (mxcsr & FPUS_ZE ? float_flag_divbyzero : 0)= | (mxcsr & FPUS_OE ? float_flag_overflow : 0) | (mxcsr & FPUS_UE ? float_flag_underflow : 0)= | - (mxcsr & FPUS_PE ? float_flag_inexact : 0), + (mxcsr & FPUS_PE ? float_flag_inexact : 0) | + (mxcsr & FPUS_DE ? float_flag_inorm_denormal= : 0), &env->sse_status); =20 /* set denormals are zero */ @@ -2989,20 +2990,13 @@ void update_mxcsr_status(CPUX86State *env) void update_mxcsr_from_sse_status(CPUX86State *env) { uint8_t flags =3D get_float_exception_flags(&env->sse_status); - /* - * The MXCSR denormal flag has opposite semantics to - * float_flag_iflush_denormal (the softfloat code sets that flag - * only when flushing input denormals to zero, but SSE sets it - * only when not flushing them to zero), so is not converted - * here. - */ env->mxcsr |=3D ((flags & float_flag_invalid ? FPUS_IE : 0) | (flags & float_flag_divbyzero ? FPUS_ZE : 0) | (flags & float_flag_overflow ? FPUS_OE : 0) | (flags & float_flag_underflow ? FPUS_UE : 0) | (flags & float_flag_inexact ? FPUS_PE : 0) | - (flags & float_flag_oflush_denormal ? FPUS_UE | FPUS_PE= : - 0)); + (flags & float_flag_inorm_denormal ? FPUS_DE : 0) | + (flags & float_flag_oflush_denormal ? FPUS_UE | FPUS_PE= : 0)); } =20 void helper_update_mxcsr(CPUX86State *env) --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622089111; cv=none; d=zohomail.com; s=zohoarc; b=kYfr8FESskHeaClUpwHLR8VLWB6dKK8zRTXV0OTC03SEVVBXy4fqF8m2VlNHhV9GEzB1bfRR0EzTriRd5zm1fBM6A2BEqZWVwHK0RlfFT6CsGl/9wEwi+66eGLBoZW00mZlcVYITnkim+ERIC1onBxpztvA9qaifOQOKhqDhHnU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622089111; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GEYVI8LFk6gKuKrRnF8fi7M93S+ekzhJWlI6Apgn4eU=; b=GuIxWsy+7JOhTZCbmsHI3GddyBr0Tnx6Pjp6Xxk6Wld8afxkoq9syj6c+qZYSk4DTPdif+Lvqv3YigoWuvEKEoPlB6S7d13Oko8tVQ8elpHb1g6FpuB+fV0DeYK4h8o85PhdfKEygD9rofiqBSJwUI4S04AjVyZmvi8JLUv7Msw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622089111387302.90477059873285; Wed, 26 May 2021 21:18:31 -0700 (PDT) Received: from localhost ([::1]:49262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7Ta-0001dX-ET for importer@patchew.org; Thu, 27 May 2021 00:18:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PU-0001Zs-Ce for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:16 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:34417) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PP-0007D5-Bb for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:15 -0400 Received: by mail-pf1-x436.google.com with SMTP id q25so2664685pfn.1 for ; Wed, 26 May 2021 21:14:10 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GEYVI8LFk6gKuKrRnF8fi7M93S+ekzhJWlI6Apgn4eU=; b=p8LZ1BKVgZqYKudYMjH7qzvO4nH/DHzpAfA/EgRYpkOzk4JXDkVsDBhE5RQBPJjAIy uL2zyDB4eHXvUTcnUY+zBJfNhDxuPThEtBTN9LnP9mA7rOoCGk7fXMd8A2Lp1mDKTy9G 4V3vToc6rDGXnRx1s0uWgwGRMeFH0gk3xOv0UfDVNLVPBmUrgBgTSHEswXN0SF5ExBY3 Z0oArZ/4sKcz/sadFLDTiUDu0C2ormvmeE1/7IyRH/d8QSLR+WgtqcxOEYV6ExpUvO54 m4cw8OammlqDiQjCa3TpeJNFojZpAfvP65N3fWAY7esfGwGOVlTgzuK/3doIoyS4swF9 DXyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GEYVI8LFk6gKuKrRnF8fi7M93S+ekzhJWlI6Apgn4eU=; b=l2BL3bNi6SC+DU42VqbrvsCYYpV6HHrX9roY3dMKWKayGUsDdKN+3t73Wr18qlFdC9 YirhQhF/V3tfWW595GxNSILC0LPMwQjllisA3X5qWN0PcBBC9pgcdbj5Loe/tLLmn0OP WAzAn0oaKJNXhfIj6BCPt+MCJmvN0W753e2v111QPd56wfdgsNHMFy6hcXXQNOUU8xHv f6a/NHsFGmJl0Rn1l4qJ1jrRftHeCh+ftGpLNa9kBCWbrtzc7UH0KtKN+jioPFdELtaj lGfYGVD4smKhkpJs0+DR6DKIBrVnaDg7MhKQ166OZJLkTfUe3E3cNuuNWqwmT7mdaE24 K2mQ== X-Gm-Message-State: AOAM533GdAsuVq0UX75ZAuuAtduKsy/6wJrE9dOLK+7ip5qxYrT53RHe zYEccaFsCSnhjgA8ZZ38VZK9soY9U10Raw== X-Google-Smtp-Source: ABdhPJzgXUUT40s0378mIvZ8f6UFJ7XtHVXuq0UBTycLcb2+vjhu1GHaF0ZroqXUTz74hGE8sEIIiA== X-Received: by 2002:a63:4b18:: with SMTP id y24mr1871088pga.438.1622088850164; Wed, 26 May 2021 21:14:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 06/11] target/rx: Handle the FPSW.DN bit in helper_set_fpsw Date: Wed, 26 May 2021 21:14:00 -0700 Message-Id: <20210527041405.391567-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Both input and output denormals flush to zero when DN is set. Cc: Philippe Mathieu-Daud=C3=A9 Cc: Yoshinori Sato Signed-off-by: Richard Henderson --- target/rx/op_helper.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index ef904eb5f9..2139def3b2 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -127,13 +127,20 @@ void helper_set_fpsw(CPURXState *env, uint32_t val) float_round_down, }; uint32_t fpsw =3D env->fpsw; + bool dn; + fpsw |=3D 0x7fffff03; val &=3D ~0x80000000; fpsw &=3D val; FIELD_DP32(fpsw, FPSW, FS, FIELD_EX32(fpsw, FPSW, FLAGS) !=3D 0); env->fpsw =3D fpsw; - set_float_rounding_mode(roundmode[FIELD_EX32(env->fpsw, FPSW, RM)], + + set_float_rounding_mode(roundmode[FIELD_EX32(fpsw, FPSW, RM)], &env->fp_status); + + dn =3D FIELD_EX32(env->fpsw, FPSW, DN); + set_flush_to_zero(dn, &env->fp_status); + set_flush_inputs_to_zero(dn, &env->fp_status); } =20 #define FLOATOP(op, func) \ --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622088963; cv=none; d=zohomail.com; s=zohoarc; b=DdCVN46QF+3/kZMt65FyY8MUjGbi7OLw7KB5+U/bBY7dthvGmMtOLdwUld4Wof5Tf/NMd8yaFWKTDpqYwaabYLi5GdRF69P/XjqGS9ruXUTVDlugDvyM+6O7WKWmmwv8E58q/Z5ymMB4+yYTl99z6BrY3H5ckZWUWLItwcNzf7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622088963; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UoxBYLGz1RPfPHU5SsrpnEXE2PmprFjabmvNHor6v/o=; b=f2GsMqd7vjIWiyOngCfimgSpPX6aSRRaUGYEk23eT3B34ZbbK7T/yBvIcIUWHJLihgEwhovihG4baMy/t9PGGeNNCy6COYmEtovtyrkbVPjiWmreyXwDDnyu9zO2VLAaY7BSBLJX3YBbfH6nQbp+xQbt61/sS7a/aCbN8jwXqqk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622088962996987.0232729525305; Wed, 26 May 2021 21:16:02 -0700 (PDT) Received: from localhost ([::1]:40552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7RB-0004Ex-Lf for importer@patchew.org; Thu, 27 May 2021 00:16:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PR-0001Z1-C5 for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:14 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:44586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PP-0007DF-Sz for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:13 -0400 Received: by mail-pg1-x52e.google.com with SMTP id 29so2710284pgu.11 for ; Wed, 26 May 2021 21:14:11 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UoxBYLGz1RPfPHU5SsrpnEXE2PmprFjabmvNHor6v/o=; b=OSsljFwqnG6yAYxRCl+xTx4bq6IqteVk7ygm0Ld1zhlngHNqUzq7GBVU9WbvyAUw3W e4XPzYGFEDlcTMz/0KvEVdRq20/AD6wt+SUUAcwt2H2WUl/o3+e7Cj+uAlKLGtL9FlII iOFZzuemVT78aExW+5LYpSBtKrC/iCFgkCO1bIDgE1/u2iH+0K8ICC154ycL/kFI0uE8 pz75Ud6NNAxCQRQJtGKoCkUbQ/Bu2j8TICUYcqxLsLbQTY8lhzrEDRjS54Rmdp/BJjR+ lTdNN0WC5JBjxN3CSDib7FSv0C8m/W5VQYpOfmDG56oikNmjRbDYRy8pMl1EfRz2XSXa +Ybw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UoxBYLGz1RPfPHU5SsrpnEXE2PmprFjabmvNHor6v/o=; b=nITj/dgB0LhcYrbxgaY9FrDJsMm4cfqMqNU2dsUuw8b+MvAvsSR7m7KM/jl3pHQ5Fv 7LBXAu5EBGFsR9FYmWnjBUEBXMkPd9FUGZg3q+075oGPnZ09LQIMYIsBqD3iWPtEgEOn h4nK51imbURDagm/b+DG3em5mCj+FvbWC1GSs3bl+Z+i9RJkhiMtro3qrfdxqOC73NEI dwDsNBGUVG3KVeMHhZl4SFHTW4Y/meZ11cpK13yzClput32y+0NShapOedL9+Lb9vhB1 wpxzq+cB+dE41EHE3pFtGSYUaQsZyjUmjrriqpE5JuFFJxqkT5NHF/9wOYSmgglB7fA2 yWUQ== X-Gm-Message-State: AOAM530c1SOX3YHA/kacdbM7SkUYYmPpbUj1MVMWLCeltbBDYpbQ4Li0 DaEuRjgHC5nOclP/JBvraNCu4eyWVW2ZOQ== X-Google-Smtp-Source: ABdhPJzoHGPy+mM1vnfke5ie73IuFuG7XZuXZ+BzujqIDdKeaZT7eaDhor/LZP0dYZ+DSSPZkTxlAA== X-Received: by 2002:a62:5846:0:b029:2e8:fde9:5c6d with SMTP id m67-20020a6258460000b02902e8fde95c6dmr1822074pfb.56.1622088850663; Wed, 26 May 2021 21:14:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 07/11] target/rx: Use FloatRoundMode in helper_set_fpsw Date: Wed, 26 May 2021 21:14:01 -0700 Message-Id: <20210527041405.391567-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Use the proper type for the roundmode array. Cc: Philippe Mathieu-Daud=C3=A9 Cc: Yoshinori Sato Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/rx/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index 2139def3b2..b1772e9538 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -120,7 +120,7 @@ static void update_fpsw(CPURXState *env, float32 ret, u= intptr_t retaddr) =20 void helper_set_fpsw(CPURXState *env, uint32_t val) { - static const int roundmode[] =3D { + static const FloatRoundMode roundmode[] =3D { float_round_nearest_even, float_round_to_zero, float_round_up, --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622088965; cv=none; d=zohomail.com; s=zohoarc; b=CZIoeF7ug8QK8CqTosdA9tHAGdfkAcgckDMiX5dsyxhcgYVZZE1rBQ3SFR+MqBpL8gy07g9+SED3/XUEmiiM+31s2lD4HjLA6k8pPQP8qoYiZAmovawFkgYgzTdSvgq36RIad5PFNIy3k9C43gCZWlQIv+qAWuyf63iYKgWEO40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622088965; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iIf4CiQjBFO3jZShlRi5AmbhMlsdhUxW6Q2TeLIQ1Ds=; b=Ams/xO8kPH5yXvtGVLGSbtRhJxgExUUUANiKSxscsSfYVp9Y2iytympyf9FIwyRLLrRiXgGgdSJN2UdM7SgnAjwuH8qyoaqDyvI9jO7wKwxuhMx1lX+DGfoPtwn+cElzujM+RIKOhEgjgTddsrkdJERfU4o2y/EerWZ/WzIcI0g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622088965853763.8664030094345; Wed, 26 May 2021 21:16:05 -0700 (PDT) Received: from localhost ([::1]:40840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7RE-0004QP-NO for importer@patchew.org; Thu, 27 May 2021 00:16:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PU-0001Zv-E6 for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:16 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:45809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PQ-0007DP-FN for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:16 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d16so2627851pfn.12 for ; Wed, 26 May 2021 21:14:12 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iIf4CiQjBFO3jZShlRi5AmbhMlsdhUxW6Q2TeLIQ1Ds=; b=SdGxfJ9mHrdaJcGb3fDdpugU3AiXIpjnT8j8XCRo0ysw0zlgSdsj5zGTyJYK27OKTF iwgY1bqpSuHjZ6jFyrN/jRKixKrmolIR3BDKRxIVAnhV7hDLEEFzxpSW/ssRQTybNqB8 qwBcCJBIXdIpt9hPSsUSPKF3GR0pFlZlufQ3u8KpC21SQk2C1EUkZMZ7fB3iGebQjUiN o/z38qAHR2+A7Sqh0GDPGq0R/YxDTeOBgs/RfFDrXuAzKXmJZJSkP3UHvyncY08jxNCK Z2sKkmjheEXilPe9Pw5jrioFXlP7W8Zij6XCfpbNcLR0Wh1fddLetzsXGVWUPkM6orkH rz8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iIf4CiQjBFO3jZShlRi5AmbhMlsdhUxW6Q2TeLIQ1Ds=; b=dYwL+4SKpbX0ogpoLoBFuFgXU4dieFmAijOuzJzQavWR2qGr15hnNgpWsPngIcZBxh 4EmOmIK6Df6J4GBRvXLzcKtJrXJiPHR+ec2VzmzWuJGpwqIvoDyLZ9Mcj8fJZbzMd8s1 SP1CTpdNUSFcHQDIZBKkZ5hlagWyDzkcn6dsmAh2RQqU/ROlsHdkJULfJk7ayebXQa6x b28HrD8BEhMNnZRiiN8Idda6s3r84NQ3RjonE5T/W2iz9zQqZQ35bfbGYk9LnWGS4gKq 6uve4WGgdM9DiLzMPBSs/p5WnoIrJSy4vlGt0AGeIZcfSt88baYi4ZWpEUjdErcBhJB4 fAsQ== X-Gm-Message-State: AOAM532PnMrZWrwl8/9k4BVfZ5mgSLnZbMIcxtHt88R+2GD0LqjoHCjI 9jXPMLOvIw44+0Y30Bxvui7cMZjBHGNOEg== X-Google-Smtp-Source: ABdhPJycv4PqYuImvbu8oZ0PZh1F/folpCF1arPC6sOTJKfCRmN0P1ytgGoD0pgwBD+02R2X0FO1DQ== X-Received: by 2002:a62:1e42:0:b029:2df:dd12:1608 with SMTP id e63-20020a621e420000b02902dfdd121608mr1849044pfe.11.1622088851174; Wed, 26 May 2021 21:14:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 08/11] target/rx: Fix setting of FPSW.CE Date: Wed, 26 May 2021 21:14:02 -0700 Message-Id: <20210527041405.391567-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The existing check was completely wrong, confused about the definition of the (previous) float_flag_{input,output}_denormal flags, then making sure that DN, the flush-to-zero bit, was off. Update for the introduction of float_flag_inorm_denormal and float_flag_result_denormal, taking into account that DN now sets the softfloat flush-to-zero bits. Cc: Philippe Mathieu-Daud=C3=A9 Cc: Yoshinori Sato Signed-off-by: Richard Henderson --- target/rx/op_helper.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index b1772e9538..c2e4f9a5e3 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -97,9 +97,11 @@ static void update_fpsw(CPURXState *env, float32 ret, ui= ntptr_t retaddr) if (xcpt & float_flag_inexact) { SET_FPSW(X); } - if ((xcpt & (float_flag_iflush_denormal - | float_flag_oflush_denormal)) - && !FIELD_EX32(env->fpsw, FPSW, DN)) { + /* + * If any input or output denormals, not flushed to zero, raise CE: + * unimplemented processing has been encountered. + */ + if (xcpt & (float_flag_inorm_denormal | float_flag_result_denormal= )) { env->fpsw =3D FIELD_DP32(env->fpsw, FPSW, CE, 1); } =20 --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622089165; cv=none; d=zohomail.com; s=zohoarc; b=Odro+JBAiSNv8sDoV7P093aTCZ01YEoSn/sKgA94eUne3LqTm/7aroG6VFpyDSbhSRpczQdMudyqd4XyVHq+rlZAgXwvxuJGNMA0BmaUIK1aJOGVhxksD7CMoTTxLYA269/Q3I97HV4tb0JxORxK3WBF55VKewWATeyT/M54O2w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622089165; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MTs4Hq04LmWnritZnQvkJU7gh2wQWfLa5CN1BG09M0w=; b=Zd5qxVm6BvpzkXCXXrJnLwcGQvdq9+fj+K0aKDzWELoKGozdqLggGkGH1u9t/FWrReF9hwZSl9a4UjNhZcIkkm41cC97H5TOSH6VsqkamyQE0zv2CbALRR1M9uEoDTW/1XbqlPhwe2hPq1kavf9cXC7wz3S5m1s46stSgr/Magw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622089165326968.0555764964635; Wed, 26 May 2021 21:19:25 -0700 (PDT) Received: from localhost ([::1]:52676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7US-0003vR-5B for importer@patchew.org; Thu, 27 May 2021 00:19:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PW-0001ai-HJ for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:20 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:42601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PR-0007E6-Cp for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:17 -0400 Received: by mail-pj1-x1030.google.com with SMTP id m8-20020a17090a4148b029015fc5d36343so1595975pjg.1 for ; Wed, 26 May 2021 21:14:12 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MTs4Hq04LmWnritZnQvkJU7gh2wQWfLa5CN1BG09M0w=; b=aPvhgy2i5X+y4L2au2xunxfNsrrBAODIwuZNZLRChuWfIo0covg0Uq8uPFSE0bH8sq McvOE727RIBf64pcLpBV+ckp7qwedNvOtLV0yEafqLYcQ7xYLZMiaJUmffZV9Ftd1ElT K/Hm6ZKGDOdqTWCIJAuZwJzFNYbevRb4kCYce5ZmZu6BCvSovvHJeQHSpfDm3txUIvrJ w43RpNIBHEB1AzoPhadE3hpsvgvxUO8twyu0v7/Eil5ltj+H4qHi4dw0ok2HPVUXwIgm Jm5u7C9+6kO/ZWPOEuQaff9epCZxZglQRyPyfN2LxpBeqj+d9ZxaXN0UIRgYnBIy/D1b tCUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MTs4Hq04LmWnritZnQvkJU7gh2wQWfLa5CN1BG09M0w=; b=rTwMDiljiGGsP7rBJ4Lj3l1+aftZTOmWrbvfpOrgrLKGPl9oHJAFYxsD5yChACpqv1 CaYzWkaXpdA4/Sio7PVGl/LS4gldkBeh/XKAkPZ8jX8DvUEIJ7K9aBmXEAqWJV0Sb+pa HHqU3ViD+Uuf7h4rznNVsLe5zdrL1AQAkX9fS1u3O9ltPEm/ID98i8ncAJPu11rmEFrQ CYQ727HM43bSOZVy2TGhKAgmGQfyLwY8CwLACFUuPsYz/yoByBLAGeODytubpRPe9n8b ICWhuckL5wp3/pNlvIngv3p0hRWy+CY3wxN/EDN5X7ehrhFw5Qd/sLRwNIK0RjIibL9R lTUQ== X-Gm-Message-State: AOAM531M7IQaD6/9CTaAMb+xTK9XjmRjX/DGkNkc8gGc527+bN0RyOMS pmrg4VpGDXkdfTW/ZFgRAUTA8eean0W4Yg== X-Google-Smtp-Source: ABdhPJwVZuzqFVKJws0ctlwEcG/C5FgjURlG2FY+mY/Ykd1qryQ4XBVvlFikT7SjqugTKhKxCovwBw== X-Received: by 2002:a17:90a:e615:: with SMTP id j21mr6650666pjy.222.1622088851785; Wed, 26 May 2021 21:14:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 09/11] target/mips: Drop inline markers from msa_helper.c Date: Wed, 26 May 2021 21:14:03 -0700 Message-Id: <20210527041405.391567-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Some of these functions are quite large. Let the compiler decide whether to inline. Cc: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/msa_helper.c | 262 ++++++++++++++++------------------- 1 file changed, 121 insertions(+), 141 deletions(-) diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index 51791f946b..2f89abe166 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -68,7 +68,7 @@ * +---------------+------------------------------------------------------= ----+ */ =20 -static inline int64_t msa_nlzc_df(uint32_t df, int64_t arg) +static int64_t msa_nlzc_df(uint32_t df, int64_t arg) { uint64_t x, y; int n, c; @@ -89,7 +89,7 @@ static inline int64_t msa_nlzc_df(uint32_t df, int64_t ar= g) return n - x; } =20 -static inline int64_t msa_nloc_df(uint32_t df, int64_t arg) +static int64_t msa_nloc_df(uint32_t df, int64_t arg) { return msa_nlzc_df(df, UNSIGNED((~arg), df)); } @@ -210,7 +210,7 @@ void helper_msa_nlzc_d(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->d[1] =3D msa_nlzc_df(DF_DOUBLE, pws->d[1]); } =20 -static inline int64_t msa_pcnt_df(uint32_t df, int64_t arg) +static int64_t msa_pcnt_df(uint32_t df, int64_t arg) { uint64_t x; =20 @@ -307,8 +307,7 @@ void helper_msa_pcnt_d(CPUMIPSState *env, uint32_t wd, = uint32_t ws) /* Data format bit position and unsigned values */ #define BIT_POSITION(x, df) ((uint64_t)(x) % DF_BITS(df)) =20 -static inline int64_t msa_binsl_df(uint32_t df, - int64_t dest, int64_t arg1, int64_t arg= 2) +static int64_t msa_binsl_df(uint32_t df, int64_t dest, int64_t arg1, int64= _t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_dest =3D UNSIGNED(dest, df); @@ -388,8 +387,7 @@ void helper_msa_binsl_d(CPUMIPSState *env, pwd->d[1] =3D msa_binsl_df(DF_DOUBLE, pwd->d[1], pws->d[1], pwt->d[= 1]); } =20 -static inline int64_t msa_binsr_df(uint32_t df, - int64_t dest, int64_t arg1, int64_t arg= 2) +static int64_t msa_binsr_df(uint32_t df, int64_t dest, int64_t arg1, int64= _t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_dest =3D UNSIGNED(dest, df); @@ -526,7 +524,7 @@ void helper_msa_bsel_v(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) * +---------------+------------------------------------------------------= ----+ */ =20 -static inline int64_t msa_bclr_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_bclr_df(uint32_t df, int64_t arg1, int64_t arg2) { int32_t b_arg2 =3D BIT_POSITION(arg2, df); return UNSIGNED(arg1 & (~(1LL << b_arg2)), df); @@ -594,7 +592,7 @@ void helper_msa_bclr_d(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->d[1] =3D msa_bclr_df(DF_DOUBLE, pws->d[1], pwt->d[1]); } =20 -static inline int64_t msa_bneg_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_bneg_df(uint32_t df, int64_t arg1, int64_t arg2) { int32_t b_arg2 =3D BIT_POSITION(arg2, df); return UNSIGNED(arg1 ^ (1LL << b_arg2), df); @@ -662,8 +660,7 @@ void helper_msa_bneg_d(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->d[1] =3D msa_bneg_df(DF_DOUBLE, pws->d[1], pwt->d[1]); } =20 -static inline int64_t msa_bset_df(uint32_t df, int64_t arg1, - int64_t arg2) +static int64_t msa_bset_df(uint32_t df, int64_t arg1, int64_t arg2) { int32_t b_arg2 =3D BIT_POSITION(arg2, df); return UNSIGNED(arg1 | (1LL << b_arg2), df); @@ -809,7 +806,7 @@ void helper_msa_bset_d(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) */ =20 =20 -static inline int64_t msa_add_a_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_add_a_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t abs_arg1 =3D arg1 >=3D 0 ? arg1 : -arg1; uint64_t abs_arg2 =3D arg2 >=3D 0 ? arg2 : -arg2; @@ -883,7 +880,7 @@ void helper_msa_add_a_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_adds_a_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_adds_a_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t max_int =3D (uint64_t)DF_MAX_INT(df); uint64_t abs_arg1 =3D arg1 >=3D 0 ? arg1 : -arg1; @@ -962,7 +959,7 @@ void helper_msa_adds_a_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_adds_s_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_adds_s_df(uint32_t df, int64_t arg1, int64_t arg2) { int64_t max_int =3D DF_MAX_INT(df); int64_t min_int =3D DF_MIN_INT(df); @@ -1040,7 +1037,7 @@ void helper_msa_adds_s_d(CPUMIPSState *env, } =20 =20 -static inline uint64_t msa_adds_u_df(uint32_t df, uint64_t arg1, uint64_t = arg2) +static uint64_t msa_adds_u_df(uint32_t df, uint64_t arg1, uint64_t arg2) { uint64_t max_uint =3D DF_MAX_UINT(df); uint64_t u_arg1 =3D UNSIGNED(arg1, df); @@ -1115,7 +1112,7 @@ void helper_msa_adds_u_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_addv_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_addv_df(uint32_t df, int64_t arg1, int64_t arg2) { return arg1 + arg2; } @@ -1200,7 +1197,7 @@ void helper_msa_addv_d(CPUMIPSState *env, ((((uint64_t)(a)) << (64 - DF_BITS(df))) >> (64 - DF_BITS(df) / 2)) =20 =20 -static inline int64_t msa_hadd_s_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_hadd_s_df(uint32_t df, int64_t arg1, int64_t arg2) { return SIGNED_ODD(arg1, df) + SIGNED_EVEN(arg2, df); } @@ -1247,7 +1244,7 @@ void helper_msa_hadd_s_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_hadd_u_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_hadd_u_df(uint32_t df, int64_t arg1, int64_t arg2) { return UNSIGNED_ODD(arg1, df) + UNSIGNED_EVEN(arg2, df); } @@ -1318,7 +1315,7 @@ void helper_msa_hadd_u_d(CPUMIPSState *env, * +---------------+------------------------------------------------------= ----+ */ =20 -static inline int64_t msa_ave_s_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_ave_s_df(uint32_t df, int64_t arg1, int64_t arg2) { /* signed shift */ return (arg1 >> 1) + (arg2 >> 1) + (arg1 & arg2 & 1); @@ -1390,7 +1387,7 @@ void helper_msa_ave_s_d(CPUMIPSState *env, pwd->d[1] =3D msa_ave_s_df(DF_DOUBLE, pws->d[1], pwt->d[1]); } =20 -static inline uint64_t msa_ave_u_df(uint32_t df, uint64_t arg1, uint64_t a= rg2) +static uint64_t msa_ave_u_df(uint32_t df, uint64_t arg1, uint64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -1464,7 +1461,7 @@ void helper_msa_ave_u_d(CPUMIPSState *env, pwd->d[1] =3D msa_ave_u_df(DF_DOUBLE, pws->d[1], pwt->d[1]); } =20 -static inline int64_t msa_aver_s_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_aver_s_df(uint32_t df, int64_t arg1, int64_t arg2) { /* signed shift */ return (arg1 >> 1) + (arg2 >> 1) + ((arg1 | arg2) & 1); @@ -1536,7 +1533,7 @@ void helper_msa_aver_s_d(CPUMIPSState *env, pwd->d[1] =3D msa_aver_s_df(DF_DOUBLE, pws->d[1], pwt->d[1]); } =20 -static inline uint64_t msa_aver_u_df(uint32_t df, uint64_t arg1, uint64_t = arg2) +static uint64_t msa_aver_u_df(uint32_t df, uint64_t arg1, uint64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -1639,12 +1636,12 @@ void helper_msa_aver_u_d(CPUMIPSState *env, * +---------------+------------------------------------------------------= ----+ */ =20 -static inline int64_t msa_ceq_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_ceq_df(uint32_t df, int64_t arg1, int64_t arg2) { return arg1 =3D=3D arg2 ? -1 : 0; } =20 -static inline int8_t msa_ceq_b(int8_t arg1, int8_t arg2) +static int8_t msa_ceq_b(int8_t arg1, int8_t arg2) { return arg1 =3D=3D arg2 ? -1 : 0; } @@ -1673,7 +1670,7 @@ void helper_msa_ceq_b(CPUMIPSState *env, uint32_t wd,= uint32_t ws, uint32_t wt) pwd->b[15] =3D msa_ceq_b(pws->b[15], pwt->b[15]); } =20 -static inline int16_t msa_ceq_h(int16_t arg1, int16_t arg2) +static int16_t msa_ceq_h(int16_t arg1, int16_t arg2) { return arg1 =3D=3D arg2 ? -1 : 0; } @@ -1694,7 +1691,7 @@ void helper_msa_ceq_h(CPUMIPSState *env, uint32_t wd,= uint32_t ws, uint32_t wt) pwd->h[7] =3D msa_ceq_h(pws->h[7], pwt->h[7]); } =20 -static inline int32_t msa_ceq_w(int32_t arg1, int32_t arg2) +static int32_t msa_ceq_w(int32_t arg1, int32_t arg2) { return arg1 =3D=3D arg2 ? -1 : 0; } @@ -1711,7 +1708,7 @@ void helper_msa_ceq_w(CPUMIPSState *env, uint32_t wd,= uint32_t ws, uint32_t wt) pwd->w[3] =3D msa_ceq_w(pws->w[3], pwt->w[3]); } =20 -static inline int64_t msa_ceq_d(int64_t arg1, int64_t arg2) +static int64_t msa_ceq_d(int64_t arg1, int64_t arg2) { return arg1 =3D=3D arg2 ? -1 : 0; } @@ -1726,7 +1723,7 @@ void helper_msa_ceq_d(CPUMIPSState *env, uint32_t wd,= uint32_t ws, uint32_t wt) pwd->d[1] =3D msa_ceq_d(pws->d[1], pwt->d[1]); } =20 -static inline int64_t msa_cle_s_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_cle_s_df(uint32_t df, int64_t arg1, int64_t arg2) { return arg1 <=3D arg2 ? -1 : 0; } @@ -1797,7 +1794,7 @@ void helper_msa_cle_s_d(CPUMIPSState *env, pwd->d[1] =3D msa_cle_s_df(DF_DOUBLE, pws->d[1], pwt->d[1]); } =20 -static inline int64_t msa_cle_u_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_cle_u_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -1870,12 +1867,12 @@ void helper_msa_cle_u_d(CPUMIPSState *env, pwd->d[1] =3D msa_cle_u_df(DF_DOUBLE, pws->d[1], pwt->d[1]); } =20 -static inline int64_t msa_clt_s_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_clt_s_df(uint32_t df, int64_t arg1, int64_t arg2) { return arg1 < arg2 ? -1 : 0; } =20 -static inline int8_t msa_clt_s_b(int8_t arg1, int8_t arg2) +static int8_t msa_clt_s_b(int8_t arg1, int8_t arg2) { return arg1 < arg2 ? -1 : 0; } @@ -1905,7 +1902,7 @@ void helper_msa_clt_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_clt_s_b(pws->b[15], pwt->b[15]); } =20 -static inline int16_t msa_clt_s_h(int16_t arg1, int16_t arg2) +static int16_t msa_clt_s_h(int16_t arg1, int16_t arg2) { return arg1 < arg2 ? -1 : 0; } @@ -1927,7 +1924,7 @@ void helper_msa_clt_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_clt_s_h(pws->h[7], pwt->h[7]); } =20 -static inline int32_t msa_clt_s_w(int32_t arg1, int32_t arg2) +static int32_t msa_clt_s_w(int32_t arg1, int32_t arg2) { return arg1 < arg2 ? -1 : 0; } @@ -1945,7 +1942,7 @@ void helper_msa_clt_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_clt_s_w(pws->w[3], pwt->w[3]); } =20 -static inline int64_t msa_clt_s_d(int64_t arg1, int64_t arg2) +static int64_t msa_clt_s_d(int64_t arg1, int64_t arg2) { return arg1 < arg2 ? -1 : 0; } @@ -1961,7 +1958,7 @@ void helper_msa_clt_s_d(CPUMIPSState *env, pwd->d[1] =3D msa_clt_s_d(pws->d[1], pwt->d[1]); } =20 -static inline int64_t msa_clt_u_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_clt_u_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -2052,7 +2049,7 @@ void helper_msa_clt_u_d(CPUMIPSState *env, */ =20 =20 -static inline int64_t msa_div_s_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_div_s_df(uint32_t df, int64_t arg1, int64_t arg2) { if (arg1 =3D=3D DF_MIN_INT(df) && arg2 =3D=3D -1) { return DF_MIN_INT(df); @@ -2127,7 +2124,7 @@ void helper_msa_div_s_d(CPUMIPSState *env, pwd->d[1] =3D msa_div_s_df(DF_DOUBLE, pws->d[1], pwt->d[1]); } =20 -static inline int64_t msa_div_u_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_div_u_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -2240,7 +2237,7 @@ void helper_msa_div_u_d(CPUMIPSState *env, } while (0) =20 =20 -static inline int64_t msa_dotp_s_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_dotp_s_df(uint32_t df, int64_t arg1, int64_t arg2) { int64_t even_arg1; int64_t even_arg2; @@ -2293,7 +2290,7 @@ void helper_msa_dotp_s_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_dotp_u_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_dotp_u_df(uint32_t df, int64_t arg1, int64_t arg2) { int64_t even_arg1; int64_t even_arg2; @@ -2346,8 +2343,8 @@ void helper_msa_dotp_u_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_dpadd_s_df(uint32_t df, int64_t dest, int64_t ar= g1, - int64_t arg2) +static int64_t msa_dpadd_s_df(uint32_t df, int64_t dest, int64_t arg1, + int64_t arg2) { int64_t even_arg1; int64_t even_arg2; @@ -2400,8 +2397,8 @@ void helper_msa_dpadd_s_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_dpadd_u_df(uint32_t df, int64_t dest, int64_t ar= g1, - int64_t arg2) +static int64_t msa_dpadd_u_df(uint32_t df, int64_t dest, int64_t arg1, + int64_t arg2) { int64_t even_arg1; int64_t even_arg2; @@ -2454,8 +2451,8 @@ void helper_msa_dpadd_u_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_dpsub_s_df(uint32_t df, int64_t dest, int64_t ar= g1, - int64_t arg2) +static int64_t msa_dpsub_s_df(uint32_t df, int64_t dest, int64_t arg1, + int64_t arg2) { int64_t even_arg1; int64_t even_arg2; @@ -2508,8 +2505,8 @@ void helper_msa_dpsub_s_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_dpsub_u_df(uint32_t df, int64_t dest, int64_t ar= g1, - int64_t arg2) +static int64_t msa_dpsub_u_df(uint32_t df, int64_t dest, int64_t arg1, + int64_t arg2) { int64_t even_arg1; int64_t even_arg2; @@ -2594,7 +2591,7 @@ void helper_msa_dpsub_u_d(CPUMIPSState *env, * +---------------+------------------------------------------------------= ----+ */ =20 -static inline int64_t msa_max_a_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_max_a_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t abs_arg1 =3D arg1 >=3D 0 ? arg1 : -arg1; uint64_t abs_arg2 =3D arg2 >=3D 0 ? arg2 : -arg2; @@ -2668,7 +2665,7 @@ void helper_msa_max_a_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_max_s_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_max_s_df(uint32_t df, int64_t arg1, int64_t arg2) { return arg1 > arg2 ? arg1 : arg2; } @@ -2740,7 +2737,7 @@ void helper_msa_max_s_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_max_u_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_max_u_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -2814,7 +2811,7 @@ void helper_msa_max_u_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_min_a_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_min_a_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t abs_arg1 =3D arg1 >=3D 0 ? arg1 : -arg1; uint64_t abs_arg2 =3D arg2 >=3D 0 ? arg2 : -arg2; @@ -2888,7 +2885,7 @@ void helper_msa_min_a_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_min_s_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_min_s_df(uint32_t df, int64_t arg1, int64_t arg2) { return arg1 < arg2 ? arg1 : arg2; } @@ -2960,7 +2957,7 @@ void helper_msa_min_s_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_min_u_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_min_u_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -3050,7 +3047,7 @@ void helper_msa_min_u_d(CPUMIPSState *env, * +---------------+------------------------------------------------------= ----+ */ =20 -static inline int64_t msa_mod_s_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_mod_s_df(uint32_t df, int64_t arg1, int64_t arg2) { if (arg1 =3D=3D DF_MIN_INT(df) && arg2 =3D=3D -1) { return 0; @@ -3124,7 +3121,7 @@ void helper_msa_mod_s_d(CPUMIPSState *env, pwd->d[1] =3D msa_mod_s_df(DF_DOUBLE, pws->d[1], pwt->d[1]); } =20 -static inline int64_t msa_mod_u_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_mod_u_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -3218,7 +3215,7 @@ void helper_msa_mod_u_d(CPUMIPSState *env, * +---------------+------------------------------------------------------= ----+ */ =20 -static inline int64_t msa_maddv_df(uint32_t df, int64_t dest, int64_t arg1, +static int64_t msa_maddv_df(uint32_t df, int64_t dest, int64_t arg1, int64_t arg2) { return dest + arg1 * arg2; @@ -3290,7 +3287,7 @@ void helper_msa_maddv_d(CPUMIPSState *env, pwd->d[1] =3D msa_maddv_df(DF_DOUBLE, pwd->d[1], pws->d[1], pwt->d[= 1]); } =20 -static inline int64_t msa_msubv_df(uint32_t df, int64_t dest, int64_t arg1, +static int64_t msa_msubv_df(uint32_t df, int64_t dest, int64_t arg1, int64_t arg2) { return dest - arg1 * arg2; @@ -3363,7 +3360,7 @@ void helper_msa_msubv_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_mulv_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_mulv_df(uint32_t df, int64_t arg1, int64_t arg2) { return arg1 * arg2; } @@ -3478,7 +3475,7 @@ void helper_msa_mulv_d(CPUMIPSState *env, */ =20 =20 -static inline int64_t msa_asub_s_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_asub_s_df(uint32_t df, int64_t arg1, int64_t arg2) { /* signed compare */ return (arg1 < arg2) ? @@ -3552,7 +3549,7 @@ void helper_msa_asub_s_d(CPUMIPSState *env, } =20 =20 -static inline uint64_t msa_asub_u_df(uint32_t df, uint64_t arg1, uint64_t = arg2) +static uint64_t msa_asub_u_df(uint32_t df, uint64_t arg1, uint64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -3628,7 +3625,7 @@ void helper_msa_asub_u_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_hsub_s_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_hsub_s_df(uint32_t df, int64_t arg1, int64_t arg2) { return SIGNED_ODD(arg1, df) - SIGNED_EVEN(arg2, df); } @@ -3675,7 +3672,7 @@ void helper_msa_hsub_s_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_hsub_u_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_hsub_u_df(uint32_t df, int64_t arg1, int64_t arg2) { return UNSIGNED_ODD(arg1, df) - UNSIGNED_EVEN(arg2, df); } @@ -3722,7 +3719,7 @@ void helper_msa_hsub_u_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_subs_s_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_subs_s_df(uint32_t df, int64_t arg1, int64_t arg2) { int64_t max_int =3D DF_MAX_INT(df); int64_t min_int =3D DF_MIN_INT(df); @@ -3800,7 +3797,7 @@ void helper_msa_subs_s_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_subs_u_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_subs_u_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -3874,7 +3871,7 @@ void helper_msa_subs_u_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_subsus_u_df(uint32_t df, int64_t arg1, int64_t a= rg2) +static int64_t msa_subsus_u_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t max_uint =3D DF_MAX_UINT(df); @@ -3958,7 +3955,7 @@ void helper_msa_subsus_u_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_subsuu_s_df(uint32_t df, int64_t arg1, int64_t a= rg2) +static int64_t msa_subsuu_s_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); uint64_t u_arg2 =3D UNSIGNED(arg2, df); @@ -4042,7 +4039,7 @@ void helper_msa_subsuu_s_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_subv_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_subv_df(uint32_t df, int64_t arg1, int64_t arg2) { return arg1 - arg2; } @@ -4618,7 +4615,7 @@ void helper_msa_xor_v(CPUMIPSState *env, uint32_t wd,= uint32_t ws, uint32_t wt) * +---------------+------------------------------------------------------= ----+ */ =20 -static inline void msa_move_v(wr_t *pwd, wr_t *pws) +static void msa_move_v(wr_t *pwd, wr_t *pws) { pwd->d[0] =3D pws->d[0]; pwd->d[1] =3D pws->d[1]; @@ -4892,7 +4889,7 @@ void helper_msa_pckod_d(CPUMIPSState *env, */ =20 =20 -static inline int64_t msa_sll_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_sll_df(uint32_t df, int64_t arg1, int64_t arg2) { int32_t b_arg2 =3D BIT_POSITION(arg2, df); return arg1 << b_arg2; @@ -4965,7 +4962,7 @@ void helper_msa_sll_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_sra_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_sra_df(uint32_t df, int64_t arg1, int64_t arg2) { int32_t b_arg2 =3D BIT_POSITION(arg2, df); return arg1 >> b_arg2; @@ -5038,7 +5035,7 @@ void helper_msa_sra_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_srar_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_srar_df(uint32_t df, int64_t arg1, int64_t arg2) { int32_t b_arg2 =3D BIT_POSITION(arg2, df); if (b_arg2 =3D=3D 0) { @@ -5116,7 +5113,7 @@ void helper_msa_srar_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_srl_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_srl_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); int32_t b_arg2 =3D BIT_POSITION(arg2, df); @@ -5190,7 +5187,7 @@ void helper_msa_srl_d(CPUMIPSState *env, } =20 =20 -static inline int64_t msa_srlr_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_srlr_df(uint32_t df, int64_t arg1, int64_t arg2) { uint64_t u_arg1 =3D UNSIGNED(arg1, df); int32_t b_arg2 =3D BIT_POSITION(arg2, df); @@ -5417,14 +5414,14 @@ void helper_msa_ldi_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, } } =20 -static inline int64_t msa_sat_s_df(uint32_t df, int64_t arg, uint32_t m) +static int64_t msa_sat_s_df(uint32_t df, int64_t arg, uint32_t m) { return arg < M_MIN_INT(m + 1) ? M_MIN_INT(m + 1) : arg > M_MAX_INT(m + 1) ? M_MAX_INT(m += 1) : arg; } =20 -static inline int64_t msa_sat_u_df(uint32_t df, int64_t arg, uint32_t m) +static int64_t msa_sat_u_df(uint32_t df, int64_t arg, uint32_t m) { uint64_t u_arg =3D UNSIGNED(arg, df); return u_arg < M_MAX_UINT(m + 1) ? u_arg : @@ -5530,8 +5527,7 @@ MSA_TEROP_IMMU_DF(binsri, binsr) } \ } while (0) =20 -static inline void msa_sld_df(uint32_t df, wr_t *pwd, - wr_t *pws, target_ulong rt) +static void msa_sld_df(uint32_t df, wr_t *pwd, wr_t *pws, target_ulong rt) { uint32_t n =3D rt % DF_ELEMENTS(df); uint8_t v[64]; @@ -5561,7 +5557,7 @@ static inline void msa_sld_df(uint32_t df, wr_t *pwd, } } =20 -static inline int64_t msa_mul_q_df(uint32_t df, int64_t arg1, int64_t arg2) +static int64_t msa_mul_q_df(uint32_t df, int64_t arg1, int64_t arg2) { int64_t q_min =3D DF_MIN_INT(df); int64_t q_max =3D DF_MAX_INT(df); @@ -5572,7 +5568,7 @@ static inline int64_t msa_mul_q_df(uint32_t df, int64= _t arg1, int64_t arg2) return (arg1 * arg2) >> (DF_BITS(df) - 1); } =20 -static inline int64_t msa_mulr_q_df(uint32_t df, int64_t arg1, int64_t arg= 2) +static int64_t msa_mulr_q_df(uint32_t df, int64_t arg1, int64_t arg2) { int64_t q_min =3D DF_MIN_INT(df); int64_t q_max =3D DF_MAX_INT(df); @@ -5649,8 +5645,8 @@ void helper_msa_sld_df(CPUMIPSState *env, uint32_t df= , uint32_t wd, msa_sld_df(df, pwd, pws, env->active_tc.gpr[rt]); } =20 -static inline int64_t msa_madd_q_df(uint32_t df, int64_t dest, int64_t arg= 1, - int64_t arg2) +static int64_t msa_madd_q_df(uint32_t df, int64_t dest, int64_t arg1, + int64_t arg2) { int64_t q_prod, q_ret; =20 @@ -5663,8 +5659,8 @@ static inline int64_t msa_madd_q_df(uint32_t df, int6= 4_t dest, int64_t arg1, return (q_ret < q_min) ? q_min : (q_max < q_ret) ? q_max : q_ret; } =20 -static inline int64_t msa_msub_q_df(uint32_t df, int64_t dest, int64_t arg= 1, - int64_t arg2) +static int64_t msa_msub_q_df(uint32_t df, int64_t dest, int64_t arg1, + int64_t arg2) { int64_t q_prod, q_ret; =20 @@ -5677,8 +5673,8 @@ static inline int64_t msa_msub_q_df(uint32_t df, int6= 4_t dest, int64_t arg1, return (q_ret < q_min) ? q_min : (q_max < q_ret) ? q_max : q_ret; } =20 -static inline int64_t msa_maddr_q_df(uint32_t df, int64_t dest, int64_t ar= g1, - int64_t arg2) +static int64_t msa_maddr_q_df(uint32_t df, int64_t dest, int64_t arg1, + int64_t arg2) { int64_t q_prod, q_ret; =20 @@ -5692,8 +5688,8 @@ static inline int64_t msa_maddr_q_df(uint32_t df, int= 64_t dest, int64_t arg1, return (q_ret < q_min) ? q_min : (q_max < q_ret) ? q_max : q_ret; } =20 -static inline int64_t msa_msubr_q_df(uint32_t df, int64_t dest, int64_t ar= g1, - int64_t arg2) +static int64_t msa_msubr_q_df(uint32_t df, int64_t dest, int64_t arg1, + int64_t arg2) { int64_t q_prod, q_ret; =20 @@ -5783,8 +5779,7 @@ MSA_TEROP_DF(maddr_q) MSA_TEROP_DF(msubr_q) #undef MSA_TEROP_DF =20 -static inline void msa_splat_df(uint32_t df, wr_t *pwd, - wr_t *pws, target_ulong rt) +static void msa_splat_df(uint32_t df, wr_t *pwd, wr_t *pws, target_ulong r= t) { uint32_t n =3D rt % DF_ELEMENTS(df); uint32_t i; @@ -6165,12 +6160,12 @@ void helper_msa_fill_df(CPUMIPSState *env, uint32_t= df, uint32_t wd, #define FLOAT_SNAN64(s) (float64_default_nan(s) ^ 0x0008000000000020ULL) /* 0x7ff0000000000020 */ =20 -static inline void clear_msacsr_cause(CPUMIPSState *env) +static void clear_msacsr_cause(CPUMIPSState *env) { SET_FP_CAUSE(env->active_tc.msacsr, 0); } =20 -static inline void check_msacsr_cause(CPUMIPSState *env, uintptr_t retaddr) +static void check_msacsr_cause(CPUMIPSState *env, uintptr_t retaddr) { if ((GET_FP_CAUSE(env->active_tc.msacsr) & (GET_FP_ENABLE(env->active_tc.msacsr) | FP_UNIMPLEMENTED)) =3D= =3D 0) { @@ -6187,7 +6182,7 @@ static inline void check_msacsr_cause(CPUMIPSState *e= nv, uintptr_t retaddr) #define RECIPROCAL_INEXACT 4 =20 =20 -static inline int ieee_to_mips_xcpt_msa(int ieee_xcpt) +static int ieee_to_mips_xcpt_msa(int ieee_xcpt) { int mips_xcpt =3D 0; =20 @@ -6210,7 +6205,7 @@ static inline int ieee_to_mips_xcpt_msa(int ieee_xcpt) return mips_xcpt; } =20 -static inline int update_msacsr(CPUMIPSState *env, int action, int denorma= l) +static int update_msacsr(CPUMIPSState *env, int action, int denormal) { int ieee_exception_flags; int mips_exception_flags =3D 0; @@ -6296,14 +6291,13 @@ static inline int update_msacsr(CPUMIPSState *env, = int action, int denormal) return mips_exception_flags; } =20 -static inline int get_enabled_exceptions(const CPUMIPSState *env, int c) +static int get_enabled_exceptions(const CPUMIPSState *env, int c) { int enable =3D GET_FP_ENABLE(env->active_tc.msacsr) | FP_UNIMPLEMENTED; return c & enable; } =20 -static inline float16 float16_from_float32(int32_t a, bool ieee, - float_status *status) +static float16 float16_from_float32(int32_t a, bool ieee, float_status *st= atus) { float16 f_val; =20 @@ -6312,7 +6306,7 @@ static inline float16 float16_from_float32(int32_t a,= bool ieee, return a < 0 ? (f_val | (1 << 15)) : f_val; } =20 -static inline float32 float32_from_float64(int64_t a, float_status *status) +static float32 float32_from_float64(int64_t a, float_status *status) { float32 f_val; =20 @@ -6321,8 +6315,7 @@ static inline float32 float32_from_float64(int64_t a,= float_status *status) return a < 0 ? (f_val | (1 << 31)) : f_val; } =20 -static inline float32 float32_from_float16(int16_t a, bool ieee, - float_status *status) +static float32 float32_from_float16(int16_t a, bool ieee, float_status *st= atus) { float32 f_val; =20 @@ -6331,7 +6324,7 @@ static inline float32 float32_from_float16(int16_t a,= bool ieee, return a < 0 ? (f_val | (1 << 31)) : f_val; } =20 -static inline float64 float64_from_float32(int32_t a, float_status *status) +static float64 float64_from_float32(int32_t a, float_status *status) { float64 f_val; =20 @@ -6340,7 +6333,7 @@ static inline float64 float64_from_float32(int32_t a,= float_status *status) return a < 0 ? (f_val | (1ULL << 63)) : f_val; } =20 -static inline float32 float32_from_q16(int16_t a, float_status *status) +static float32 float32_from_q16(int16_t a, float_status *status) { float32 f_val; =20 @@ -6351,7 +6344,7 @@ static inline float32 float32_from_q16(int16_t a, flo= at_status *status) return f_val; } =20 -static inline float64 float64_from_q32(int32_t a, float_status *status) +static float64 float64_from_q32(int32_t a, float_status *status) { float64 f_val; =20 @@ -6362,7 +6355,7 @@ static inline float64 float64_from_q32(int32_t a, flo= at_status *status) return f_val; } =20 -static inline int16_t float32_to_q16(float32 a, float_status *status) +static int16_t float32_to_q16(float32 a, float_status *status) { int32_t q_val; int32_t q_min =3D 0xffff8000; @@ -6414,7 +6407,7 @@ static inline int16_t float32_to_q16(float32 a, float= _status *status) return (int16_t)q_val; } =20 -static inline int32_t float64_to_q32(float64 a, float_status *status) +static int32_t float64_to_q32(float64 a, float_status *status) { int64_t q_val; int64_t q_min =3D 0xffffffff80000000LL; @@ -6544,9 +6537,8 @@ static inline int32_t float64_to_q32(float64 a, float= _status *status) } \ } while (0) =20 -static inline void compare_af(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_af(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retadd= r) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6573,9 +6565,8 @@ static inline void compare_af(CPUMIPSState *env, wr_t= *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_un(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_un(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retadd= r) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6604,9 +6595,8 @@ static inline void compare_un(CPUMIPSState *env, wr_t= *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_eq(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_eq(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retadd= r) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6633,9 +6623,8 @@ static inline void compare_eq(CPUMIPSState *env, wr_t= *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_ueq(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_ueq(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retad= dr) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6662,9 +6651,8 @@ static inline void compare_ueq(CPUMIPSState *env, wr_= t *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_lt(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_lt(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retadd= r) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6691,9 +6679,8 @@ static inline void compare_lt(CPUMIPSState *env, wr_t= *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_ult(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_ult(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retad= dr) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6720,9 +6707,8 @@ static inline void compare_ult(CPUMIPSState *env, wr_= t *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_le(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_le(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retadd= r) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6749,9 +6735,8 @@ static inline void compare_le(CPUMIPSState *env, wr_t= *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_ule(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_ule(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retad= dr) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6778,9 +6763,8 @@ static inline void compare_ule(CPUMIPSState *env, wr_= t *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_or(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_or(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retadd= r) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6807,9 +6791,8 @@ static inline void compare_or(CPUMIPSState *env, wr_t= *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_une(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_une(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retad= dr) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -6836,9 +6819,8 @@ static inline void compare_une(CPUMIPSState *env, wr_= t *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -static inline void compare_ne(CPUMIPSState *env, wr_t *pwd, wr_t *pws, - wr_t *pwt, uint32_t df, int quiet, - uintptr_t retaddr) +static void compare_ne(CPUMIPSState *env, wr_t *pwd, wr_t *pws, + wr_t *pwt, uint32_t df, int quiet, uintptr_t retadd= r) { wr_t wx, *pwx =3D &wx; uint32_t i; @@ -8395,10 +8377,8 @@ void helper_msa_ld_d(CPUMIPSState *env, uint32_t wd, #define MSA_PAGESPAN(x) \ ((((x) & ~TARGET_PAGE_MASK) + MSA_WRLEN / 8 - 1) >=3D TARGET_PAGE_= SIZE) =20 -static inline void ensure_writable_pages(CPUMIPSState *env, - target_ulong addr, - int mmu_idx, - uintptr_t retaddr) +static void ensure_writable_pages(CPUMIPSState *env, target_ulong addr, + int mmu_idx, uintptr_t retaddr) { /* FIXME: Probe the actual accesses (pass and use a size) */ if (unlikely(MSA_PAGESPAN(addr))) { --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622089223; cv=none; d=zohomail.com; s=zohoarc; b=hXcjnCOkPwws18w/92DfAT1NquGMp+bh8tkLVMSRb/AMWHSJkKFtHRgfn2WReYD7uXqT6e1dodtsojNpi56DG8QsYHwlvU69KhmZHzUt3sLwXRh9TojO3VGeb9wO7zrpmFi6By3f0VytDEc3RHuHrOrMBxwY8xgIk8icrH4bKKw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622089223; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=429j/OIChOskBqYFqhLITpYSTNdNJxwR8yKdtB0Ywow=; b=cgUC5WrzEZTvrkyU85DFzmKQLRUTzVXlWL+qpt3Oh1sI3QpVhNULEcDLoH5Z3Q0dJgzU1VOPjh5rRwIrRMIWwzGE1Dbe7aFhaaRZNb1g0NyLvCwi5IeZRqozAEX0ie0zcWucVVTfeFoqMzb19fsaABOI1+REgxXSoDDiBpBrmEM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622089223893132.19275499842763; Wed, 26 May 2021 21:20:23 -0700 (PDT) Received: from localhost ([::1]:57638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7VO-0007Af-Rj for importer@patchew.org; Thu, 27 May 2021 00:20:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PW-0001as-J5 for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:20 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:46733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PS-0007EO-64 for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:18 -0400 Received: by mail-pf1-x431.google.com with SMTP id y15so2631392pfn.13 for ; Wed, 26 May 2021 21:14:13 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=429j/OIChOskBqYFqhLITpYSTNdNJxwR8yKdtB0Ywow=; b=ksZi3UO1+nFo8q9UQUw5k8FwXBjFiZZmmLE6I9Qp/4lpFPqILBAqjnh8wgepYlAWui QFBXBViCQZWHHZ8oEAuF2dIdrxtWTHuuuCaMvTbKXgm/vLcG/X74JUPIV18AFrx2r4cG u3pKPSxvGIz2YVTl++Omf3dISI8GGkRPFDH2zHFKoCb6a8BOu45416RgdmZswuyRloIW m1NrtagjFWvLV0VCVTaoN4sPoD3VEj6y1mIeuJHm3pcUZmVp1PsXoe/BXerdMGSMn+D8 K5MBC6Jq+YBcCnWqDquTMPC9Xk9A9AdZ/0eonZ05uWEK8T6Jxg7GTqtIIOzDHfvEpBu8 bkAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=429j/OIChOskBqYFqhLITpYSTNdNJxwR8yKdtB0Ywow=; b=gvrm4+YhDks13uZ474Jvoyys6YMrpGz+LiQEcWD3vGCky41iuhNWBx27AC4S1kfW/g pkLlG84iLU6bS5i5ATl9yyjKjvL+MyLDYScLWW9JRGrLsX9t3GcC+ORMgJuMiAAKNqog 35+7fTIBEIEZISlIHokIrAGHUcovgdu5fdcqv2nhc76oSWGwaVvRBtk9TndPVTubI6Mb j5wSLhKbSexhptIW08qA1Gpzn0xkieuK3QYdfjdKzY70NuZ//gi1EnjvSeWMnUTMYdAT /PqcjOkSvIuuzj6ku4vzSVf6ElMi58mVLgXrUFCc3lJJ+U+zDWk0dCUGY3KbiDAlhbk1 yEdA== X-Gm-Message-State: AOAM530OEitPciwUwoGyryqlPj9cQ72HhSzp9AqOxBCKUwezkkYmXVxA 5pc5k/gz7XLnjttUUi+GEiRfdZwtQuHYtg== X-Google-Smtp-Source: ABdhPJzI/Nrh7AOLNlBK04bQx67SRKGd91Z2nLSf0MozBnf49Aq3pp0BlGCpqQNTaU/tccQ/1ta8jg== X-Received: by 2002:a62:1d52:0:b029:2dd:ee:1439 with SMTP id d79-20020a621d520000b02902dd00ee1439mr1793832pfd.57.1622088852402; Wed, 26 May 2021 21:14:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 10/11] target/mips: Do not check MSACSR_FS_MASK in update_msacsr Date: Wed, 26 May 2021 21:14:04 -0700 Message-Id: <20210527041405.391567-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, mmorrell@tachyum.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The FS_MASK has already been taken into account with restore_msa_fp_status. The definition of iflush and oflush is that we *have* flushed to zero. Cc: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/msa_helper.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index 2f89abe166..ffe6e630ed 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -6225,8 +6225,7 @@ static int update_msacsr(CPUMIPSState *env, int actio= n, int denormal) enable =3D GET_FP_ENABLE(env->active_tc.msacsr) | FP_UNIMPLEMENTED; =20 /* Set Inexact (I) when flushing inputs to zero */ - if ((ieee_exception_flags & float_flag_iflush_denormal) && - (env->active_tc.msacsr & MSACSR_FS_MASK) !=3D 0) { + if (ieee_exception_flags & float_flag_iflush_denormal) { if (action & CLEAR_IS_INEXACT) { mips_exception_flags &=3D ~FP_INEXACT; } else { @@ -6235,8 +6234,7 @@ static int update_msacsr(CPUMIPSState *env, int actio= n, int denormal) } =20 /* Set Inexact (I) and Underflow (U) when flushing outputs to zero */ - if ((ieee_exception_flags & float_flag_oflush_denormal) && - (env->active_tc.msacsr & MSACSR_FS_MASK) !=3D 0) { + if (ieee_exception_flags & float_flag_oflush_denormal) { mips_exception_flags |=3D FP_INEXACT; if (action & CLEAR_FS_UNDERFLOW) { mips_exception_flags &=3D ~FP_UNDERFLOW; --=20 2.25.1 From nobody Mon Feb 9 18:01:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622089366; cv=none; d=zohomail.com; s=zohoarc; b=c1squDw9PDzz0K1tQXUr1Lprp9UlGYsLW0+mtcv36nc0EzLNGJR6gJtV0ixr1XaQmV4qrwIt5Eg6fnXTgg2++13N9c173Z7cUXn4AGdx6Z7/LkBG24nOB0QvD0uDnT+dRdTh1vAFjTZ3/RD6WIsfNDn1iB2Qm5l2luGvNEhBErU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622089366; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fxhT5T2jN/8rQ+o7wJeAhpV/9V3uAlnXkzPAEXr9qP0=; b=QKheAcKW+uSQ8JU1g/ixjc1haCTPbeVMWQ7NeTdffJwcxFL4jJM4Moj6I4o1SqZqX1bBtK89qCdq/ew3hrUrttKXe0uw29DP698SC4zAdf3XCiWSYhdZ9sm8onBUWobK+LDuAWnz0qxpAft5z2Ml1OaGGv393a83J3OLyVf2lpM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622089366925720.8723506472337; Wed, 26 May 2021 21:22:46 -0700 (PDT) Received: from localhost ([::1]:33802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7Xh-0001ma-F1 for importer@patchew.org; Thu, 27 May 2021 00:22:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm7PZ-0001cr-07 for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:22 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:37663) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm7PS-0007Es-9c for qemu-devel@nongnu.org; Thu, 27 May 2021 00:14:20 -0400 Received: by mail-pg1-x535.google.com with SMTP id t193so2728299pgb.4 for ; Wed, 26 May 2021 21:14:13 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id s1sm605959pfc.6.2021.05.26.21.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 21:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fxhT5T2jN/8rQ+o7wJeAhpV/9V3uAlnXkzPAEXr9qP0=; b=DHI9VWeaQcvvzr+boGdZjn0q24hRoQP9IM8EiaiiCMf+AnpvOsc8r4VlwPWwSTSI3j NrP8QJVITUXpt1S0BHuUMtDiHjXBFdItRB2YBxXCBe7f4WScY3eBs73mBgxPDBIdMk9F 6lFc7GzjMJeLJImnzRyhmMYb29Nvh0qRgcS2vGSStMNQywYeAlPBbvu6NOIdatIqorpq QliEQAxB8BzteYsoxt5+HwQsVK45rR7KbHp3jq8Or+O57MzRi8s4EefLjOk6VMVCfa9t 63wyQ11G4oGFL0O0IG2HC1Mr8LjZRsX+mNe0nrK7udI9RafYqnIOLhJJxTBHssonTn+A UrBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fxhT5T2jN/8rQ+o7wJeAhpV/9V3uAlnXkzPAEXr9qP0=; b=NtAAlRfBYis2hmbwXY9tfLsxRMzAKB/jKs24Qn684XmWcAFak7YW2KpOOCJgmoz4Nj Re5bd4ELgZBSXp2oNl3TkgvT8zVDuITsaAcxZWRQUFoq3nC1owitSyxCpDe2ZBf+Kkj8 ZLmwY1EtO5TzZnyICgF5kjz4z/9KFsl//DXxaVxiV5b1vO7GJJPbGM/ovqU0t6Cpiwvf zNpnNY8XSd2HVVDylUzEIHIomTfs20frdCyjavB7tUk3BXBtla7hrALbudN3oiJbbRBH h2xSZddTDdtsRPIT9eJ0huksoxntqj1awKdGjst5Ar3DNOc9HCjGG+JnOBHI2Bq1yiyN UsgA== X-Gm-Message-State: AOAM530anAq3o6I+TxpWheBy9GT9UQKgPa8ni8ZCjK9H8nj7Qx1g7mCn q5WPwXd9gTEbV9phcXO4UJvoEhfC0yaC3A== X-Google-Smtp-Source: ABdhPJzZ8W7/Vn4Bb2llfxFMLXpLVeFM2sQSY8urIv3gDNVR08K/353CvW4Uf9UaskemIU6PxTKn+A== X-Received: by 2002:a62:2a14:0:b029:263:20c5:6d8c with SMTP id q20-20020a622a140000b029026320c56d8cmr1449434pfq.23.1622088852973; Wed, 26 May 2021 21:14:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 11/11] target/mips: Drop denormal operand to update_msacsr Date: Wed, 26 May 2021 21:14:05 -0700 Message-Id: <20210527041405.391567-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527041405.391567-1-richard.henderson@linaro.org> References: <20210527041405.391567-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, Yongbok Kim , mmorrell@tachyum.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The comment about not signaling all underflow cases is almost certainly incorrect. It has been there since the initial commit of the file. There is a bit of code below that sets underflow with float_flag_oflush_denormal, which is probably the fix for whatever the original case may have been. Cc: Yongbok Kim Cc: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/msa_helper.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index ffe6e630ed..b752373bce 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -6205,7 +6205,7 @@ static int ieee_to_mips_xcpt_msa(int ieee_xcpt) return mips_xcpt; } =20 -static int update_msacsr(CPUMIPSState *env, int action, int denormal) +static int update_msacsr(CPUMIPSState *env, int action) { int ieee_exception_flags; int mips_exception_flags =3D 0; @@ -6215,10 +6215,6 @@ static int update_msacsr(CPUMIPSState *env, int acti= on, int denormal) ieee_exception_flags =3D get_float_exception_flags( &env->active_tc.msa_fp_status); =20 - /* QEMU softfloat does not signal all underflow cases */ - if (denormal) { - ieee_exception_flags |=3D float_flag_underflow; - } if (ieee_exception_flags) { mips_exception_flags =3D ieee_to_mips_xcpt_msa(ieee_exception_flag= s); } @@ -6469,7 +6465,7 @@ static int32_t float64_to_q32(float64 a, float_status= *status) cond =3D float ## BITS ## _ ## OP ## _quiet(ARG1, ARG2, status= ); \ } = \ DEST =3D cond ? M_MAX_UINT(BITS) : 0; = \ - c =3D update_msacsr(env, CLEAR_IS_INEXACT, 0); = \ + c =3D update_msacsr(env, CLEAR_IS_INEXACT); = \ = \ if (get_enabled_exceptions(env, c)) { = \ DEST =3D ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; = \ @@ -7043,13 +7039,6 @@ void helper_msa_fsne_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, compare_ne(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -#define float16_is_zero(ARG) 0 -#define float16_is_zero_or_denormal(ARG) 0 - -#define IS_DENORMAL(ARG, BITS) \ - (!float ## BITS ## _is_zero(ARG) \ - && float ## BITS ## _is_zero_or_denormal(ARG)) - #define MSA_FLOAT_BINOP(DEST, OP, ARG1, ARG2, BITS) = \ do { = \ float_status *status =3D &env->active_tc.msa_fp_status; = \ @@ -7057,7 +7046,7 @@ void helper_msa_fsne_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, = \ set_float_exception_flags(0, status); = \ DEST =3D float ## BITS ## _ ## OP(ARG1, ARG2, status); = \ - c =3D update_msacsr(env, 0, IS_DENORMAL(DEST, BITS)); = \ + c =3D update_msacsr(env, 0); = \ = \ if (get_enabled_exceptions(env, c)) { = \ DEST =3D ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; = \ @@ -7193,7 +7182,7 @@ void helper_msa_fdiv_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, = \ set_float_exception_flags(0, status); = \ DEST =3D float ## BITS ## _muladd(ARG2, ARG3, ARG1, NEGATE, status= ); \ - c =3D update_msacsr(env, 0, IS_DENORMAL(DEST, BITS)); = \ + c =3D update_msacsr(env, 0); = \ = \ if (get_enabled_exceptions(env, c)) { = \ DEST =3D ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; = \ @@ -7312,7 +7301,7 @@ void helper_msa_fexp2_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, = \ set_float_exception_flags(0, status); = \ DEST =3D float ## BITS ## _ ## OP(ARG, status); = \ - c =3D update_msacsr(env, 0, IS_DENORMAL(DEST, BITS)); = \ + c =3D update_msacsr(env, 0); = \ = \ if (get_enabled_exceptions(env, c)) { = \ DEST =3D ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; = \ @@ -7365,7 +7354,7 @@ void helper_msa_fexdo_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, = \ set_float_exception_flags(0, status); = \ DEST =3D float ## BITS ## _ ## OP(ARG, status); = \ - c =3D update_msacsr(env, CLEAR_FS_UNDERFLOW, 0); = \ + c =3D update_msacsr(env, CLEAR_FS_UNDERFLOW); = \ = \ if (get_enabled_exceptions(env, c)) { = \ DEST =3D ((FLOAT_SNAN ## XBITS(status) >> 6) << 6) | c; = \ @@ -7416,7 +7405,7 @@ void helper_msa_ftq_df(CPUMIPSState *env, uint32_t df= , uint32_t wd, = \ set_float_exception_flags(0, status); = \ DEST =3D float ## BITS ## _ ## OP(ARG1, ARG2, status); = \ - c =3D update_msacsr(env, 0, 0); = \ + c =3D update_msacsr(env, 0); = \ = \ if (get_enabled_exceptions(env, c)) { = \ DEST =3D ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; = \ @@ -7672,7 +7661,7 @@ void helper_msa_fclass_df(CPUMIPSState *env, uint32_t= df, = \ set_float_exception_flags(0, status); = \ DEST =3D float ## BITS ## _ ## OP(ARG, status); = \ - c =3D update_msacsr(env, CLEAR_FS_UNDERFLOW, 0); = \ + c =3D update_msacsr(env, CLEAR_FS_UNDERFLOW); = \ = \ if (get_enabled_exceptions(env, c)) { = \ DEST =3D ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; = \ @@ -7780,8 +7769,7 @@ void helper_msa_fsqrt_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, DEST =3D float ## BITS ## _ ## div(FLOAT_ONE ## BITS, ARG, status)= ; \ c =3D update_msacsr(env, float ## BITS ## _is_infinity(ARG) || = \ float ## BITS ## _is_quiet_nan(DEST, status) ? = \ - 0 : RECIPROCAL_INEXACT, = \ - IS_DENORMAL(DEST, BITS)); = \ + 0 : RECIPROCAL_INEXACT); = \ = \ if (get_enabled_exceptions(env, c)) { = \ DEST =3D ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; = \ @@ -7897,7 +7885,7 @@ void helper_msa_frint_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, (~float_flag_inexact), = \ status); = \ = \ - c =3D update_msacsr(env, 0, IS_DENORMAL(DEST, BITS)); = \ + c =3D update_msacsr(env, 0); = \ = \ if (get_enabled_exceptions(env, c)) { = \ DEST =3D ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; = \ --=20 2.25.1