From patchwork Tue Apr 24 15:23:40 2018 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: 134129 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2405001lji; Tue, 24 Apr 2018 08:55:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqVo8XLayATlrCp0ZeVactak3Mc7e757B9Tmgim0xFK+bg3NpZjRxBBR0P3azmtg5wW6Lrt X-Received: by 10.12.130.225 with SMTP id i88mr4620136qva.34.1524585314267; Tue, 24 Apr 2018 08:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524585314; cv=none; d=google.com; s=arc-20160816; b=up00tobWj2htCOX6syNj+BQ1sXKA7V10N+pURoDa556mUe0mx7w1EdRn5LIvRXoilc F2QXkQOvDGSZYDBQ0mD8rNhDAMQCerhLAEiOinFt7CTrH8gJFV/gjWzABi/TKAbsI2kH Dfsb1mV36C82yjQmbd70blQ3RdHcbovcAh+HWsB92a7AUUs9Ver8YRmgtkj5zd4RLUqp KxR0kO8+hgaTngmrgQoRNtixpvSeG5m3zIK5oqWqOhpbvoJMhye8Xq7lrBXtPfMEo59k G5BYB3nf0YJ9BGl2927letOhYahPXN+XNi3z5XZdPRK729d8P/+d09IMDHnfhsJoA3yE Xy7Q== 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:arc-authentication-results; bh=vUipRvnkSMD8n2jt4YPtcr9YXU+GoIKvf8EYreRHLGQ=; b=c1Gjir7GspijxOUPRUDKlXGSGwuijg6ugQlLG0JDPmMXxogPuCbUJzf/od9QRBW91H HA7puxHoGbFCtc/rwJvqg93MuTo6YZCV424hEOzg7akr03IcFpdynxLJq4LMqIlu6QJs jSGpw9q0m1HoysiP//DtWquBXRDdhtCgr1bprt55b5pHSMtG/uXMkQSfl0aGnTrKxzW8 zagmFANnm4/5suabNRmQ1y1Qds5z9AUirtDdTYV0K8JPb29D+fnfXTnjS6ROa4DU+5jo W8l8llhOEvnUWzaPs90WqCHe66osd7m5gxNbLuGlomWvfRD6FBkkjkRiSMdfo2ZtCuTV h4Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VtEh5Fz3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z5si2670144qvz.49.2018.04.24.08.55.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Apr 2018 08:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VtEh5Fz3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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 ([::1]:59262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fB0Hh-0006Be-MO for patch@linaro.org; Tue, 24 Apr 2018 11:55:13 -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) 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-Received: by 10.28.84.3 with SMTP id i3mr12866642wmb.37.1524583991544; Tue, 24 Apr 2018 08:33:11 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Remove dependencies on QEMU's source tree and build directly. Signed-off-by: Alex Bennée --- tests/tcg/i386/test-i386-fprem.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) -- 2.17.0 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé diff --git a/tests/tcg/i386/test-i386-fprem.c b/tests/tcg/i386/test-i386-fprem.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 . */ -#include "qemu/osdep.h" +#include +#include + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) /* * 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; /* 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; }; #define IEEE854_LONG_DOUBLE_BIAS 0x3fff @@ -229,6 +232,7 @@ static void test_fprem_cases(void) do_fprem_stack_underflow(); printf("= invalid operation =\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); + do_fprem(smallest_positive_norm.d, smallest_positive_norm.d); + /* printf("= underflow =\n"); */ /* TODO: Is there a case where FPREM raises underflow? */ }