From patchwork Wed Jan 16 20:23:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1026196 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="UeojzR1x"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fzJp07wgz9sDX for ; Thu, 17 Jan 2019 07:27:06 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrmB-0000RJ-TS for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 15:27:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrjD-0006xz-58 for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrjB-0006Re-OH for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:59 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:40835) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjrjB-0006L0-G6 for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:57 -0500 Received: by mail-wr1-x441.google.com with SMTP id p4so8475056wrt.7 for ; Wed, 16 Jan 2019 12:23:57 -0800 (PST) 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=F4xieiuSGqqMJCZRrk4MmRbOQ9MdsYPNyyxXECLqEvE=; b=UeojzR1xFfuUFIKIptlt/HuOr6v2o/BRtRVfoZ5+SWAHY/+IidELqZR6LBG81ArypM FWJgG5Xr/Q2u1xmpT44ctt2/qSO19Z7Ry+Bclyzz6pIFwUFSD/U/OYsId0f6zLUWjeLl XQt9R0Xv2bY9hxB46Y974Q9mDfJC25sIxY2ks= 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=F4xieiuSGqqMJCZRrk4MmRbOQ9MdsYPNyyxXECLqEvE=; b=ODKCQl/o+2YZLTaUjjvTAvnhkpQbdeKmfpC4evzANruIV/B9RhqtPC4zy5P+xtYMNG prMK+SyE8SibW4Ir1pekRTrxa9CYELEuj5neto9re+8FZBMXd1xufnIfMEu7Zzl0x3eo n1bhdjLIXrRZAPKWC896G9EcZcyxfKV/16Y9rqM3zNqlYSETaNrUMNWucsRYQIFWndr8 uAwgpmQi+OGO3ezKhBel9vCrdQnZNguV6YGw2+rRS2PZO+a0tOvqDOKxFYr9A++Rcfpw yzZqDEF8iWGTCuD4cLpqqpBZwSXLAFUssABnWVhpoED54MLez1QRKJPm35zZmz64h4YU kduw== X-Gm-Message-State: AJcUukfYBKBNxZPinapjcPfA9Mlr/8UjxcDYw341Aq66haCBbvFa8SKx S5TeDWUQitW2SF67fK6ayP6uM29hyOw= X-Google-Smtp-Source: ALg8bN7ynq29NEU2yUXGVKdEkUJ3i+rL9hMhQmg8fKCloomPokcNKwDkasV1z9vUIgsrWMIZ2nkmFg== X-Received: by 2002:adf:9521:: with SMTP id 30mr8548762wrs.192.1547670236205; Wed, 16 Jan 2019 12:23:56 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l19sm37407893wme.21.2019.01.16.12.23.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 12:23:53 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 79F353E0F34; Wed, 16 Jan 2019 20:23:49 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 16 Jan 2019 20:23:43 +0000 Message-Id: <20190116202349.29272-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190116202349.29272-1-alex.bennee@linaro.org> References: <20190116202349.29272-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v2 1/7] fp-bench: fix update_random_ops 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 , cohuck@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , "Emilio G. Cota" , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" The second test in the branches is wrong; fix while converting to a switch statement, which is easier to get right. Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/fp/fp-bench.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/fp/fp-bench.c b/tests/fp/fp-bench.c index f5bc5edebf..546bac9c9c 100644 --- a/tests/fp/fp-bench.c +++ b/tests/fp/fp-bench.c @@ -143,15 +143,20 @@ static void update_random_ops(int n_ops, enum precision prec) for (i = 0; i < n_ops; i++) { uint64_t r = random_ops[i]; - if (prec == PREC_SINGLE || PREC_FLOAT32) { + switch (prec) { + case PREC_SINGLE: + case PREC_FLOAT32: do { r = xorshift64star(r); } while (!float32_is_normal(r)); - } else if (prec == PREC_DOUBLE || PREC_FLOAT64) { + break; + case PREC_DOUBLE: + case PREC_FLOAT64: do { r = xorshift64star(r); } while (!float64_is_normal(r)); - } else { + break; + default: g_assert_not_reached(); } random_ops[i] = r; From patchwork Wed Jan 16 20:23:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1026187 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ICMTDAm2"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fzFt1Xtcz9sDP for ; Thu, 17 Jan 2019 07:24:33 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrjj-0006vJ-Ce for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 15:24:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrj8-0006tO-Bb for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrj7-0005yI-BS for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:54 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:51851) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjrj6-0005li-DN for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:53 -0500 Received: by mail-wm1-x343.google.com with SMTP id b11so3461048wmj.1 for ; Wed, 16 Jan 2019 12:23:52 -0800 (PST) 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=BKiceF0eCEcLLYJ2HmNMq8GOYGcVmd+bgBmQXvFufFI=; b=ICMTDAm2MYZElsEOd0ownrO3SpNz1ed+/j32/X7wENSRMAfuzvY6ZQN3ecpS9Ch3fp Vyt+UlP4ucv/adkJq22zQWCtuWgQbBTbYu1pTqSpx6/Ukjo0u9hb05ySd6vZdMd6hov6 fkklox1wALq0Ce8KpDM9yGpyh4m+rcv1TLoFU= 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=BKiceF0eCEcLLYJ2HmNMq8GOYGcVmd+bgBmQXvFufFI=; b=n9onb6feOq8CFslHV7icXyZieAt5HoTwM+rB9WgRO5ZFRitry4UmwhYKC1yMXI1tSW T/ubjTF17qzTqX1uJRRmLIiszvgo6dPuEVg9xtShr5OTNadoAtbeZVIukG1yU+cYYZV9 d30OyaZmaSZT0XcLY8FhEtNCEnINVBJrD/1lRoQfGVG5pjx5v2PlBviBTaHsqvEUuXeA klrLkah+Je9pHmMldSiLRSihVuxBN7mfNypKO6mn3qiaUXRkm4pvT96npt7kzBEh4Jrm D2CCBxwnZqaUAYo4GMAVxjV2nnRTmZM2CTi+fXVrj6qa3e+DP2JfAvBhB7apJ7XB705r V69g== X-Gm-Message-State: AJcUukftLWO8WYAlDYeYhz35R3Lx0EsZQkUTd/rJhzn81QMLYZagZZGS vf0wYFUq13B/sP5PNeQzUDLM1Q== X-Google-Smtp-Source: ALg8bN72m+F7L8snqoCNfRG5vYtPfH4JirnNNdUX2aR7DJUSSTLyZkVvbZSvgs+zNGy/e8fW8syiUw== X-Received: by 2002:a1c:7c07:: with SMTP id x7mr9062655wmc.82.1547670231083; Wed, 16 Jan 2019 12:23:51 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s8sm93817298wrn.44.2019.01.16.12.23.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 12:23:50 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 8EAD43E0F3C; Wed, 16 Jan 2019 20:23:49 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 16 Jan 2019 20:23:44 +0000 Message-Id: <20190116202349.29272-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190116202349.29272-1-alex.bennee@linaro.org> References: <20190116202349.29272-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH v2 2/7] fp-bench: remove wrong exponent raise in fill_random 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 , cohuck@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , "Emilio G. Cota" , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" At this point random_ops[] only contains normals, so there's no need to do anything to them. In fact, raising the exponent here can make the output !normal, which is precisely what the comment says we want to avoid. Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- tests/fp/fp-bench.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/fp/fp-bench.c b/tests/fp/fp-bench.c index 546bac9c9c..4ba5e1d2d4 100644 --- a/tests/fp/fp-bench.c +++ b/tests/fp/fp-bench.c @@ -176,8 +176,6 @@ static void fill_random(union fp *ops, int n_ops, enum precision prec, if (no_neg && float32_is_neg(ops[i].f32)) { ops[i].f32 = float32_chs(ops[i].f32); } - /* raise the exponent to limit the frequency of denormal results */ - ops[i].f32 |= 0x40000000; break; case PREC_DOUBLE: case PREC_FLOAT64: @@ -185,8 +183,6 @@ static void fill_random(union fp *ops, int n_ops, enum precision prec, if (no_neg && float64_is_neg(ops[i].f64)) { ops[i].f64 = float64_chs(ops[i].f64); } - /* raise the exponent to limit the frequency of denormal results */ - ops[i].f64 |= LIT64(0x4000000000000000); break; default: g_assert_not_reached(); From patchwork Wed Jan 16 20:23:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1026188 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="adhpLQus"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fzFy6hc6z9sDP for ; Thu, 17 Jan 2019 07:24:38 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrjo-0006yX-Qx for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 15:24:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrj9-0006ut-GW for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrj8-000653-HV for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:55 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:34597) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjrj8-00060F-AN for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:54 -0500 Received: by mail-wm1-x342.google.com with SMTP id y185so1921552wmd.1 for ; Wed, 16 Jan 2019 12:23:54 -0800 (PST) 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=V4sA7A65E2SWFC74zBDODZmknqvCshvStCQltJmAmqo=; b=adhpLQusJL5zHwRexa4Zd+cLrLGFFUnQ5PJ3RKhZZpJlqmbXUdrMKVQjNJmfPrDlxL NOzx7zZqQd2d4/z2XvWzcbEAhQbgz1XwY3JnuLKaWTSkrDvBrzh+Mpf+urrI/wslfRs+ FlirSqgMltJ2alV5xah4uGcy0LYY6XQpf7hv0= 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=V4sA7A65E2SWFC74zBDODZmknqvCshvStCQltJmAmqo=; b=tHiBr3AyQScFNt3PchDOqdaLea1+6qU3uFIT462vdRHbN2OQaOq1lDPxtFrNE1G5Mj knzYY2ASbnqdTcDcntmjDF2mYpNCvtmTstcY55gqBa8HfSs7/l/u0SlQ36lCeRBhsHLV PQ7JrGbaaS61f3khoOAAzdwXpgKOtWKh6GWL9410mvZvJXHOmEtTPqZ6FMQafGZ61qzU yiKTIZywEmiXHxr/qNN0oPDKW6Yj7xojd6gNLNbEFKU5e9J7rekeFnnB1WCPXpySQTxA 3RITaFUnJd6AHvQS0Msfv9OdlPKqcNVH+dV9QmZUlDZqsp7tyFoP1xFXNQ8wJw4eQenX ZJKA== X-Gm-Message-State: AJcUukeQ2fUgQ7sHEWazKSRkE2YA6d+Iob+qqjhYiXcISfO7xF1u+BLU JXsDFO+7OKJfLKmRN+m6G6PViA== X-Google-Smtp-Source: ALg8bN72u4XzEvzvzcmLolZpKZ10oJ4lM5QVtf6OHdNVwcSl8+gsrFjEnm/trLV8yxfzrlzUXriIpg== X-Received: by 2002:a7b:c757:: with SMTP id w23mr8430756wmk.59.1547670232663; Wed, 16 Jan 2019 12:23:52 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s1sm115908380wro.9.2019.01.16.12.23.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 12:23:50 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A48A13E0F77; Wed, 16 Jan 2019 20:23:49 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 16 Jan 2019 20:23:45 +0000 Message-Id: <20190116202349.29272-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190116202349.29272-1-alex.bennee@linaro.org> References: <20190116202349.29272-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH v2 3/7] softfloat: enforce softfloat if the host's FMA is broken 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 , cohuck@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , "Emilio G. Cota" , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" The added branch to the FMA ops is marked as unlikely and therefore its impact on performance (measured with fp-bench) is within noise range when measured on an Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz. Reported-by: Laurent Desnogues Signed-off-by: Emilio G. Cota Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- fpu/softfloat.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 59eac97d10..9132d7a0b0 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1542,6 +1542,8 @@ soft_f64_muladd(float64 a, float64 b, float64 c, int flags, return float64_round_pack_canonical(pr, status); } +static bool force_soft_fma; + float32 QEMU_FLATTEN float32_muladd(float32 xa, float32 xb, float32 xc, int flags, float_status *s) { @@ -1562,6 +1564,11 @@ float32_muladd(float32 xa, float32 xb, float32 xc, int flags, float_status *s) if (unlikely(!f32_is_zon3(ua, ub, uc))) { goto soft; } + + if (unlikely(force_soft_fma)) { + goto soft; + } + /* * When (a || b) == 0, there's no need to check for under/over flow, * since we know the addend is (normal || 0) and the product is 0. @@ -1623,6 +1630,11 @@ float64_muladd(float64 xa, float64 xb, float64 xc, int flags, float_status *s) if (unlikely(!f64_is_zon3(ua, ub, uc))) { goto soft; } + + if (unlikely(force_soft_fma)) { + goto soft; + } + /* * When (a || b) == 0, there's no need to check for under/over flow, * since we know the addend is (normal || 0) and the product is 0. @@ -7974,3 +7986,24 @@ float128 float128_scalbn(float128 a, int n, float_status *status) , status); } + +static void __attribute__((constructor)) softfloat_init(void) +{ + union_float64 ua, ub, uc, ur; + + if (QEMU_NO_HARDFLOAT) { + return; + } + /* + * Test that the host's FMA is not obviously broken. For example, + * glibc < 2.23 can perform an incorrect FMA on certain hosts; see + * https://sourceware.org/bugzilla/show_bug.cgi?id=13304 + */ + ua.s = 0x0020000000000001ULL; + ub.s = 0x3ca0000000000000ULL; + uc.s = 0x0020000000000000ULL; + ur.h = fma(ua.h, ub.h, uc.h); + if (ur.s != 0x0020000000000001ULL) { + force_soft_fma = true; + } +} From patchwork Wed Jan 16 20:23:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1026193 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="aWZqCPxr"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fzJd62f9z9sDP for ; Thu, 17 Jan 2019 07:26:57 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrm3-0000Mv-Jv for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 15:26:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrj9-0006uu-Pj for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrj8-00065w-LM for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:55 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:33777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjrj8-00061a-DK for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:54 -0500 Received: by mail-wm1-x342.google.com with SMTP id r24so1922813wmh.0 for ; Wed, 16 Jan 2019 12:23:54 -0800 (PST) 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=CH+fbm3rQwsIpBYqFgXaDA7siyiApJFCyWBJwHgGYWA=; b=aWZqCPxrEMnlEm+/gFQQFPkRlEiv9EH8+dwji35zK7tPZrybY90DEj0F7DyVrLaLcX Hk+eFvrvQvqKRI19puzXfRsOoea8WfE/hRelUpUFlkB3kMsHzIMA2iQCYP+H7LrNBiN8 DNWFNw7iV3ApNmmZp0vC4gk7TFG7K8fxRyoXw= 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=CH+fbm3rQwsIpBYqFgXaDA7siyiApJFCyWBJwHgGYWA=; b=gkxp9OOjtkCeRytH/6aL53R1s9KKgsqjib1kucyCIjPtmcR4w6mO7a467g1IAh7nWj 5th/N9lwxYkLUJO2ffNwoAIRxGAfldTCSP7Ah46ryR8lZOZr+3XouI0gwTOASbqFaIDH CCMjfqM7uV56DnVZAN/ToFKDcg50jNyXf5STtgejgn/RruD98/H78iZl/eWtuUVGyY2r wlwQ9KZgOdQVZjKRjjGkFwQVnUCemNz5KDNALuhgHMumxfuh2Wgg6gjgSbK1295YtZUj bl7s7aZNnVIHLhX0H8UpsB47e8pbDXI81ardtOXo8U6/LhYx+FfwF02F2hZQicr4DXvY JCYg== X-Gm-Message-State: AJcUukfOY14sFPn4M0lWjpbOEzvqqaXLWM5APx+b1AXbuS3sBsWam7Up 6GK+CSpHG/UxXJRzD5PC/jgjUQ== X-Google-Smtp-Source: ALg8bN6++HlrVNE1c/pQiJO2xFhmsKyrfOh9zbCI/uOuSPK+fBRuhnS8EOlvWYZXlUHqsSqXTtfvcw== X-Received: by 2002:a1c:7616:: with SMTP id r22mr8944104wmc.35.1547670233242; Wed, 16 Jan 2019 12:23:53 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id g188sm40872946wmf.32.2019.01.16.12.23.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 12:23:50 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B8D2B3E0FBD; Wed, 16 Jan 2019 20:23:49 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 16 Jan 2019 20:23:46 +0000 Message-Id: <20190116202349.29272-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190116202349.29272-1-alex.bennee@linaro.org> References: <20190116202349.29272-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH v2 4/7] softfloat: fallback to __int128 maths for s390x and others 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 , Thomas Huth , cohuck@redhat.com, "open list:S390" , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Apparently some versions of clang can't handle inline assembly with __int128 parameters, especially on s390. Instead of hand-coding the s390 divide provide a generic fallback for anything that provides __int128 capable maths. Signed-off-by: Alex Bennée Cc: Thomas Huth --- include/fpu/softfloat-macros.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/fpu/softfloat-macros.h b/include/fpu/softfloat-macros.h index b1d772e6d4..1a43609eef 100644 --- a/include/fpu/softfloat-macros.h +++ b/include/fpu/softfloat-macros.h @@ -641,12 +641,6 @@ static inline uint64_t udiv_qrnnd(uint64_t *r, uint64_t n1, uint64_t q; asm("divq %4" : "=a"(q), "=d"(*r) : "0"(n0), "1"(n1), "rm"(d)); return q; -#elif defined(__s390x__) - /* Need to use a TImode type to get an even register pair for DLGR. */ - unsigned __int128 n = (unsigned __int128)n1 << 64 | n0; - asm("dlgr %0, %1" : "+r"(n) : "r"(d)); - *r = n >> 64; - return n; #elif defined(_ARCH_PPC64) && defined(_ARCH_PWR7) /* From Power ISA 2.06, programming note for divdeu. */ uint64_t q1, q2, Q, r1, r2, R; @@ -663,6 +657,10 @@ static inline uint64_t udiv_qrnnd(uint64_t *r, uint64_t n1, } *r = R; return Q; +#elif defined(CONFIG_INT128) + unsigned __int128 n = (unsigned __int128)n1 << 64 | n0; + *r = n % d; + return n / d; #else uint64_t d0, d1, q0, q1, r1, r0, m; From patchwork Wed Jan 16 20:23:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1026195 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="VH+pj2Du"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fzJn3vs6z9sDP for ; Thu, 17 Jan 2019 07:27:05 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrmB-0000Qn-EA for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 15:27:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrjB-0006vq-HQ for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrjA-0006Ih-Cy for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:57 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:34834) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjrjA-0006AN-2R for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:56 -0500 Received: by mail-wr1-x444.google.com with SMTP id 96so8504407wrb.2 for ; Wed, 16 Jan 2019 12:23:55 -0800 (PST) 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=4tIQHkLdtPcPZgGvv4SbMOFG+FC+QLZJH+6yX93G298=; b=VH+pj2DulY4L3GYw+Lqhx3p3Q4uz5mkIApBhbEINQwaaeFvD1aeglBBDGGz+KsammC unBorcYftB/dHnBqQ6WPiaeq7RyYj/vqhrfSsnMySkzfIBaBSXluUqXkOPSXC1hhrJi/ kohCeKR57qZN+SrxbHQAdIP7lNDIsyJ3p0nY0= 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=4tIQHkLdtPcPZgGvv4SbMOFG+FC+QLZJH+6yX93G298=; b=bpOaJxex+ZY5ZgotkomFJX87FoT1F8ggG/DfVbSmUKjS/jVwPet/WF1xhvaI824vSH mu//YU//JvsA927ENjI3QlDdoqIBayDH0b2/nb/b77x3xdewPZ93LG6lIFuTstNTSM7o JGHfVUy54fhFbXSg4BG/LD1FtszUkaJxYHRm4k5D7P+vGBRVUtPLnruVle/F6wzvKNhR oq5mZ+Z6AoaZ2xLqbWRIczIGnybKC5qaSe1CXuYsY8huMvOes9xRZ2w+CXauAFCyOt9m whLAyBT2MucQo/qnkiz7gyw+W0xd48rIEQjl0eZYRbmfEVm/XqbsnfHCi92COEo01xPZ 5wgA== X-Gm-Message-State: AJcUukdlqNShfs/JYTh2pqqArQowILlvbi6szrYb2wQkGlASlhR5wzFQ 62Haeb5Vml7heGXicaqsY1fasw== X-Google-Smtp-Source: ALg8bN4E2zaJ0kZygEAdi08RgnHGRXZ3FBs0rgLxTNQg79nUw/MCOlli9i+QYwNcBQ+ATsBeJzpWDg== X-Received: by 2002:adf:e8c1:: with SMTP id k1mr8597692wrn.104.1547670234737; Wed, 16 Jan 2019 12:23:54 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x15sm83022108wrs.27.2019.01.16.12.23.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 12:23:53 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id CD0733E10B2; Wed, 16 Jan 2019 20:23:49 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 16 Jan 2019 20:23:47 +0000 Message-Id: <20190116202349.29272-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190116202349.29272-1-alex.bennee@linaro.org> References: <20190116202349.29272-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH v2 5/7] tests/Makefile: add floating point tests 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: cohuck@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Wire up test/fp-test into the main testing Makefile. Currently we skip some of the extF80 and f128 related tests. Once we re-factor and fix these tests the plumbing should get simpler. Signed-off-by: Alex Bennée --- tests/Makefile.include | 115 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index f403a6571d..43888f3ad5 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -878,6 +878,121 @@ check-report-unit.tap: $(check-unit-y) check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) check-report-unit.tap $(call quiet-command,./scripts/tap-merge.py $^ > $@,"GEN","$@") +# FPU Emulation tests (aka softfloat) +# +# As we still have some places that need fixing the rules are a little +# more complex than they need to be and have to override some of the +# generic Makefile expansions. Once we are cleanly passing all +# the tests we can simplify the make syntax. + +# the build dir is created by configure +$(BUILD_DIR)/tests/fp/fp-test: $(BUILD_DIR)/tests/fp + $(call quiet-command, \ + cd $(BUILD_DIR)/tests/fp && make, \ + "BUILD", $<) + +# The full test suite can take a bit of time, default to a quick run +ifeq ($(SPEED), quick) +FP_TL=-l 1 +else +FP_TL=-l 2 -r all +endif + +# $1 = tests, $2 = description +test-softfloat = $(call quiet-command, \ + cd $(BUILD_DIR)/tests/fp && ./fp-test -s $(FP_TL) $1 > $2.out 2> $2.err, \ + "FLOAT TEST", $2) + +# Conversion Routines: +# FIXME: i32_to_extF80 (broken), i64_to_extF80 (broken) +# ui32_to_f128 (not implemented), f128_to_ui32 (not implemented) +# extF80_roundToInt (broken) +# +check-softfloat-conv: tests/fp/fp-test + $(call test-softfloat, \ + i32_to_f16 i64_to_f16 \ + i32_to_f32 i64_to_f32 \ + i32_to_f64 i64_to_f64 \ + i32_to_f128 i64_to_f128, int-to-float) + $(call test-softfloat, \ + ui32_to_f16 ui64_to_f16 \ + ui32_to_f32 ui64_to_f32 \ + ui32_to_f64 ui64_to_f64 \ + ui64_to_f128, uint-to-float) + $(call test-softfloat, \ + f16_to_i32 f16_to_i32_r_minMag \ + f32_to_i32 f32_to_i32_r_minMag \ + f64_to_i32 f64_to_i32_r_minMag \ + extF80_to_i32 extF80_to_i32_r_minMag \ + f128_to_i32 f128_to_i32_r_minMag \ + f16_to_i64 f16_to_i64_r_minMag \ + f32_to_i64 f32_to_i64_r_minMag \ + f64_to_i64 f64_to_i64_r_minMag \ + extF80_to_i64 extF80_to_i64_r_minMag \ + f128_to_i64 f128_to_i64_r_minMag, \ + float-to-int) + $(call test-softfloat, \ + f16_to_ui32 f16_to_ui32_r_minMag \ + f32_to_ui32 f32_to_ui32_r_minMag \ + f64_to_ui32 f64_to_ui32_r_minMag \ + f16_to_ui64 f16_to_ui64_r_minMag \ + f32_to_ui64 f32_to_ui64_r_minMag \ + f64_to_ui64 f64_to_ui64_r_minMag, \ + float-to-uint) + $(call test-softfloat, \ + f16_roundToInt f32_roundToInt \ + f64_roundToInt f128_roundToInt, \ + round-to-integer) + +# Generic rule for all float operations +# +# Some patterns are overidden due to broken or missing tests. +# Hopefully these can be removed over time. + +check-softfloat-%: tests/fp/fp-test + $(call test-softfloat, f16_$* f32_$* f64_$* extF80_$* f128_$*, $*) + +# Float Compare routines +SF_COMPARE_OPS=eq eq_signaling le le_quiet lt_quiet +SF_COMPARE_RULES=$(patsubst %,check-softfloat-%, $(SF_COMPARE_OPS)) + +# FIXME: extF80_le_quiet (broken) +check-softfloat-le_quiet: tests/fp/fp-test + $(call test-softfloat, \ + f16_le_quiet f32_le_quiet f64_le_quiet \ + f128_le_quiet, \ + le_quiet) + +# FIXME: extF80_lt_quiet (broken) +check-softfloat-lt_quiet: tests/fp/fp-test + $(call test-softfloat, \ + f16_lt_quiet f32_lt_quiet f64_lt_quiet \ + f128_lt_quiet, \ + lt_quiet) + +.PHONY: check-softfloat-compare +check-softfloat-compare: $(SF_COMPARE_RULES) + +# Math Operations + +# FIXME: extF80_mulAdd (missing) +check-softfloat-mulAdd: tests/fp/fp-test + $(call test-softfloat, \ + f16_mulAdd f32_mulAdd f64_mulAdd f128_mulAdd, \ + mulAdd) + +# FIXME: extF80_rem (broken) +check-softfloat-rem: tests/fp/fp-test + $(call test-softfloat, \ + f16_rem f32_rem f64_rem f128_rem, \ + rem) + +SF_MATH_OPS=add sub mul mulAdd div rem sqrt +SF_MATH_RULES=$(patsubst %,check-softfloat-%, $(SF_MATH_OPS)) + +.PHONY: check-softfloat-ops +check-softfloat-ops: $(SF_MATH_RULES) + # Per guest TCG tests LINUX_USER_TARGETS=$(filter %-linux-user,$(TARGET_DIRS)) From patchwork Wed Jan 16 20:23:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1026200 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="TOCQ9emo"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fzMV53Ncz9sDP for ; Thu, 17 Jan 2019 07:29:26 +1100 (AEDT) Received: from localhost ([127.0.0.1]:46201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjroS-0002DI-L2 for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 15:29:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrjD-0006yR-IE for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:24:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrjC-0006Wj-Gq for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:59 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:46706) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjrjC-0006Qi-8r for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:58 -0500 Received: by mail-wr1-x435.google.com with SMTP id l9so8414057wrt.13 for ; Wed, 16 Jan 2019 12:23:58 -0800 (PST) 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=HjyDClYTa4RavIRqdKjd3FAFDFKhqzTfdleMBuojdXM=; b=TOCQ9emoqnDIYvxdaQdhs3sRSVqXwRoRPghIbhuyaeZjh72fWO7QlzwbHNdSebhlh/ PgDndk5uGmslEJDTXiDIsJdET/oxKNCi0LTAUSw6H6uLW1mSsCIBWx2syAljUk8TXqva CXyYr2B90J2d+ZQq7LHh5+WK3ZwrWH8lrL3Ik= 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=HjyDClYTa4RavIRqdKjd3FAFDFKhqzTfdleMBuojdXM=; b=MhK/T8eUyGZgTPyB01kI0Y02RMKvIzTqnSgSSqY9cLH41pclbkcW3OTaxLQV9IpajA kY5KfxV8O9VLcEZvV9E3oQtnYXKMAqZm0W55l4BQEFQ71Q77f+sDYKPetVRq1oZs7K6i VNpcFb0HeAFhkbbIAxbSUYaXdTm/6OYwM72jPfIaEau1n4t84eRg3Cjkj4RNitNbSIsu aLAIn4PW16CU6REalLAf/iQRG/bkGm+jBFyKOIFKE2c6d/aOcSSxSrTEIQTv4uWWW/9z KLgtUOul7d2UJA80zuzkOtW97hOTbE8weEE6roqyBVgSl8qLLP3I7zVUPA/OuDEVpbH9 AzWg== X-Gm-Message-State: AJcUukfaNQFrDqFnd+ZeQjjOHqynULNk9KHxHonZ6/oCnHn1FydCrV36 6AGzzYGRwi/bYOTxtyTRYn2W6w1o6W4= X-Google-Smtp-Source: ALg8bN5zZpN+SAD3/cMaqGkrLoY23G77Z4Fr79hRgubItrGWEa9h1qZ4IMDX0SsY7I1vyMnyFyGD6Q== X-Received: by 2002:adf:cc91:: with SMTP id p17mr9178157wrj.118.1547670237071; Wed, 16 Jan 2019 12:23:57 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o5sm66464639wmg.25.2019.01.16.12.23.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 12:23:53 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E01CE3E1138; Wed, 16 Jan 2019 20:23:49 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 16 Jan 2019 20:23:48 +0000 Message-Id: <20190116202349.29272-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190116202349.29272-1-alex.bennee@linaro.org> References: <20190116202349.29272-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::435 Subject: [Qemu-devel] [PATCH v2 6/7] scripts/archive-source: include softfloat tests 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: cohuck@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We need these if we want to run unit/softfloat tests in our docker containers. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- scripts/archive-source.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index 62bd22578b..6eed2a29bd 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -26,7 +26,7 @@ vroot_dir="${tar_file}.vroot" # independent of what the developer currently has initialized # in their checkout, because the build environment is completely # different to the host OS. -submodules="dtc ui/keycodemapdb" +submodules="dtc ui/keycodemapdb tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" trap "status=$?; rm -rf \"$list_file\" \"$vroot_dir\"; exit \$status" 0 1 2 3 15 From patchwork Wed Jan 16 20:23:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1026199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="JsOanjNO"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fzMM2dDqz9sDP for ; Thu, 17 Jan 2019 07:29:19 +1100 (AEDT) Received: from localhost ([127.0.0.1]:46183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjroL-00028T-4j for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 15:29:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrjD-0006xg-O7 for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:24:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrjA-0006LA-NL for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:58 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:39036) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjrjA-0006Dz-FM for qemu-devel@nongnu.org; Wed, 16 Jan 2019 15:23:56 -0500 Received: by mail-wr1-x443.google.com with SMTP id t27so8485957wra.6 for ; Wed, 16 Jan 2019 12:23:56 -0800 (PST) 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=+KbacgjL9JJeISDLFI0i6I7/jVit7/Pa+3F212jRkHQ=; b=JsOanjNOXjGrvRr+ygf4YMQ5kTHq3be0w5HJbw+P0JeIVrly53LcWbEIIEts0YZnRu kHVxySoCbI9cCuaXgl2MaY5Lw22LYHOp7MkSsNAL1uKwskdQ/SoT0SM8tMRkLl07k2S6 Nv+ktCJQdovNoBgTZmFVwcu/NZc3gZvkH2hXo= 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=+KbacgjL9JJeISDLFI0i6I7/jVit7/Pa+3F212jRkHQ=; b=epXvzouCZR8EwumdGKcgtsDCXxI1u9+UBeSaelo/pD3RlGOpIScf6fu9azjl67N5Gs FpOJy5WOxEQLrt5Elg8KkwXCBeeXPnBRXnfIwoUlQbc7qqR18DAwi/ZaXvTbYZy7OMb6 QgWg3KtWgB07kt7vAxSRushVaw0CojGCpqODiKOuD+vcvwafZeIERWuXD5JiafKbbW5c 26wyjn/xiIdbsw+vXDgsggKhGBF/FdMnZmiwC9PJou+qayvmUYmLyr8I2GKzQSTgTezv ZDoXyxBh2W5LvrRYD9wJykly5EkGAWUE5jxSDefHr3KgZKrU4tSn54T5ZggJVWh6syl1 v3Vw== X-Gm-Message-State: AJcUuke3nA1xMe17g0f30ZsLrg7eRVFecFTttdf4ZAVZSHbtBRN4y06S mt+BX6npR0Eckbq70iAzMkpacQ== X-Google-Smtp-Source: ALg8bN7CjGUyRf5t25kfJLr1fePRI37nMt3ZxeAQMBgUoUDzVwVYzHp0IozAiz7YjDZDE51ZqvAxqQ== X-Received: by 2002:adf:fbc8:: with SMTP id d8mr8963170wrs.318.1547670235248; Wed, 16 Jan 2019 12:23:55 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x15sm83022140wrs.27.2019.01.16.12.23.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 12:23:53 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 002423E1185; Wed, 16 Jan 2019 20:23:50 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 16 Jan 2019 20:23:49 +0000 Message-Id: <20190116202349.29272-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190116202349.29272-1-alex.bennee@linaro.org> References: <20190116202349.29272-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH v2 7/7] tests/Makfile: add check-softfloat rule 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: cohuck@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This adds a rule to run all of our softfloat tests. It is included as a pre-requisite to check-tcg and check-unit as well. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- tests/Makefile.include | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 43888f3ad5..1de4f1b7dd 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -11,6 +11,7 @@ check-help: @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" @echo " $(MAKE) check-block Run block tests" @echo " $(MAKE) check-tcg Run TCG tests" + @echo " $(MAKE) check-softfloat Run FPU emulation tests" @echo " $(MAKE) check-acceptance Run all acceptance (functional) tests" @echo " $(MAKE) check-report.html Generates an HTML test report" @echo " $(MAKE) check-venv Creates a Python venv for tests" @@ -993,6 +994,18 @@ SF_MATH_RULES=$(patsubst %,check-softfloat-%, $(SF_MATH_OPS)) .PHONY: check-softfloat-ops check-softfloat-ops: $(SF_MATH_RULES) +# Finally a generic rule to test all of softfoat. If TCG isnt't +# enabled we define a null operation which skips the tests. + +.PHONY: check-softfloat +ifeq ($(CONFIG_TCG),y) +check-softfloat: check-softfloat-conv check-softfloat-compare check-softfloat-ops +else +check-softfloat: + $(call quiet-command, /bin/true, "FLOAT TEST", \ + "SKIPPED for non-TCG builds") +endif + # Per guest TCG tests LINUX_USER_TARGETS=$(filter %-linux-user,$(TARGET_DIRS)) @@ -1025,7 +1038,7 @@ clean-tcg-tests-%: build-tcg: $(BUILD_TCG_TARGET_RULES) .PHONY: check-tcg -check-tcg: $(RUN_TCG_TARGET_RULES) +check-tcg: check-softfloat $(RUN_TCG_TARGET_RULES) .PHONY: clean-tcg clean-tcg: $(CLEAN_TCG_TARGET_RULES) @@ -1107,7 +1120,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) check-tests/qapi-schema/doc-good.texi check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) check-block: $(patsubst %,check-%, $(check-block-y)) -check: check-qapi-schema check-unit check-qtest check-decodetree +check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree check-clean: rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y) rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))