From patchwork Thu May 27 04:14:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 448816 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp158149jac; Wed, 26 May 2021 21:14:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrvrpMjzfcq0V2w6bG3YPOZlLRXPV5SfDWayQKs/cGDi+n/XZtfpugTY7UH+3RfwOeEiFX X-Received: by 2002:a25:d6c8:: with SMTP id n191mr1945024ybg.358.1622088883978; Wed, 26 May 2021 21:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622088883; cv=none; d=google.com; s=arc-20160816; b=bD1ddPm0oon8YZl0Clk/xg2UbHK39ljtgorpsKd1hIXw328DgMHwHqPjigfmBypea7 BxVt5wfCNg3o4gLyxW2JKqgwikScVZm5TeLqY/rxLrVf2Q4XbgSTCS7nkpFDL7hpnD2/ 5LrMMoBTf4CDJ+fEVR8bcX7Rj2wOO709EJ6M7LnJ0HDz/Q+n3w3N/rIGfXef1+RHK+JH N2mnm3bWBbzSHxsPaYyEWQA/baxKEMbeasln9pCgreG3BO2RUcDRcbPa6FiNF/Oyw2Uc cY6Q6/i3dIW3h67tg5HKlC+JHVRrOwU65D0ehc9IrUxY6Jo7tQnBfqEo1B/MsyHNk3So wRAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=iIf4CiQjBFO3jZShlRi5AmbhMlsdhUxW6Q2TeLIQ1Ds=; b=d6WO/4+WRxmxkby4/MMjZ57a/mejGlk1um6OH2tOUS9Z6Td6L3z1skkR/1FPuC/5QT uH4UMbQKf7f6xP1yaIVyReY7I404DUQRO5TnqfpCye9UA823S8a1bq4JSouKcQqep6Tr q1xVNSlZmRgt//bVDcbFvgIFxrMYI2t/IvEQTEc1u/KXJQSZ4ny3b9dmIoISJOpC62Nw XnTfjPQPN/ucI2C0cj6f+LTS6bh2sAaWnwZXJ0AQPPs+bcPtDcRXJTY8G1yLL+S/WNsr U1m4LsqYHzKrG8GdwTTVo+1+LDOuwtJTWlxQRFN0AHFgkD2eJxqznf5QVN8ec+eSGwCA H5pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SdGxfJ9m; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x5si1024137ybt.428.2021.05.26.21.14.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 May 2021 21:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SdGxfJ9m; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm7Pv-0001jM-ES for patch@linaro.org; Thu, 27 May 2021 00:14:43 -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) 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-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) 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) 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 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_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , Yoshinori Sato Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Cc: Yoshinori Sato Signed-off-by: Richard Henderson --- target/rx/op_helper.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.25.1 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, uintptr_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 = FIELD_DP32(env->fpsw, FPSW, CE, 1); }