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: 155765 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1102909jaa; Wed, 16 Jan 2019 12:28:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN4NQnQqBnZmOYZiijjXr/C/Tx5N3fdCsqtYFGC/dOXdyJ4lvIjx0ADyzEm5qllUFEbhOYQY X-Received: by 2002:a1c:2856:: with SMTP id o83mr9576840wmo.45.1547670527269; Wed, 16 Jan 2019 12:28:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547670527; cv=none; d=google.com; s=arc-20160816; b=MfrCrrHN9J2Biwc8ANUw1BaJlYLnhA1WUH3zIV5EScREJ6xwwFFaFWSWhW2sQZceLk dtasLdsta8UTx4bvr2bgaTOjR71Xw4QnPHa0c61//pn5rFDaV7ecf4gSFRTy4xt/1RBT TkNpwJ2JS+Tpe+uR4Sn9vWZaF2cpM+5mc2cCIRJc6pPdDPg4JldNz+O0aMQ5YHYsKOrR zlqPJP6n3RLm0/3OxMDdZdpailjYcPHtAbH7OYbhtiMnrCfJAg7cmEEFoxwyKq8A0xmg 6U+ST2gSvmKoBb57EEC8XICmyzeMwzFoWhdQbHbtVYA5ulbHqehWAEBF4zuBVBxgpYY4 njNg== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=F4xieiuSGqqMJCZRrk4MmRbOQ9MdsYPNyyxXECLqEvE=; b=oSJAqUuPDo9AmReN3KZVcC5DrQPCTyQ5SHn4lPUle0GU4t4emw2B4PlEJPViqhiINI muMwsb7XdzhADPK3PyRPWIrvAj55WIzzOwZUQsNi+/Tprqm1jKeSsPtPCDrqgbMPAwUr AqhYwG8h1AI6vUY8ogPT4mo+JzhXyr3BBP0583j3f4zuMmzHRSQkfRHE++5IHWMWcbHC VDQTBvjRhASDFSzU0HtqXcBONc1g7fx2VO+HskFx0Rbb5Eafvr7R50mzKOqOpJDwb2Nc aAdu/zW8ZItawAmlp5KHYknsYUiIv2l1LhCAdw/OTKDqUkNHsHncJS0iHfiY8hr4o0S7 0tIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UeojzR1x; 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 d63si23744319wmf.51.2019.01.16.12.28.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 Jan 2019 12:28:47 -0800 (PST) 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=UeojzR1x; 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 ([127.0.0.1]:45980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrnq-0001IB-46 for patch@linaro.org; Wed, 16 Jan 2019 15:28:46 -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-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+patch=linaro.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(-) -- 2.17.1 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: 155761 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1100328jaa; Wed, 16 Jan 2019 12:26:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN5slFDqttHB3er/mW5xb+qbywX/kTDnB/Ni8AZxFsNpNAzoNrDvV8jksrpUnEXsSFolfcXt X-Received: by 2002:adf:9323:: with SMTP id 32mr8860065wro.213.1547670377502; Wed, 16 Jan 2019 12:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547670377; cv=none; d=google.com; s=arc-20160816; b=LHIM2rQDBOJ7wPYBo3IIbMOZYX+Fq5xTZHmObYJF/O5C1tGTIHn4lNxqKOZtzlnquU uKWFIz92rZmwjUtxmJ2kqYBU6gHzihjbwH//LIBjeLWlnyXvyyrUxJKUipJkH/36d0HD 6ckCzbUeNFW+MWvYf+nne2b9jBPVlxDAnlpEjWZ6t/5c+8hvYueoQHXozyNeuCCAbtdy OgmaoOglHb7BCEWvmA6pdtjB66yB/wv8aUC8KOrnMrOTlJ44vgyrst8cIuzxPVjw4oFh C3NXPkVcBeCPh7rGDlAQB4mG+IqbY0e2xl6h2btMx/8hMxWjLbrfO7ng8ZP0T0uK8Q0c IKCw== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=BKiceF0eCEcLLYJ2HmNMq8GOYGcVmd+bgBmQXvFufFI=; b=Sb4joxdWLCLO2hDCTg5yW7EpXhC4j4oCngYSkAwAnNZc8qOkeFECDsARBounYuDsEB pe/s63NPafdGgPqo+PCQhFlOS32Argt2lz2LpvBFMfWLuEKYbHh6P7CCPdAibr/YxE9y h/KjWxt7rbl+2J3yZw8hOZ7mwebMJxl5gx7853Ce7vJIZGlUGjIWXY/3J2EWj4fe1f90 9R0yHHOC2RGWjVi+SD8khY+TVpKc2vwIvVMI23jyCUbVA4KoWThQF0XLR5VKY/AMhkNY mz63rNCH3epwvwwothyT6D3oyAIj0V9MnHQKmPUaMqFlXtv+bBReXIzNEMVGJb8QhQEy Y9ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ICMTDAm2; 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 w1si23414817wmk.68.2019.01.16.12.26.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 Jan 2019 12:26:17 -0800 (PST) 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=ICMTDAm2; 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 ([127.0.0.1]:45566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrlQ-0007pn-Es for patch@linaro.org; Wed, 16 Jan 2019 15:26:16 -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-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+patch=linaro.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(-) -- 2.17.1 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: 155760 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1098290jaa; Wed, 16 Jan 2019 12:24:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Nayimpl20crairt8gjAytJOGWNkCQruy21lRTb+QIUDVq5y/rYSRdHX2nyqbJfrfY6h7F X-Received: by 2002:adf:fe8f:: with SMTP id l15mr8633774wrr.313.1547670261234; Wed, 16 Jan 2019 12:24:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547670261; cv=none; d=google.com; s=arc-20160816; b=IohL4OayAtMQgdTZvIcWWHGZbjbLQPRYIZDlBuFQteOz6jIcJ2Xst50SCALKINQNTK kKVlPtp1UpHU2COAOCJ0lB5F12A3udzcAMypmSyoaXavavrRI1pvTJlNGfnGz2/CKx3k VGe3hx2HZrnqNdIkF1ryiTgzZgL1gC+VVp+HXW+t7wpxZaAo86RiIzqpoeth1/uWPxMl ij+4Xh6eufckQaX4DctkjaShn2l2HoM+fQ5dOPPIct4lfqoSDVwJXyo/VB9UWRtCYwnD 7bWokyfNbNuGQdeoljLm8xRjC++a+N85xQ4cBoVXO3gakcQAhXYPOGWBOyClb/3hgYSO YRaA== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=V4sA7A65E2SWFC74zBDODZmknqvCshvStCQltJmAmqo=; b=Ieayl8UIeIYk9KFHJG0Mz6TKkOaDUSaLYROVte+bYQ5PNJlsl7w3VG7tv/IfS3jdis G+9SkXfQobhxOljBfGVKLtmuYi5BUVfYVHE5cjGdGVf3fVc+VcIFb/gH7avUN++VoTbn 8GyKJnvpBXHJco8NGWoAQ/gNgikoJ+yVOCYWAVyL6Y2DIHqhmZmh1ifRJ4CM7oARLM1g lvAuTxd6ACnt32mpmBILLsrLAg57AusUFCm6pfna+nk0z25VvruwW+PmOiohQ3f2icZ/ A7Zk4Ycs5q8998lJTxPrDZTjwBoomp19d3KigI84p7yN/HEezWO5EY7A6MkezU0ny/LK l7zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=adhpLQus; 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 h4si23385843wmh.124.2019.01.16.12.24.20 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 Jan 2019 12:24:21 -0800 (PST) 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=adhpLQus; 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 ([127.0.0.1]:45331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrjX-0006yX-NU for patch@linaro.org; Wed, 16 Jan 2019 15:24:19 -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-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+patch=linaro.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 --- fpu/softfloat.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) -- 2.17.1 Reviewed-by: Richard Henderson 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: 155763 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1102819jaa; Wed, 16 Jan 2019 12:28:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN5GiRaSFHZZjug0HBuPa12OmEX9fbjm+6Sce/Yna4sv3pdMLr2HZwkqFAktM46kfP8kgu+h X-Received: by 2002:a1c:e3d7:: with SMTP id a206mr8472344wmh.12.1547670521415; Wed, 16 Jan 2019 12:28:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547670521; cv=none; d=google.com; s=arc-20160816; b=BCmL/jJqrFRoFtk2+Tc8XSTiKUH1oZoHGoasvudRzRKaG2J7uGT7XiQwFyOjDhnem+ 8nHBfLObIpNKe9YWdZ9Zy3/ZUAXJz2h96vMM18LDy6Aj5fHz07RCaoBGTf1P9/apW0Mg pkap/uZU4QJmhq4mdvViqTk2OEx0uZygZAW2w36Dft5akEunO1v2jzA/ZopL8x9g6AQk GKQ2yvLsGCNGhXnMQoXU4t5APhBlJEBZgV41P+SOtZmrP5degpiaqBCal0skbMmSTpK/ MLFZO8Y+H/bwX4cGAioG8fW+Prl86ig3Une4svqmkaNY6bDFoRgMu0Mdw5IZp6HplSY4 XhzA== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=CH+fbm3rQwsIpBYqFgXaDA7siyiApJFCyWBJwHgGYWA=; b=JyJba/QriDwzBYPlz2tum/VXjcJGSRjgdRSo1hDu7mJdhDp3OxjrCDEwDt/SWu1Vsu W9WUM4IPLZ/zb82JoWBHk/Js/3jpZWjjbRA8oAf0D880pF4TEbk4yxqJZIfmN5cePoYE S7DmBYRcv5twNGn9wfB/MjNYElo/c9FBIImqP6LssaDNegvb4uu2FXO1xmwsHxxLdoJL 3+/P3PjT/cOPeshuIjitN08drmx4I1JJ/yzfmQCm6KOjNCmPz3BbCTeRveeBdfNxekn4 NJMpJrzS/YmO6OXxSZcKAR46xRYRwTLPBYquyGQiIGSzMy30lQxrKHY2/DiAFO/MWyhy 9doA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aWZqCPxr; 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 y14si53825276wrn.359.2019.01.16.12.28.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 Jan 2019 12:28:41 -0800 (PST) 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=aWZqCPxr; 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 ([127.0.0.1]:45965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrnk-0001EB-Bg for patch@linaro.org; Wed, 16 Jan 2019 15:28:40 -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-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+patch=linaro.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(-) -- 2.17.1 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: 155764 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1102900jaa; Wed, 16 Jan 2019 12:28:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN6aPkumlTyMHq6n/3YaImc4fAI9l9t2ieAdZr/XXJnhDfc3K0kABEaKClqRoiGi7QaUc/13 X-Received: by 2002:a1c:2b01:: with SMTP id r1mr8774076wmr.7.1547670526850; Wed, 16 Jan 2019 12:28:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547670526; cv=none; d=google.com; s=arc-20160816; b=LcEL8CLkrPvZY8Nzao0L6Ihfuja/GZYmYXp1K9ibydZi31OeuwpQgdBrwm8/jhM47T 7g200MiT25cgG7iqjLKYgL7Q3hQD21b/4J5+Qu3NYjGlfw0tvxoxHQWg6Cmk2WD9KI/m 11kBvwi99LV2jKkT9HCAmXBkGamO7/7EOCDMncRPXcMuDfJs6NzjRBeNSPof13tsRYqm 3deSfzB4Jb6DuJR79iF7GIAdWrRMG15Ul91IVftK4tjNJkKsn1IX8UWoyd5VSp3zcGS3 7HE1MSYyPbSBGOEiZO7E5U8tRjZUJ1rPW50fLMykiFuyYZn2Laup6Bva+WZQcgKPnBlV cHEg== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=4tIQHkLdtPcPZgGvv4SbMOFG+FC+QLZJH+6yX93G298=; b=RpuVJRVqjVDzuPfFJKwpFQRttS6jw+4Y9paX/xOjhcFK44YhurusVhK424H5Pb8Lgr gY4urw7RQeUgDNgRhcSQZLN0R9sWWsDYl28N0JpXL4BpFBK8n0+y+WrACrS0d7/nRbLm +SptJfCbSkLGgkgV5vqKF/BwcSU2ek/WuzEgOqtf60ZZbJw+JtZ1+zE1vevy0kImTc/q Uq+fkrL62LUxTb6lYTqg2v9YWmae3xFihX5PRgTvOu+Zp7Qn7MV0vNDjpk+gGMwv4zia iQPCHaFznAvYWmq47dmU7Qkh8EoyQ398Hg2FhdhTABslrAaew5v7iYh8yfhcV3ZQ1DFT kOAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VH+pj2Du; 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 q194si23975540wme.147.2019.01.16.12.28.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 Jan 2019 12:28:46 -0800 (PST) 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=VH+pj2Du; 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 ([127.0.0.1]:45982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrnp-0001IG-OK for patch@linaro.org; Wed, 16 Jan 2019 15:28:45 -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-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+patch=linaro.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(+) -- 2.17.1 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: 155767 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1105406jaa; Wed, 16 Jan 2019 12:31:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN6YyJT2lhuYyaO3+fsLr4MkWOi0hCes7g2bFqsw1GRISOp6hd3sQoqDqfKMTnz3n1EBeLe8 X-Received: by 2002:adf:db01:: with SMTP id s1mr8801557wri.214.1547670674722; Wed, 16 Jan 2019 12:31:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547670674; cv=none; d=google.com; s=arc-20160816; b=YF2XAhLvUAOJ/S5tQ3RZQ96i2TYWhIeE7SlU66QVqRambGgaJ+JmU/OXJQ4TZocaZt iWjTbQ+8il6CbQQY/jsq7H3/u4qeIa1e60I+XDNe7/mk9341wCSJjttK3coie5CcJnN2 xUd6SbkS//H+WdsbuEJnW/XSv2wS9ROWWTEGK30WCII1/sz/ThnbntZEaTCjRWUrgUwm qj9C513txA+wmmY0LUnHMkfEWtg+CgTGO8mJ7YG1V7C9Le1Ovx1B6xVlEo0dBMafbW/b /6maU0SlFCFO13ip5sAR4NqywXLwJRVQz/jCJ4smEe2C5pFZlq6XC5bJ27qrQXx00Ssl 7qrg== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=HjyDClYTa4RavIRqdKjd3FAFDFKhqzTfdleMBuojdXM=; b=tkLOa+cw/h8lyCmDwIeSqnaDVuSpNfR+naBKlz44ApuBicyNd5LGOXXojMe5A8rjQ8 tMfCI3SCV/nNY1VahNs7JHPVEUXT//Ja/AEAfIll/x+dCCHFjt4NfmqmkSXL+I+3P0Aq v4k0z++lEDGYoyXxA8ZMWYlzyT1TafhjpWV2iQPvTRAIE7cV37KcT5SIDtIGzlhcqUwD DGAJnUClsEjvCEbUzetltQqumLOiOS4L7rJqXiT4RPTmrxnZ9ADdE3B5tzFw0WB24ASi 7peWVhQE0cqa5gGBNHqkUot+HMr7bc4ui7FDSL6AZJzCbdcdEW+chhYjJl2vEkZrBC/1 GD7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TOCQ9emo; 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 w18si53550696wrr.154.2019.01.16.12.31.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 Jan 2019 12:31:14 -0800 (PST) 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=TOCQ9emo; 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 ([127.0.0.1]:46451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrqC-00038m-ND for patch@linaro.org; Wed, 16 Jan 2019 15:31:12 -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-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+patch=linaro.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(-) -- 2.17.1 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: 155766 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1105227jaa; Wed, 16 Jan 2019 12:31:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN40h9zu8GXtQ2k4tWkCw9xl9QWiw38RBu7rnJ4nzHNjeJ+rMvRW6nV98FxpZQedgY3ym53h X-Received: by 2002:adf:ecc8:: with SMTP id s8mr8840432wro.208.1547670665563; Wed, 16 Jan 2019 12:31:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547670665; cv=none; d=google.com; s=arc-20160816; b=Nzf2nMl5v+cb9KfLVSrGicq68OT94+I1fA50nVumRBD6CEWY1ovJeZ03BRUtX3Nrpz GZi2WG+inAR2sSE3r+1DyT2KiUDqY3fvxFNPOr6ypaYyM6zM1ABsErAcNxwRUTa2fQ9J Bb5tI+3Dereaskz02w/x3IcwSh2xYOcWFmtqD/BFU8NtBXZf6W/+Kfj7aDHWC4zFlPLk g7Aowft/lX/isLtdpAJuqTiS3HvTEbCu5esX6LFFUlMcNQMkkYo77hb/x/BVeToPo3mM TF7wf6Qyb2ZgGDCFl3kGfpUX2FrhXowNuj1/9LBcU1qR7p1u2RKLUjAUuXUEO9cU03v2 NXXQ== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=+KbacgjL9JJeISDLFI0i6I7/jVit7/Pa+3F212jRkHQ=; b=JjxPKCgE3M03Nmkyed6xietKAky3V6nQlSqrXo7e4PCrSnQJHBt2K7r8M65y+h5l7y 1h4IlftbRsUyy40BtCa9SXGLMGooVUwpsQ9gud4VLYAK95uwnUVW4bmNFQCRCogHP5kg D8bPd30xPzvmOTxJ0o01DTNfEoMS2IpTjd+3OZ7dOfHfj3MZ2usRVPZeQ48A3KNXh5ZW zSZQOrn0sdpoiC6TNEKO81uRgcZ5thansvJl2ymzVd3VmhVIICvWQJbddGJGMIefPLwi nEJTzX46t8nUksG1JKNZoNhd4Y3xsT9T3RSyRnhWchTLsknRNAFApcURlXkMrU+9lurY cWVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JsOanjNO; 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 t13si11945491wrn.408.2019.01.16.12.31.04 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 Jan 2019 12:31:05 -0800 (PST) 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=JsOanjNO; 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 ([127.0.0.1]:46430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrq2-000353-VP for patch@linaro.org; Wed, 16 Jan 2019 15:31:03 -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-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+patch=linaro.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 --- tests/Makefile.include | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) -- 2.17.1 Reviewed-by: Richard Henderson 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))