From patchwork Sat May 12 00:42:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135598 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1571706lji; Fri, 11 May 2018 17:54:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoZZ6X4Kfh+BjMjHI8VfHRN1L4gqTe5WHrJf9svWfaScBrvY9xzwqfslm3yd2XqpxNlEOvP X-Received: by 2002:a0c:f381:: with SMTP id i1-v6mr631974qvk.214.1526086465027; Fri, 11 May 2018 17:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526086465; cv=none; d=google.com; s=arc-20160816; b=gg3Ty0Vyg6VFuxYRxKvEkY/3aAqqUvKK+WWkhQ74odSOtEswX16oZyCMTObgF/OURJ bJueYQ16CsBlTwx+kMFgaM5iqVDPjz5hG6jFNxOA24Toc6y8JBAwiS+tZgGamgpSm7t1 jKZ7lXMxUDBjAOEc2MOmGbXpKePsrTBAIaoUn7v2FfCLeKvAv+Bj7NzR+iTDP/CXfOdY 8CbUQ7AmDJbNsvsMKNVExbQ8aJEbcF4KXW0uMkAPzMuUdM74urf7xXFWQF9KeYoWDUW9 re2OcdBlnXN1qhMm10KC7C7MBPAn2ky8QxdmvNO3tZ+bvNX3BuvsTTx7hW7WHx5h9hwH Xo0g== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=jnB8tA4c5Y4Msd2PfhBNR5wBe9pwdTmI4+OOGSATPKw=; b=f15/hEjEsh1B4Br6M/mZAj39lyJywPGgY3Xgb7BQFSEArSpSeAU9yst2+cbj2UUfm9 Nw2M3wy3yXRpp6yYgRaEfng5ZwVk2SGRhRZkswZJA/Dkg85Hq537RXBGoaGBwRz2Ha8m PmxY2LB5gZk4RPPS5m6pf3/a9+KfEblDggoZVMmyNqiwR8zderDoZp8upL7PliQveMZk Nsp6J39MiHy4xz/XwWje8PoD+M4P1qu3jzwyKWFvzEDl8WGlL8cG7hH30iQQzHQqgTOD PUe+S2p4qx0vUYssdP8zFJr7JJ3U46pJKqtXEx9BqKyc8dy5IkMRHtiZ84QOVjMaWKnP 9IYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fE4Ji2Bh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p21-v6si4357620qtj.352.2018.05.11.17.54.24 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 11 May 2018 17:54:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fE4Ji2Bh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:59486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHIno-00046h-GX for patch@linaro.org; Fri, 11 May 2018 20:54:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHIdN-0004g1-I5 for qemu-devel@nongnu.org; Fri, 11 May 2018 20:43:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHIdM-0002wr-Pd for qemu-devel@nongnu.org; Fri, 11 May 2018 20:43:37 -0400 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:34644) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHIdM-0002wF-Kr for qemu-devel@nongnu.org; Fri, 11 May 2018 20:43:36 -0400 Received: by mail-pg0-x243.google.com with SMTP id g20-v6so3086442pgv.1 for ; Fri, 11 May 2018 17:43:36 -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; bh=jnB8tA4c5Y4Msd2PfhBNR5wBe9pwdTmI4+OOGSATPKw=; b=fE4Ji2BhX23c6muAGtx4355+/t53Mom8doTp6Lws0dvK27CyEAXmOlSfRRtKuUCYR9 4A7lxrZAcpccyOQThu7Px/ENJSRFGeYhaUJEeVJh/FYcl6uDqfXNktdbN2MbweMYHckY d8nnkOZX29PJzx844BPe207rvM7yaK+GJE+Lk= 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; bh=jnB8tA4c5Y4Msd2PfhBNR5wBe9pwdTmI4+OOGSATPKw=; b=oFz3AXZmz7GmyipFtwWpBkVVdW2C2US2Zzss6YSaSOG77IodfJc2m027Z/Oa9k+Oko D4DiYZfO/rn1W/5q6eV+uabGwIj6Lb1/nVyumYn5zN4lE4hzqKl5rkDfnulVKzlr0OLj VCVh/aI/6aM2rC1ddLOEblqb+i/LoxfFQ5wx9eMG8XpneuRKN/H9sL5WFcPdR8g7QqId ehqt6Sv71kq63M1uQbp9w5FBEqpPFTDznbV0/Sy+XCQrxBdTkTtr1vMwLC7lssTWp/Zb K6KcWuS8kmnWP8YyPzQ74cDQNJzSWnOobfrDXs/EE39GeJDrWo/O+f/gp07A6g0dUdyU WdIA== X-Gm-Message-State: ALKqPwcEbtbN8GcPwv1eXF5Z4Y8dTgzQ0DHry8Jf0JlY4YKue30wGMzm SQyG1wkrxFbrbqIFNa0FL6yNN+07Ytk= X-Received: by 2002:a62:5754:: with SMTP id l81-v6mr996185pfb.56.1526085815409; Fri, 11 May 2018 17:43:35 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id k84-v6sm10756406pfh.93.2018.05.11.17.43.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 May 2018 17:43:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 11 May 2018 17:42:59 -0700 Message-Id: <20180512004311.9299-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512004311.9299-1-richard.henderson@linaro.org> References: <20180512004311.9299-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 Subject: [Qemu-devel] [PATCH v2 15/27] target/arm: Fix fp_status_f16 tininess before rounding X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org, qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell In commit d81ce0ef2c4f105 we added an extra float_status field fp_status_fp16 for Arm, but forgot to initialize it correctly by setting it to float_tininess_before_rounding. This currently will only cause problems for the new V8_FP16 feature, since the float-to-float conversion code doesn't use it yet. The effect would be that we failed to set the Underflow IEEE exception flag in all the cases where we should. Add the missing initialization. Fixes: d81ce0ef2c4f105 Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.0 diff --git a/target/arm/cpu.c b/target/arm/cpu.c index d175c5e94f..7939c6b8ae 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -324,6 +324,8 @@ static void arm_cpu_reset(CPUState *s) &env->vfp.fp_status); set_float_detect_tininess(float_tininess_before_rounding, &env->vfp.standard_fp_status); + set_float_detect_tininess(float_tininess_before_rounding, + &env->vfp.fp_status_f16); #ifndef CONFIG_USER_ONLY if (kvm_enabled()) { kvm_arm_reset_vcpu(cpu);