From nobody Wed Oct 29 09:06:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524585408550821.9956925304989; Tue, 24 Apr 2018 08:56:48 -0700 (PDT) Received: from localhost ([::1]:59274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fB0J9-0007Np-Vi for importer@patchew.org; Tue, 24 Apr 2018 11:56:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAzwR-0005wl-Fi for qemu-devel@nongnu.org; Tue, 24 Apr 2018 11:33:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAzwO-0001N0-QO for qemu-devel@nongnu.org; Tue, 24 Apr 2018 11:33:15 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:51008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fAzwO-0001LU-K8 for qemu-devel@nongnu.org; Tue, 24 Apr 2018 11:33:12 -0400 Received: by mail-wm0-x243.google.com with SMTP id t67so1870419wmt.0 for ; Tue, 24 Apr 2018 08:33:12 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w40-v6sm21479365wrc.69.2018.04.24.08.33.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 08:33:09 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 099913E0B7C; Tue, 24 Apr 2018 16:24:07 +0100 (BST) 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=vUipRvnkSMD8n2jt4YPtcr9YXU+GoIKvf8EYreRHLGQ=; b=VtEh5Fz39KgAmKzmJvvT/rDjICZC4L3SgABTgXijf2zZV8kKd1o32WXBKrCC5f5ZXc J+t/zkVOPa3ml/56XAisGkNwk7VdgqW/Ipewm9y1zVxLqikrS1fIIY92Peupf8uusQDT 44mz6LhSAq8N72JPkSUyn5oK3p3SN9av2Xxcw= 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=vUipRvnkSMD8n2jt4YPtcr9YXU+GoIKvf8EYreRHLGQ=; b=FAIN7v96IceCwFL2Vv5370xps5uBRtQJbzJxiNdVFutJnEw+hOnZjT5arySmWtX777 Fn8rX2Ib6qmFISLuZZgXqRYlO/0V5uraEwYUT5rnlA/bKZ9Ens9Tuh8Xqi9CkjBvJWFl Orh0xdL2QOWOyXmvJqUFFPrafRXtW+3B9I0IWH++OqLMRiXjYu1U2pHSYk3/GAC4x5JV nMcnikE95zo3lcHdu2M4e64afn1mSB8lIK5CSnwAROe37zg38ZbniiRgaEn5yiv/h9Uc hCNLHv77e9IOcb2IrY3sKh3Je8PTap+aNTTNsHD5x5467kqR6DAdN/qjXjDpqAOFTkUF WHHA== X-Gm-Message-State: ALQs6tDpvUfZimic30AGzAAKc0ntxnAlese1AF2Fg9Jxq26nTBxs63z9 q26ZlTDwr6dinhsKduzRzxlIQg== X-Google-Smtp-Source: AIpwx4+6LorIiwaXqGokfMHSWvdf5mElz4lyth70AM+8HrtLmRC1WZXsp0AtbFTjhu0P5cM0TxsGhg== X-Received: by 10.28.84.3 with SMTP id i3mr12866642wmb.37.1524583991544; Tue, 24 Apr 2018 08:33:11 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org, cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 24 Apr 2018 16:23:40 +0100 Message-Id: <20180424152405.10304-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424152405.10304-1-alex.bennee@linaro.org> References: <20180424152405.10304-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH v3 21/46] tests/tcg/i386: fix test-i386-fprem 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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Remove dependencies on QEMU's source tree and build directly. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/i386/test-i386-fprem.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/tcg/i386/test-i386-fprem.c b/tests/tcg/i386/test-i386-fp= rem.c index 1a71623204..66f5a9657d 100644 --- a/tests/tcg/i386/test-i386-fprem.c +++ b/tests/tcg/i386/test-i386-fprem.c @@ -23,7 +23,10 @@ * along with this program; if not, see . */ =20 -#include "qemu/osdep.h" +#include +#include + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) =20 /* * Inspired by 's union ieee854_long_double, but with single @@ -39,7 +42,7 @@ union float80u { unsigned int exponent:15; unsigned int negative:1; unsigned int empty:16; - } QEMU_PACKED ieee; + } __attribute__((packed)) ieee; =20 /* This is for NaNs in the IEEE 854 double-extended-precision format. = */ struct { @@ -49,7 +52,7 @@ union float80u { unsigned int exponent:15; unsigned int negative:1; unsigned int empty:16; - } QEMU_PACKED ieee_nan; + } __attribute__((packed)) ieee_nan; }; =20 #define IEEE854_LONG_DOUBLE_BIAS 0x3fff @@ -229,6 +232,7 @@ static void test_fprem_cases(void) do_fprem_stack_underflow(); =20 printf("=3D invalid operation =3D\n"); + do_fprem(q_nan.d, 1.0); do_fprem(s_nan.d, 1.0); do_fprem(1.0, 0.0); do_fprem(pos_inf.d, 1.0); @@ -238,6 +242,8 @@ static void test_fprem_cases(void) do_fprem(pos_denorm.d, 1.0); do_fprem(1.0, pos_denorm.d); =20 + do_fprem(smallest_positive_norm.d, smallest_positive_norm.d); + /* printf("=3D underflow =3D\n"); */ /* TODO: Is there a case where FPREM raises underflow? */ } --=20 2.17.0