From patchwork Tue Jan 22 21:50:07 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: 10776341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4ACF1390 for ; Tue, 22 Jan 2019 21:58:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A35A528DC3 for ; Tue, 22 Jan 2019 21:58:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 905A028E91; Tue, 22 Jan 2019 21:58:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2D13928EB6 for ; Tue, 22 Jan 2019 21:58:49 +0000 (UTC) Received: from localhost ([127.0.0.1]:50907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm44G-0006vM-Gi for patchwork-qemu-devel@patchwork.kernel.org; Tue, 22 Jan 2019 16:58:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm3wP-0007RT-3E for qemu-devel@nongnu.org; Tue, 22 Jan 2019 16:50:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gm3wM-0008CJ-Iv for qemu-devel@nongnu.org; Tue, 22 Jan 2019 16:50:40 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:44930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gm3wK-0007l2-JJ for qemu-devel@nongnu.org; Tue, 22 Jan 2019 16:50:37 -0500 Received: by mail-wr1-x444.google.com with SMTP id z5so50588wrt.11 for ; Tue, 22 Jan 2019 13:50:19 -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=eaNrnb9lJUzjFslVmypTpso1EiPUsPfYAhRJ04YXOhFS4b9k7aIFIxy9jpTkRjvlZj S9myyW4AG7mRTbeRsA8peKMhcyJQXVzTQbVyNu+gUMAhO0DGhPh08F6Ql+dsbipD7JpA 3ONq5X/qe0EgErmda5B1XR6/HxfsWdbayJ+7Y= 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=Vj4/TCfoOIPOz7rmbWxaLvisqsoJ16jfszOp0JsSuPMcM1cNbNumbqyPF621KECeq2 fmzZYsDuAszy6SCP8QjN94z1f1lDkdcIIHD+n7RKXe/N2SBolbfffrV9oAm4YwwEFV97 cfBLE65N9vA86s0R29Q6JZ8Uqns50Y8OaevLWAuRZQg23R0Gag7QTHpMjGrKasdffPay maauAUbQmu1fscXbsgzZUNZFLLaVq1SfSM5lGR0MI2IimBsAu/7+Le+dw53OFxMSC5NN m61RTkYWWPOqC2QIlU/HjsNYDTE1Pj/dNqQt0g7uC+WS7Pb6KgWd8BN/iOMRSsb5EePi AJ0g== X-Gm-Message-State: AJcUukfEG9OSbsR8rs602pjHzr02xKf5aIbrJwo5ivrJ5ly4yvBD1eqa 7rmZTgbhgQpCzqSRASzf9ZKKjiST2Qo= X-Google-Smtp-Source: ALg8bN6zbnGBj7L+8oIuEK/23MMr4Sm2XFRnwt2X+qPuhhU1F6Ub+pAkwjSbznDc3GwZ0siV4GC37w== X-Received: by 2002:adf:fc09:: with SMTP id i9mr32149284wrr.299.1548193818596; Tue, 22 Jan 2019 13:50:18 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c13sm108608405wrb.38.2019.01.22.13.50.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Jan 2019 13:50:17 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 4DC923E08E3; Tue, 22 Jan 2019 21:50:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 22 Jan 2019 21:50:07 +0000 Message-Id: <20190122215016.18697-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190122215016.18697-1-alex.bennee@linaro.org> References: <20190122215016.18697-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 v3 02/11] 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 , "Emilio G. Cota" , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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();