From patchwork Tue May 12 17:39:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 471472 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3DC781400B7 for ; Wed, 13 May 2015 03:51:43 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ibAjIYTV; dkim-atps=neutral Received: from localhost ([::1]:44301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsELE-0008MH-PL for incoming@patchwork.ozlabs.org; Tue, 12 May 2015 13:51:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsEAm-0007vb-8K for qemu-devel@nongnu.org; Tue, 12 May 2015 13:40:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsEAi-0007ku-Vv for qemu-devel@nongnu.org; Tue, 12 May 2015 13:40:52 -0400 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:35207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsEAi-0007km-JV for qemu-devel@nongnu.org; Tue, 12 May 2015 13:40:48 -0400 Received: by qcbgu10 with SMTP id gu10so8592871qcb.2 for ; Tue, 12 May 2015 10:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=O0nKsq6Zq8I2zSv6cg6wG3ciVtuf0/06uzakD6ElBMU=; b=ibAjIYTVLvotqISm46u1zuvOePFgOScHZU/Upx80KkKqAS2rzZmsKcOyZU+tIT7tTt ixUWIZl8JkpWjYiRKC9h9LeLWRv7R8yAX75bbEsx9vXSZyAne6iU++zq6T9prTy3Wrcc Jfrsq0XR6mGWIfP6JUihNFHJ2UoKh5oH3fpUwLcIDHrJVkhvxrr22Wvg0FC6TxCBENLo hcehigjqgwMD2D2zavGw+L27gTk6XORO49J9U2leokx1YiEwuzwU0k1MANFY6WoIVoiR WhC7XEdXsaI9oiYvh1jN3bIoZlFdrwppX8ncBBO9GkBtSzGSrqDf6QkqeSvTkyXXXf69 NwFw== X-Received: by 10.140.235.16 with SMTP id g16mr22752341qhc.55.1431452448314; Tue, 12 May 2015 10:40:48 -0700 (PDT) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id f4sm13701736qhe.9.2015.05.12.10.40.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2015 10:40:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 12 May 2015 10:39:45 -0700 Message-Id: <1431452387-20280-16-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1431452387-20280-1-git-send-email-rth@twiddle.net> References: <1431452387-20280-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::233 Subject: [Qemu-devel] [PATCH v2 15/17] target-alpha: Suppress underflow from CVTTQ if DNZ X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org I.e. respect flush_inputs_to_zero. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/fpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-alpha/fpu_helper.c b/target-alpha/fpu_helper.c index ea1f2e2..fa4401d 100644 --- a/target-alpha/fpu_helper.c +++ b/target-alpha/fpu_helper.c @@ -452,7 +452,7 @@ static uint64_t do_cvttq(CPUAlphaState *env, uint64_t a, int roundmode) frac = a & 0xfffffffffffffull; if (exp == 0) { - if (unlikely(frac != 0)) { + if (unlikely(frac != 0) && !env->fp_status.flush_inputs_to_zero) { goto do_underflow; } } else if (exp == 0x7ff) {