From patchwork Thu Jan 17 13:26:58 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: 155831 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1986422jaa; Thu, 17 Jan 2019 05:43:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN4HqZKlfJCLybov8NvTq+wRtm/w3OmgxPn4ioEByi3EtXBzs49aVBCZJBeL4rQQoMoTMh5r X-Received: by 2002:a1c:7409:: with SMTP id p9mr12199240wmc.136.1547732594470; Thu, 17 Jan 2019 05:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547732594; cv=none; d=google.com; s=arc-20160816; b=XTo9JGasTMNZtYuJbUa+FVi6Sm29E2W78Rc4GEQhg21zPXSkcuQwpJRK/Dn03APWAQ IQiQc6xWDR0xjEAAxYy74hnXV93LAyoOkhzy5SGqI9QrEVxjPWKtigfuHVFrnjapWg9m utPUpu6z7cf/kLCKwc++84hvH1ZD6Ddr/So8if9Op8KS4EUErXYlVGhD5SWGsiyQ5/AL 9x+PkhdowVO8igZ1D8TLSGmqFJ89nNQ1ZwpwUtFI7tRfZjkiTdpm2yLRpW4wAXPQdyu+ gM0qKQWf7p9k6+sVXW49mtwJbaIaILblCgY9bIvn0s9NqjL1U6sPIUQHrckI6TIfuUqR ROrQ== 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=3nIZXLVOlP9xAHKTd0IegSRTcsxaaRYRrYp40KpwHLk=; b=oSiGOndtm4Hk71TaC2diNkSPFyIpLuWqAm52pGA3I6du9Q3yGClHxIsXGPHUTvx42j IJeuAwH3RdQbW6TdWvwgF9HAPfJyVIXBNcfYOeIzimYUh8bfNMTHleEhl/H2BmVASz00 FDZ4+u+eZ7NhkNlM3dc7o/FgSgHcIinItSTCHXPdAHIjuuqVIklwJET35WIS2rLC7awJ oTjrJ19+l4Qt5mRovUHLb2hI6cy6oxK34FdImWQDyCqwOEq3dtKA4o/1ZwouiMc6EWj+ prfeEYrV+4qZuWyCyIftqK4YKFqzmNsQ/vGnvFbv7jVXEiwKoOpPQ4cFczQNlMCn+LOT 2QtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AyiEtPFj; 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 v84si26443517wma.79.2019.01.17.05.43.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 17 Jan 2019 05:43: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=AyiEtPFj; 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]:44669 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gk7wv-0000ra-7D for patch@linaro.org; Thu, 17 Jan 2019 08:43:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gk7mK-0000CE-PM for qemu-devel@nongnu.org; Thu, 17 Jan 2019 08:32:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gk7hP-0002Yb-4K for qemu-devel@nongnu.org; Thu, 17 Jan 2019 08:27:18 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:40233) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gk7hM-0002Sh-QW for qemu-devel@nongnu.org; Thu, 17 Jan 2019 08:27:10 -0500 Received: by mail-wm1-x32b.google.com with SMTP id f188so1040497wmf.5 for ; Thu, 17 Jan 2019 05:27:08 -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=3nIZXLVOlP9xAHKTd0IegSRTcsxaaRYRrYp40KpwHLk=; b=AyiEtPFjakvA2M76xBw7LttUjLl78/B/zzXRIrAyj0SEci3DezeIOsZZxqYHomj+Or 573lLeQkf3GWPu0VESFM0k95s0UGmisxtdBOocdCtXymvhCHTYthsRku/dG1+rcE2bPJ Gm3PXX7dBDsyXu53qGzi/EnEqyzh9bctZJYR4= 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=3nIZXLVOlP9xAHKTd0IegSRTcsxaaRYRrYp40KpwHLk=; b=su5f6+4KfwfA6OclN0AY1IpsfRIbelbfZ99BiWUTUVfEqXVzrbzu9u5VRzjOg/R5Wz zwy/WJ7VQsENVm72gDSFQFIU+GozpJlxDQMrRLvAz3D+1s/zLJghjQbrcqCt3zKkGs4t CoRRIa8Cv6aVqCkg7p8wJEN58LiZz0YPdON/OBZOqU5nG32UrbhzSiydjY7t4cNUgkXu Ed3P9Dr28xVt6GLPEZTNHnJfT4frO+bImP1NB4W1jCf21mdkL/w7CrSQ6V5RzgkmE515 IeLIPAZmZoJHKBSa8purtcKhq/fQ4+r+7wgRjVzb35HwVae5ZLdqJs924ShIqHK0NnS8 Lzfg== X-Gm-Message-State: AJcUukfLSF1DNZRWkdhlluJaMJ2rbzLfXEm/uein8ZiZi9Y4CCuAMji2 xfoYVhM2OQFDHjzUaswt0qQZpg== X-Received: by 2002:a1c:a755:: with SMTP id q82mr12215478wme.6.1547731627462; Thu, 17 Jan 2019 05:27:07 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h10sm35416395wmf.44.2019.01.17.05.27.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Jan 2019 05:27:05 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1F06E3E0807; Thu, 17 Jan 2019 13:27:04 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 17 Jan 2019 13:26:58 +0000 Message-Id: <20190117132703.17790-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190117132703.17790-1-alex.bennee@linaro.org> References: <20190117132703.17790-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::32b Subject: [Qemu-devel] [PULL 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: "Emilio G. Cota" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, 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 -- 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();