From patchwork Tue May 15 14:06:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 135890 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1076447lji; Tue, 15 May 2018 07:16:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZotV6k7uQFP+Omcp9I/pKi+pjRDO9Ttlzd8bq0jUWFXk5rDEZO5Sh1s5PfeczV1K04P8dUS X-Received: by 2002:a0c:d92d:: with SMTP id p42-v6mr242100qvj.78.1526393767345; Tue, 15 May 2018 07:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526393767; cv=none; d=google.com; s=arc-20160816; b=bUTDhO8mDQ/dDsqB3dLrDHQdA0Oi/2KN8S7nRzfeGYjyB5MlLaw9ISfQI0hMJBtMi1 vnd6K/cxrY+KKD5A7Km9v17jrh/W6PH87dkoWp4laEUq62f9hmeTOveMmk2LF5MQ+mwN Jpsd+orhrgzdB0A87cDC/dDb/setZkdwX+O7lOYG7dWnxp2YJTkAg+/K56eVs66f/k1j zU5GoHO4M8q3PSiO3E3fUnltU/UKyhYSjkFsfJPi3hcbzEkvw0UNKImAX+c1RKCngk2C hKiuPRfYBvFj2bKUSxn95i5emK/62UjdC2r2jHlvGSUoVPxVYMaWtiZX18dVKOxTuD90 UHBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=P8NM1Vr/CH805dzrJYAWV6FewZeXl3gxOvvhd0AstXU=; b=jQxF5KaiHqZc2lXFa9laE9d0QiuyIwEMGCVX6a+qtD0Xm8BBdq40YpQjkgBGpT0/kA S0ZlkKPtLTG5XJP2wi+CCCs7c84KnvkZaBRsxXlU448/pvytvHfC2NGdcbtmuHtfv130 yGVDjqQLyHhtJbEDk1IbDfQFWTaMNd2dju2gIZQlTqzmObxcEIFpUmMVHxRyPSctat05 Bd3t/IC5DIT+3YhCxh9MbxiD0hulJv5bzecB1+Yq+y+mwntV0963GAaVuZBohEWK490p DWwuLYwOZB1etbYUE4qHH93a79Kyp/7KaHNIEeF51uOO1mIrhbnuP6rqo8yKsD7zLsy3 IXUw== ARC-Authentication-Results: i=1; mx.google.com; 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 z3-v6si122952qva.256.2018.05.15.07.16.07 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 15 May 2018 07:16:07 -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; 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]:40014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIakI-0001ko-N9 for patch@linaro.org; Tue, 15 May 2018 10:16:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIabl-0003pe-Gw for qemu-devel@nongnu.org; Tue, 15 May 2018 10:07:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIabf-0002nk-Rh for qemu-devel@nongnu.org; Tue, 15 May 2018 10:07:17 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:41678) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fIabf-0002nB-Kv for qemu-devel@nongnu.org; Tue, 15 May 2018 10:07:11 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fIabe-0001OC-Ny for qemu-devel@nongnu.org; Tue, 15 May 2018 15:07:10 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 15 May 2018 15:06:54 +0100 Message-Id: <20180515140707.15957-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180515140707.15957-1-peter.maydell@linaro.org> References: <20180515140707.15957-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 03/16] 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Peter Maydell Message-id: 20180512004311.9299-16-richard.henderson@linaro.org --- 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);