From patchwork Thu Apr 19 13:58:38 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: 133779 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp687994ljf; Thu, 19 Apr 2018 07:14:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoo+GrfI3lWkitjz0WNZihPUnflA7xgV94cinxShZUZ+H73f4JdeCwYnrBAVWqschp1bTn0 X-Received: by 10.55.127.70 with SMTP id a67mr6101254qkd.328.1524147245551; Thu, 19 Apr 2018 07:14:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147245; cv=none; d=google.com; s=arc-20160816; b=y0OcUdC+8HjnVom1xSQeUxRCzyLaLNqRMGiD9JGr2uxrP05fr7JY6XI6imwAdIv3ZV YQclLu6h5bNDaFQzIPR9wvGBfA0hd8c3uRzVxTW+G0I4XKpFIbwkmmy2msR/vk35FaY0 Q0EUFh1Q+/7ES5zdDjBttlJotLXsL8eZfMb/DEclr85vBng2VTFS2gR9nFq5VwI0d1/Y HUv/ECww6GMe1CiuFn0NqduY4wcw2tvczCmJZ9hyW25Lg9Lg2vLwYUW+0PQnFqy7qA57 pq9plpgvyJD0go/EIoJU0R1xJC5J4sbG2Px6KjnIYuhRbN9Jt8nuWb26+2SZCCbePbAT dcSg== 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=OY0dJJGbMkR2IhOgMfsw57C/gyVZZ3VLj9ary7cn8/CNjHW+BAF6r4Wmwr8J+hqijl zO3MeQybjVBXOqSEEQrLCCwwhEGfZIhTFaeW+ooDK2elA4CdWqZPVq8FE6zpXA5OIo3l 2PgYyhIffBrB46zP9HZVEorIZVTJttt9+bgDWU0L9oEhRNfS9ctwudMEavgXM4sHTtYi BkiQ4OuKXcN1bGKkqos7izejZHGEk3G6kB8zMni4x4DnFuncNgdcx+lN7L6XpJ4fbkQu z/n9pFzfN7yLnDXSTEtTljJ1XhAH68LJchNk5Aan/vfNIYbXlaDFV1MN/fRYUEdnjfNp +eNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cURhxcCs; 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 y40-v6si4966865qty.345.2018.04.19.07.14.05 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:14:05 -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=cURhxcCs; 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]:50132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AK5-0001lS-0n for patch@linaro.org; Thu, 19 Apr 2018 10:14:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADm-0004Od-UI for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADh-0004iU-1Y for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:34 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:39029) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADg-0004hN-QW for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:28 -0400 Received: by mail-wr0-x243.google.com with SMTP id q3-v6so4396080wrj.6 for ; Thu, 19 Apr 2018 07:07:28 -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=cURhxcCsBinMEy8iz9VfpekDYF87Xv9ChqEBOY22zZkhHa/gjsylk+Z1xuY0eeIGD2 wRxnE6+ensMu+A5fyqRLuQGZZDhidfkoT7XUEWLSj0/OLUx8xMDlNjqt7OdVSlawqb49 kRHf7W8EdNaBJOQOOVUa8twzEeUa/CQwJdwfI= 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=Hhn1CISEykpjeaJhdtA/BVkFYg0D1EtbOiFOS+tiYsRCHOdPi0HX9KuqVnhPm0J0rH qPCiQ0rivV/G/UiSRl8EEH23YgtHYbukWnN1UDTrZtwrfEZ3/r8rhyt5y+0hQhUz0lfz ZK6D8gXZuC5qqqFXehiwx45bl2JZV1bmi2DlLKNDAoI7Hp/xxDejM/fcgFojx/9NV23O ix0yu+O1rG9bPomtK4vae12if+oKmFLSa7eJjveeIbyEk8FN/kUbtNoTs3Uz2fPBWyf9 39lPs8fuUU6jPTC6NshNZxjF8cTLJR+pHMura9jHgLJbIX+vo3ANdVMh1f09OXcu4JK3 VehQ== X-Gm-Message-State: ALQs6tApnnveyeYWEwm057LgL4hwdX+qjnCU0LGC/2sO9KfRNCg+aNSq iOWVsT/QhErYkvOpE2pvEIntLA== X-Received: by 2002:adf:874c:: with SMTP id 12-v6mr4936561wrz.275.1524146847824; Thu, 19 Apr 2018 07:07:27 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l53-v6sm3404wrc.80.2018.04.19.07.07.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:26 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 0AB863E04A6; Thu, 19 Apr 2018 14:59:03 +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: Thu, 19 Apr 2018 14:58:38 +0100 Message-Id: <20180419135901.30035-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180419135901.30035-1-alex.bennee@linaro.org> References: <20180419135901.30035-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:c0c::243 Subject: [Qemu-devel] [PATCH v2 20/43] 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 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? */ }