From patchwork Thu Apr 19 13:58:19 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: 133764 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp669267ljf; Thu, 19 Apr 2018 06:59:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq7lnjzV54AFbBitFJcNkGZXxC0tHnFVW/ESl7XcEXE6HpgvkHQ8M1JU0L9c+vmswTkOPKS X-Received: by 10.12.150.137 with SMTP id a9mr920297qvd.7.1524146381469; Thu, 19 Apr 2018 06:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146381; cv=none; d=google.com; s=arc-20160816; b=tB86+/FhZ3+SAMaSRU6baylzZqurfw2i/fj5ggQQsYt100y/0ebcywv05bq6Oiw1Vn M9iXSkSWlMN0VC19gishFVkNpxUoL2PhIfbnM1KrN2O9C0/uuArOmQ14EWgQYYN/mMtC WEDFa7D1LySbZ6i+wNep5R6blMFjky7HVeCLf1rvVarWSEYkPXHReVrl7ZjRd2xK5H+s FqRUBR7kUODiRxsFH7OK4jZkls9ZePuv7uXsGEAUNW8W7lKSblg8s8VPeIEDHXHkG48a 8yOqQvGENhtmNO4ZIXKl9qZzRjShOQm8yEkZ0+GoIqWR3yZ9kLF5rxzZCXjHFfqkN/6C c7AA== 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=u29oiq3CC+KvaxAcUAHApC35h6dnscSEFhWDu5R5SEM=; b=RK3P22+2x6uE7270y2FerygJiVoz/gV3pylIjUkTp+XaXZ8RZXJGtEw6qWLwqZB6Gs EIzgZJfBHNVzh4ebonevOVte+TVlVQySxIvqzCI1cJYBYHsGGq8VqALhXfKj3PLJ99k2 C/wkyZNifCT5/DQ6uRgtsmwLq/YqBWdnuotwlDQg0EJYJweFxmJHaZb3ukMzvmfB/KjI pkDqfSGacDvaSXFrOMgHzg3Kik91yr4Rb6C9F16kqWR88qAh5wOxZv5Y0075bU1D/dcD YLEgFmcEfyw2WU1w4Jb84rD/GSy7lddSbdnkxcVUsW0PBo/u4vb6ARKvl4HKRkGh/lR0 WNEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OZnVqa2p; 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 z131si4698970qka.265.2018.04.19.06.59.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 06:59:41 -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=OZnVqa2p; 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]:49802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A68-0005zW-S4 for patch@linaro.org; Thu, 19 Apr 2018 09:59:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5c-0005vx-8C for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5Z-00024Y-6R for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:08 -0400 Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]:40520) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5Y-000243-VA for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:05 -0400 Received: by mail-wr0-x22f.google.com with SMTP id v60-v6so14336320wrc.7 for ; Thu, 19 Apr 2018 06:59:04 -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=u29oiq3CC+KvaxAcUAHApC35h6dnscSEFhWDu5R5SEM=; b=OZnVqa2pBXjIUT1OJ3KSblkqKzo/9IcMLIVCZf86pAfCO9exzOyIwAodyuhN2nSvAV h7qc6j3O1IqUuEJi7+/3K7TjvNe1BgOvuFBsdVtQEX6eExP3uRRVJLdWza508secjRV5 9tAbMq+FyHEpEJ+7oDFt+ayVmnxwifBlM0V7A= 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=u29oiq3CC+KvaxAcUAHApC35h6dnscSEFhWDu5R5SEM=; b=TlRzRb5QeRm87u3nivNCdiJQ9HtFg93m1vV5OReytDM3Xpsgvmos0YXSYny88EwQUk LcUJo+Y39ZyzBTN1faHdicclmaXq3reRCLXF6lwrO/8e8iyJtOBb3P0HQg1dmC5Hm/SH dH7ct9k7qxcHentBZGpVoUKzQ1uVktoSfS/DVYyuBm5/jtMroQ1+jSB5VZ3Ec1gxwwx8 WbeiPB7C2GgePZb8cR4AGn07iBPBQbusBP1bJK6qSpGmzC4bhtzy0shsKM6iuSpJT3Nk nHJxh2WXJwOK7fTSc28ek7bl8e02yS5d25Y09S6JGpmr7YA11t3/StWPUIk6eCvC6PxT UZsA== X-Gm-Message-State: ALQs6tBFDkvlztR4bsENm8cyrMBmwKGvQERvaeoykYr8CE2yxrbvDgEj fD42RfiE5uVrEg7c6oDDCJffhA== X-Received: by 2002:adf:ea01:: with SMTP id q1-v6mr243731wrm.50.1524146343766; Thu, 19 Apr 2018 06:59:03 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 11sm3764188wmd.26.2018.04.19.06.59.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:02 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 9B69F3E0288; Thu, 19 Apr 2018 14:59:01 +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:19 +0100 Message-Id: <20180419135901.30035-2-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::22f Subject: [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure 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" From: Peter Maydell This is a helper function for the configure script. It replies yes, sudo or no to inform the user if non-interactive docker support is available. We trap the Exception to fail gracefully. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.17.0 Reviewed-by: Fam Zheng diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 1246ba9578..f8267586eb 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -390,6 +390,24 @@ class ImagesCommand(SubCommand): def run(self, args, argv): return Docker().command("images", argv, args.quiet) + +class ProbeCommand(SubCommand): + """Probe if we can run docker automatically""" + name = "probe" + + def run(self, args, argv): + try: + docker = Docker() + if docker._command[0] == "docker": + print "yes" + elif docker._command[0] == "sudo": + print "sudo" + except Exception: + print "no" + + return + + def main(): parser = argparse.ArgumentParser(description="A Docker helper", usage="%s ..." % os.path.basename(sys.argv[0])) From patchwork Thu Apr 19 13:58:20 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: 133762 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp669140ljf; Thu, 19 Apr 2018 06:59:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqJOH7v/n65/7+N8s2/ijPBLDEMvjTf1LJdjdTT6KZGGUtuzw0+ITxyWSS6/q8bev6lW0dn X-Received: by 2002:ac8:3af:: with SMTP id t47-v6mr5573162qtg.117.1524146374162; Thu, 19 Apr 2018 06:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146374; cv=none; d=google.com; s=arc-20160816; b=ne9tA7MarWuJg2bFp5EYAOwh7horXMB1ooORGJ9o6Q+5d5OgzHof8o83KNAWtIPknN u4MZDNNg7p7JnhUexKJpmwsJxKghRrIhdMW0En5yriygp62MKJgmlXzlmmcxHGA0TNCH IXRRQqsI/SPjQXjp/e/ggjMjvinRFVoYb6mcq0eZfv2wRGMD0gFIVzczhtLZZAdKRp5s BOuGK1SsdPkmGcW69whsrImBARQF97xhVXT+INbfaaDsvBPFTBdTV+j+FbI2/lFgd2Rf cnmC3wbhjEJbJushwAlVBRhN3GPXPBOuLaB7SvcjLDA8/VCkYaW6TfvJmoXDfi1rBWjf EKkA== 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=PBBcL7evx4AUc+MVUfWzM5d2rbr035v+hr9e0PLaeTo=; b=f6VYN/0Zwujs2YYP4L+/+LP/IVGHFsnZzz/Yz4zcYLMwf9TYKpP3whWRueJ6Q0bexw sQTRTEEYtLP1ezvfI50ntuP+HvDmPwJMDLSVlNy1NiuWkWx0lHUQNrndULJygtyGoAYS ozIDOCYhx0Y8hDeNVOTt5FrCoP1lh7dlbMmXKmfDt2w7n/Xkb+qc8+whsvfaRL5xgW7P Yvw7DpRpKKYlzCKJJM0TymwlJ5gN97I/tB/TP+DquHWnagwThZQdA6P2LvWxkPtfzLtc AFbbuixtWkiUuXOGIQ2+KrgQTVT0AclAm2Y+v2Y4YjajQCm1HKMMD8tKprMPsONiSkZN xZsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=h9RCiIO1; 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 f130si2112389qkb.193.2018.04.19.06.59.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 06:59:34 -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=h9RCiIO1; 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]:49797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A61-0005wT-Kr for patch@linaro.org; Thu, 19 Apr 2018 09:59:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5c-0005vy-8a for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5a-00025a-0Y for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:08 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:43520) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5Z-00024V-P0 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:05 -0400 Received: by mail-wr0-x244.google.com with SMTP id u4-v6so14330285wrg.10 for ; Thu, 19 Apr 2018 06:59:05 -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=PBBcL7evx4AUc+MVUfWzM5d2rbr035v+hr9e0PLaeTo=; b=h9RCiIO1eKYenMVPiIJ/aZLtkhm/lxEl5t80egGSXxZsNDAcDDq8KeW6h6Wdvwn0E5 Og3rZiKWfi9jHMHFeU7NlbU9NLurzHumcpgWR3UV9RLJvm0sv82V5mABqQBsEhXX+o9/ HsydmIowj9rAvWBuFA/WYbut2FZOAt0VdJZBs= 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=PBBcL7evx4AUc+MVUfWzM5d2rbr035v+hr9e0PLaeTo=; b=DBomgwxrcWkvjeJriBXAl3GzAeMlzz/cuWrgf99OkivAUCm4kMoLg4/5guiiEGt8QZ L+aEJmcKprJj+PKGAoZSHrmuQnn2o4RL1Z9MskSnGr3DIN3YypujHwCLOJrkhevhLgHP 0HOK835jSSDht/zrJQG6uP1+p/VCzoGVMrMDB1l0MyLh+/PX19WozlOXYJE52Z7B+wOo i8Gufjgmrb7OA69L8zIwx5lbecPpkLrjAdxe2gPsria6GVsVLOXm2FubJbeoMPXeqNqM XXITRIffMORnhk0G2iOyUQH1n1hytaypOWyY3tv0ocXnGxsDpBCU00/rJaBL7q9tu+la mKIg== X-Gm-Message-State: ALQs6tCUIaeEG9uN2qQMxpzPkMrfoI8DJ/K5g/XdXvwaAvaeFwjimdly j3CuKvtayDKk0f2xWH+rsBW5WQ== X-Received: by 10.28.237.11 with SMTP id l11mr4533276wmh.160.1524146344565; Thu, 19 Apr 2018 06:59:04 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id k11sm4600027wmi.35.2018.04.19.06.59.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:02 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id AD0FE3E02CB; Thu, 19 Apr 2018 14:59:01 +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:20 +0100 Message-Id: <20180419135901.30035-3-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::244 Subject: [Qemu-devel] [PATCH v2 02/43] configure: add test for docker availability 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" This tests for a working docker installation without sudo and sets up config-host.mak accordingly. This will be useful from cross compiling things in the future. Signed-off-by: Alex Bennée --- configure | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/configure b/configure index 0a19b033bc..b0ae632ee4 100755 --- a/configure +++ b/configure @@ -451,6 +451,7 @@ jemalloc="no" replication="yes" vxhs="" libxml2="" +docker="no" supported_cpu="no" supported_os="no" @@ -5413,6 +5414,17 @@ EOF fi fi +########################################## +# Docker and cross-compiler support +# +# This is specifically for building test +# cases for foreign architectures, not +# cross-compiling QEMU itself. + +if has "docker"; then + docker=$($python $source_path/tests/docker/docker.py probe) +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -5874,6 +5886,7 @@ echo "avx2 optimization $avx2_opt" echo "replication support $replication" echo "VxHS block device $vxhs" echo "capstone $capstone" +echo "docker $docker" if test "$sdl_too_old" = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -6697,6 +6710,10 @@ if test "$gcov" = "yes" ; then echo "GCOV=$gcov_tool" >> $config_host_mak fi +if test "$docker" != "no"; then + echo "HAVE_USER_DOCKER=y" >> $config_host_mak +fi + # use included Linux headers if test "$linux" = "yes" ; then mkdir -p linux-headers From patchwork Thu Apr 19 13:58:21 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: 133766 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp673871ljf; Thu, 19 Apr 2018 07:03:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/LV9Dxh9OJxYkqpotAlkIy4SbsO7kW7B1mm+MBMj+6kiobTAl4WcNIjm7fJm8CRgGA4E/r X-Received: by 10.55.215.198 with SMTP id t67mr6068506qkt.190.1524146580680; Thu, 19 Apr 2018 07:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146580; cv=none; d=google.com; s=arc-20160816; b=zJ0mYobsiUBmRIlydatbfkntsRRJKvD7TxejRHL1erIYAnGBxTfeGrzD46rnljQD5H C9WSyYpaQsfaJ1zjjo3SkkT+ukme7eAqWxxD8V8VkUwMX0ZmvcPNurIwvE5SLk0tEsSx Twgp2Icx5C2FbCA94VGjkVJgDN2tVLZRPOmBAzWN3+6Gwkc17CJUjGqWrV9PeHNew4QA ld/IOFrfIrv7arnx353CTKqrx+dc9uK0uyKlaEw9a82gu6/ZFPST8c/CoyZTntJCLmSn 7yakxTRthEWLR/TdOWJ2KJOllgle4v6t5KJANTzEkBi/RJU1B9zh+Io0GC5ttX5s70q2 dL6w== 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=57DG2ledkL4kd6fdevGAh9vF1I76amNVFoyAwiMCJcs=; b=d89gkErX26mC2aeBV38pcobHH1jrd5FnBn+0Lj9wLlyLqaY84v7G6937plF3wkqnXL 2v3q+MThkSWmrIy3xR6iBHNL6aljNaz6iXBqH9iO5ylhmkQzAsQM8GHE5QYSlsMlhQMj ArpTGBy7ZUg1AwFIw+p53oSoJqvSI9PQiiwjFaLMpjY2/8z+FWV3wgeo9T9eyUlfVkqi 0inddisxsehAvclgaAFHIl6dy36j5Z2oevNn0Rvd8NnTmsVPEiSjLjdYqkxgBSoKE8MD z35BqukQtswHHWqEzGd69sUsT6pYs/WbTL5E3utrFjfNytXN5lh5Gqk4Fi48yjf0v6ls Zkrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SHvC6Jl+; 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 x3si1102288qke.294.2018.04.19.07.03.00 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:03:00 -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=SHvC6Jl+; 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]:49819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A9M-0000MY-4D for patch@linaro.org; Thu, 19 Apr 2018 10:03:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5c-0005vz-Ig for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5b-00026K-27 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:08 -0400 Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]:43743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5a-00025g-Qq for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:06 -0400 Received: by mail-wr0-x233.google.com with SMTP id u4-v6so14330461wrg.10 for ; Thu, 19 Apr 2018 06:59:06 -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=57DG2ledkL4kd6fdevGAh9vF1I76amNVFoyAwiMCJcs=; b=SHvC6Jl+6ToQeeadlGScZVRg7JNGAVHiRhVSUD0TrLBfSYHXRmxv5ZrLi7T25XmjXD 0aWQuJX3XUEUqJV7dBDB9Oqe+7PkhOj9/k2IdzLOpIvIJIrxjcrq1ltfg7atTrrkUzCR vEgEjoVRjkERr9WdCs06Nda9106LgExr5OV0w= 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=57DG2ledkL4kd6fdevGAh9vF1I76amNVFoyAwiMCJcs=; b=cn4f/kJih8He9XiatvtcHIQ9eaXHn2w5s6AC0xgNAa6wn5oTFjIL/Q7a2fQtHT6mVQ dVEKNrNYde1FRCKCeIKPtV1WvI1KtyMxAiDyR4Fa2Vf861xkHy9vujz7/V3p5+vz2823 IleNgnXYwgvBCUGQVsumcpHron0v7Sz+1NntcqDVEJnPDuHBoLP6KbxP7Ns8e2pnG3z2 PGx0NTluPCjFDZerUC7cwQYSniudxcR/xBuwVKszWqwbTKHzd25EWrN/ssKVOy1sJ5mW 1MGEE4S+kGUpd3yDssizerr7Pe8qCCtHd0co+HC9KEDCongqt0f0hQvsPcsPdSyegv+E 3zkw== X-Gm-Message-State: ALQs6tA8r3rGAkmcxNbGaM127Tij+oNsI6uO6SLddAtvoFOwxa9M2bjL G3YwZOt6TjK+Iw07Hjow03LIKQ== X-Received: by 2002:adf:db90:: with SMTP id u16-v6mr5069350wri.90.1524146345625; Thu, 19 Apr 2018 06:59:05 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u187sm2632wmu.46.2018.04.19.06.59.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:02 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id BED9B3E0308; Thu, 19 Apr 2018 14:59:01 +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:21 +0100 Message-Id: <20180419135901.30035-4-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::233 Subject: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO 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" This allows us to specify cross compilers for our guests. This is useful for building test images/programs. Currently we re-run the compile test for each target. I couldn't think of a way to cache the value for a given arch without getting messier configure code. The cross compiler for the guest is visible to each target as CROSS_CC_GUEST in config-target.mak. Signed-off-by: Alex Bennée --- configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) -- 2.17.0 diff --git a/configure b/configure index b0ae632ee4..0dca341f2a 100755 --- a/configure +++ b/configure @@ -453,6 +453,13 @@ vxhs="" libxml2="" docker="no" +# cross compilers defaults, can be overridden with --cross-cc-ARCH +cross_cc_aarch64="aarch64-linux-gnu-gcc" +cross_cc_arm="arm-linux-gnueabihf-gcc" +cross_cc_powerpc="powerpc-linux-gnu-gcc" + +enabled_cross_compilers="" + supported_cpu="no" supported_os="no" bogus_os="no" @@ -483,6 +490,11 @@ for opt do ;; --disable-debug-info) debug_info="no" ;; + --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option" + ;; + --cross-cc-*) cc_arch=${opt#--cross-cc-} + eval "cross_cc_${cc_arch}=\$optarg" + ;; esac done # OS specific @@ -675,10 +687,12 @@ case "$cpu" in i386|i486|i586|i686|i86pc|BePC) cpu="i386" supported_cpu="yes" + cross_cc_i386=gcc ;; x86_64|amd64) cpu="x86_64" supported_cpu="yes" + cross_cc_x86_64=gcc ;; armv*b|armv*l|arm) cpu="arm" @@ -912,6 +926,8 @@ for opt do ;; --disable-debug-info) ;; + --cross-cc-*) + ;; --enable-modules) modules="yes" ;; @@ -6777,6 +6793,8 @@ case "$target" in ;; esac +target_compiler="" + mkdir -p $target_dir echo "# Automatically generated by configure - do not modify" > $config_target_mak @@ -6805,6 +6823,7 @@ case "$target_name" in bflt="yes" mttcg="yes" gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" + target_compiler=$cross_cc_arm ;; aarch64|aarch64_be) TARGET_ARCH=aarch64 @@ -6812,6 +6831,7 @@ case "$target_name" in bflt="yes" mttcg="yes" gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" + target_compiler=$cross_cc_aarch64 ;; cris) ;; @@ -6853,6 +6873,7 @@ case "$target_name" in ;; ppc) gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" + target_compiler=$cross_cc_powerpc ;; ppcemb) TARGET_BASE_ARCH=ppc @@ -6927,6 +6948,25 @@ if [ "$TARGET_BASE_ARCH" = "" ]; then TARGET_BASE_ARCH=$TARGET_ARCH fi +# Do we have a cross compiler for this target? +if has $target_compiler; then + + cat > $TMPC << EOF +#include +int main(void) { + printf("Hello World!\n"); +} +EOF + + if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then + target_compiler="" + else + enabled_cross_compilers="${enabled_cross_compilers} ${target_compiler}" + fi +else + target_compiler="" +fi + symlink "$source_path/Makefile.target" "$target_dir/Makefile" upper() { @@ -7000,6 +7040,10 @@ if test "$target_bsd_user" = "yes" ; then echo "CONFIG_BSD_USER=y" >> $config_target_mak fi +if test -n "$target_compiler"; then + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak +fi + # generate QEMU_CFLAGS/LDFLAGS for targets cflags="" @@ -7122,6 +7166,12 @@ echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak done # for target in $targets +if test -n "$enabled_cross_compilers"; then + echo + echo "NOTE: cross-compilers enabled:" + printf '%s\n' $enabled_cross_compilers | sort -u +fi + if [ "$dtc_internal" = "yes" ]; then echo "config-host.h: subdir-dtc" >> $config_host_mak fi From patchwork Thu Apr 19 13:58:22 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: 133763 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp669244ljf; Thu, 19 Apr 2018 06:59:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/utPO97l9f4p4qytzw+j9Vwz84cUo5wXOvReiHJ6Lc0Lt2cgQnQBESOXfTbILsVhNMxL0c X-Received: by 2002:ac8:1e82:: with SMTP id c2-v6mr6122655qtm.402.1524146379710; Thu, 19 Apr 2018 06:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146379; cv=none; d=google.com; s=arc-20160816; b=Eei//FETD4Ny59qo89Bhceb9WA0Nq2lnIjwprHYbgTh/iHek9grA7OKt3kvUnLkHE/ lXbSHK1xyo8MBeOIi2MovCt6McEniNQ7dxOYVUjyRsTXFKLjmO/lqK0SFxnZfRo4GZ2K dIPX3zafydFPtoLhniGefKuSzh6BDBDOzbp7Xm/niyoW1IE5F4/RXCBUwt7MZuB2h0Lx p62YfNhZR/tfiztihprsFpGqrjrCDMKRVynKuARj0+3NOMDR+Fqjnhm46ncqtelSqsvE nIgzPmY5QGVZjUxIiq9RJzSfv4vR6df9wL1FBgeNn2aZnj5Hgzn1/++LkvuaNBxdbzWh KJ1A== 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=lUgYhW8e6LyPBKtB7xAbRk2VE1K63xWnhPqjL/790ko=; b=SEva/BYqv6qjrg2sbg/hS7TodcTgImEt3Y64Twc4vmAfiGr74HX1KHLajmORtEU4y5 ZR7qSLTnjYBzJ3CCA9fgNUuuAgdB1SGIBsgML1wszZd4WkHk3syjsDZE2A1BgS76pFRV /xOuuk+1Wn+VHZNLG91D5+UcTBvPuI3tEWsH152uw2GUJg+HNB2aLjbj8UL4dPkL0w0D heTgUc1RdkgdZSpGorcK1YGIU6HBKGQ3+WtWVVtDoAmXCGdZYxOoradzzEkPX23T6XNT s7KwCAssai/TfRwprvNLKruo1t50wX9Vml0w0ndueNBTJdg4oBYxOhRfjYbjugz7N0tT Uumw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DBkgMq8Z; 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 v126si1778260qkh.27.2018.04.19.06.59.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 06:59:39 -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=DBkgMq8Z; 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]:49800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A67-0005y8-2N for patch@linaro.org; Thu, 19 Apr 2018 09:59:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5d-0005wK-La for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5c-00026h-4i for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:09 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:43519) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5b-00026O-U9 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:08 -0400 Received: by mail-wr0-x241.google.com with SMTP id u4-v6so14330667wrg.10 for ; Thu, 19 Apr 2018 06:59:07 -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=lUgYhW8e6LyPBKtB7xAbRk2VE1K63xWnhPqjL/790ko=; b=DBkgMq8ZKGIlUp4oztcpBYSV78Qqmy1xg7Q04485ZV/nPLl8rSX6cMtePtBTQ/1xSZ j/cEVcibQPNBNcqd0/TxYLI8WWTTCA6HFE0I/7/+RSJlNveZmXL3TMWEypRrPFlxk0xR G2jhMu+s8JhAAgPj/9R6mAn8zzpY3j3W6KuMk= 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=lUgYhW8e6LyPBKtB7xAbRk2VE1K63xWnhPqjL/790ko=; b=hOu1K0nu3nlIkGC4G+C+IiyyYPpdNTe4FnJli37AsCyeX0EHzYGFE85ro2pe8A43JG DdZczcWI7QDGVJUZ5auOOYLd11sLttxcWNnhGIjUbi+6go3ze7mi7PjZEEKQQuI2AET9 JsfYC5yywJ7A7/S3lyAz97SOR8QKFXtWWPA6TlnLJoyvgd6KHadsRHeCYjIchRQl/aqw 6kP7yZANzCMefmmKuLiN/egJR447tloY8dSMllzlUZInUp33oPEqZimw6aVhCYl9r09i h3WDAEWCXCxx3KkaUd8aIP9Ie2TPFdw0JiAvjb3XgzVClBaKuU8ZajNtLKfhAX9lozxX c8bQ== X-Gm-Message-State: ALQs6tBWKTHZaw2nnWRjLL9oLghKv+5Zxz+fSAIQ8g5CnnJ5RZ4XZZlm M5xujswm04W8fAuSbjT34oLSfQ== X-Received: by 2002:adf:ba50:: with SMTP id t16-v6mr2567696wrg.237.1524146346731; Thu, 19 Apr 2018 06:59:06 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b18-v6sm166283wrb.55.2018.04.19.06.59.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:02 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D00A03E031E; Thu, 19 Apr 2018 14:59:01 +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:22 +0100 Message-Id: <20180419135901.30035-5-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::241 Subject: [Qemu-devel] [PATCH v2 04/43] configure: move i386_cc to cross_cc_i386 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" Also dont assume x86_64 compiler can build i386 binaries. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé --- v2 - drop using system x86_64 compiler for i386 compiles --- configure | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) -- 2.17.0 diff --git a/configure b/configure index 0dca341f2a..038fb9db7b 100755 --- a/configure +++ b/configure @@ -284,7 +284,6 @@ libs_softmmu="" libs_tools="" audio_pt_int="" audio_win_int="" -cc_i386=i386-pc-linux-gnu-gcc libs_qga="" debug_info="yes" stack_protector="" @@ -457,6 +456,8 @@ docker="no" cross_cc_aarch64="aarch64-linux-gnu-gcc" cross_cc_arm="arm-linux-gnueabihf-gcc" cross_cc_powerpc="powerpc-linux-gnu-gcc" +cross_cc_i386="i386-pc-linux-gnu-gcc" +cross_cc_cflags_i386="" enabled_cross_compilers="" @@ -687,12 +688,10 @@ case "$cpu" in i386|i486|i586|i686|i86pc|BePC) cpu="i386" supported_cpu="yes" - cross_cc_i386=gcc ;; x86_64|amd64) cpu="x86_64" supported_cpu="yes" - cross_cc_x86_64=gcc ;; armv*b|armv*l|arm) cpu="arm" @@ -1435,7 +1434,6 @@ case "$cpu" in i386) CPU_CFLAGS="-m32" LDFLAGS="-m32 $LDFLAGS" - cc_i386='$(CC) -m32' ;; x86_64) # ??? Only extremely old AMD cpus do not have cmpxchg16b. @@ -1443,12 +1441,14 @@ case "$cpu" in # runtime and generate the fallback to serial emulation. CPU_CFLAGS="-m64 -mcx16" LDFLAGS="-m64 $LDFLAGS" - cc_i386='$(CC) -m32' + cross_cc_x86_64=$cc + cross_cc_cflags_x86_64=$CPU_CFLAGS ;; x32) CPU_CFLAGS="-mx32" LDFLAGS="-mx32 $LDFLAGS" - cc_i386='$(CC) -m32' + cross_cc_i386=$cc + cross_cc_cflags_i386="-m32" ;; # No special flags required for other host CPUs esac @@ -6675,7 +6675,6 @@ echo "CC=$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "IASL=$iasl" >> $config_host_mak fi -echo "CC_I386=$cc_i386" >> $config_host_mak echo "HOST_CC=$host_cc" >> $config_host_mak echo "CXX=$cxx" >> $config_host_mak echo "OBJCC=$objcc" >> $config_host_mak @@ -6794,6 +6793,7 @@ case "$target" in esac target_compiler="" +target_compiler_cflags="" mkdir -p $target_dir echo "# Automatically generated by configure - do not modify" > $config_target_mak @@ -6810,10 +6810,13 @@ TARGET_ABI_DIR="" case "$target_name" in i386) gdb_xml_files="i386-32bit.xml i386-32bit-core.xml i386-32bit-sse.xml" + target_compiler=$cross_cc_i386 + target_compiler_cflags=$cross_cc_cflags_i386 ;; x86_64) TARGET_BASE_ARCH=i386 gdb_xml_files="i386-64bit.xml i386-64bit-core.xml i386-64bit-sse.xml" + target_compiler=$cross_cc_x86_64 ;; alpha) mttcg="yes" @@ -6958,7 +6961,7 @@ int main(void) { } EOF - if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then + if ! do_compiler $target_compiler $target_compiler_cflags -o $TMPE $TMPC -static ; then target_compiler="" else enabled_cross_compilers="${enabled_cross_compilers} ${target_compiler}" @@ -7042,8 +7045,13 @@ fi if test -n "$target_compiler"; then echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + + if test -n "$target_compiler_cflags"; then + echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak + fi fi + # generate QEMU_CFLAGS/LDFLAGS for targets cflags="" From patchwork Thu Apr 19 13:58:23 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: 133765 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp673265ljf; Thu, 19 Apr 2018 07:02:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/6x6Uio7rw5jycXQAYgXw59HJlph+H90I+0K3dsu5mRxHKYWT0kDgLqYX1t0Ik9hbLnWw9 X-Received: by 2002:ac8:1382:: with SMTP id h2-v6mr6422354qtj.134.1524146553653; Thu, 19 Apr 2018 07:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146553; cv=none; d=google.com; s=arc-20160816; b=hIsle4rg05QQyh2V7rUgtlraIUi+SDhyH8utWl3963j+qnQWmPhXOsNWvbBu/b4rQL qnMjNAck3uI3ryvcoRJpowfkwX5Bkp9Go9DVLDbfCpfSLXUxgbv8jeOWNGH9ptyfMLS9 3NK0AkcoE4idsG+WluCPVpCmrKREaQd35YdUfrV0/buYPzxGWN7OxMyA2Dv6RMUuOuk0 UACgG5x2xWqclS1PKbicj1EP9aMDueqn7YroUMCIGTUNblmVDXZ/5UC+ZoIWcRuHKpW2 SY0cd5gPUbfrO9PJWNRNt7pQedPLNjTsXrYSl+K3raAWm+Eu4awCCU6hR36Lymx3+UC8 JAcw== 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=EUerH2jG/RsWhx4ELeJ4/AmVZEOk4gNUNLMWrWMwnYM=; b=uV58lt8wZXN2BfPFYTmHCM0KFY6jjAnEW/8lNyitZB1zoNahpAEWRp6HYhpY7TknSl zUCI23KZc2W1ZGu2lWz+ESEIOPT/YqDu9Mdt2Zt1uiuqIGGoiMt6FxsDXXGm97FlYeqq kiUb16xBUGXh/YprSFVYdugSP77GMxFTUo4vHkBbTpVk514TnpaeRh+C78gU+kT+13iT h4pFzo5jHoHVeQ49p7Bf+CCGHc33MJiUsNwrwOEEMUlYIwT8suhH2m/XEoYb4hHAoYSu Uu+cVMc0oVQgZVJr7EH9HD2RNBI6Lftb+DpNT4jGGKJcjKyeTPR/SAtikve69uFqDT5Q C+6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PSRcCQwb; 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 o98si1607378qkh.137.2018.04.19.07.02.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:02:33 -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=PSRcCQwb; 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]:49820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A8v-0000Nt-2N for patch@linaro.org; Thu, 19 Apr 2018 10:02:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5f-0005xO-J3 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5e-00028x-PH for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:11 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:41554) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5e-00028B-Iz for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:10 -0400 Received: by mail-wr0-x242.google.com with SMTP id v24-v6so14330342wra.8 for ; Thu, 19 Apr 2018 06:59:10 -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=EUerH2jG/RsWhx4ELeJ4/AmVZEOk4gNUNLMWrWMwnYM=; b=PSRcCQwbxYxYYhOxLU0mkFGUQ00lzVxjiXqCuALHhMZ46u3cfRZTXtMkxoPzrjIBWl Y+wnczkQAUkhUA3TXYzdHPWIbQq9Rz4RUfpvFaXYKQ5x6nei2c3ETWULktphpi9lNkKb uTBPyTTvb1rF6hJWuyzRdVkuyhxdsvfi/8AT4= 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=EUerH2jG/RsWhx4ELeJ4/AmVZEOk4gNUNLMWrWMwnYM=; b=HWX20mEoFDI2JZ5pGJYDE5dw3fnih0Qe9nhPXIGDlsvoRHeRpSANX7YKDj4xNts+51 KmanncbXK1rShEt83lutkoiyAOkn8xS5JSo6jNE9TYbOOwW1Pi5agzetXiJZYSahSB92 cDyATaak3KxdggOIeE25z1k1X3J+MWOYqIzPgSQgahzAUEegLViKdnsZ7wrdjPXhA2kX Dv4jq2B82+P296gMX2MsGddCXkuXX8nBICPQ9cELlFlZiuoD1eoWr3zaeFxtmijh4Xig UqYcaBr+BHxBELmbfAnLQGFH1SyuU6fK/+W3v8N6VE5yvTwE/mG+SOuP6K9FrZBuCkjj PbnA== X-Gm-Message-State: ALQs6tC8o5HmPxdsGk7NOvoMo0MGV2LsHgKQAdC4gEN0yrUvdJk9SR0Y kK5DQW5SQRj0vFbMbGZ+8Ljpbg== X-Received: by 2002:adf:ac64:: with SMTP id v91-v6mr4648060wrc.80.1524146349330; Thu, 19 Apr 2018 06:59:09 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a13-v6sm4073420wrc.19.2018.04.19.06.59.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:06 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E1A873E031F; Thu, 19 Apr 2018 14:59:01 +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:23 +0100 Message-Id: <20180419135901.30035-6-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::242 Subject: [Qemu-devel] [PATCH v2 05/43] configure: allow user to specify --cross-cc-cflags-foo= 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" As an individual compiler may be able to support several targets with the appropriate flags we need to expose this to the user as well. Signed-off-by: Alex Bennée --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.17.0 diff --git a/configure b/configure index 038fb9db7b..29af33716d 100755 --- a/configure +++ b/configure @@ -454,7 +454,10 @@ docker="no" # cross compilers defaults, can be overridden with --cross-cc-ARCH cross_cc_aarch64="aarch64-linux-gnu-gcc" +cross_cc_aarch64_be="$cross_cc_aarch64" +cross_cc_cflags_aarch64_be="-mbig-endian" cross_cc_arm="arm-linux-gnueabihf-gcc" +cross_cc_cflags_armeb="-mbig-endian" cross_cc_powerpc="powerpc-linux-gnu-gcc" cross_cc_i386="i386-pc-linux-gnu-gcc" cross_cc_cflags_i386="" @@ -493,6 +496,9 @@ for opt do ;; --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option" ;; + --cross-cc-cflags*) cc_arch=${opt#--cross-cc-flags} + eval "cross_cc_cflags_${cc_arch}=\$optarg" + ;; --cross-cc-*) cc_arch=${opt#--cross-cc-} eval "cross_cc_${cc_arch}=\$optarg" ;; @@ -6827,6 +6833,7 @@ case "$target_name" in mttcg="yes" gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" target_compiler=$cross_cc_arm + eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}" ;; aarch64|aarch64_be) TARGET_ARCH=aarch64 @@ -6835,6 +6842,7 @@ case "$target_name" in mttcg="yes" gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" target_compiler=$cross_cc_aarch64 + eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}" ;; cris) ;; From patchwork Thu Apr 19 13:58:24 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: 133767 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp677844ljf; Thu, 19 Apr 2018 07:06:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqHbcUqAYJzmZhGVeq87k+APpMceV4SOJf0gdCkW+1qzdiTRh85v7PW8TG4TwcxdhyDD3Ny X-Received: by 10.55.97.197 with SMTP id v188mr6101432qkb.134.1524146760696; Thu, 19 Apr 2018 07:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146760; cv=none; d=google.com; s=arc-20160816; b=sx+4DWDFSSZOhxtiEO2U88Vez8oOYBJu+SAKNIpqMDAe4NtUONec816P0IDUlCc8Ea +nC5fu/c7NgDFAAKcxz6HTRFDDnHXWLMLaMf7qS1nCSvaOzhPeeT1B8/SwF9m9qA2/3a l0yBvXP/aATrPaZzAYmPrEEg6weB0NvJdcUfRYEQ3thUQ4ifNzIIzET5RjPrHu2qsquv SsQZxqybSlO9cu3LAMC2bRep+3cecYsAeqDMUXoB+W413/QsteMH/LGkQzVTGPpcS70N iAEZE2K/jVQCxXSe3mSbxCsyRWfZDgG9U30BllTwAU6vsgB3VeW3axPuxYQ58FWrpv9n RVUQ== 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=V4loadEfQMPlIQOyz24KJ4T6ib1kKhegaW4NwHGkGiM=; b=dEJeZ/Oqcqv3pWrxgTRRnLvb1J2KbnRXKxr+BA9RbVQyp/MJqwB6IVFS/YWrjEaAdE 2cdVJKgPxanISafLsRbUrtlFZ+9Qc2GxCggJpdL20dyo1hQCLG/G/tnXqaXMoVR7sKR7 ZS/ENWK7AHMoIfHV/jnJPlN46eXrE7CW7+rMANVeUxALfdidhkIZjrop+ycPjZTC9fx6 O8yFr8/09JPhXhDEtUSPVB51nH6i5Q8vlt68LduhIMDz1ap0hQlLSssn4r4sk4s40HON QwVkI1iBSOrFbo5iXj4ycp4FqQusFwHW1ZHtFByyXYuzgQckVWUd6rIM5TjylGL5Ofpw VMBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jZpVScVL; 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 y44si420303qve.41.2018.04.19.07.06.00 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:06:00 -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=jZpVScVL; 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]:49844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ACG-00037E-43 for patch@linaro.org; Thu, 19 Apr 2018 10:06:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5f-0005x5-3Z for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5d-00028G-Vw for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:11 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:37484) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5d-00027P-O8 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:09 -0400 Received: by mail-wr0-x242.google.com with SMTP id f14-v6so14349860wre.4 for ; Thu, 19 Apr 2018 06:59:09 -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=V4loadEfQMPlIQOyz24KJ4T6ib1kKhegaW4NwHGkGiM=; b=jZpVScVLCk/9qmp25ZqblNDn4xxZibzybZGVTYyc84GH2ksbl8cq8Gc8/egOL4ibDB uOr+QZ5JgNoniDjP9QGanvZR9+PjMvQJYNPhoN9fKt1lHOlOgRf7mquxutfQJMI7XhSH b49hGFBHsNZlnnshRu/tt4fSD+FKiY9aokKV0= 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=V4loadEfQMPlIQOyz24KJ4T6ib1kKhegaW4NwHGkGiM=; b=sw+H2dR044GxZljA8csVWzA1DrtTjmL38GMgALu2svLLtyFwamJv5LwXuGOWGFbnKL fPOHd2Q6acVqjiOsxbWgo0p/LCeS3O2J94OKG3X8YKe5LO4IulU2rPInYme3i4hrMeOX JbyM+sTw5aipvT59qWq9MqHnE91e3UULHnpsgOCtMkhpQH3WAUXkpkolU/Jh4k2k7gpn OzX7B2zP+SJWjp9EIv0XN61ysacT3jY42FfLUxb96AotJinP1VeFRTBv3e1QEdBaNVuH WynCwQh7Fc+xsUvNSSJdDexliF0TlbrK635edz/GcZP+mGsW2YNidpa9lTeCFR3AMjN1 Zbiw== X-Gm-Message-State: ALQs6tDao6tkWd87MDYpOhuZXwPI684b4X3J8k1wSG3mSKJ3/IOl12VX TrNkyRVk8ZwpsbEK77DQxbZp4g== X-Received: by 2002:adf:9205:: with SMTP id 5-v6mr5042971wrj.282.1524146348556; Thu, 19 Apr 2018 06:59:08 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y42-v6sm7799877wry.21.2018.04.19.06.59.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:06 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id F31B23E0321; Thu, 19 Apr 2018 14:59:01 +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:24 +0100 Message-Id: <20180419135901.30035-7-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::242 Subject: [Qemu-devel] [PATCH v2 06/43] configure: set cross_cc_FOO for host compiler 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" We can build tests for the host system with the compiler that we have selected. Signed-off-by: Alex Bennée --- configure | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/configure b/configure index 29af33716d..44d310a692 100755 --- a/configure +++ b/configure @@ -1416,30 +1416,44 @@ case "$cpu" in ppc) CPU_CFLAGS="-m32" LDFLAGS="-m32 $LDFLAGS" + cross_cc_powerpc=$cc + cross_cc_cflags_powerpc=$CPU_CFLAGS ;; ppc64) CPU_CFLAGS="-m64" LDFLAGS="-m64 $LDFLAGS" + cross_cc_ppc64=$cc + cross_cc_cflags_ppc64=$CPU_CFLAGS ;; sparc) CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc" LDFLAGS="-m32 -mv8plus $LDFLAGS" + cross_cc_sparc=$cc + cross_cc_cflags_sparc=$CPU_CFLAGS ;; sparc64) CPU_CFLAGS="-m64 -mcpu=ultrasparc" LDFLAGS="-m64 $LDFLAGS" + cross_cc_sparc64=$cc + cross_cc_cflags_sparc64=$CPU_CFLAGS ;; s390) CPU_CFLAGS="-m31" LDFLAGS="-m31 $LDFLAGS" + cross_cc_s390=$cc + cross_cc_cflags_s390=$CPU_CFLAGS ;; s390x) CPU_CFLAGS="-m64" LDFLAGS="-m64 $LDFLAGS" + cross_cc_s390x=$cc + cross_cc_cflags_s390x=$CPU_CFLAGS ;; i386) CPU_CFLAGS="-m32" LDFLAGS="-m32 $LDFLAGS" + cross_cc_i386=$cc + cross_cc_cflags_i386=$CPU_CFLAGS ;; x86_64) # ??? Only extremely old AMD cpus do not have cmpxchg16b. @@ -1454,7 +1468,7 @@ case "$cpu" in CPU_CFLAGS="-mx32" LDFLAGS="-mx32 $LDFLAGS" cross_cc_i386=$cc - cross_cc_cflags_i386="-m32" + cross_cc_cflags_i386=$CPU_CFLAGS ;; # No special flags required for other host CPUs esac From patchwork Thu Apr 19 13:58:25 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: 133776 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp682662ljf; Thu, 19 Apr 2018 07:09:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq/6XP5ohnYVs5YJPZoiIjqhtR6RQg15Wj0kh6/dYb7bCKRmK/8aH4cmB1YrbUNCW18y7nM X-Received: by 2002:ac8:44cd:: with SMTP id b13-v6mr1335948qto.394.1524146987150; Thu, 19 Apr 2018 07:09:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146987; cv=none; d=google.com; s=arc-20160816; b=0FPMkid01eR0arTyFFUmtpUwjU3mLPBxTGBGzkCKAwwasrHhnbxF7aOIk8jpZOJz3F n+yNW2Xcek+l6wNMg3S3Jd+2MM1Rg5qLidjMKBKZyqGCFeSaH7khnBwt8XGOhM++moFE a5je7SfpYW0psgCxiKT7+/P/IYNtQ6k0Bil2wbMPUvn1O7fZPQDUYkS4JzvZXMm1SRr9 ncH3n+5V++xdJtxdMAgL+1OOfHMxO9qTaL12isMxnlf/bieOL2+UO1ZvT//TVfy2kegR NUlXjCz7O4TiX2mxqXe77OE+nIP13wVUt74ktZpcKe0aoT6x9+8Uky1SdzcjPjEFnKrs MjHw== 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=ioTotYAqkFBKd5KnrtG52D7NPXHT5Pw9gIfB7plDrJM=; b=orZG/I+wJmIcm4Ngml0z3pDSlWe+81DbsiWkSfslMHwWqwAHYCBMrqAQLsmXI1q6lr MqSQnZLqzL84HnztP8DyS/y+8DjZLloGAIWQyS89aE3Kt/LTzbTQ5RtR36zp5AWJlO7O KcT2a8om3mJToyv7hunR63ryKnzNdcaxhsdrCjUImNYfUlalSSXmru8SU5FwPe/szmSk tvjKn28N4qaPAWN51PFr0+RmWfh/2VQPzfr+qeZ9nmPSOREF5oryrmx9gdAcFv5XKXmt OEbq7u0feD2LpO9efAvLj6NK7n9yBpw+J3IEIvZbPSoN9NShRBseGnDuWkUg5/BWi7+o sdnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LDvT1J9+; 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 b191si4856067qkg.318.2018.04.19.07.09.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:09:47 -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=LDvT1J9+; 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]:50004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AFu-00063b-H7 for patch@linaro.org; Thu, 19 Apr 2018 10:09:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5i-00060N-6a for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5g-0002DY-Uy for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:14 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:38067) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5g-0002Aa-L3 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:12 -0400 Received: by mail-wr0-x244.google.com with SMTP id h3-v6so14359052wrh.5 for ; Thu, 19 Apr 2018 06:59: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=ioTotYAqkFBKd5KnrtG52D7NPXHT5Pw9gIfB7plDrJM=; b=LDvT1J9+TqD1dBQmem2A8E6TiyG1M+0f1PlCwYLKoydbhu3RWZP/plqTKuztzXHrNg KStCzek/XLFnKnGBVP01agaNs5aDdNQQb1A34UBCTDntZaVdBFEBfqKxslpyHFOQv9lR GT9u8+3yqW2d7ctGrw4jbVIiTeQlCJSWsbaF4= 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=ioTotYAqkFBKd5KnrtG52D7NPXHT5Pw9gIfB7plDrJM=; b=XHKvl/GMeWBkg6H6W0r6YmzFNtW7E1Eua0+VOA43mDFFdoppEGxRFGRV1Vyvg2tevV r/M0S5eR0z6RbBhYm6+nZc12HUZ4fcF/Ec1QCB+jamQZDQg3ThFuUvbJcxcD7cv3ykbr DizL63pxDTm5ynI6Pr0rKPBHBhuOe+s8DJURV2x0rXkibHPmx/ycuSqbXLt+RNWFxp3E 2Jdk2QeEe63i3T2fHTljqkjeGqB5YNKUHuD6JacIHqG0x9GLLYpnwWjoEniuzjdIcynq kyqcg5fyQqMNAbEVcLZvkbdE4pB27irXiPK6WNCheD10oGqCfrytnUvzbzmLvRyoSqCc ipGA== X-Gm-Message-State: ALQs6tDErVJ12NMJuOYtcAzBlO+YkYsdIUdKnOEBwRX8Y9pPuc6/M9jT JTKKPitEKiCqLCf0tQ7s8yqdcA== X-Received: by 2002:adf:a850:: with SMTP id l74-v6mr4627596wrc.42.1524146351444; Thu, 19 Apr 2018 06:59:11 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v134sm3130872wmv.32.2018.04.19.06.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:06 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 13D3B3E0342; Thu, 19 Apr 2018 14:59:02 +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:25 +0100 Message-Id: <20180419135901.30035-8-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::244 Subject: [Qemu-devel] [PATCH v2 07/43] Makefile: Rename TARGET_DIRS to TARGET_LIST 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Fam Zheng To be more accurate on its purpose and make code that looks for a certain target out of this variable more readable. Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- Makefile | 20 ++++++++++---------- configure | 2 +- scripts/create_config | 2 +- tests/Makefile.include | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/Makefile b/Makefile index d71dd5bea4..e894431a89 100644 --- a/Makefile +++ b/Makefile @@ -62,8 +62,8 @@ seems to have been used for an in-tree build. You can fix this by running \ endif endif -CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y) -CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y) +CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_LIST)),y) +CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_LIST)),y) CONFIG_XEN := $(CONFIG_XEN_BACKEND) CONFIG_ALL=y -include config-all-devices.mak @@ -362,8 +362,8 @@ DOCS= endif SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR) -SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) -SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS)) +SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_LIST)) +SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_LIST)) ifeq ($(SUBDIR_DEVICES_MAK),) config-all-devices.mak: @@ -466,7 +466,7 @@ config-host.h-timestamp: config-host.mak qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@") -SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) +SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_LIST)) SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES)) $(SOFTMMU_SUBDIR_RULES): $(block-obj-y) @@ -510,7 +510,7 @@ ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) romsubdir-%: $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/" CFLAGS="$(filter -O% -g%,$(CFLAGS))",) -ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) +ALL_SUBDIRS=$(TARGET_LIST) $(patsubst %,pc-bios/%, $(ROMS)) recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) @@ -763,7 +763,7 @@ distclean: clean rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html rm -f docs/qemu-block-drivers.7 - for d in $(TARGET_DIRS); do \ + for d in $(TARGET_LIST); do \ rm -rf $$d || exit 1 ; \ done rm -Rf .sdk @@ -864,7 +864,7 @@ endif $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ done $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all" - for d in $(TARGET_DIRS); do \ + for d in $(TARGET_LIST); do \ $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ done @@ -1062,9 +1062,9 @@ endif @echo ' ctags/TAGS - Generate tags file for editors' @echo ' cscope - Generate cscope index' @echo '' - @$(if $(TARGET_DIRS), \ + @$(if $(TARGET_LIST), \ echo 'Architecture specific targets:'; \ - $(foreach t, $(TARGET_DIRS), \ + $(foreach t, $(TARGET_LIST), \ printf " %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \ echo '') @echo 'Cleaning targets:' diff --git a/configure b/configure index 44d310a692..0988c88d9f 100755 --- a/configure +++ b/configure @@ -6125,7 +6125,7 @@ qemu_version=$(head $source_path/VERSION) echo "VERSION=$qemu_version" >>$config_host_mak echo "PKGVERSION=$pkgversion" >>$config_host_mak echo "SRC_PATH=$source_path" >> $config_host_mak -echo "TARGET_DIRS=$target_list" >> $config_host_mak +echo "TARGET_LIST=$target_list" >> $config_host_mak if [ "$docs" = "yes" ] ; then echo "BUILD_DOCS=yes" >> $config_host_mak fi diff --git a/scripts/create_config b/scripts/create_config index d727e5e36e..58948a67a4 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -107,7 +107,7 @@ case $line in target_name=${line#*=} echo "#define TARGET_NAME \"$target_name\"" ;; - TARGET_DIRS=*) + TARGET_LIST=*) # do nothing ;; TARGET_*=y) # configuration diff --git a/tests/Makefile.include b/tests/Makefile.include index 3b9a5e31a2..3d2f0458ab 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -854,7 +854,7 @@ endif # QTest rules -TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS))) +TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_LIST))) ifeq ($(CONFIG_POSIX),y) QTEST_TARGETS = $(TARGETS) check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y)) From patchwork Thu Apr 19 13:58:26 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: 133775 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp682627ljf; Thu, 19 Apr 2018 07:09:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/HtYbMBkfo3wLQZFckHDxNy5D//j34K4tYgULEs/rCO55Z00ik+JC99MrzZWD3dUzFFFrT X-Received: by 10.55.31.161 with SMTP id n33mr6305101qkh.393.1524146985427; Thu, 19 Apr 2018 07:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146985; cv=none; d=google.com; s=arc-20160816; b=aEr8d1CYSI32GL7rLkdZ63Wy5rTTXtzrfXraaQ/XSH6Cp4oG+pZPhGDFkHWXe7OCLy ZJMGWoYq8w9nyPwWyRB5kXU7utdq8wLoMcu29rRwPQKHkykRnJvUZzJ4a22EW3UpVSj4 brL+Yqi6UyOv+WQZNTgptLmTRTuV3Z+YSizkdBJDrYRO7uorOLMNFXUcC/n96xFtKPjL mbbLT91IWT4XyZhBW9pzkTJg+n8SuZIX8dui+Vdyvb//Om76vAfLfTLVVrhwi/I0XHun ILvpvapKIAdhEyIaG/zYEU8HNACBaLd+JF7+OKa2WdE2PgHf1A/O5GXsIeXGk7a9qLfW dHhA== 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=2bTmo5Z3bqje3uvfKSKg6BbcjFDioLuevJQVtr4gvdc=; b=ZhJx4ELt6v5lvSD+VgfxZz62T6/fXZujUZ8c9upu2W01IshuCf55j4fOGV4M3eMFCs ydCN2tOCvuAUlyb76M6UxnBKQX0N1AcxRn4fuC+6/dLOduo3d5R/qaK32P1Ox4pTaqvC efdXmDPGN+9w/nVSgZdTgIcRwUvNEaQgnWIAk0hKV/GyDLxws9S4AIFhlH9G81+0ccr2 OMJ1aRt15M6uQcIftedfpDTyWsWy8Psf/sQfuo6nO3TnnK7oqKN3qqZOQ/7x/AyOPKLu PKrwM6dbi9fwE7ldhYGCAlf9j8JNNGjhx5tHmcYtbyqqbP14iJ0IdTCuSxKQnaLK9isE joAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SH5smvtJ; 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 d11si453775qvf.95.2018.04.19.07.09.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:09:45 -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=SH5smvtJ; 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]:50003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AFs-00063P-Q3 for patch@linaro.org; Thu, 19 Apr 2018 10:09:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5l-00064M-CS for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5f-00029i-Mh for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:17 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:41554) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5f-000295-GD for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:11 -0400 Received: by mail-wr0-x241.google.com with SMTP id v24-v6so14330517wra.8 for ; Thu, 19 Apr 2018 06:59:11 -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=2bTmo5Z3bqje3uvfKSKg6BbcjFDioLuevJQVtr4gvdc=; b=SH5smvtJW78Ri/ZHXYoNlfWRCqyuqDDmtv7n/w50Z2oQpWRY3YXI2dWUmHw2ppET5c NXX8/027v2dnFTN4LGAPbRT73XMLyhZIE6Usw4ZfY3ckuTnO2WQaAncNmhfryUbKe79g IkE9v/0vfoz6ZwkkBXI/UcVWFUdVBbohU18iw= 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=2bTmo5Z3bqje3uvfKSKg6BbcjFDioLuevJQVtr4gvdc=; b=guUNAWucsocsq8GYMkAyF2AWwFudaECB5R+Pbd4F3s3CwexPVd1C9Udx6HAUP4Tccb 5nMuKtvQ0ZL0FLKQbdZTHXUWQv3wAfh+FJV2FN2QY54SGpLrFTYvobu3sPTiqje3OXne Oq/pp2audvVWZ0PKQOmsDSw/1QusZ2e3AZAD6fjw2GMXPwGQ4KwXMaKlyYVhfGCo/lHe a0Y3boJveW910sfkYOTIRk4PsEGVpCjKoQcDLSHMyprAY8J3SFbDHzOtHr2Foa0zZTnd zju6KeQt8K4bIb8Tp+Z606PSwx8YEHOGDpXBl6BkadUpA/CL762hY8V32xLMcc3cSPC7 R9zw== X-Gm-Message-State: ALQs6tB7Gb56Suol7YarJIqeMughAUslyOf+6N/x1LuvHr7IBHTHG+EU d6KvlzEWEXRWAPFwPEqL+Al6YioDDdk= X-Received: by 10.28.135.9 with SMTP id j9mr4946542wmd.68.1524146350330; Thu, 19 Apr 2018 06:59:10 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id d7-v6sm3515865wrj.26.2018.04.19.06.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:06 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 259883E03B9; Thu, 19 Apr 2018 14:59:02 +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:26 +0100 Message-Id: <20180419135901.30035-9-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::241 Subject: [Qemu-devel] [PATCH v2 08/43] docker: Add "cc" subcommand 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" Signed-off-by: Fam Zheng [AJB: add if args.paths check] Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - add if args.paths check to avoid iterating null argument --- tests/docker/docker.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -- 2.17.0 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index f8267586eb..bcc3ee2dee 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -408,6 +408,31 @@ class ProbeCommand(SubCommand): return +class CcCommand(SubCommand): + """Compile sources with cc in images""" + name = "cc" + + def args(self, parser): + parser.add_argument("--image", "-i", required=True, + help="The docker image in which to run cc") + parser.add_argument("--source-path", "-s", nargs="*", dest="paths", + help="""Extra paths to (ro) mount into container for + reading sources""") + + def run(self, args, argv): + if argv and argv[0] == "--": + argv = argv[1:] + cwd = os.getcwd() + cmd = ["--rm", "-w", cwd, + "-v", "%s:%s:rw" % (cwd, cwd)] + if args.paths: + for p in args.paths: + cmd += ["-v", "%s:%s:ro,z" % (p, p)] + cmd += [args.image, "cc"] + cmd += argv + return Docker().command("run", cmd, args.quiet) + + def main(): parser = argparse.ArgumentParser(description="A Docker helper", usage="%s ..." % os.path.basename(sys.argv[0])) From patchwork Thu Apr 19 13:58:27 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: 133772 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp679660ljf; Thu, 19 Apr 2018 07:07:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqXmxw4UfNIkq5Qq1wAmbrKaQaey1ppi+wo2ktDGBAqAy+yQIc/h/RvohbST+VMlxQLYX6c X-Received: by 10.55.215.84 with SMTP id m81mr5866328qki.278.1524146842545; Thu, 19 Apr 2018 07:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146842; cv=none; d=google.com; s=arc-20160816; b=ZhEZW7Ysdh0MGi2yvsXKScrS6VrEqbb6aGPqvxRov98oLar6bdqmJ6ItFCDWTcJl5t A5Ovnk9bkwcJhXME3sGXodgXiLhJjU01edzncZghHZanTjwMFAxGduMBHYp4Aa4j1iUr A1rMph0scocOtLbetBosAOrKLfIQ1rxLHH/LCELXshj2JAskkTyI71YSzdomLCwvf07g u4yqihDqmmAmL2hmnH0f+BPd1XLX/vY3ivcOC8hRuFI0wDzmdR3qc/98Jz2Uv5Xbrk3T FcfFMQna3b7+ZotTkvWb9BU79HhJ2W36Twza7i3S2gJJPKSIR7Kechj3VlucnNIvU3Av wd6w== 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=PotZUyOt6b4te5W9l96ZklU65MqBhhmo3ReGmsMNrMA=; b=J9pr3KlA3qGoEOOWF5mXidXTA782bWEEjqofQHMDY7enRllCfmk11E3nRhVdJ+7qmu H44+IXend19m4krxo5yBH0B+Ol6MZ/Lm90uGS3h9PY5rqVw/aqsOzEza0lwIdVrLthUb i9QyDv0nZXmER4a1HXoxsgqxS1xXG0fiTlUnDIIbMsZ8dBUmDwdZh9s4s79iCFJKOYLm DXj1QlaVQva2YMzJ1eRWWQ9SOp5Tp1bXbP8LZsKMheeNK7TiMIOVd0e4TjqutQqTEP3u n99MQDoop7dHm6SzGJWBwNwFFtWeemEBW1wAhFH7mvBdSwaL6H7ZS1uDZNeswhUGq3co 1J9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZzyAar+o; 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 w36-v6si4958366qtb.19.2018.04.19.07.07.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:07:22 -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=ZzyAar+o; 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]:49853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADZ-0004CV-V6 for patch@linaro.org; Thu, 19 Apr 2018 10:07:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5m-00066B-Tn for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5j-0002Jl-2Y for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:18 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:42089) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5i-0002Hk-SX for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:15 -0400 Received: by mail-wr0-x241.google.com with SMTP id s18-v6so14329581wrg.9 for ; Thu, 19 Apr 2018 06:59:14 -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=PotZUyOt6b4te5W9l96ZklU65MqBhhmo3ReGmsMNrMA=; b=ZzyAar+oSUcupbceItUU/2ZSPRMo7cl8wTmGAH4oUnpGPy2cKl05IBUdsM1vEQgIK6 hVOPYvQz7nKVwyIasUQNl/6+iz3zzbRxeqmrh5dJG1qnnFqjehIJ7JGU8v1xoireBs+Z W65HLPiufUfWRwhbhPI/xanw/pZ5uV0qxMtT4= 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=PotZUyOt6b4te5W9l96ZklU65MqBhhmo3ReGmsMNrMA=; b=Qpq2qO7RvLTg12gkuy21GwlawjZ3i+ngEwAUUaB/pIsD/PPwZQDdgMUf/yFd2PHvKq WkZcH2QX9H+h5fUMS1oZ1zhn0YMazv2dIp8wf3TVat4jQS2oe3GoczPi4bC4OmIY6+y7 886YLaHOhZodXlhlHGQ2FAFXDO4df91dKtUAQN/foS2+JKSXrRrXX9lrcHyDWkZHTEu9 Qd9oSzO2ZFfm0ATZ//qUZ/hDjkvFXjBYWybTX8Y6VgWFBFGaZ82DnBFl0Wv/kisfW49h /DPaOHV3vpi2IiVO254OVD4ctNdnmJPxy4ydtA1qo3uXDYMjXadm/PjLMb4UW1OZCoj1 afFQ== X-Gm-Message-State: ALQs6tCbEjYS8Z4RbXASqUZ6BTOQ7kS7O4vMfdzF6uEVCnMcedFNr1Yw p99Ixa+s3B8EFrWJRkFIQA0USg== X-Received: by 10.28.232.202 with SMTP id f71mr5067593wmi.136.1524146353716; Thu, 19 Apr 2018 06:59:13 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u14-v6sm3720327wri.31.2018.04.19.06.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:07 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 36FDC3E03CC; Thu, 19 Apr 2018 14:59:02 +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:27 +0100 Message-Id: <20180419135901.30035-10-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::241 Subject: [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler 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" When calling our cross-compilation images we want to call something other than the default cc. Signed-off-by: Alex Bennée --- v2 - use arg.cc default to simplify logic --- tests/docker/docker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.0 Reviewed-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé diff --git a/tests/docker/docker.py b/tests/docker/docker.py index bcc3ee2dee..59bce9f19a 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -415,6 +415,8 @@ class CcCommand(SubCommand): def args(self, parser): parser.add_argument("--image", "-i", required=True, help="The docker image in which to run cc") + parser.add_argument("--cc", default="cc", + help="The compiler executable to call") parser.add_argument("--source-path", "-s", nargs="*", dest="paths", help="""Extra paths to (ro) mount into container for reading sources""") @@ -428,7 +430,7 @@ class CcCommand(SubCommand): if args.paths: for p in args.paths: cmd += ["-v", "%s:%s:ro,z" % (p, p)] - cmd += [args.image, "cc"] + cmd += [args.image, args.cc] cmd += argv return Docker().command("run", cmd, args.quiet) From patchwork Thu Apr 19 13:58:28 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: 133770 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp678703ljf; Thu, 19 Apr 2018 07:06:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx48KHfOtPDT6ZtD52Q+9P2wAH6BgcQv2Vwn3sVkmpbXmejfFYu2PJoywWAcKHYjx+S4VycES X-Received: by 2002:ac8:1a41:: with SMTP id q1-v6mr6447092qtk.191.1524146795891; Thu, 19 Apr 2018 07:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146795; cv=none; d=google.com; s=arc-20160816; b=Rjj7KMite6aSMCyR09dtBXxx22/dpFRV+wzMBBF9vXoDFBtWUZBNVQthhVt69ozaGF ProT0VF336Jds9yCjPUgDgEMTvf97RE4xiA7DkeZdJHXhHSkfSc1fRz/LDgyB9ZRJTsA KhMN0GZdBIkZAREA1ewVMYxgOj6o9hBx6HvGafbb8YrXdjb7hAvbFOs5wAvlkA3HCRpA p8qz3gQ55DHm4tqNr94nSxEScDVewkqu7lAXqSXKtcEeZX/whOJhALQ7Du+VZ4/FG9H4 c4Rq9TB/rvxZs2+Uc87pghLuSOS6stYvgtn38PQN4PRDhisXswIeQ/tSm0j0tpMV8962 ypBQ== 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=yx5ucHfklmdWD5NFIiC6j32FmmfKfpWkJIX7Slm13Jo=; b=IR28N6DNZ2cLusyFWJn7GmVfiTDTbHf2Dj8X1T16vnmCqJEUwQGbw0D+cjMkAC11Uh N64QhOdhW/Y3P1626CIwYIH9WtF+Zt3RltqYzngrr0zUwEP0pX1Jkeb1Bhw9lQ4SQB0o d/7cGLcs+/htMN5z8EBhSCvgxmnIBXyZkcSCtt2jXlZNQArsSwHOAREd7q2Ihrk4+Mp/ P+8dl3AfDQHekyEJMbdvkbJD3XrBjIsEA/LZfttcLvXi1+AL01YW3llOc77pndMfqpc5 6hs9ZvA8fIw7AKabttqXK5zWGsIWFAt/5n0GdjbzAzRy4d/NdnBeO3UtKFpq7UyzJDJ6 AOJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BZIPBNkV; 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 v73si3978367qkl.180.2018.04.19.07.06.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:06:35 -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=BZIPBNkV; 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]:49848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ACp-0003Cu-7b for patch@linaro.org; Thu, 19 Apr 2018 10:06:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5l-00064V-Fr for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5j-0002LY-R2 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:17 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:33467) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5j-0002Jc-Jk for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:15 -0400 Received: by mail-wr0-x241.google.com with SMTP id z73-v6so14374717wrb.0 for ; Thu, 19 Apr 2018 06:59:15 -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=yx5ucHfklmdWD5NFIiC6j32FmmfKfpWkJIX7Slm13Jo=; b=BZIPBNkVyfndTH+w0QMRpp10hqN/G+WXztabFd+72sY3h1yD15fqEqGI8dd93MXzY0 WJ8hC2w8bUDzIvbRvNhaup9XlHldAa6eeRyQYF1JRdaeXJpChEbQH4SHSivQm/lT7+cA cbjCAaQR0J9HZY0hSO7KvI727py6PfVFlOQZ0= 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=yx5ucHfklmdWD5NFIiC6j32FmmfKfpWkJIX7Slm13Jo=; b=Rx3NFZr2aMuO1BxvWv6+Bd495a736aTR8MFSzp+xUNPdl2cYRrjawdfiFKjA0/t9Af ojqf0bAnFQoDcQnWpshE82RbhB0Bqq4pqy7OaifYtrycPYd4BONCHWipXqQDN28xoJJu HHMKgo8YjeFzhtH9LChwMoBEFV1nfQBrnRQWPtkyMbKMLqLZcks/7fNWsGIurocAdNac TT10pgaPEUMLt6uXph5SptI/j5WaFgNaSsMBk+RSbifNnc3InlKN21I5hxOJM98bHfNM TNQht36vu3QS863JehLnol2jk+ZklbMpLSADWuKXi3Zi3zOFWlrVEbKef8CTFBcBVDS1 1n7g== X-Gm-Message-State: ALQs6tArvgf0FfCReOG/UJEEtYvfb3FwXAr7/jM9SplwzfyY3TPvBwXa EfLDz1sWKeTcwWyDqCh5KEQ6LA== X-Received: by 2002:adf:b08e:: with SMTP id i14-v6mr5247820wra.9.1524146354476; Thu, 19 Apr 2018 06:59:14 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m4-v6sm3282822wrj.47.2018.04.19.06.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:07 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 48A2D3E0402; Thu, 19 Apr 2018 14:59:02 +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:28 +0100 Message-Id: <20180419135901.30035-11-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::241 Subject: [Qemu-devel] [PATCH v2 10/43] docker: allow "cc" command to run in user context 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" Signed-off-by: Alex Bennée Reviewed-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/docker.py | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.0 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 59bce9f19a..37bfa98005 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -417,6 +417,8 @@ class CcCommand(SubCommand): help="The docker image in which to run cc") parser.add_argument("--cc", default="cc", help="The compiler executable to call") + parser.add_argument("--user", + help="The user-id to run under") parser.add_argument("--source-path", "-s", nargs="*", dest="paths", help="""Extra paths to (ro) mount into container for reading sources""") @@ -430,6 +432,8 @@ class CcCommand(SubCommand): if args.paths: for p in args.paths: cmd += ["-v", "%s:%s:ro,z" % (p, p)] + if args.user: + cmd += ["-u", args.user] cmd += [args.image, args.cc] cmd += argv return Docker().command("run", cmd, args.quiet) From patchwork Thu Apr 19 13:58:29 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: 133795 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp702402ljf; Thu, 19 Apr 2018 07:27:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo366C5xiQ96F5osB0I9hrT4eFp6VlpAjkVFHPyjEdNtUSAXNKr1WmsHHGfWmMyFeWH+IeK X-Received: by 2002:aed:36e2:: with SMTP id f89-v6mr6550721qtb.6.1524148039565; Thu, 19 Apr 2018 07:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148039; cv=none; d=google.com; s=arc-20160816; b=WgY3FUk6OfXEeCrDX4ytjVU8tqxue+3rKzpR6WJQHa851ObYF2k0pcUhjG3Mwwc4e3 Uo7Pt3kTfwZnxT3qzUUbE4nDG0ew4kDF+buZ0ODYhYQlUavxYeOJv406u0jy0UKWCHYm OH6twH85g2kDc9erHrzNmG4sT9iTJUkiZivKPzs2v2x5MVIqMtuUKyXNOaxD/AC5Lr/e m4VBI4K+EFyCkQ3ARyFHcs3SOKV5XgvthkRNSwD3zdcSX3LcbssQXY65IkxQZe8To+YY zyfI80oDgvvdXZObhzSMysa/XILaPfbJWw9zl/sPQEa6yRnXJ5PYTYiQPvkma3t+oyjl 5Q6w== 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=Txa5dWaw6rpku3w/i3TgIXvc5LO3CkoCTj1w4cH/zrg=; b=JSHTjZvIPYh1YuIdqcaUGrEY+Zi6loykF6Z70JxKGansONqA3Q7QZ3mJBPbBf75WPI 0RJc9TK52O5KL3WzH1SYbxGKb8cQ1aLzDHAEjfLyyKZShaJiYLSdmHU5d+Ruoc14ZSyf qZ2Pv6P2Qn7q2lprGfRI2g6UBxSFL1kIx6fiS8J5H3O75sPNBAu9zhZKxI9EARNSaGB1 akyY1goO1szxp4RiSpZrDoBumndh0+gYHLhjZykcIfhic6m4B10oXCxY7KU3VLTgdAWe iYFD3aAE16dTGQrd9xzT5RrVHDpziXtecbeOpAeGhi2TSjTSqbFAvP6KS70YlYopHToh /t/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DOz3hJ+b; 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 t64si178934qkc.71.2018.04.19.07.27.19 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:27:19 -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=DOz3hJ+b; 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]:50750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AWs-0007Y1-UD for patch@linaro.org; Thu, 19 Apr 2018 10:27:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADq-0004TP-Ii for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADn-0004zX-Il for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:38 -0400 Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]:46197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADn-0004yt-CU for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:35 -0400 Received: by mail-wr0-x22f.google.com with SMTP id d1-v6so14417992wrj.13 for ; Thu, 19 Apr 2018 07:07:35 -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=Txa5dWaw6rpku3w/i3TgIXvc5LO3CkoCTj1w4cH/zrg=; b=DOz3hJ+b1MHJtzZvc60fCxjIOfZCbuOflnHLR1ViOqXbYpAATTeAJhc6tGKzui6b0P Z1mjfhUKB5d03mCvYFSN2sezm/9OTg0ZCU4XcuDxNOFkLsWxtukh+q9iXvxDWocBm2OT bHr29yxhqvhTYM0mwxCB38s+I+UjcZ3Ow8Lvo= 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=Txa5dWaw6rpku3w/i3TgIXvc5LO3CkoCTj1w4cH/zrg=; b=uWPll3BjBYrQibi7vECxzHjkMSS240ENK4lPAvEtTO4YKJePe/yOTsOSUWFcuEOs63 EZeJPUVGnJ+w2R+6SbeS2LgkqhYTn7PZBVxYB6p5jpSZUc/6vGCZq1hV3t6XO+PCciWO P55Zyw6gwc7NknUmCVkcG6FcDFKvUodQY0/+KGBiEDlszPIYENLKu7HitK005zIpklLz PlGV+lI1pD4ri5ctXrSJREFh/lhAHjwhPhuDNVJbPRlpEzIKYBjXcqWEkwvCCdZ44eQs RODV16WTGZ2vqslNVr+fgFFAGw2OBBUDNC8Q8rRceKOQR6r9ZaXFjnTnhYTmDVoAz/be 0xdQ== X-Gm-Message-State: ALQs6tCtcv4JpHCN5rvakNo6tE+B6o9oS+dZdZqnODsap2Zls2ckqHYL iHCD+C0DrK7pmhVnbIuL41QmnQ== X-Received: by 2002:adf:91a2:: with SMTP id 31-v6mr5145887wri.124.1524146854283; Thu, 19 Apr 2018 07:07:34 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id e185sm4750684wmg.5.2018.04.19.07.07.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 5A5393E0410; Thu, 19 Apr 2018 14:59:02 +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:29 +0100 Message-Id: <20180419135901.30035-12-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::22f Subject: [Qemu-devel] [PATCH v2 11/43] docker: Makefile.include introduce DOCKER_SCRIPT 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" Define this in one place to make it easy to re-use. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index de87341528..6a5aa9ec71 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -14,6 +14,8 @@ DOCKER_TESTS := $(notdir $(shell \ DOCKER_TOOLS := travis +DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py + TESTS ?= % IMAGES ?= % @@ -37,7 +39,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker echo WARNING: EXECUTABLE is not set, debootstrap may fail. 2>&1 ; \ fi $(call quiet-command,\ - $(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \ + $(DOCKER_SCRIPT) build qemu:$* $< \ $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \ $(if $(NOUSER),,--add-current-user) \ $(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\ @@ -129,11 +131,11 @@ docker-run: docker-qemu-src fi $(if $(EXECUTABLE), \ $(call quiet-command, \ - $(SRC_PATH)/tests/docker/docker.py update \ + $(DOCKER_SCRIPT) update \ $(IMAGE) $(EXECUTABLE), \ " COPYING $(EXECUTABLE) to $(IMAGE)")) $(call quiet-command, \ - $(SRC_PATH)/tests/docker/docker.py run \ + $(DOCKER_SCRIPT) run \ $(if $(NOUSER),,-u $(shell id -u)) \ --security-opt seccomp=unconfined \ $(if $V,,--rm) \ @@ -163,4 +165,4 @@ docker-run-%: @$(MAKE) docker-run TEST=$(CMD) IMAGE=qemu:$(IMAGE) docker-clean: - $(call quiet-command, $(SRC_PATH)/tests/docker/docker.py clean) + $(call quiet-command, $(DOCKER_SCRIPT) clean) From patchwork Thu Apr 19 13:58:30 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: 133796 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp703998ljf; Thu, 19 Apr 2018 07:28:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqlFQhoAik2RIRSpeS0KQ31eb5i9sil1RehSy1d9FR7JnOZs7cyqp5OU0eOhVBrkBwJmd4X X-Received: by 10.55.139.7 with SMTP id n7mr6129159qkd.210.1524148139466; Thu, 19 Apr 2018 07:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148139; cv=none; d=google.com; s=arc-20160816; b=xY0/4s1gPyPdEVUM1P72DqN5kQtylJrkL2p4EGK5c5ncg3Y596UYEfLom1AEfYgIwP EkMGU+P5jm3V+zQMh08ciYzytd2OgZdZ6GUHi9QtSAE5Ajio5Hhsq33/XWCfhEVRqtkB kKV6fZDzWKihLxb7eDwCyx0IYrCKBIrjO//bhY/lZWUUtawEDTfNYDgAPzzPBwCoTY2A 9Cz6WsjVAasXvYpcjHTmLIxANUc+GUBbN4MR9xAjLZPElQ6pfpsCdx17a8qKdLzbWncE jqshjeI6CgRVAjg7TwANSecIdWzbVhdLJDkMoHeTROkmhMcVVt8tFSrri6VBzijT9+cS 6giA== 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=vUO1+oC4MRsaR4YCV5AlhtkzJ+Q5g7rrTuNL8mCWqY8=; b=hmlNo7QDcHeIq+ScWN7y1u/EVan9KntmvfkHHpx9g/CpJsFQRLX8xUwmNCfn4Meiyr NXPF5Ovi3NhXHF7MNT7vBIa4ALI/q/Ru1gOAtfCTAYDF0hvyx3lu3xVmMBmHrX7Mz9wa 16O6xEVpOqpJAX8RlVSnOCVw9ZvZtAeeFoe6c3ghu7ntF5oKBUEyMEC37uBXwo2W4nK9 SF+x3jCi/rv4gLqKW2dnExDSHz9j6fruhdtl7KxRQz9VILAekObCfC0a/SbfieVMM+lD 8ASaOhaNefTQUwq5LLr+TTImUa/2V0FxR052sUSZE9m+nU0IAyJZt8RM8mHBGAqUqD+b AhBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KZ2Yc1QE; 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 j186si4537652qkd.386.2018.04.19.07.28.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:28:59 -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=KZ2Yc1QE; 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]:50841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AYU-0000y2-Qd for patch@linaro.org; Thu, 19 Apr 2018 10:28:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANO-0004eV-9m for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANM-00063v-9d for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:30 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:40171) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANL-00063Z-VW for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:28 -0400 Received: by mail-wr0-x241.google.com with SMTP id v60-v6so14510343wrc.7 for ; Thu, 19 Apr 2018 07:17:27 -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=vUO1+oC4MRsaR4YCV5AlhtkzJ+Q5g7rrTuNL8mCWqY8=; b=KZ2Yc1QEO3hGL+Kaz1sUnz7ZHzyR0UWfCDGWx3mMrD0XPqbl6n32v9IkI9Bvlv2y0L rZXqJxpaGZ5ZV47IlmR2/811KHLGdPHI0WM1irutptV4Rc8XXQJIr8JkZmw5NfwceSpC b+SB8BGoQQPs+9lGwEJWWHCUEF8OjnEIFqj+w= 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=vUO1+oC4MRsaR4YCV5AlhtkzJ+Q5g7rrTuNL8mCWqY8=; b=SqgiLtaELPekZNjSZT42R6q2wEsk6jCme7kXTJZS1pv8Ah6d6K4lSRrOcyNdYY16j/ URv+HADD3XGtEWvacGcdH+uBPLEDaF8l+Nh05LN7Eaigu+T0PSBNdlglIhGGVYnpkjl9 AXMe2/DKESghAWiqtZ/fOemO4Hwye9hL366T3E7kqg+sjEhpd0Cy+Mx4kACLqU1FqSvo 4c79fm1c2IgCvpWiYH3PbK3Srb1xijNXY+Iksv9F3t2zNHZpG+9IqO443qrTUBzn2+TQ SiurCbcI71CIWOlOzknrHeZRXO9hRZewZD6hlp4ENf3LTMaMzB4yADkx0Re/4/bMvmsl vbrg== X-Gm-Message-State: ALQs6tB82OHtQ999wxt6x/lzJACoFgxoKPQh/4sfXAsCdmxUi0tkvUId i97t4PD2llIWzDb51HH8bw2nNA== X-Received: by 10.28.217.67 with SMTP id q64mr4893156wmg.12.1524147446679; Thu, 19 Apr 2018 07:17:26 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id e50-v6sm5259151wre.4.2018.04.19.07.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:25 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 707633E041B; Thu, 19 Apr 2018 14:59:02 +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:30 +0100 Message-Id: <20180419135901.30035-13-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::241 Subject: [Qemu-devel] [PATCH v2 12/43] tests/tcg: move architecture independent tests into subdir 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" We will want to build these for all supported guest architectures so lets move them all into one place. We also drop test_path at this point because it needs qemu utils and glib bits which is hard to support for cross compiling. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- v2 - move VPATH and TESTs setup into multiarch/Makefile.target - remove moved bits from tests/tcg/Makefile --- tests/tcg/Makefile | 31 ----- tests/tcg/README | 10 +- tests/tcg/multiarch/Makefile.target | 30 +++++ tests/tcg/multiarch/README | 1 + tests/tcg/{ => multiarch}/linux-test.c | 0 tests/tcg/{ => multiarch}/sha1.c | 0 tests/tcg/{ => multiarch}/test-mmap.c | 0 tests/tcg/{ => multiarch}/testthread.c | 0 tests/tcg/test_path.c | 157 ------------------------- 9 files changed, 35 insertions(+), 194 deletions(-) create mode 100644 tests/tcg/multiarch/Makefile.target create mode 100644 tests/tcg/multiarch/README rename tests/tcg/{ => multiarch}/linux-test.c (100%) rename tests/tcg/{ => multiarch}/sha1.c (100%) rename tests/tcg/{ => multiarch}/test-mmap.c (100%) rename tests/tcg/{ => multiarch}/testthread.c (100%) delete mode 100644 tests/tcg/test_path.c -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 89e3342f3d..e12395117a 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -18,12 +18,9 @@ LDFLAGS= # also, pi_10.com runs indefinitely I386_TESTS=hello-i386 \ - linux-test \ - testthread \ sha1-i386 \ test-i386 \ test-i386-fprem \ - test-mmap \ # runcom # native i386 compilers sometimes are not biarch. assume cross-compilers are @@ -47,8 +44,6 @@ run-%: % -$(QEMU) ./$* run-hello-i386: hello-i386 -run-linux-test: linux-test -run-testthread: testthread run-sha1-i386: sha1-i386 run-test-i386: test-i386 @@ -66,11 +61,6 @@ run-test-x86_64: test-x86_64 -$(QEMU_X86_64) test-x86_64 > test-x86_64.out @if diff -u test-x86_64.ref test-x86_64.out ; then echo "Auto Test OK"; fi -run-test-mmap: test-mmap - -$(QEMU) ./test-mmap - -$(QEMU) -p 8192 ./test-mmap 8192 - -$(QEMU) -p 16384 ./test-mmap 16384 - -$(QEMU) -p 32768 ./test-mmap 32768 run-runcom: runcom -$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com @@ -80,17 +70,10 @@ run-test_path: test_path # rules to compile tests -test_path: test_path.o - -test_path.o: test_path.c - hello-i386: hello-i386.c $(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< strip $@ -testthread: testthread.c - $(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread - # i386/x86_64 emulation test (test various opcodes) */ test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \ test-i386.h test-i386-shift.h test-i386-muldiv.h @@ -104,28 +87,14 @@ test-x86_64: test-i386.c \ test-i386.h test-i386-shift.h test-i386-muldiv.h $(CC_X86_64) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $( -#include -#include - -void qemu_log(const char *fmt, ...); - -/* Any log message kills the test. */ -void qemu_log(const char *fmt, ...) -{ - va_list ap; - - fprintf(stderr, "FATAL: "); - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - exit(1); -} - -#define NO_CHANGE(_path) \ - do { \ - if (strcmp(path(_path), _path) != 0) return __LINE__; \ - } while(0) - -#define CHANGE_TO(_path, _newpath) \ - do { \ - if (strcmp(path(_path), _newpath) != 0) return __LINE__; \ - } while(0) - -static void cleanup(void) -{ - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE"); - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE2"); - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE3"); - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE4"); - unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE5"); - rmdir("/tmp/qemu-test_path/DIR1/DIR2"); - rmdir("/tmp/qemu-test_path/DIR1/DIR3"); - rmdir("/tmp/qemu-test_path/DIR1"); - rmdir("/tmp/qemu-test_path"); -} - -static unsigned int do_test(void) -{ - if (mkdir("/tmp/qemu-test_path", 0700) != 0) - return __LINE__; - - if (mkdir("/tmp/qemu-test_path/DIR1", 0700) != 0) - return __LINE__; - - if (mkdir("/tmp/qemu-test_path/DIR1/DIR2", 0700) != 0) - return __LINE__; - - if (mkdir("/tmp/qemu-test_path/DIR1/DIR3", 0700) != 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE", 0600)) != 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE2", 0600)) != 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE3", 0600)) != 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE4", 0600)) != 0) - return __LINE__; - - if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE5", 0600)) != 0) - return __LINE__; - - init_paths("/tmp/qemu-test_path"); - - NO_CHANGE("/tmp"); - NO_CHANGE("/tmp/"); - NO_CHANGE("/tmp/qemu-test_path"); - NO_CHANGE("/tmp/qemu-test_path/"); - NO_CHANGE("/tmp/qemu-test_path/D"); - NO_CHANGE("/tmp/qemu-test_path/DI"); - NO_CHANGE("/tmp/qemu-test_path/DIR"); - NO_CHANGE("/tmp/qemu-test_path/DIR1"); - NO_CHANGE("/tmp/qemu-test_path/DIR1/"); - - NO_CHANGE("/D"); - NO_CHANGE("/DI"); - NO_CHANGE("/DIR"); - NO_CHANGE("/DIR2"); - NO_CHANGE("/DIR1."); - - CHANGE_TO("/DIR1", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/DIR1/", "/tmp/qemu-test_path/DIR1"); - - NO_CHANGE("/DIR1/D"); - NO_CHANGE("/DIR1/DI"); - NO_CHANGE("/DIR1/DIR"); - NO_CHANGE("/DIR1/DIR1"); - - CHANGE_TO("/DIR1/DIR2", "/tmp/qemu-test_path/DIR1/DIR2"); - CHANGE_TO("/DIR1/DIR2/", "/tmp/qemu-test_path/DIR1/DIR2"); - - CHANGE_TO("/DIR1/DIR3", "/tmp/qemu-test_path/DIR1/DIR3"); - CHANGE_TO("/DIR1/DIR3/", "/tmp/qemu-test_path/DIR1/DIR3"); - - NO_CHANGE("/DIR1/DIR2/F"); - NO_CHANGE("/DIR1/DIR2/FI"); - NO_CHANGE("/DIR1/DIR2/FIL"); - NO_CHANGE("/DIR1/DIR2/FIL."); - - CHANGE_TO("/DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/DIR2/FILE2", "/tmp/qemu-test_path/DIR1/DIR2/FILE2"); - CHANGE_TO("/DIR1/DIR2/FILE3", "/tmp/qemu-test_path/DIR1/DIR2/FILE3"); - CHANGE_TO("/DIR1/DIR2/FILE4", "/tmp/qemu-test_path/DIR1/DIR2/FILE4"); - CHANGE_TO("/DIR1/DIR2/FILE5", "/tmp/qemu-test_path/DIR1/DIR2/FILE5"); - - NO_CHANGE("/DIR1/DIR2/FILE6"); - NO_CHANGE("/DIR1/DIR2/FILE/X"); - - CHANGE_TO("/DIR1/../DIR1", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/DIR1/../DIR1/", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/../DIR1", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/../DIR1/", "/tmp/qemu-test_path/DIR1"); - CHANGE_TO("/DIR1/DIR2/../DIR2", "/tmp/qemu-test_path/DIR1/DIR2"); - CHANGE_TO("/DIR1/DIR2/../DIR2/../../DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/DIR2/../DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - - NO_CHANGE("/DIR1/DIR2/../DIR1"); - NO_CHANGE("/DIR1/DIR2/../FILE"); - - CHANGE_TO("/./DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/././DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/./DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/././DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/DIR2/./FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/DIR1/DIR2/././FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - CHANGE_TO("/./DIR1/./DIR2/./FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE"); - - return 0; -} - -int main(int argc, char *argv[]) -{ - int ret; - - ret = do_test(); - cleanup(); - if (ret) { - fprintf(stderr, "test_path: failed on line %i\n", ret); - return 1; - } - return 0; -} From patchwork Thu Apr 19 13:58:31 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: 133783 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp690421ljf; Thu, 19 Apr 2018 07:16:11 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+FUB77+EgwZAQILyBlI+pJIvgdbGj/JN8N0bNRLsrdmUEVl5e380fHHxhwutl0iban2w17 X-Received: by 2002:aed:21d2:: with SMTP id m18-v6mr2304375qtc.1.1524147370956; Thu, 19 Apr 2018 07:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147370; cv=none; d=google.com; s=arc-20160816; b=AUYfCAe1Iu0Quia9yZac8dREp3zSXK3VsowHs20Kl8r5p8MjOgZXHAag2JdoEKR9+w 7CuVfKfWz+Cx/cNIeZ+hmP69w6yv7ZR4n2ALNDOJtOx74Q/rbyhOn466uSpqbgqkQOrC KWkn06sHyu1SRck/7s6lyL0UXAXXM9sLTT46vJafgvLLO30LDCtoLFcDMdk3a464XOcp Vv4qKG4W7GNNPldMWdP9tWalmsmldjrKeV+ZpeL6uWeYh2dzmIb1iXiH9kqQ7d3jiogw UkJawOW+r2hyxoocnTDnrTmseI7vbV5PJtTTLdGqFpg+xTk/JHToL8Nj2czSKkLVYCVH 6Mkg== 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=EiFcVfhMjf9AXXl4rTHN8NJQbIPZJGrxc0yc25niYXM=; b=PNGSkR1H1/LjCpDobbjckTCS1rvcz6sqNW31bViEycaHvQztpLgYLiY8A1iMcnLgzR maX5vx8caVnZh4xJNp/huKOddAJ3axardZu3m115SJ3HppDFHffaT5pmq4iS+eSnpZV7 dUj3SMPzCM187LudWSst4YdvJi34EfpH0/2wy/Uwh3G1W4eVEyP9vV+v1Mf2Gus/W9LV eqsVASvpC2Ilh8AMo3C3cwuZgofnpEbkOpzhy1i+WWtoF//hKSuu2z1aPeRrG+NCdmZa kIVS/cygHc9CQ4B9SCvg2O3XDdBWTDLru2W6PdYUAQbMpgZM59RIWYDW+vvhM2Hb9WZN 3QGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cbXuFJ9Z; 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 w10-v6si4995818qti.228.2018.04.19.07.16.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:16:10 -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=cbXuFJ9Z; 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]:50195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AM6-0003D6-9Y for patch@linaro.org; Thu, 19 Apr 2018 10:16:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5s-0006BP-1a for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5m-0002T1-2r for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:24 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:34143) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5l-0002PK-Qd for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:18 -0400 Received: by mail-wr0-x243.google.com with SMTP id d19-v6so14369031wre.1 for ; Thu, 19 Apr 2018 06:59:17 -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=EiFcVfhMjf9AXXl4rTHN8NJQbIPZJGrxc0yc25niYXM=; b=cbXuFJ9ZOyK+we+rbOzdxsMUp72Sc0GDKVb4RTNhvokdSTlAibAx/6z2HWW37SVzAG inatG2CmYcNsG/Ni1SStaaPxMox7y3CuIikVcXdElVWbtfKAIuk1XQLZKLnCA64e+KWH 8Ay0Gl6hr56p9QDYby/EJQUs+WD7Lk2Iu3aa0= 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=EiFcVfhMjf9AXXl4rTHN8NJQbIPZJGrxc0yc25niYXM=; b=amaeQD3cc1AkAXBeWnBmD9pC6RUxSZhIsfOXdv0eOHsy6ReGmIJFZxaAS0wrEywAui XTK58E6qWUZzPs6Cu9qxSyGtSihY2GWIrCEJTbFMiHCRKG4LehLyUWWB/AaX/3SxQ1Jg loxdGEd1c6z13k+DMgyUEQMayOEfv1Ai0mamHP53N/nn7zmARJz2ZkTgg1lzp4NoVO47 E94yqNtDo6kVfEgOH93PCtftpwkntViIK3qosV0SKNCZbMrgnF2oEtvZPxts3YiRtOt8 mD4FU32N/IrUTT74bFj4eNR/J2Rpi3EJBQ3Vbal355XSwM3HZpfh6W2oxSCnacQ14hX8 WfJw== X-Gm-Message-State: ALQs6tDaafzZj5y1LoSL93HQ6yN1s5kYOPG25Jys6EF/0Hdmbc/UIBXv YZEjpkwlhbcGNq0bedlv3PEYxg== X-Received: by 10.28.109.27 with SMTP id i27mr4776510wmc.109.1524146356518; Thu, 19 Apr 2018 06:59:16 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c21-v6sm3489858wre.43.2018.04.19.06.59.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:11 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 823D73E0430; Thu, 19 Apr 2018 14:59:02 +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:31 +0100 Message-Id: <20180419135901.30035-14-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 13/43] tests/tcg/multiarch: Build fix for linux-test 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" From: Fam Zheng To keep the compiler happy, and to fit in our buildsys flags: - Make local functions "static" - #ifdef out unused functions - drop cutils/osdep dependencies Signed-off-by: Fam Zheng [AJB: drop cutils/osdep dependencies] Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- tests/tcg/multiarch/linux-test.c | 68 ++++++++++---------------------- 1 file changed, 21 insertions(+), 47 deletions(-) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c index 5070d31446..4457bd04ba 100644 --- a/tests/tcg/multiarch/linux-test.c +++ b/tests/tcg/multiarch/linux-test.c @@ -16,7 +16,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ -#define _GNU_SOURCE #include #include #include @@ -31,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -39,13 +39,12 @@ #include #include #include -#include "qemu/cutils.h" #define TESTPATH "/tmp/linux-test.tmp" #define TESTPORT 7654 #define STACK_SIZE 16384 -void error1(const char *filename, int line, const char *fmt, ...) +static void error1(const char *filename, int line, const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -56,7 +55,7 @@ void error1(const char *filename, int line, const char *fmt, ...) exit(1); } -int __chk_error(const char *filename, int line, int ret) +static int __chk_error(const char *filename, int line, int ret) { if (ret < 0) { error1(filename, line, "%m (ret=%d, errno=%d)", @@ -73,7 +72,7 @@ int __chk_error(const char *filename, int line, int ret) #define FILE_BUF_SIZE 300 -void test_file(void) +static void test_file(void) { int fd, i, len, ret; uint8_t buf[FILE_BUF_SIZE]; @@ -210,7 +209,7 @@ void test_file(void) chk_error(rmdir(TESTPATH)); } -void test_fork(void) +static void test_fork(void) { int pid, status; @@ -224,7 +223,7 @@ void test_fork(void) error("waitpid status=0x%x", status); } -void test_time(void) +static void test_time(void) { struct timeval tv, tv2; struct timespec ts, rem; @@ -251,34 +250,7 @@ void test_time(void) error("getrusage"); } -void pstrcpy(char *buf, int buf_size, const char *str) -{ - int c; - char *q = buf; - - if (buf_size <= 0) - return; - - for(;;) { - c = *str++; - if (c == 0 || q >= buf + buf_size - 1) - break; - *q++ = c; - } - *q = '\0'; -} - -/* strcat and truncate. */ -char *pstrcat(char *buf, int buf_size, const char *s) -{ - int len; - len = strlen(buf); - if (len < buf_size) - pstrcpy(buf + len, buf_size - len, s); - return buf; -} - -int server_socket(void) +static int server_socket(void) { int val, fd; struct sockaddr_in sockaddr; @@ -298,7 +270,7 @@ int server_socket(void) } -int client_socket(void) +static int client_socket(void) { int fd; struct sockaddr_in sockaddr; @@ -312,9 +284,9 @@ int client_socket(void) return fd; } -const char socket_msg[] = "hello socket\n"; +static const char socket_msg[] = "hello socket\n"; -void test_socket(void) +static void test_socket(void) { int server_fd, client_fd, fd, pid, ret, val; struct sockaddr_in sockaddr; @@ -348,9 +320,10 @@ void test_socket(void) chk_error(close(server_fd)); } +#if 0 #define WCOUNT_MAX 512 -void test_pipe(void) +static void test_pipe(void) { fd_set rfds, wfds; int fds[2], fd_max, ret; @@ -391,10 +364,10 @@ void test_pipe(void) chk_error(close(fds[1])); } -int thread1_res; -int thread2_res; +static int thread1_res; +static int thread2_res; -int thread1_func(void *arg) +static int thread1_func(void *arg) { int i; for(i=0;i<5;i++) { @@ -404,7 +377,7 @@ int thread1_func(void *arg) return 0; } -int thread2_func(void *arg) +static int thread2_func(void *arg) { int i; for(i=0;i<6;i++) { @@ -435,27 +408,28 @@ void test_clone(void) thread2_res != 6) error("clone"); } +#endif /***********************************/ volatile int alarm_count; jmp_buf jmp_env; -void sig_alarm(int sig) +static void sig_alarm(int sig) { if (sig != SIGALRM) error("signal"); alarm_count++; } -void sig_segv(int sig, siginfo_t *info, void *puc) +static void sig_segv(int sig, siginfo_t *info, void *puc) { if (sig != SIGSEGV) error("signal"); longjmp(jmp_env, 1); } -void test_signal(void) +static void test_signal(void) { struct sigaction act; struct itimerval it, oit; @@ -510,7 +484,7 @@ void test_signal(void) #define SHM_SIZE 32768 -void test_shm(void) +static void test_shm(void) { void *ptr; int shmid; From patchwork Thu Apr 19 13:58:32 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: 133771 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp678737ljf; Thu, 19 Apr 2018 07:06:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Fk65ihZ0tWsgXIziKFnaLWzwmNZyMq9N3GNazpVmhXR4LvaX9UtremvQXAJ/WwanC8G5B X-Received: by 2002:ac8:1e93:: with SMTP id c19-v6mr6078878qtm.349.1524146797737; Thu, 19 Apr 2018 07:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146797; cv=none; d=google.com; s=arc-20160816; b=vfk8k9qLjwf2iqbNHA+zinkgmn6BKeR0OpqLvYaENEFvs0EdbXcps8UnyUpW23sNSb +G+f0TqajTGmYHUdaYzPjrbtS1fmWrbGzB+hxENuEcIPERxhk///u5BTfnAb7AcLhceu b8/0i6DoVyp/3hMgmeP7FYdLe9B8/6Z4SvSbM7qaUMnbpL+6DqNPrBHCUyQbBSVVmYXr 1d2BouscR9lXDfOsXd5MNtutF7O6uz4dySl8GZVf7U/KKhjFHOyv+zrDcM3xbNvU4gX8 ZdN5XlVjJ81HCN8+d6ltQgomRMko00Z+JM9df7xAdGbeK3q/VEfWYMfgoSSIVpa8nMi1 cbHA== 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=GLwVMwJJxQKYPCdpmP8VCCwUe/OSKjPOWcKfs+oHnq0=; b=m2FenF4aaW9r3zxZDJV6QH7clIZjiaG2surRNp16KQ1BsjuYfJEaTBHSWV0kv3vVNY 8wg9aR6vdpzAg0I/BcC4H7lvpYm9x3hjiQonTKD19SFGiA9c6Zz7N9j3BoHm3Erru1JM PAZbEepmJApBoBBHfmXYMJxb08osXBm4KIlHcR0bn7qmd53a/um4hZIXS5LR7+Azr3oL BbjKPGYj1Te7hcl1KmEj6PyuKrbYKOi+dQtIGRTZWefONdh4NZ02Nx3gutsrwnpYDrZX dvg3PwA35uvLOaJD0Cq/MmB27DlsXfWhRbIiLn/pLJqfs9oIhmUhMKNQRUibK9enb7CY R6FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cy3AfY2I; 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 o45si423841qve.187.2018.04.19.07.06.37 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:06:37 -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=cy3AfY2I; 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]:49852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ACr-0003FU-57 for patch@linaro.org; Thu, 19 Apr 2018 10:06:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5m-00065B-0Z for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5k-0002Od-SB for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:18 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:45433) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5k-0002MM-LV for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:16 -0400 Received: by mail-wr0-x242.google.com with SMTP id u11-v6so14326933wri.12 for ; Thu, 19 Apr 2018 06:59:16 -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=GLwVMwJJxQKYPCdpmP8VCCwUe/OSKjPOWcKfs+oHnq0=; b=cy3AfY2IeG27WUSLeGTWb9bf7xutDtrZzVnkoDjMuZLVZmMfkPoq1h0EbbLhYG8Ltc aJ91nwrghzCoj3+mRHEPOhTHzGfIFqGv9anJLZITkA+IsR9uZKMb4eQvkFDPr9/Y2yfV wti6ro0xQeaV17/lb4P+ZJ39VC5JaQWckvi1E= 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=GLwVMwJJxQKYPCdpmP8VCCwUe/OSKjPOWcKfs+oHnq0=; b=jZdlHksKxdAkmG2wCUyZMxt6I3JROxM452koWCq7VmCrbZfABDJEaMGWqzEpmlsEzm Ni0NdFIAYT8GdHb1l182XgOyEa97WL9pe8JO8DVQosxu6UPEIxhpLPeHCUrx+lgm5xq0 ViCcVjHIQ4BeaHhelpJvlM9BD1VXC30YgHtEaK9oJhTWIUpXPvf5fsq81RnKVeJvIT5V yxOn0MsJCLPRmTFJGJqiXfIUSucgZu90nuXkhX1VA7UYAbWKADe4ddrO4JoeuRA9DLFZ SCnZsASE/No05pH++r/tARAtDQpLO9Wf7bLkYjbH4een1BYGtfgGTnxDxUH4A3i7fJVX XPUg== X-Gm-Message-State: ALQs6tCTOpuAI+nGUGZCkdpGzep7cIdsg5AGiS2N+QX4bO1E5YozR7d7 u0/IoIb1q0Vu6obmrd+wfJoPXg== X-Received: by 2002:adf:a0a2:: with SMTP id m31-v6mr4895969wrm.278.1524146355454; Thu, 19 Apr 2018 06:59:15 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 33-v6sm3129810wrs.74.2018.04.19.06.59.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:11 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 93EB83E0481; Thu, 19 Apr 2018 14:59:02 +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:32 +0100 Message-Id: <20180419135901.30035-15-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::242 Subject: [Qemu-devel] [PATCH v2 14/43] tests/tcg/multiarch: enable additional linux-test tests 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" Un-comment the remaining tests. I removed the itimer value tests because I'm fairly sure a re-arming timer will always have a different value in it when you grab it. Signed-off-by: Alex Bennée --- tests/tcg/multiarch/linux-test.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c index 4457bd04ba..519b0ac653 100644 --- a/tests/tcg/multiarch/linux-test.c +++ b/tests/tcg/multiarch/linux-test.c @@ -16,6 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ +#define _GNU_SOURCE #include #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #define TESTPATH "/tmp/linux-test.tmp" #define TESTPORT 7654 @@ -58,8 +60,8 @@ static void error1(const char *filename, int line, const char *fmt, ...) static int __chk_error(const char *filename, int line, int ret) { if (ret < 0) { - error1(filename, line, "%m (ret=%d, errno=%d)", - ret, errno); + error1(filename, line, "%m (ret=%d, errno=%d/%s)", + ret, errno, strerror(errno)); } return ret; } @@ -320,7 +322,6 @@ static void test_socket(void) chk_error(close(server_fd)); } -#if 0 #define WCOUNT_MAX 512 static void test_pipe(void) @@ -355,7 +356,7 @@ static void test_pipe(void) } if (FD_ISSET(fds[1], &wfds)) { ch = 'a'; - chk_error(write(fds[0], &ch, 1)); + chk_error(write(fds[1], &ch, 1)); wcount++; } } @@ -408,7 +409,6 @@ void test_clone(void) thread2_res != 6) error("clone"); } -#endif /***********************************/ @@ -449,12 +449,10 @@ static void test_signal(void) it.it_value.tv_usec = 10 * 1000; chk_error(setitimer(ITIMER_REAL, &it, NULL)); chk_error(getitimer(ITIMER_REAL, &oit)); - if (oit.it_value.tv_sec != it.it_value.tv_sec || - oit.it_value.tv_usec != it.it_value.tv_usec) - error("itimer"); while (alarm_count < 5) { usleep(10 * 1000); + getitimer(ITIMER_REAL, &oit); } it.it_interval.tv_sec = 0; @@ -463,9 +461,6 @@ static void test_signal(void) it.it_value.tv_usec = 0; memset(&oit, 0xff, sizeof(oit)); chk_error(setitimer(ITIMER_REAL, &it, &oit)); - if (oit.it_value.tv_sec != 0 || - oit.it_value.tv_usec != 10 * 1000) - error("setitimer"); /* SIGSEGV test */ act.sa_sigaction = sig_segv; @@ -503,10 +498,11 @@ static void test_shm(void) int main(int argc, char **argv) { test_file(); + test_pipe(); test_fork(); test_time(); test_socket(); - // test_clone(); + test_clone(); test_signal(); test_shm(); return 0; From patchwork Thu Apr 19 13:58:33 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: 133788 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp695940ljf; Thu, 19 Apr 2018 07:21:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpQvsrJCuIak0O1/Olg+jNft5uUFWMGuieAAGpwC6Snm5aTR0WzoKSwG7NhsLCSf6yhQqma X-Received: by 2002:aed:2a31:: with SMTP id c46-v6mr6238240qtd.238.1524147673648; Thu, 19 Apr 2018 07:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147673; cv=none; d=google.com; s=arc-20160816; b=A1ejq4yc56j1Es0l/LSbJeoQDgUYGjiRX3OCzZX6/GNH8YBtaSd1S6JZd7+ZG29njZ IlF7t3ApVxEYjkHV/RJlfS8GEU/d+4vyIUnx9wpH0K/IL5LM9vejUz6HOzP7LNavxC0F rdY4sVgU76d9pDLktVEMEaHXUEEKyLv0CyJlt0M8IPjSRCmOMBhw4+z59YhJ24x+yYMi i6cJKwcFO6/fUKNTpiOLFDLDLGnmYjVwWaI+0AmotK5G/SInb29pZ4x5ecigrCD7mNVv IEOxOvEOmOh+D0m1tI8dPR84piGdwnpL7d5ybx0SfKI96TN+YUlT/n5TOckSnpxxvoFR Yf9A== 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=flypIEKkCYHfJd0HmJGs/yHA6xC+HQqzKclPb3K9yGo=; b=ZzZ1wWIfLSs5EngPAIdKm9zGtQ4oFInN7pGmkvmq2PfEWYP2UpWVHRB7iD+zH4MRS7 1Nc/x6QFpu8MVAy8z9cDCn3HMsKU2n7irA4Bm5dySOadwvDEWhV9c5lG2QOVWCON73Sf qCYmObFDlCRj5bceX4b0u9zorhA4KQD2y3DHVn3wUN+RuAT3Bo9ZV1HUoH9PHMgyNKEI +eKUNh4m8mPgyizqIqUF9e8qatKWG48gZG8c3McapBE3Em9UhJEhmNh72IpXbol+DsLg LvVoos9mQ+Jsa4qTp22FkpeFk2eOBUVpQpOJin6KGAGLKDSDTUJhaEFPyaph7eq9LXFW kLLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dfjILpeg; 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 d19si4758223qkg.69.2018.04.19.07.21.13 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:21:13 -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=dfjILpeg; 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]:50367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AQz-0002OX-2o for patch@linaro.org; Thu, 19 Apr 2018 10:21:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADs-0004W7-Mo for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADi-0004lA-Ex for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:40 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:36559) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADi-0004jC-6M for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:30 -0400 Received: by mail-wr0-x243.google.com with SMTP id q13-v6so14449180wre.3 for ; Thu, 19 Apr 2018 07:07:30 -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=flypIEKkCYHfJd0HmJGs/yHA6xC+HQqzKclPb3K9yGo=; b=dfjILpegRqqMG6c7PIHMxXTKgZ8Kj3vS7QFqS5jEuGCxq/iIYRrhezHx0j7vy5WYKp iLhxzqzvBpmJhdjP4IetkZPV9O2pCiPiwiXWHqkOAB7sJJmBCyTuO6T7g6DtGP0iNINo 0Cbpdg3l0cx1YtPWBycpgHnhG4/sc6aYQ4yUM= 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=flypIEKkCYHfJd0HmJGs/yHA6xC+HQqzKclPb3K9yGo=; b=cuul4x9xX0p0NsKL/Up8EQk+gCU95uxUbb/x9KCGPVJsgGd4E1UxvX60jNvHkm1H7g chbkIkkGvN83iAdXxc0oOG/i/JmDRAwN+72Uy/v68nCQI6udr616KkFYvVHHiiOSabxn UXw5p6vvTHjWQ45LTVHxBnU6lx2dMkqaP4hXQROixw06sxQwuUnUfozxdFQZtev59HQ/ FTTppeJN/KTLo1AL74Qumza50078PHDMGjmTmGjURbM4QAiOwHOG+PPnWSBUY2WlqYRO hY8sUcGzNbsYMVRMte4BgFyla1BHUolA0pwo5klsVfGksVkIJ906J8CfpVigHcwu2/2n nvUw== X-Gm-Message-State: ALQs6tCVelNNslMKLulPtp1ndrsWCUihW9uNY+qdn721QoQpFv8hmyGs 4BtZx8PfqgbJEnMoCFzllJkI/g== X-Received: by 2002:adf:c105:: with SMTP id r5-v6mr4697994wre.274.1524146849122; Thu, 19 Apr 2018 07:07:29 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n23-v6sm290948wra.39.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 A7DBD3E0486; Thu, 19 Apr 2018 14:59:02 +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:33 +0100 Message-Id: <20180419135901.30035-16-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 15/43] tests/tcg: move i386 specific tests into subdir 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" These only need to be built for i386 guests. This includes a stub tests/tcg/i386/Makfile.target which absorbs some of what was in tests/tcg/Makefile. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - move VPATH and TESTs setup into i386/Makefile.target - set CFLAGS+=-m32 for cross building --- tests/tcg/README | 39 ------------------------ tests/tcg/i386/Makefile.target | 30 ++++++++++++++++++ tests/tcg/i386/README | 38 +++++++++++++++++++++++ tests/tcg/{ => i386}/hello-i386.c | 0 tests/tcg/{ => i386}/pi_10.com | Bin tests/tcg/{ => i386}/runcom.c | 0 tests/tcg/{ => i386}/test-i386-code16.S | 0 tests/tcg/{ => i386}/test-i386-fprem.c | 0 tests/tcg/{ => i386}/test-i386-muldiv.h | 0 tests/tcg/{ => i386}/test-i386-shift.h | 0 tests/tcg/{ => i386}/test-i386-ssse3.c | 0 tests/tcg/{ => i386}/test-i386-vm86.S | 0 tests/tcg/{ => i386}/test-i386.c | 0 tests/tcg/{ => i386}/test-i386.h | 0 14 files changed, 68 insertions(+), 39 deletions(-) create mode 100644 tests/tcg/i386/Makefile.target create mode 100644 tests/tcg/i386/README rename tests/tcg/{ => i386}/hello-i386.c (100%) rename tests/tcg/{ => i386}/pi_10.com (100%) rename tests/tcg/{ => i386}/runcom.c (100%) rename tests/tcg/{ => i386}/test-i386-code16.S (100%) rename tests/tcg/{ => i386}/test-i386-fprem.c (100%) rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%) rename tests/tcg/{ => i386}/test-i386-shift.h (100%) rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%) rename tests/tcg/{ => i386}/test-i386-vm86.S (100%) rename tests/tcg/{ => i386}/test-i386.c (100%) rename tests/tcg/{ => i386}/test-i386.h (100%) -- 2.17.0 diff --git a/tests/tcg/README b/tests/tcg/README index 0890044cf0..469504c4cb 100644 --- a/tests/tcg/README +++ b/tests/tcg/README @@ -3,45 +3,6 @@ regression testing. Tests are either multi-arch, meaning they can be built for all guest architectures that support linux-user executable, or they are architecture specific. -i386 -==== - -test-i386 ---------- - -This program executes most of the 16 bit and 32 bit x86 instructions and -generates a text output, for comparison with the output obtained with -a real CPU or another emulator. - -The Linux system call modify_ldt() is used to create x86 selectors -to test some 16 bit addressing and 32 bit with segmentation cases. - -The Linux system call vm86() is used to test vm86 emulation. - -Various exceptions are raised to test most of the x86 user space -exception reporting. - -linux-test ----------- - -This program tests various Linux system calls. It is used to verify -that the system call parameters are correctly converted between target -and host CPUs. - -test-i386-fprem ---------------- - -runcom ------- - -test-mmap ---------- - -sha1 ----- - -hello-i386 ----------- ARM diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target new file mode 100644 index 0000000000..2f27b65e2d --- /dev/null +++ b/tests/tcg/i386/Makefile.target @@ -0,0 +1,30 @@ +# i386 cross compile notes + +I386_SRC=$(SRC_PATH)/tests/tcg/i386 + +# Set search path for all sources +VPATH += $(I386_SRC) + +I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c)) +I386_TESTS=$(I386_SRCS:.c=) + +# Update TESTS +TESTS+=$(I386_TESTS) + +ifneq ($(TARGET_NAME),x86_64) +CFLAGS+=-m32 +endif + +# +# hello-i386 is a barebones app +# +hello-i386: CFLAGS+=-ffreestanding +hello-i386: LDFLAGS+=-nostdlib + +# +# test-386 includes a couple of additional objects that need to be linked together +# + +test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386-shift.h test-i386-muldiv.h + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ \ + $( X-Patchwork-Id: 133791 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp697484ljf; Thu, 19 Apr 2018 07:22:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrJrIa+zrd+H2EqNWc8k4LW8uaYgEtQxsj42AbpwnqmVWMKP/FlBUrDvEfXp0rlVhmGbcGv X-Received: by 10.55.103.148 with SMTP id b142mr6160072qkc.325.1524147763043; Thu, 19 Apr 2018 07:22:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147763; cv=none; d=google.com; s=arc-20160816; b=O9o0CPTXggk0jMFcrAFuaya8Onn3u/IFwQ3bthzulWdUNwqLk9W9IU3Q2QPGC1c347 R39ET+QKR3FbV2RoP+XxgcqFrwjA9UUkqF2cU1AUy76ZR9LgwJqFaUXLz1/z/+HAlUlE xjbIhdzzpm5e6nGaB7imGwPJMwwx0w1nVtB4yt2PLMPjpmb+wgSIIw6Oi4/1bUy3r44g xCl7msuVnfcK7sr17ohjh6/apG0oIEIvxRxorKbDwvU/Kko2W4nPM8LjFIhgMOLRu5om 9oPch2d4xnBe5c9GsKm4qxmKPzqhxVP3o+3/G2P0MH5PUL1p//fTfpguyKa7H9Hjx92/ Ttuw== 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=Sp/nWR42wqBHZeJmZ4fe68++pwWrJ8UU+fs/ZWk84p4=; b=iGigQBMZFlq8JgJuvGaU/6KxNoo7hSAdY35hdnlEHan4FjWaoQJQFOWI5nb3QImrT2 I3KCYGdB6nOre3+TKcqYCCNpT5MMiEpivo10Pa8lB84yTvM5ssebHKnyMCLsFsKUzR28 r59fr06hvky0UlKznUkPmfJeNxkhBxiS2f08nH1zUkFEtJMCUKGckj0drjXvD6PrfDiC c5UGfFi6edwWdPqxTW6SBYCDViAbX6bkhW5mov4BM0rRWnia2D+slFhIPZuzbwQPTSHt 6w5jSdhccQAc5gtL/lxRQtyZqg1eXB8MbnhrR7gvUPKNh/yHPRTKpMyv4RTlDrUR/nH1 6stA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Hrbd3jQi; 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 n23-v6si5054503qtn.198.2018.04.19.07.22.42 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:22:43 -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=Hrbd3jQi; 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]:50377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ASQ-0003bN-Da for patch@linaro.org; Thu, 19 Apr 2018 10:22:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5v-0006F6-2l for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5r-0002j4-6C for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:27 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:34143) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5q-0002hD-W2 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:23 -0400 Received: by mail-wr0-x241.google.com with SMTP id d19-v6so14369925wre.1 for ; Thu, 19 Apr 2018 06:59:22 -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=Sp/nWR42wqBHZeJmZ4fe68++pwWrJ8UU+fs/ZWk84p4=; b=Hrbd3jQiMMQ7feVCHCKHj59AO9KG3DAXESFRl0N4Wgz23+ZV3Y58rLZABNrpY/M8Q9 8iypKNlLCJRaIsMrvy4BppDeiZOPbdKjbzO/t07dFW1aCDr9vmVpaUt9vWbLkV8QSWhF NZSTBo3vCL0c6viXN2XnSslB3KnZ/KkfHTE7g= 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=Sp/nWR42wqBHZeJmZ4fe68++pwWrJ8UU+fs/ZWk84p4=; b=jTmaiVvsyRljKq60woIiaiRWI/n96nzn+GEaAlnR9U2pg1KT2vhqgrS4BAyYi684Sq M1hU4tvuzOFTOLeEOKbOWzC0BPXmaF4blQ5b3ywWjYBLpD0p/4M3xCYhdTrP7P5muam/ pADZ1tiAbn0qaq8wF6b17gv7tDRTpi+13LCdMvtRa3X4Hv9xzL2cKZNheQHb6kCpGENb bafjqcx0n6JsvSv/yqYyADsFSYF5utWuIUet5Yu5DgAQs7hUMqY9loEZ95ywuHL7MN5r Aza93KuShhoDpIsn5byyBSF22hsMhts/If0gEWrPysq9ttiFxjysrJx94xFlx/1lszO4 E5EA== X-Gm-Message-State: ALQs6tCl4Ybc00zWbudrY0ty2fkG0y3OQUosX7IKmmwYXpY1YclrDVn9 ZxgYVXzsF2C4mn9u/y7vUvhV/A== X-Received: by 2002:adf:a558:: with SMTP id j24-v6mr3877854wrb.261.1524146361868; Thu, 19 Apr 2018 06:59:21 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u8sm4555839wmf.3.2018.04.19.06.59.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:17 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B8E063E048B; Thu, 19 Apr 2018 14:59:02 +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:34 +0100 Message-Id: <20180419135901.30035-17-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::241 Subject: [Qemu-devel] [PATCH v2 16/43] docker: Add fedora-i386-cross image 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" From: Fam Zheng It has some basic *-devel.i686 packages to be used with "gcc -m32" as a 32 bit cross build environment. Signed-off-by: Fam Zheng [AJB: add glibc-static] Signed-off-by: Alex Bennée --- v2 - include static glibc package as well --- tests/docker/dockerfiles/fedora-i386-cross.docker | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/docker/dockerfiles/fedora-i386-cross.docker -- 2.17.0 diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker new file mode 100644 index 0000000000..8fbef2fa53 --- /dev/null +++ b/tests/docker/dockerfiles/fedora-i386-cross.docker @@ -0,0 +1,14 @@ +FROM fedora:latest +ENV PACKAGES \ + gcc \ + glibc-static.i686 \ + glibc-devel.i686 \ + glib2-devel.i686 \ + zlib-devel.i686 \ + glib2-devel.i686 \ + nettle-devel.i686 \ + pixman-devel.i686 \ + gnutls-devel.i686 + +RUN dnf install -y $PACKAGES +RUN rpm -q $PACKAGES | sort > /packages.txt From patchwork Thu Apr 19 13:58:35 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: 133778 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp686559ljf; Thu, 19 Apr 2018 07:13:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoEIlQuMKO5gVb9Dt5+39o/vVRo/Vio4m/Dg6KCJMND1L2Z7ey1eWMM8r0fQlMOdJTRjIYR X-Received: by 2002:aed:3245:: with SMTP id y63-v6mr5978683qtd.7.1524147179927; Thu, 19 Apr 2018 07:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147179; cv=none; d=google.com; s=arc-20160816; b=DMxdSamwSaaj5TmCTD8q4MU6z5YbuUhaCmJ7RKJ2WLxZCO2sEVfsDthiZsvdCT2Bs9 8YviVx0vq3yt+2PfIf/giljdqm597xVRKAA2lIVCTcWmdAo1DUl5wV98PLLGqxOqLbAK QQCQxenYTW/m2kI3CYmJze+fIo6NehlCxYHlsLnpAQVQrJBjNIA2guAf9GPQUUbOH+cK f6NCTrSOS/wyOETRruy7Cs1gcboUcvBO1h5lBh7eU2f1kAfluU0oSPI9VNZcT3vr41zV 87/I4naaWArvobBTZIA4RQODcahxHiFddvwowk3XvSI3Pf/eB7dSqVG+XqG2gWDqJnBE MkTw== 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=xGMWVwBGlvDN7ujlWYQ+MdT0fxtsB9XscGnzXOZT/ts=; b=hR9in6tQdgtdil00Apn/wHnuv7s+QOOruo6rc6j9JXZRzecF+x324IHUhajF3NSWFd 8dhXiAHO2s/5Rgft1WB6uKcqAnoS+BqfVB8RcXfh8QuYexWxA99qDC9bkCb6mnX8Mb/I pnTJHsoTN1eATnuZoZ6u2/JVi+zl9cpwm8O+Ltfn5S7pgE4BSkYRgkwybne6Fcpuy0K6 x/+TGazcQJs9h6lRUe8xSaVTR4LqbmSUsQ8iteWLGQk2s1TSyQetRix8/KjEs5QTPR+V BYWCahUzgCeLqU+wW8HI7iovLdVc4zBG/+kXgNlWOof0vePt6I0X2Lw3NFrE7XhzNk4I flyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hg3AepyH; 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 h68si3448917qkh.310.2018.04.19.07.12.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:12:59 -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=hg3AepyH; 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]:50074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AJ1-0000PL-9W for patch@linaro.org; Thu, 19 Apr 2018 10:12:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5n-00067O-US for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5n-0002XI-4g for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:20 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:34142) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5m-0002T7-ME for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:19 -0400 Received: by mail-wr0-x241.google.com with SMTP id d19-v6so14369181wre.1 for ; Thu, 19 Apr 2018 06:59:18 -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=xGMWVwBGlvDN7ujlWYQ+MdT0fxtsB9XscGnzXOZT/ts=; b=hg3AepyHGbIPADu2vx5EWFdqyaCSqE4d30muEUk67+46eoqMBeokWl9WRctwWyHMXO mK7LfdLrZMheIOKsAVu+4MiVOFuzmAGyPM42peoQpYQAs6bOuqeRTYZAwtKWA0Ns+9Hs sGF1M9aocbKN9svRlgbYE+E5cXOp2vqQlHex0= 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=xGMWVwBGlvDN7ujlWYQ+MdT0fxtsB9XscGnzXOZT/ts=; b=o80hXNMklw6Tp+xn7tOhbn+lruD4gN4pKcoPHmHMTTo5iCScdpwrglnpncbWSOqJUp YiEnqi6cmZ9RKDi3rnj9v42ODVwq3dIc8gyFwhHskHtMuzpOqSL0QHz7irVE/2QsT+g7 n8i02uM4zy5eUZJRyMv8+bfUYiT8jdoEvVZeuwP/TL9Y0QpwEffYknGtzNfU7rS7XaAP liTxzrKrgfCZngfq6SjLxaBpe4PZddPuLnYqNflkn1J0qgUlFsxkQmPkD8xxV3+F705e +5+bYaRwvn3fxuKKDX5iBlFhacIwlsS8j8ZV7rZ9DfxlGT9xaNalJKkRPmchlM6N43zM ahvg== X-Gm-Message-State: ALQs6tAQz12KgKYOcfDw3NXeyP6iwPddahMFvCr1cDhRFeXrFc83iUCa T+jiR3nDVfK/i0emcoQVidlNgA== X-Received: by 2002:adf:8667:: with SMTP id 36-v6mr5102195wrw.23.1524146357536; Thu, 19 Apr 2018 06:59:17 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q138sm5095197wmd.1.2018.04.19.06.59.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:11 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id CA64C3E0493; Thu, 19 Apr 2018 14:59:02 +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:35 +0100 Message-Id: <20180419135901.30035-18-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::241 Subject: [Qemu-devel] [PATCH v2 17/43] tests/tcg: enable building for i386 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" While you can construct a compile command that does work using the x86_64 host compiler that most people use this is flakey. Different distros handle this is different ways so we default to using a known good i386 compiler via docker. Signed-off-by: Alex Bennée --- tests/tcg/i386/Makefile.include | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/tcg/i386/Makefile.include -- 2.17.0 diff --git a/tests/tcg/i386/Makefile.include b/tests/tcg/i386/Makefile.include new file mode 100644 index 0000000000..be1c3008dd --- /dev/null +++ b/tests/tcg/i386/Makefile.include @@ -0,0 +1,9 @@ +# +# Makefile.include for all i386 +# +# There is enough brokeness in x86_64 compilers that we don't default +# to using the x86_64 system compiler for i386 binaries. +# + +DOCKER_IMAGE=fedora-i386-cross +DOCKER_CROSS_COMPILER=gcc From patchwork Thu Apr 19 13:58:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 133773 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp681861ljf; Thu, 19 Apr 2018 07:09:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/OLEPNe6DMizu1tGml8pGZMe5e2RNjLWAZyN01gPUD5GVJtyIY20kxQWfxGtYZT5pHIF1I X-Received: by 2002:ac8:351c:: with SMTP id y28-v6mr6189825qtb.58.1524146946694; Thu, 19 Apr 2018 07:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146946; cv=none; d=google.com; s=arc-20160816; b=P6PTCpv8JgIlZqrZAGfJY070AvKQP9pk/9PLcZYzLqCZoVmy+kzXnJFLhXumb3gZPU d39uoy8Gi7Pd2jE9R6Cs4D/La3McGKCcLqhnGlN0bu3+8DniilF3WGOBSQtRq9UF6coA I5dblR2DCY+wbSlM53SBMYCNoXJN57XKdeVF9BlleuWqYaaPi7sNbzPRVLl3IbGjq5u7 1e0TrhV+NUA8dpUVN/1K6wbAW+CaXmN+ryso2W80T3Swhfn2AcyrG4M2pFYoDq5OoBop yt149FlyFozORbevd7Rk7/zH4PF8E1O2P69dJ6Jhy0RfpKgyNV4PaHeOg5B4ik33/ySC JNeA== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=M4knfNziydg8xz3w7OTWFo2qsq6zaTW6DQN1Zbl0wio=; b=cOrQedn/+/NIE9ZzamDZpFaKsGTbyjXiyRgxhW9R1qBr4CMNymA20ofhe0f0C8CMOy 0N7DiFkcgoFkdtl64iLINjloDpSpj1H775MIfJeSK0ndntrxBQPANwDzuAAb47MG+/A0 V4msDmMosRV/MwvRlzmaTELwP1bVGzobQG8ymbdmTthF+taD+AOmen2OkQzHsX0Qyb+9 GgH3X+3pKCPtOVyGZCV0jbXvQTZ+5i4PJFlQ8vwuVBpeYC14TkknPqaliEshXgdc7qXY uyod2Vx+akh8bhrb2WOrDAUduY0tDP2vqL/CNuaRDAWKnYFNpA2M17OyMSFFv3ihZzOc kLFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gFJIciaf; 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 v57-v6si4419349qtj.209.2018.04.19.07.09.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:09:06 -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=gFJIciaf; 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]:49998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AFG-0005s0-3C for patch@linaro.org; Thu, 19 Apr 2018 10:09:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5p-00068u-1J for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5o-0002bE-6l for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:21 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:46504) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5o-0002YO-0y for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:20 -0400 Received: by mail-wr0-x244.google.com with SMTP id d1-v6so14338106wrj.13 for ; Thu, 19 Apr 2018 06:59:19 -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; bh=M4knfNziydg8xz3w7OTWFo2qsq6zaTW6DQN1Zbl0wio=; b=gFJIciafU2DiY0eZGfZQkyhsDHBE/hYGii2DYnGEW8eTlxQqi40F/lsiEAV/AjQz19 LQ0xr9hKaB9NJT5P9sMwbeY4hm//kEB/XE2YQ94F5INwSpbRGmegP2Vgc7wnicfSD3Fp mL03sJl9iUPnpAxzx27Tad9mcYs+4c4Xi8sVo= 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; bh=M4knfNziydg8xz3w7OTWFo2qsq6zaTW6DQN1Zbl0wio=; b=LnoybqMY24p6Dp46053yNGvnyzwvdqOOSMDldnfHULJRbAJZ5GtVK8+wEdQRswSkC8 J2Nh7ZVUEsVbSMCaO1j3pnrTp2hzYm+VG26rmLQUfl9vX6YJ4lEDM4O3cMmAA3T/uTIw P4AAhljjpUSUqhgMB1ycrQz3zeCYGAlTdHLl4WATSKsYuD2PED/xJqdOLYrYi4gORkMt e7ZL0d347ccZqvYRShcRLRAe+ERYGa0xc7jfg2CqCQSvLs3T7nVwDsrAw2W4Fn1rP4Sl mxKbImTO/7vtBQj0p7REybSy+O/PpyefXpZ9Xp1B/yIgx93YeBYvRALa2zsXGP9RBe02 bsXA== X-Gm-Message-State: ALQs6tAKY+G9MnIdhlV2EkPNR7VnnebAP4+ANVsvpG2N5TIg4vAJNghb +12109KELGkrHQzedfabEXSWEQ== X-Received: by 2002:adf:a925:: with SMTP id u34-v6mr5145986wrc.248.1524146358886; Thu, 19 Apr 2018 06:59:18 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u196sm3467520wmf.30.2018.04.19.06.59.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:17 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id DBBF53E0260; Thu, 19 Apr 2018 14:59:02 +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:36 +0100 Message-Id: <20180419135901.30035-19-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> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH v2 18/43] tests/tcg/i386: Build fix for hello-i386 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Fam Zheng We have -Werror=missing-prototype, add a dummy prototype to avoid that warning. Signed-off-by: Fam Zheng Reviewed-by: Thomas Huth --- tests/tcg/i386/hello-i386.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/tests/tcg/i386/hello-i386.c b/tests/tcg/i386/hello-i386.c index fa00380de2..cfeb24b2f5 100644 --- a/tests/tcg/i386/hello-i386.c +++ b/tests/tcg/i386/hello-i386.c @@ -20,6 +20,7 @@ static inline int write(int fd, const char * buf, int len) return status; } +void _start(void); void _start(void) { write(1, "Hello World\n", 12); From patchwork Thu Apr 19 13:58:37 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: 133803 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp711659ljf; Thu, 19 Apr 2018 07:36:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpjAr1lG4tfZASA3kRdYOarPtVbILpCZ8cLDMy7PvapEVsLT8P/YtcEbu2KFIBD9ZheW2dp X-Received: by 10.55.47.2 with SMTP id v2mr5962943qkh.249.1524148569330; Thu, 19 Apr 2018 07:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148569; cv=none; d=google.com; s=arc-20160816; b=sgOKyqvcjBVTAedfQAISmQzkbIFWLoVZIrUDeXDx48qyK2pxCWmCYDRIbWUGUIpVm5 PVv3m5joPmLeGai61CFCZBIs24J4zKKyAOglbZDSJFC04iXGrDUYBbKSmZHXAQIEfVTg LoHm12ePL2NJY0fJVFLitmn09xg2Z9EpILPNk0T/bLhH9ZoDQblUs2yAwskz7Ch5BSh8 WKtOLEAiktU4a9NW+sgFfgsL5E0NVWeUala9VPJOz2pshw0aiCoPBIKDN2Lk4DSIa5G2 hL5Nn3h0aUlnE0ejVWCVJmcAvPZmpMQ0reiKTWDL9cTicw0IpQjl29X/TAymfDSuP67V VBmA== 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=mjpOLjaoGzyWGd8JfUynyR0nlaimjKnGDmOdOWejvfU=; b=aSiktxO0nOjBVYeO26DymJ3WOSWL+CPqYxnHFM6A2VRx40BNyJo8JxIEdnuS4Zo4Rr JmZBx7f7j1i4tRhx9Rw9bWMeIPykclrNZNdmar0UhmfFdOp7NJoAqPkFwNl7iXI1SgiA zh3RkfAyRtqGCilvyKwSkkJg6EKL2LomHt+5NIH5kpV+xfMFTPevwUVnz9dykqjMYaKq BOXKLEp1uIxAjY9++7FdydCsl2+xMTyxlYXhyXLUK3MtXRgmI3gu3/t8DyJmfn6dA6At aA+Y+lJw/PQMDSEaaW/lMdFvvJyB1XfB9tuP9pyTOu9iXLGYEYTIKvJjoQwrgA4UelWv mTtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Bg5DqEtL; 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 s5si516042qvl.116.2018.04.19.07.36.09 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:36:09 -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=Bg5DqEtL; 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]:51181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AfO-0006g7-SJ for patch@linaro.org; Thu, 19 Apr 2018 10:36:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANY-0004n2-3W for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANT-00068L-Dc for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:40 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:44260) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANT-00067y-5j for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:35 -0400 Received: by mail-wr0-x243.google.com with SMTP id o15-v6so14510341wro.11 for ; Thu, 19 Apr 2018 07:17:35 -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=mjpOLjaoGzyWGd8JfUynyR0nlaimjKnGDmOdOWejvfU=; b=Bg5DqEtLaMojtxn5xH/z2clPxp9JYxEZ/giHOYG5XKcmqm1HqG6w85TlqhscGjRtXr 385X9SOeVhnZ3EbTY3UHybZZNNQ9Izay3ROsJHgkZ6iEMjhNnh4HMzkIlLF0+d1GAF9h 7yNYot43+8dXONYEVr2q6mHPePER7FQlX6odU= 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=mjpOLjaoGzyWGd8JfUynyR0nlaimjKnGDmOdOWejvfU=; b=QI7f2dvhAWJGMxUPGLX/J13RPW8SXdFQSwhSwC752koq4aFMihnxF4gO0e9gRr6rze 0VzBEZFjzK7Uf3n2QXu0vATt0ZFve7vIG6yV8Gnbo/ERpTFOIrhHdKttVFD1FpGAo5gU 1chO+ab+UeYBaSQ4JLndr4MJAl7PuDJSNk/GAuOp/LaUmfE5h0Lwi6IPygsg6PKSpgVV K1Lbfz6ZuY6pR59tzqi5zJ+pOk8HFUCeSg3p5R0L1T6S9YJk/u2lNoBJ2/9DuPHoOsca pa33prNv0ChRUxMUrCT85IcQHTyzXHJ1jOWEEJfMrMATeBNT6O27kae82RVOiGAFjNcJ p8fA== X-Gm-Message-State: ALQs6tBItBa5QSsk+vuSk3/EpRx17s7jGdmykYbxpTG9OlfJVCz0JUKC 5CZeAaulLuLRpOenZqJ6ibXaDw== X-Received: by 2002:adf:c104:: with SMTP id r4-v6mr5200592wre.84.1524147454134; Thu, 19 Apr 2018 07:17:34 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id e131sm198090wmg.1.2018.04.19.07.17.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id EDA4F3E049E; Thu, 19 Apr 2018 14:59:02 +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:37 +0100 Message-Id: <20180419135901.30035-20-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 19/43] tests/tcg/i386: fix test-i386 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" The test-i386 test case is a little special as it includes assembler files. Add the additional compile magic to assemble these bits and link them to the final binary. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/i386/test-i386.c | 1 - 1 file changed, 1 deletion(-) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index 9599204895..cae6a7773a 100644 --- a/tests/tcg/i386/test-i386.c +++ b/tests/tcg/i386/test-i386.c @@ -17,7 +17,6 @@ * along with this program; if not, see . */ #define _GNU_SOURCE -#include "qemu/compiler.h" #include #include #include 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? */ } From patchwork Thu Apr 19 13:58:39 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: 133786 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp695351ljf; Thu, 19 Apr 2018 07:20:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq/blffF/dE5fwfrJ3fRGecHiFHH07zrjUTp6IlSxgds/t0tWB+6skqgJCIWbj108PXGjc/ X-Received: by 10.55.121.1 with SMTP id u1mr6217296qkc.79.1524147638325; Thu, 19 Apr 2018 07:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147638; cv=none; d=google.com; s=arc-20160816; b=IZjStGL8JzmhmP1IJbqTps1O3+DS9rmd0nPMvJwPq+g6qruNL6Ac/u+YE+FY3XAjGa vVePGzZPjirXTnpQwGrdKYwmW6/8IBEy3VSAX2xklFyR/xO8e+yb8Ff+pjtLdomA+DHf e58dLpFBZyXNz0N3H4cSBZzKuGiLzXeZmDUAAuxI8F8d8zsPRxM4kPmh3/eX3W6doWYT 4N3poWDfKnl3d1mhWppnFCTGASIIgAYNjOv74THjla/2MVEZItnAFj1SmSBvSYfcqYcZ SbogcFGPhwnLy9piERQ/IwFoG64oIuRn9xT6Z2cm3PnxruTr/rmxfYhTW7hoTWbS3HJZ lsAw== 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=Gdosn+sLwYDfNgBiyIEGRlmLYr7oX4ZvVfB9k5F+VgY=; b=1HN6oRjxVmn0QX7CmX4tNoA1FOeN/5ggl6r6Ykc45ob9v07N2slalOYM3Y8e+5b3Bn xkOG57TdE/9Oo8ZbP06C8uMlIqEvgzDeeJZgtunuubQaNQDcSn8R9W+sVfrHf/wS/pno xFagNAgL4EVcUlXGFTo1Pw2UhCsNd7hu9cnq9pQDrcz446RmNaSFOUTaQdVo8EActwGu ajIiKTQ9D+YAXvAsXnhb/vZgBgnvMRcfY1+pidnbADz7UmKVUT0HdndcJnPl9T6AvR2b d2bWI12HqUQeK1ASoYDsd3zUljZ3Wa5jrhkZ+uXJdcl7MQv3gvQCiRnawfD+tqrRss6J JcLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M83LGe6Q; 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 k20si451137qvc.218.2018.04.19.07.20.38 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:20:38 -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=M83LGe6Q; 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]:50359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AQP-0001RR-Lf for patch@linaro.org; Thu, 19 Apr 2018 10:20:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADs-0004Ve-BF for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADq-0005Ch-Qn for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:40 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:45631) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADq-00057T-GV for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:38 -0400 Received: by mail-wr0-x243.google.com with SMTP id u11-v6so14407848wri.12 for ; Thu, 19 Apr 2018 07:07:38 -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=Gdosn+sLwYDfNgBiyIEGRlmLYr7oX4ZvVfB9k5F+VgY=; b=M83LGe6QA6RfymU/FPiVnjzxnPgLradUc94Za1Mf2xc0/mn4HLb0y+P7GC4inMW9yl zjq8gJn/JJN44useAyEZ2vr9IuSRgUMwyzoc5LuqBlNYLNCV81+9ygTazSt5XiG8i+87 cEla7Ybe4b1UyUhnQSaBMpVZUEl4hzKpHGwTM= 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=Gdosn+sLwYDfNgBiyIEGRlmLYr7oX4ZvVfB9k5F+VgY=; b=VKEy1lKM/Chsz1v9ScBBGyLcn+gE/oSmHWE3XKByRLKfMaIdQjqCBInA7clUoHWZ9j teGnl8CLOWy+LO7nS/g8V9A4B6OZQfQHhhRUfRLElEccUGlMUF5cUzgQMLN5HRWT3jHh B7HPQAHT+0pPO7xhczg4EV+w5kh7pZC3Xr8LYCpbY3G8Xl63grZVQZcrREtIgiqiSgW+ 7If0stjMuNCJkGtu9iD38xLXYA0qll1vqn/fRO7OAv1RTxH3W7ZfxHqdqNVNEvV0ChkY 9zjmvG3GK2va4WLUVO1yhwTJy9Cg8uZhHrOnim9sd/5ohYMT3nUbZ/hXrriF/OgqhLtL A4Ug== X-Gm-Message-State: ALQs6tCEh9kYZhaVROj5FqeMzScBzC2iCdSRZTJYbmMQQ/VJ7mplfV4Q gvaZ5IB769cjSUko8I49A/65iQ== X-Received: by 2002:adf:a453:: with SMTP id e19-v6mr5048230wra.121.1524146857447; Thu, 19 Apr 2018 07:07:37 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b105-v6sm6613784wrd.64.2018.04.19.07.07.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1C59C3E04BB; 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:39 +0100 Message-Id: <20180419135901.30035-22-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 21/43] tests/tcg/i386: disable i386 version of test-i386-ssse 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" It doesn't build for i386 easily and we probably need a better more methodical test for SSE et all in QEMU. Signed-off-by: Alex Bennée --- tests/tcg/i386/Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.0 diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index 2f27b65e2d..a6cc76664c 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -9,7 +9,7 @@ I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c)) I386_TESTS=$(I386_SRCS:.c=) # Update TESTS -TESTS+=$(I386_TESTS) +TESTS+=$(I386_ONLY_TESTS) ifneq ($(TARGET_NAME),x86_64) CFLAGS+=-m32 From patchwork Thu Apr 19 13:58: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: 133781 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp689770ljf; Thu, 19 Apr 2018 07:15:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/cLFShtXetEoVEBhL22dESq286JULy8r6GBt916zMyXahM35sJmLr+iq6FnrPHSi+U/Bgm X-Received: by 2002:aed:3111:: with SMTP id 17-v6mr6454231qtg.267.1524147332358; Thu, 19 Apr 2018 07:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147332; cv=none; d=google.com; s=arc-20160816; b=q8b5C8e+2YiTF3CiQ3LbSwJI9wtS6JNIZORoHBb/F/yiHTYWtJZh02QNwr2EX07Xi7 CW02nYevsRy/03hBRVgsdHCB1/jK9qPIZJ15gtFHCQjt3WM/CksA5m35Fa3IsHzQR+fO xQ1H0hsLNbwkTQN89gjmpXJF2+TqatGVo3gaINXufg7DD+pSF9FMqkfogoxXNmVqDEkN YoeeRX+ye+3N9+xJeIYOGLlX8P0nJvEq1Zol5LjWDqO7Ab5+DgSAJDL7UArd76+SW4Jg 6ZCLzgjlviNAbs/sI1+08bDtsa3S0FbJESByJwetrF435z94/IIb9lKxEsSlUMyWTy5G zLag== 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=6cCILsw7Ds0t9cXFsW29dGcUt526P7FLE3AZ1xhalc8=; b=arvu+hZes3afbTQntjQUWXCg1crtSvOc0XV+g88Hhm3UMHuxK+WMfFRoOoxCVj1Wvb AFGDnmGdK6zZ3R5m+NsVdX4R4s1L/TeIp7vTHoUbpRBNqb3CCWih54P5Gdn6HlPpdley r49AdaqoGdwfHzvDWxV70fy1kIzG2nrj/pPdUFouNbs4k057aCOIxiCFAT8eilZDlroT c6MWu+ONpNO4m9g8cl1ImayDZ2h7krrzPxHhhkKZ0SGl3n5CgPLKwcJAcv+iinVsC3VV ku///IP677oT0PZE060G6N5Lo5N2znMt4Z5gfW2OlhDZNzltz19xlkpbaoproXmEnGFH Gmkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=N5bPXqPd; 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 i38-v6si5111887qti.173.2018.04.19.07.15.32 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:15:32 -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=N5bPXqPd; 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]:50193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ALT-000397-6s for patch@linaro.org; Thu, 19 Apr 2018 10:15:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5r-0006Ab-BZ for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5q-0002h2-CD for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:23 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:34856) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5q-0002er-52 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:22 -0400 Received: by mail-wr0-x241.google.com with SMTP id w3-v6so14354563wrg.2 for ; Thu, 19 Apr 2018 06:59:21 -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=6cCILsw7Ds0t9cXFsW29dGcUt526P7FLE3AZ1xhalc8=; b=N5bPXqPdxVfQ1kV6ZV5NW+fclEcOVgiElwXBWDIXVE61zIUW9FCsljhbc34XNIDr17 2Y2MZIIXakx2IZEnhacwIBIkiKrgcYNTU/w6nvrMeb9MZrprVAF+ElrcyxOqDSa/pnlP 8LrcLE9RYzf6kj3Pu/TMueIG7RmWJqt6eMzKk= 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=6cCILsw7Ds0t9cXFsW29dGcUt526P7FLE3AZ1xhalc8=; b=KmRM+Jgypb2DA/maLpQRxbyKjVbZfIxmzp+ZrYojxjBqX0uGV+73CY9epNOtOMIlg9 PA6K5RBtj4GLxZPqyUfJx911pAOCol56IMFlvNNaALsNmMRm+qE+ZaVP49hB++CSR/iW ZJ1dlLzOQAJthhyM5JAG9poBECphJ+tSPHGaSwjdoYAEo7++EhR+EKSok8Fk8/rl9m4H U8nZ4y43spWIpzOTVHKIbxT4wjVc9SZPHgTV88kAf9CzK27siFaYwuu2tWz3ashIplF7 GYZjABM4jq4TSjKSuOo1uu979uTQ2P5e3T4sn21fkmmznQCN4UgEi7kBrYnKcrkETlDQ IWzw== X-Gm-Message-State: ALQs6tB9OQfTeIjbqJASaDzY4V98QDS25YDOAUnq8A68ZmvKYOGglAkD JUA3XA6qCOuCJHGCFLNC+kSPsA== X-Received: by 2002:adf:a144:: with SMTP id r4-v6mr4698229wrr.217.1524146360972; Thu, 19 Apr 2018 06:59:20 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r19-v6sm3627203wrg.8.2018.04.19.06.59.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:17 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 2EE4B3E04D2; 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:40 +0100 Message-Id: <20180419135901.30035-23-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::241 Subject: [Qemu-devel] [PATCH v2 22/43] tests/tcg/x86_64: add Makefile.target 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" The sources for x86_64 are shared in the i386 directory which will be included thanks to TARGET_BASE_ARCH. However not all sources build so we need to filter out the ones we can't build in the 64 bit world. Signed-off-by: Alex Bennée --- tests/tcg/i386/Makefile.target | 2 +- tests/tcg/x86_64/Makefile.target | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/x86_64/Makefile.target -- 2.17.0 diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index a6cc76664c..3a2736616c 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -7,7 +7,7 @@ VPATH += $(I386_SRC) I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c)) I386_TESTS=$(I386_SRCS:.c=) - +I386_ONLY_TESTS=$(filter-out test-i386-ssse3, $(I386_TESTS)) # Update TESTS TESTS+=$(I386_ONLY_TESTS) diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.target new file mode 100644 index 0000000000..74f170b9ed --- /dev/null +++ b/tests/tcg/x86_64/Makefile.target @@ -0,0 +1,15 @@ +# -*- Mode: makefile -*- +# +# x86_64 tests - included from tests/tcg/Makefile.target +# +# Currently we only build test-x86_64 and test-i386-ssse3 from +# $(SRC)/tests/tcg/i386/ +# + +X86_64_TESTS=$(filter-out $(I386_ONLY_TESTS), $(TESTS)) +X86_64_TESTS+=test-x86_64 +TESTS:=$(X86_64_TESTS) + +test-x86_64: LDFLAGS+=-lm -lc +test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h + $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) From patchwork Thu Apr 19 13:58:41 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: 133800 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp708765ljf; Thu, 19 Apr 2018 07:33:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrkyJGfs+29xMdUTgB73x/Tah+ULlyfdO3Tw2I1QkhmnxNYBtvnZItJ8c9kFfCo4CaovAev X-Received: by 2002:aed:3a09:: with SMTP id n9-v6mr6284297qte.98.1524148401039; Thu, 19 Apr 2018 07:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148401; cv=none; d=google.com; s=arc-20160816; b=1CZP9S9sE4r+voa7HDpGPmPh3nlf3AiGS+E44nKh63FBHlqcc2AbUgsujQjwBc+GIT 6E3U8zCTc6Hu3odPx6XvSE3jFZCgUxXlgFyCJDZWHYCnJWDItAdploMmtzn2sVcuy7vL ZLWn/mo52rfCZPj6OLnC/Alm4jCwT3yQWoi+gmiK4JxC/6dVS6eDxFdO/kZtJkjJf1Sq SCytqjGy5+j4+bUNlf/Br2SeUBbnbzqjaBcbGwD3tgzhbHJCk3kHII568IJ9z2oIGIkp 1/5fR/J1KQdAJHARtzbFaf81FRbHTPKxzJYDypqwg0zjUAycPsUiOzacR65mzQEuWlbu ZdDw== 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=TBVWT2Jr7xSs5Jn182OBbwMa7+l8UTJ/4IciEatXAQQ=; b=U0/trK91QFn6WPwW8+i1z5zVOPph9n+xXsze0BjC7lWC/BfsyInewowvtOP8K6oVkd R/GPNG9dDxnrgUoApyKyWav9Lt/6Lkdz8jJzC5x+rN7yGMrlKEwZUxkl0U45PTCzfKVf RFWUJ7+FQL+cwgmpvlBxSBAoW8M/beOuol/utijbzRmzqJpHoaIXzgdn7CIuVPa/vd/7 neRsGwe5l3iSTn8GY2OWouZQXpfPI8dQXhQWBvfFaW0kjlJZegs68+ISXSyNmswZIK57 vVKEGfLXNQvq3Lm722jGgyQ8lro73RZEkUaDFOp6iTTa5z40PrYD1oyFQhJvzFW9xDD6 UaoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=S7tp0aCx; 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 w51-v6si4792029qtc.319.2018.04.19.07.33.20 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:33:21 -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=S7tp0aCx; 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]:50918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9Aci-0004NK-CP for patch@linaro.org; Thu, 19 Apr 2018 10:33:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADw-0004bU-Bk for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADv-0005Pq-EU for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:44 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:35071) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADv-0005PP-82 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:43 -0400 Received: by mail-wr0-x244.google.com with SMTP id w3-v6so14436652wrg.2 for ; Thu, 19 Apr 2018 07:07:43 -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=TBVWT2Jr7xSs5Jn182OBbwMa7+l8UTJ/4IciEatXAQQ=; b=S7tp0aCxIUqvw4Es9cEWRQdo7elQXyGvrY6uMxbMBsKIBaj9Clxx89tHp3QXRyEY9p zdJhsebJdlAbYwtb4fOYzpMtiQLiFbxCW7iWZ+goWfVesvFOenGtbhV7ukp2eaRKXrnO NBGuWNAVLQ0Kh4HNgX7Q6taPEXK8J42bTS7pM= 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=TBVWT2Jr7xSs5Jn182OBbwMa7+l8UTJ/4IciEatXAQQ=; b=EfFA8yxmWEpjWmaAaixCjXVGfL0/8EVei9xj/ubMBY03AO1A4tFnH0ZRfmjlrxF54o lFm0SQ+xq7xxG+d0R0UPrsIn388d0LyT5Pm7fi4FM6F+q7UDm/+DPx0jGlDn05uRKmpj GSejnNRs95aBXOXlzOrOa1oW+uixh+6WOsOKmWz9tBisGVqnRv4ro7sybAESKE4mc6uT hajraVkbDoCqjoOeaQO1CUmD7P7/R4MTpTadqweWBQYv2sWIo5CjxIt/N/WKG0UYUR8B yyoLEZF3W4XaX7HcKHFaGgdunsu1WuARyupSYt+GLwkOsZlRDnI+NP10RejYLOm9CiSm EPoQ== X-Gm-Message-State: ALQs6tBbrC7kMCb06Rg6fDb9A8ARkix1GdRvx2bS/FW9P2LS+KzASxiJ FDgGDMI9rMKbEZl+olDyEKzQRQ== X-Received: by 10.28.0.4 with SMTP id 4mr4471224wma.118.1524146862249; Thu, 19 Apr 2018 07:07:42 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o17-v6sm5855865wrc.71.2018.04.19.07.07.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:37 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 408213E04E4; 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:41 +0100 Message-Id: <20180419135901.30035-24-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::244 Subject: [Qemu-devel] [PATCH v2 23/43] tests/tcg/i386/test-i386: use modern vector_size attributes 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" The compiler complains about the old __mode__ style attributes. Signed-off-by: Alex Bennée --- tests/tcg/i386/test-i386.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index cae6a7773a..caef4da176 100644 --- a/tests/tcg/i386/test-i386.c +++ b/tests/tcg/i386/test-i386.c @@ -2106,8 +2106,8 @@ static void test_enter(void) #ifdef TEST_SSE -typedef int __m64 __attribute__ ((__mode__ (__V2SI__))); -typedef float __m128 __attribute__ ((__mode__(__V4SF__))); +typedef int __m64 __attribute__ ((vector_size(8))); +typedef float __m128 __attribute__ ((vector_size(16))); typedef union { double d[2]; From patchwork Thu Apr 19 13:58:42 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: 133785 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp694667ljf; Thu, 19 Apr 2018 07:20:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrUQg020+oz06KhbzEHCRC+s9PMz/9GEN/05FeZVChgjTQq+DyTI9sHCmzSr0tYSP+DHpwv X-Received: by 10.12.168.146 with SMTP id x18mr712157qva.118.1524147600041; Thu, 19 Apr 2018 07:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147600; cv=none; d=google.com; s=arc-20160816; b=oyID+y73ZWPHYEswVVnQwy21aSSp+8vxAIZoEXkVVW15+773O3GuL2LVBt/GCmVFcD zLn6TC/RBdMXBM5bKMiDmjSLko6uLwwe2ALO0tzTmtaC/g+2mHp9mgi4D2+shrDAwEa6 vQB/t2BqBP0lkpxm92/F87blv5hS0bTw53MJd3JDhGyf5vc2E6nHYKINSghuxyvelVdb 6eQ+dWo+lzu+aB5DCz6IlmdddrMkUuaeHyzq4YtaygC43i9a9pk3iekkMjjda0SZBZcj Lvl4OZS8rz8g7M9dYRTY8ocWLdEIYZ1Cu+M/OxEA9+N+Me4jR6WGJYnS7CpWc74dDudk gjkg== 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=ekjhqvnR95X+jHr1V+i4OxaQLzEJ58BKrFKB0zdZII8=; b=0TQ33Qw5iW8M6OBxuJ4WCrjiTlKC8a/mo2iuSRXYO01mVk+Zl42lG55yRwTQc6wKgY pSZfbjw2KsLfPm0wNdNtj/TbhP4/EZTfglCLLjbUVTHD7kh5Sy5LT5oadloUhMdiWorq 8Wn+HiSgARCBp7l9N0LRR7Yuz6cbH4HgVYnR90X02Bjqt4m7TGWnc8G2Vh6UGewdl+Ih iO8zLCa5WfQvRJ7MjenRh/16KDUSNKuU+w3xIL+cMGlDJKUHLPRumsoWsOKENOkREIoD yc8W/ezgv+WFgbPor5oCfhwfURQqoNyurL3KHVa6rWKv93YRHojQgE9dxIQiBwLj3kdY 9OTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=b+3u6K4n; 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 o124si4676488qkc.172.2018.04.19.07.19.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:20:00 -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=b+3u6K4n; 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]:50357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9APn-0001M6-An for patch@linaro.org; Thu, 19 Apr 2018 10:19:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADr-0004Ux-QZ for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADl-0004tL-Bf for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:39 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:45026) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADl-0004p9-47 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:33 -0400 Received: by mail-wr0-x243.google.com with SMTP id o15-v6so14414128wro.11 for ; Thu, 19 Apr 2018 07:07:33 -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=ekjhqvnR95X+jHr1V+i4OxaQLzEJ58BKrFKB0zdZII8=; b=b+3u6K4nK2B2ZRAJjrt2pGFZ5vbHfas8stiFvcXfKlB1+U3LrFsM8SdF3hops9+5Go aafLICMJXZGmT0BZ2rTIGCC3+9fqJl5HHBXTP5pe3YbDy9bBz0QgZJQoddE+S/jxIpQc ToRUXQInYB9lOTkEx+vyrQUt7hfjvYmjMmVmE= 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=ekjhqvnR95X+jHr1V+i4OxaQLzEJ58BKrFKB0zdZII8=; b=dIkzdEDaW/03gqRG1C05ssfGynzVtz76UjCXz8e2eEIdzry54mejRdU2lPUN54IWMU 1pYiL9r9A/CFwDfypKnQE/KQqRyX01aLV7eYGq40/q5nXqQmBPsz2scfuEwfC1rE0FgL 3gtFARY+S1oa+qBqQ0Lb7vRe2Wuq/WUnxg+/WNtRNlHsJkA/NFzepIyN8tzyD+jYHn9V D3pqdF1GEWDut+pLJcwPUnDaBy5mUawBMmT/uTGOxRjq3RshWxhIFhvkv2g90FS5Qbma eoJGp/Y87Escg2OaYT8Rsu1vmOdrUMvBHkGEp1x6es2tcgvgFKRWBK2TuE3bvcI44q6i dImw== X-Gm-Message-State: ALQs6tAWfCv+KUGoYYfDrQ4/jnZwPgGLKWToFs/K4guhWYJMYWGCN+ir 9UoRalN7zN+QdTdPbjWklRLjEbSBrpc= X-Received: by 2002:adf:9654:: with SMTP id c20-v6mr5154997wra.89.1524146852185; Thu, 19 Apr 2018 07:07:32 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r200sm8242822wmb.39.2018.04.19.07.07.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 5209F3E050A; 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:42 +0100 Message-Id: <20180419135901.30035-25-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 24/43] tests/tcg/i386/test-i386: fix printf format 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" Signed-off-by: Alex Bennée --- tests/tcg/i386/test-i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index caef4da176..a29b41e764 100644 --- a/tests/tcg/i386/test-i386.c +++ b/tests/tcg/i386/test-i386.c @@ -2258,7 +2258,7 @@ SSE_OP(a ## sd); "pop %0\n"\ : "=rm" (eflags)\ : "x" (a.dq), "x" (b.dq));\ - printf("%-9s: a=%f b=%f cc=%04x\n",\ + printf("%-9s: a=%f b=%f cc=%04lx\n",\ #op, a1, b1,\ eflags & (CC_C | CC_P | CC_Z | CC_S | CC_O | CC_A));\ } From patchwork Thu Apr 19 13:58:43 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: 133827 Delivered-To: patch@linaro.org Received: by 10.80.173.174 with SMTP id a43csp886808edd; Thu, 19 Apr 2018 07:45:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Jsrkd8nLUauHLVUzPTFzA/2DRqYfPQgQwvs3U3PiWNtGsrPpOcRjDvy9s7WCNcJLgabiL X-Received: by 2002:aed:2ce7:: with SMTP id g94-v6mr6250521qtd.298.1524149122670; Thu, 19 Apr 2018 07:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524149122; cv=none; d=google.com; s=arc-20160816; b=tz7BdTvRcied0aTvym0SHLKJw1dQlB1YDb8aQk+ziRIHKkG6GfFPMfNuy3uA79N3bS QVxOEgNU2JGdZhes1tsLIQ6dla4iRZwxuVGBr+VMgLWHl7+pcvOaduFuSkkq8dz3zki0 K+f/V+ou9gB/iij9/SvyF34eT4G+RUQaDHMebuHqIFFSXsNjSqLelfUMG7xEudCMjmSW zvOU4asPuG0+f5lm2MGzZGDGZA8a7Xm18N/lPayGr6G4gNilFTwqw/QSNIZZcUtawtGs 52ObJpfGXYj4MJYKS/52cYXHPaVQQ3wrdgrKYZtc6gYcUfmaegRXxKcoxdwUlVJWkzUp 5dqA== 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=0OulYNr93ZEqOVNUubph9dlHQ42n7JguuGfru1NCCMU=; b=hEAclggv9jBiaDY6Va9CHDcx7w5VCAQOrh3+2AMUJXPAEuawO4HNTmd4JB2+Ix9Y/e 9eOYzwaVeIn4jcR9GQU5euIEhY9BylFNL5ML1HVYpGS7WsldGytEFZFNDSBChEhHxyWC AnMEYCATu6iN7nFcisfCTSMtZkrmasI6puExbFUaiqJLSk3f5sXt0eAIVZcNDzsbJnyh KCL8aZftq6AwZ9Pcfa+vfihUkQQLRsz7xf0Rnlpz64U35blpHhikO/IIxT/POrTxjeDo QN8FW+uX4E7COn/Hml+reLHRsbXFr5STNfjZWfeBjmJ3VxtUWa1m5Cly4t7rPig33P29 ZgCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NmCDbXYr; 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 f9si5126971qkf.153.2018.04.19.07.45.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:45:22 -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=NmCDbXYr; 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]:52181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AoM-0005Ce-5f for patch@linaro.org; Thu, 19 Apr 2018 10:45:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANX-0004mU-FQ for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANR-00067W-Vd for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:38 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:42545) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANR-00066e-PA for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:33 -0400 Received: by mail-wr0-x244.google.com with SMTP id s18-v6so14504737wrg.9 for ; Thu, 19 Apr 2018 07:17:33 -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=0OulYNr93ZEqOVNUubph9dlHQ42n7JguuGfru1NCCMU=; b=NmCDbXYrNIso0DXKuTgpt3sjGIdx+kzZAyWkF0xjRWbYwuQrj1XvEiyEjSuJjKhVSv Nei/kQqyKs9emvtvCZBQw0AYRcxEk9cxUgnT4JmOLI7CnwAEhfGlF/1sNn2LYwaNGaVM m+Y8bkgQgnFNXykbg2J8aAtOrc2E7em/U7yxE= 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=0OulYNr93ZEqOVNUubph9dlHQ42n7JguuGfru1NCCMU=; b=G7PbWdLFhR64R5BilcbeNg0Ww7c0V+mpSTzr2hkQoDRy93qGia/y5nS1HoY1ldj3v1 o/k71cVmmvgiERJl+gOyAClh+j8Km8WZ4R+iECFJc4ZXRE1BCsuBDjjUw1G1Wahoa//r wVdaemZKtwnPXD19/3VyiYDVnK6vZdANb3KE8wvTTYykI4mOqQL70SWDMnbOfaKBDooO kDWhKNO2CaLZInuzeNLa5A3y2OWeIqhQ6nYdRcpGJfT/Q55J/SlzaGIcBfQyLMrAT+CQ V7wKOcZMBoQrj4UcX5XeWC82eTvDBXCKNrgPU800aRnGJELpWVUDNdI5Ot9pS0rgtBoy uCig== X-Gm-Message-State: ALQs6tAIiHZds6WB4hqFQ3q3ok7+TrjxDCbST4Cul6Cz57w3myeHQWmf flZQEQVDKT22vLMCYaInw8HDOg== X-Received: by 2002:adf:d1d1:: with SMTP id m17-v6mr784399wri.96.1524147452772; Thu, 19 Apr 2018 07:17:32 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u36-v6sm7137042wrf.87.2018.04.19.07.17.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 66BED3E054C; 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:43 +0100 Message-Id: <20180419135901.30035-26-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::244 Subject: [Qemu-devel] [PATCH v2 25/43] tests/tcg: move ARM specific tests into subdir 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" These only need to be built for ARM guests. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - do VPATH manipulation in tests/tcg/arm/Makefile.target - merge with fix hello-arm test --- tests/tcg/README | 9 --------- tests/tcg/arm/Makefile.target | 13 +++++++++++++ tests/tcg/arm/README | 11 +++++++++++ tests/tcg/{ => arm}/hello-arm.c | 0 tests/tcg/{ => arm}/test-arm-iwmmxt.s | 0 5 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 tests/tcg/arm/Makefile.target create mode 100644 tests/tcg/arm/README rename tests/tcg/{ => arm}/hello-arm.c (100%) rename tests/tcg/{ => arm}/test-arm-iwmmxt.s (100%) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/tests/tcg/README b/tests/tcg/README index 469504c4cb..625f2326e6 100644 --- a/tests/tcg/README +++ b/tests/tcg/README @@ -5,15 +5,6 @@ or they are architecture specific. -ARM -=== - -hello-arm ---------- - -test-arm-iwmmxt ---------------- - MIPS ==== diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target new file mode 100644 index 0000000000..bc6962ecc6 --- /dev/null +++ b/tests/tcg/arm/Makefile.target @@ -0,0 +1,13 @@ +# -*- Mode: makefile -*- +# +# ARM - included from tests/tcg/Makefile.target +# + +ARM_SRC=$(SRC_PATH)/tests/tcg/arm + +# Set search path for all sources +VPATH += $(ARM_SRC) + + +hello-arm: CFLAGS+=-marm -ffreestanding +hello-arm: LDFLAGS+=-nostdlib diff --git a/tests/tcg/arm/README b/tests/tcg/arm/README new file mode 100644 index 0000000000..e6307116e2 --- /dev/null +++ b/tests/tcg/arm/README @@ -0,0 +1,11 @@ +These are ARM specific guest programs + +hello-arm +--------- + +A very simple inline assembly, write syscall based hello world + +test-arm-iwmmxt +--------------- + +A simple test case for older iwmmxt extended ARMs diff --git a/tests/tcg/hello-arm.c b/tests/tcg/arm/hello-arm.c similarity index 100% rename from tests/tcg/hello-arm.c rename to tests/tcg/arm/hello-arm.c diff --git a/tests/tcg/test-arm-iwmmxt.s b/tests/tcg/arm/test-arm-iwmmxt.s similarity index 100% rename from tests/tcg/test-arm-iwmmxt.s rename to tests/tcg/arm/test-arm-iwmmxt.s From patchwork Thu Apr 19 13:58:44 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: 133798 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp706496ljf; Thu, 19 Apr 2018 07:31:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqekH4be6wEaYGzM4FepJEum2QzvyJl1r5NPvCt275GFM3zo48xhN1KVrq3BzxP02i2APp0 X-Received: by 10.55.25.196 with SMTP id 65mr5958007qkz.64.1524148281430; Thu, 19 Apr 2018 07:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148281; cv=none; d=google.com; s=arc-20160816; b=UQEfv8REqodulBrDl5BJcn90toZu2tTnZ2w96yKLPVJVoiDCLuU6OKzxt+cGMxl9Nn yxBSpKMiYi1D4VsUGbZwVa/ZBQ4HBqOG9DBBNSzSvMGzSxC8/UHrvnMmlrPRdrSpjMcI z9ngk0jrSZMUtw5S7Zv4FLX3gx+RfWiIMFTcjDj3k+7EtfL0NGqXfgEAFA+2ffG3APh7 bWNLx1uRBRRcKCvWDi/dt5opuOWoyqt1CBQ8fs6hkMbzQyQlDgucOGGee07BCx6DiyyC XulKIpSRpRNZ8mVxgUYSqYjbNPFAa5DTzn52ISiuQGWbGszJTgqGf4VtpZ3RqjKzdFp4 Md9Q== 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=pj18XZhZR/Qc6G0FNDx9yQSp1u3QyGzeTNKFrokJOwc=; b=kHuagCIXzyY8ipqmZRQkT6Ya9IcrmxW2mgZaehx+81gCUnIf4qL+RpgTxBaNqAbSZ6 EeBAGcNTyQg61h+SyF+fTIX9Fakadt1Z6sJncrGXdjForvWTZGu0Z1JZS1KNaDVrYyo+ vFbKCJx16URMVJ/cyqTnn6hoio8L6Hj8P9ckDuEzgb34ihwrSfBMML54kk/IjuXBrkaw XGZS+H0DjwlEZGDymWTqd0E4i7O3BYNVHpws3G6eZq3djGYQzYdUEuVlWt0J3f5Vo/2b Y1pmP7OKx7KP/rnehMYCdZtdgz68DutdzsuW46SMRhNXJXzbHPbao5/LEW2AZzbERqUk n2KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=E4K6K9QG; 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 n123si4612405qkd.201.2018.04.19.07.31.21 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:31:21 -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=E4K6K9QG; 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]:50856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9Aam-0002tB-JS for patch@linaro.org; Thu, 19 Apr 2018 10:31:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANQ-0004go-F6 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANP-00065m-LJ for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:32 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:43970) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANP-00065P-F9 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:31 -0400 Received: by mail-wr0-x244.google.com with SMTP id u4-v6so14504772wrg.10 for ; Thu, 19 Apr 2018 07:17:31 -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=pj18XZhZR/Qc6G0FNDx9yQSp1u3QyGzeTNKFrokJOwc=; b=E4K6K9QG5CcWiAmTzWjZ8xAPDGCzRpErQdWRTkZl/kEW3VThCHpKz9j0rUwHshveFR C+WwYmlPphqJ//x9OHUQzDxOvctsqO2sbe/0ehU9F8B/Envd7ftZOqrAX0FO1YjUDczW 0z7mx9uvw8vqiZToXjr2Ex5Zq39ij+1ywIfJs= 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=pj18XZhZR/Qc6G0FNDx9yQSp1u3QyGzeTNKFrokJOwc=; b=pbP2m3k8o7u3n3bUChxA9C/K3XoYNt5DFsTipYs6kNwHGh3nQ3DHsTIHtyu9HnRZwL IO9jynr+krPcEeOTnLZ9jQVZoE7p2Da/h1Zk3yfCGLCyxnJ55X8QP1jXPpzFaA0dzpBr d5Dthth5YjiaGvEhfcTotSa76kz4NbyWA0zjExTCEbZw6MPnUmCwaPYD9+cHedA2HT7W +fqnl8g2yVgOAUUSYlwQq3pViBC9BThK94W7MDye/uKaC4q++F448EPfEqPjqcmG0xT+ K7iSPRtKkXp4WhxrlsZ4IezLjKLACWgu9G4cOBP5aAiw29YTY3wNhMqlaKj3ng7xaz76 6Otw== X-Gm-Message-State: ALQs6tC1heD6T/5WMWoia8XP8Lm7THq0jjB51n2rg31zIBnx6V6Ez+EF 0ah49tfF8QipzBN8HT4jh/hk8A== X-Received: by 10.28.114.9 with SMTP id n9mr4477686wmc.147.1524147450336; Thu, 19 Apr 2018 07:17:30 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o12-v6sm1662633wri.78.2018.04.19.07.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:25 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 781853E055F; 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:44 +0100 Message-Id: <20180419135901.30035-27-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::244 Subject: [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test 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" We need to rename the source file to a .S so we can do a single-line assemble and link invocation. We also specify the additional CFLAGS for the compile as it's a non-standard ARM binary. Signed-off-by: Alex Bennée --- tests/tcg/arm/Makefile.target | 5 +++++ tests/tcg/arm/{test-arm-iwmmxt.s => test-arm-iwmmxt.S} | 0 2 files changed, 5 insertions(+) rename tests/tcg/arm/{test-arm-iwmmxt.s => test-arm-iwmmxt.S} (100%) -- 2.17.0 diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index bc6962ecc6..be9d3fb4a1 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -8,6 +8,11 @@ ARM_SRC=$(SRC_PATH)/tests/tcg/arm # Set search path for all sources VPATH += $(ARM_SRC) +TESTS += hello-arm test-arm-iwmmxt hello-arm: CFLAGS+=-marm -ffreestanding hello-arm: LDFLAGS+=-nostdlib + +test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs +test-arm-iwmmxt: test-arm-iwmmxt.S + $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) diff --git a/tests/tcg/arm/test-arm-iwmmxt.s b/tests/tcg/arm/test-arm-iwmmxt.S similarity index 100% rename from tests/tcg/arm/test-arm-iwmmxt.s rename to tests/tcg/arm/test-arm-iwmmxt.S From patchwork Thu Apr 19 13:58:45 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: 133782 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp689890ljf; Thu, 19 Apr 2018 07:15:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx48eWIrEqCtfrXvsoWxBKFQf4EGofiQqGB5qk/jzHXb1uGeaJn3rwxKSmUwBeS8U4ltv/HpG X-Received: by 2002:ac8:321a:: with SMTP id x26-v6mr6212341qta.130.1524147339982; Thu, 19 Apr 2018 07:15:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147339; cv=none; d=google.com; s=arc-20160816; b=sqi4k/RSEZWVbOPb7w+vLMeFt2bNZxadvHX0yUgTtHB+yqJhRkpTLxARkdqnU3/J/r 9+Ctk5/xH6tX7P0MlCePUoqQcdBb0fb5hZf9JJc15owq3MRwfM3DsmClkMuNaRMJfR5S dHlSuoSH+QJG3plEtKnf3tEMbeX/JuvEaBSVbI7we71S8p0IlVDG8/goO6q52DIBoFxE OIQ7YZbrXp6hkbpNmprewZpsyIW1XLWeO6wPWZxFIy/EYGkrljmdJ7SOxJ/JYZEZ047u h3F7wmgs3THvjBkL+Fhk7HVqiT5yC1CrJZ1vwPwYF4q8kOOQTV/bR+uUSatqnhvDYdC4 JFXA== 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=gNLVzucu4VwedbANj/UcP6keX1N6ceHAqN5yFr0ldfs=; b=pc7nYXkWkza3cowv5hqLj/OdkyjyV5Z5VKaxXKqXwOyohsmwWVVPLIdoL5kJFuyA64 zSKsTYX1l39YD2HcBdfXBA2/QtklB5LK+kLpZIi3UjrAF5+SDxUI6io7CKlH2Q5naRZB AH8JQrdbJww2YptiD47qj898pvCwRoL6GGiT1HWZqUb5FKTqfMSba/L5AbltM+aw+AgT bxTjFLppMf17pOsJXkAQuovPHvUVwdshlcX8nYsH4JmkFlHO85IYY129rlem2dNPuaVo CgNu31X+I+BEEAIZd4ne0lqWkZ2m+bEuO7iPYQF2vm/ktPhPg9SZ/BEkw0creVF5wvjx Bngw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ddzqzfGe; 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 g4si4680213qkm.163.2018.04.19.07.15.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:15:39 -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=ddzqzfGe; 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]:50189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ALb-0002nV-AT for patch@linaro.org; Thu, 19 Apr 2018 10:15:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADm-0004NM-0O for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADk-0004rB-T4 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:33 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:42305) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADk-0004nC-If for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:32 -0400 Received: by mail-wr0-x242.google.com with SMTP id s18-v6so14410189wrg.9 for ; Thu, 19 Apr 2018 07:07:32 -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=gNLVzucu4VwedbANj/UcP6keX1N6ceHAqN5yFr0ldfs=; b=ddzqzfGeTBp1jNo462DUg5FlJM2tNBM7bprbEvfcIyM+A50DXeG/d584H1aBDteUFC 6P+8boVPYSPiAlDvATgBemGyhI2ChMeZOO+uCKB/UBdL3Z/NXrwqLaho0BWEVGUz58F9 yGA7M2120tEVOaxSxNA2UNEGRiJEt+Id80zQY= 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=gNLVzucu4VwedbANj/UcP6keX1N6ceHAqN5yFr0ldfs=; b=GJ5G8XNqVdBplV03qd9n8rqDyE7eruqFjkJiXTrxhrn82cgOENfU83kAxxQtdaPMYI IGvnsbCDZj9qx08M3+Xs7MRiRNthlWhSepAWQPbEH7bZjTIfHJI55/RFQzaqoGXGejEl QwDYr42xNAL8JGLn7WORArPkImLTzpqZqju1tKkL3mK2g5dgLHAvLEzGQZh7pOlaGoZW W1/O8KWWJ4+wTWFLY1DKPY4e0JYf9fihT+d/I4Ie35n+I7aILHIbKj+Af+aDtqpIdz1D zvsQHgJWxsqkoYmIXWyNyRtDE5RUaoq1+MjmRoJRNTmiHgXGRtj+NzojO2Zy+Ur5cpTy vF4w== X-Gm-Message-State: ALQs6tChz1PG0bH7QK+eIcdbLbLeL2cHpWNeiOD/PK18Ye5IQGygO4Sx EPBcjccd/cEbamgaExmmhpX5XA== X-Received: by 10.28.173.4 with SMTP id w4mr4899494wme.54.1524146851486; Thu, 19 Apr 2018 07:07:31 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j21-v6sm5281206wrb.49.2018.04.19.07.07.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 88AB83E05CE; 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:45 +0100 Message-Id: <20180419135901.30035-28-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::242 Subject: [Qemu-devel] [PATCH v2 27/43] tests/tcg/aarch64: add Makefile.target 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" Nothing much here yet. Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.target | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/tcg/aarch64/Makefile.target -- 2.17.0 diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target new file mode 100644 index 0000000000..4ac8fbe73f --- /dev/null +++ b/tests/tcg/aarch64/Makefile.target @@ -0,0 +1,5 @@ +# -*- Mode: makefile -*- +# +# AArch64 specific tweaks + +fcvt: LDFLAGS+=-lm From patchwork Thu Apr 19 13:58:46 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: 133801 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp709126ljf; Thu, 19 Apr 2018 07:33:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoo1kMbRPWbTguWhwFULrUtJurO+OusgtwLwkrNRPl+vDir1PtQxzDQouVXnvoomCOfkBZ2 X-Received: by 10.12.135.180 with SMTP id 49mr1067136qvj.217.1524148422791; Thu, 19 Apr 2018 07:33:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148422; cv=none; d=google.com; s=arc-20160816; b=muGoBIStLsN9hRDvamK0vKt+ejiLcnS275n0cuBwgR13ibrB+iJDzxnqGMtC3ggqn5 8T/DCbz9aRc7ayVAYQBx6vqcPbLwVHraDoO4xljnW9Zh2ErMCv6o4I51RYfxStJ5H9ya 6EiviMisNT4RUGxfmRUgNepTz+Cg8JMKW5+bGT4dXCDo0X7bHc2fIzgprtMIrgxwLhI2 UV0fkVgrRWiCtIUZ1w5f2K4+/y76hPJMd7WVzV94wpH3AJjdUB+5yXe/4aYZ7h9Qmlr7 om3vWpFqIcpWkOpXJsZIn65RXVbB4pOWxO5EUcdYkjSLceEEB0I8aGJdfbVnnolQwq13 P5fw== 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=wDa+1OvPqvIGn3OtE5JrsRTXBLfWbyx5z+QlV4Vb/rM=; b=JPPQxNp6tjaDktdjquty3SzwWXn2tlGGfPUpzZw8ZoAmO0aizmzo/XKkruw583/sh4 jugzu8Q9B4UHe5+Lz3Uc64fhV1jZvcPVNHPuwmtZ5ZBt+uKQymmBX1iC+Ttd71ooHY8m 4Q9grcFPH0lnVTMhjQAu0n5IYAipxU5ZWnHGxVtGV7yd4jPY5812H9nROAlMIWTQk183 cFRRws7gvvhlM+HtGqFitNpv1YEpvmsxuyKr4pDyTNORO6CQZsKoP6GfSCsjk8DJSvWd B/j4fycofEexklHGfW2wfoPxS3pvqa3uBh1ytAZKx3hG+1CTtUkHJxkYUt+gntE8uPe3 HZEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eJU+HGjR; 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 f64si4733036qka.61.2018.04.19.07.33.42 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:33:42 -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=eJU+HGjR; 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]:50921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9Ad1-0004bY-30 for patch@linaro.org; Thu, 19 Apr 2018 10:33:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AE0-0004jG-Ql for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADl-0004sm-6F for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:48 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:37701) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADk-0004nF-Ib for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:33 -0400 Received: by mail-wr0-x243.google.com with SMTP id f14-v6so14431610wre.4 for ; Thu, 19 Apr 2018 07:07:32 -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=wDa+1OvPqvIGn3OtE5JrsRTXBLfWbyx5z+QlV4Vb/rM=; b=eJU+HGjRO0oy6chN6SS35pRkuhy2wdb2azHaLpy5cdiaHdIqSyF214tSx3Ht3BeWTX ntxKZU9zgX7PNzVDm1YVf71daFg0/z00GWucIfcvFtr15B6hmnnJtYFB9oC74LyjXdMw p/TKLJTCq38lDKMR5Umz4J92hqcbZDSwRn25o= 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=wDa+1OvPqvIGn3OtE5JrsRTXBLfWbyx5z+QlV4Vb/rM=; b=ik/YDEau9p+UdZ8r04hW1ueYwbN+D+e6nNYdPORUTp+gB+Oi4S34WRGwaqzNQ5JMMX Y36XwsixpxDoY4myPteyWWVN2WkVB31OOyW9F2VVRA4Mga4zcdP1y/w5OPlLs/L/MtSz NrGJj6QKgE1rDCurgZC0SJtQJfd15Beft4Zwmppys1ZuQnQ0ITjKZ27o2JUrPpWgLlxs C0qdUpVMcuaezBCEVoHVM5sOUSbSIgIKXyzhtOjdFxUxrT+kHPRl+diyar7nsPvO1vQE gKKg5jKpnS8NKyM/XOdKt9kYa+9gB3eS0IrU7vf2HX19V7kr9/cSpgwiH85LdK4n1kmo b9RA== X-Gm-Message-State: ALQs6tBMxAz0yU7aiUCBCa8K6xZ0nv0XfBrQ4bQN2WW8RgaTQpIBE55o tItN6imqVqY8yuTLlK8Ezjhy7g== X-Received: by 2002:adf:c908:: with SMTP id m8-v6mr3949660wrh.6.1524146850255; Thu, 19 Apr 2018 07:07:30 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m83sm4676364wma.17.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 A12393E0618; 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:46 +0100 Message-Id: <20180419135901.30035-29-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 28/43] tests/tcg/aarch64: add fcvt test cases for AArch64 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" This runs through the usual float to float conversions and crucially also runs with ARM Alternative Half Precision Format. Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.target | 8 + tests/tcg/aarch64/fcvt.c | 260 ++++++ tests/tcg/aarch64/fcvt.out | 1305 +++++++++++++++++++++++++++++ tests/tcg/arm/Makefile.target | 4 +- 4 files changed, 1576 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/aarch64/fcvt.c create mode 100644 tests/tcg/aarch64/fcvt.out -- 2.17.0 diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 4ac8fbe73f..26be1c58ef 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -2,4 +2,12 @@ # # AArch64 specific tweaks +AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64 +VPATH += $(AARCH64_SRC) + +# we don't build any of the ARM tests +AARCH64_TESTS=$(filter-out $(ARM_TESTS), $(TESTS)) +AARCH64_TESTS+=fcvt +TESTS:=$(AARCH64_TESTS) + fcvt: LDFLAGS+=-lm diff --git a/tests/tcg/aarch64/fcvt.c b/tests/tcg/aarch64/fcvt.c new file mode 100644 index 0000000000..e8d322e0bd --- /dev/null +++ b/tests/tcg/aarch64/fcvt.c @@ -0,0 +1,260 @@ +/* + * Test Floating Point Conversion + */ + +#include +#include +#include +#include +#include + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +static char flag_str[256]; + +static char *get_flag_state(int flags) +{ + if (flags) { + snprintf(flag_str, sizeof(flag_str), "%s %s %s %s %s", + flags & FE_OVERFLOW ? "OVERFLOW" : "", + flags & FE_UNDERFLOW ? "UNDERFLOW" : "", + flags & FE_DIVBYZERO ? "DIV0" : "", + flags & FE_INEXACT ? "INEXACT" : "", + flags & FE_INVALID ? "INVALID" : ""); + } else { + snprintf(flag_str, sizeof(flag_str), "OK"); + } + + return flag_str; +} + +static void print_double_number(int i, double num) +{ + uint64_t double_as_hex = *(uint64_t *) # + int flags = fetestexcept(FE_ALL_EXCEPT); + char *fstr = get_flag_state(flags); + + printf("%02d DOUBLE: %02.20e / %#020lx (%#x => %s)\n", + i, num, double_as_hex, flags, fstr); +} + +static void print_single_number(int i, float num) +{ + uint32_t single_as_hex = *(uint32_t *) # + int flags = fetestexcept(FE_ALL_EXCEPT); + char *fstr = get_flag_state(flags); + + printf("%02d SINGLE: %02.20e / %#010x (%#x => %s)\n", + i, num, single_as_hex, flags, fstr); +} + +static void print_half_number(int i, uint16_t num) +{ + int flags = fetestexcept(FE_ALL_EXCEPT); + char *fstr = get_flag_state(flags); + + printf("%02d HALF: %#04x (%#x => %s)\n", + i, num, flags, fstr); +} + +float single_numbers[] = { -FLT_MAX, -FLT_MIN, + 0.0, + FLT_MIN, + 1.0, 2.0, + M_E, M_PI, + 0x9EA82A22, + 0xAB98FBA8, + FLT_MAX }; + +static void convert_single_to_half(void) +{ + int i; + + printf("Converting single-precision to half-precision\n"); + + for (i = 0; i < ARRAY_SIZE(single_numbers); ++i) { + float input = single_numbers[i]; + uint16_t output; + + feclearexcept(FE_ALL_EXCEPT); + + print_single_number(i, input); + asm("fcvt %h0, %d1" : "=w" (output) : "x" (input)); + print_half_number(i, output); + } +} + +static void convert_single_to_double(void) +{ + int i; + + printf("Converting single-precision to double-precision\n"); + + for (i = 0; i < ARRAY_SIZE(single_numbers); ++i) { + float input = single_numbers[i]; + uint64_t output; + + feclearexcept(FE_ALL_EXCEPT); + + print_single_number(i, input); + asm("fcvt %h0, %d1" : "=w" (output) : "x" (input)); + print_double_number(i, output); + } +} + +double double_numbers[] = { -DBL_MAX, + -2.0, -1.0, + -DBL_MIN, + 0.0, + DBL_MIN, + 1.0, 2.0, + M_E, M_PI, + 0x9EA82A2287680UL, + 0xAB98FBA843210UL, + DBL_MAX }; + +static void convert_double_to_half(void) +{ + int i; + + printf("Converting double-precision to half-precision\n"); + + for (i = 0; i < ARRAY_SIZE(single_numbers); ++i) { + double input = double_numbers[i]; + uint16_t output; + + feclearexcept(FE_ALL_EXCEPT); + + print_double_number(i, input); + + /* as we don't have _Float16 support */ + asm("fcvt %h0, %d1" : "=w" (output) : "x" (input)); + print_half_number(i, output); + } +} + +static void convert_double_to_single(void) +{ + int i; + + printf("Converting double-precision to single-precision\n"); + + for (i = 0; i < ARRAY_SIZE(single_numbers); ++i) { + double input = double_numbers[i]; + uint32_t output; + + feclearexcept(FE_ALL_EXCEPT); + + print_double_number(i, input); + + asm("fcvt %s0, %d1" : "=w" (output) : "x" (input)); + + print_single_number(i, output); + } +} + +/* no handy defines for these numbers */ +uint16_t half_numbers[] = { + 0xffff, /* -NaN / AHP -Max */ + 0xfcff, /* -NaN / AHP */ + 0xfc01, /* -NaN / AHP */ + 0xfc00, /* -Inf */ + 0xfbff, /* -Max */ + 0xc000, /* -2 */ + 0xbc00, /* -1 */ + 0x8001, /* -MIN subnormal */ + 0x8000, /* -0 */ + 0x0000, /* +0 */ + 0x0001, /* MIN subnormal */ + 0x3c00, /* 1 */ + 0x7bff, /* Max */ + 0x7c00, /* Inf */ + 0x7c01, /* NaN / AHP */ + 0x7cff, /* NaN / AHP */ + 0x7fff, /* NaN / AHP +Max*/ +}; + +static void convert_half_to_double(void) +{ + int i; + + printf("Converting half-precision to double-precision\n"); + + for (i = 0; i < ARRAY_SIZE(half_numbers); ++i) { + uint16_t input = half_numbers[i]; + double output; + + feclearexcept(FE_ALL_EXCEPT); + + print_half_number(i, input); + asm("fcvt %d0, %h1" : "=w" (output) : "x" (input)); + print_double_number(i, output); + } +} + +static void convert_half_to_single(void) +{ + int i; + + printf("Converting half-precision to single-precision\n"); + + for (i = 0; i < ARRAY_SIZE(half_numbers); ++i) { + uint16_t input = half_numbers[i]; + float output; + + feclearexcept(FE_ALL_EXCEPT); + + print_half_number(i, input); + asm("fcvt %s0, %h1" : "=w" (output) : "x" (input)); + print_single_number(i, output); + } +} + +typedef struct { + int flag; + char *desc; +} float_mapping; + +float_mapping round_flags[] = { + { FE_TONEAREST, "to nearest" }, + { FE_UPWARD, "upwards" }, + { FE_DOWNWARD, "downwards" }, + { FE_TOWARDZERO, "to zero" } +}; + +int main(int argc, char *argv[argc]) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(round_flags); ++i) { + fesetround(round_flags[i].flag); + printf("### Rounding %s\n", round_flags[i].desc); + convert_single_to_half(); + convert_single_to_double(); + convert_double_to_half(); + convert_double_to_single(); + convert_half_to_single(); + convert_half_to_double(); + } + + /* And now with ARM alternative FP16 */ + asm("msr fpsr, x1\n\t" + "orr x1, x1, %[flags]\n\t" + "mrs x1, fpsr\n\t" + : /* no output */ : [flags] "n" (1 << 26) : "x1" ); + + printf("#### Enabling ARM Alternative Half Precision\n"); + + for (i = 0; i < ARRAY_SIZE(round_flags); ++i) { + fesetround(round_flags[i].flag); + printf("### Rounding %s\n", round_flags[i].desc); + convert_single_to_half(); + convert_single_to_double(); + convert_double_to_half(); + convert_double_to_single(); + convert_half_to_single(); + convert_half_to_double(); + } + + return 0; +} diff --git a/tests/tcg/aarch64/fcvt.out b/tests/tcg/aarch64/fcvt.out new file mode 100644 index 0000000000..48e62ac955 --- /dev/null +++ b/tests/tcg/aarch64/fcvt.out @@ -0,0 +1,1305 @@ +### Rounding to nearest +Converting single-precision to half-precision +00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) +00 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) +01 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 HALF: 0000000000 (0 => OK) +03 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) +03 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0 => OK) +07 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) +10 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +Converting single-precision to double-precision +00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) +00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) +01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +03 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) +03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0 => OK) +07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) +10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +Converting double-precision to half-precision +00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) +00 HALF: 0x0000fc00 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 HALF: 0x0000c000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 HALF: 0x0000bc00 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 HALF: 0x00008000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 HALF: 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 HALF: 0x00003c00 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 HALF: 0x00004000 (0 => OK) +08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) +08 HALF: 0x00004170 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) +09 HALF: 0x00004248 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 HALF: 0x00007c00 (0x14 => OVERFLOW INEXACT ) +Converting double-precision to single-precision +00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) +00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) +08 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) +09 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50 (0x10 => INEXACT ) +Converting half-precision to single-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +Converting half-precision to double-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +### Rounding upwards +Converting single-precision to half-precision +00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) +00 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) +01 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 HALF: 0000000000 (0 => OK) +03 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) +03 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0 => OK) +07 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) +10 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +Converting single-precision to double-precision +00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) +00 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) +01 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +03 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) +03 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0 => OK) +07 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) +10 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +Converting double-precision to half-precision +00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) +00 HALF: 0x0000fbff (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 HALF: 0x0000c000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 HALF: 0x0000bc00 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 HALF: 0x00008000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 HALF: 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000 (0 => OK) +05 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 HALF: 0x00003c00 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 HALF: 0x00004000 (0 => OK) +08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) +08 HALF: 0x00004170 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) +09 HALF: 0x00004249 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 HALF: 0x00007c00 (0x14 => OVERFLOW INEXACT ) +Converting double-precision to single-precision +00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) +00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000 (0 => OK) +05 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) +08 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) +09 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 SINGLE: 1.49518144000000000000e+09 / 0x4eb23d51 (0x10 => INEXACT ) +Converting half-precision to single-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +Converting half-precision to double-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +### Rounding downwards +Converting single-precision to half-precision +00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) +00 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) +01 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 HALF: 0000000000 (0 => OK) +03 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) +03 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb (0 => OK) +07 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) +10 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +Converting single-precision to double-precision +00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) +00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) +01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +03 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) +03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb (0 => OK) +07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) +10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +Converting double-precision to half-precision +00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) +00 HALF: 0x0000fc00 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 HALF: 0x0000c000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 HALF: 0x0000bc00 (0 => OK) +03 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000 (0 => OK) +03 HALF: 0x00008001 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 HALF: 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 HALF: 0x00003c00 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 HALF: 0x00004000 (0 => OK) +08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) +08 HALF: 0x0000416f (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) +09 HALF: 0x00004248 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 HALF: 0x00007bff (0x14 => OVERFLOW INEXACT ) +Converting double-precision to single-precision +00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) +00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +03 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000 (0 => OK) +03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) +08 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) +09 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50 (0x10 => INEXACT ) +Converting half-precision to single-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +Converting half-precision to double-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +### Rounding to zero +Converting single-precision to half-precision +00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) +00 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) +01 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 HALF: 0000000000 (0 => OK) +03 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) +03 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb (0 => OK) +07 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) +10 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +Converting single-precision to double-precision +00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) +00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) +01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +03 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) +03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb (0 => OK) +07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) +10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +Converting double-precision to half-precision +00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) +00 HALF: 0x0000fbff (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 HALF: 0x0000c000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 HALF: 0x0000bc00 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 HALF: 0x00008000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 HALF: 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 HALF: 0x00003c00 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 HALF: 0x00004000 (0 => OK) +08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) +08 HALF: 0x0000416f (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) +09 HALF: 0x00004248 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 HALF: 0x00007bff (0x14 => OVERFLOW INEXACT ) +Converting double-precision to single-precision +00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) +00 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) +08 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) +09 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50 (0x10 => INEXACT ) +Converting half-precision to single-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +Converting half-precision to double-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +#### Enabling ARM Alternative Half Precision +### Rounding to nearest +Converting single-precision to half-precision +00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) +00 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) +01 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 HALF: 0000000000 (0 => OK) +03 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) +03 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0 => OK) +07 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) +10 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +Converting single-precision to double-precision +00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) +00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) +01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +03 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) +03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0 => OK) +07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) +10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +Converting double-precision to half-precision +00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) +00 HALF: 0x0000fc00 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 HALF: 0x0000c000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 HALF: 0x0000bc00 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 HALF: 0x00008000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 HALF: 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 HALF: 0x00003c00 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 HALF: 0x00004000 (0 => OK) +08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) +08 HALF: 0x00004170 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) +09 HALF: 0x00004248 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 HALF: 0x00007c00 (0x14 => OVERFLOW INEXACT ) +Converting double-precision to single-precision +00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) +00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) +08 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) +09 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50 (0x10 => INEXACT ) +Converting half-precision to single-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +Converting half-precision to double-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +### Rounding upwards +Converting single-precision to half-precision +00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) +00 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) +01 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 HALF: 0000000000 (0 => OK) +03 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) +03 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0 => OK) +07 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) +10 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +Converting single-precision to double-precision +00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) +00 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) +01 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +03 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) +03 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0 => OK) +07 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) +10 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0x18 => UNDERFLOW INEXACT ) +Converting double-precision to half-precision +00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) +00 HALF: 0x0000fbff (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 HALF: 0x0000c000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 HALF: 0x0000bc00 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 HALF: 0x00008000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 HALF: 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000 (0 => OK) +05 HALF: 0x00000001 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 HALF: 0x00003c00 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 HALF: 0x00004000 (0 => OK) +08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) +08 HALF: 0x00004170 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) +09 HALF: 0x00004249 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 HALF: 0x00007c00 (0x14 => OVERFLOW INEXACT ) +Converting double-precision to single-precision +00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) +00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000 (0 => OK) +05 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) +08 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) +09 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 SINGLE: 1.49518144000000000000e+09 / 0x4eb23d51 (0x10 => INEXACT ) +Converting half-precision to single-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +Converting half-precision to double-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +### Rounding downwards +Converting single-precision to half-precision +00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) +00 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) +01 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 HALF: 0000000000 (0 => OK) +03 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) +03 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb (0 => OK) +07 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) +10 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +Converting single-precision to double-precision +00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) +00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) +01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +03 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) +03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb (0 => OK) +07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) +10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +Converting double-precision to half-precision +00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) +00 HALF: 0x0000fc00 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 HALF: 0x0000c000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 HALF: 0x0000bc00 (0 => OK) +03 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000 (0 => OK) +03 HALF: 0x00008001 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 HALF: 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 HALF: 0x00003c00 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 HALF: 0x00004000 (0 => OK) +08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) +08 HALF: 0x0000416f (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) +09 HALF: 0x00004248 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 HALF: 0x00007bff (0x14 => OVERFLOW INEXACT ) +Converting double-precision to single-precision +00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) +00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +03 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000 (0 => OK) +03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) +08 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) +09 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50 (0x10 => INEXACT ) +Converting half-precision to single-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +Converting half-precision to double-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +### Rounding to zero +Converting single-precision to half-precision +00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) +00 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) +01 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 HALF: 0000000000 (0 => OK) +03 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) +03 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb (0 => OK) +07 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) +10 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +Converting single-precision to double-precision +00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) +00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +01 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) +01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +02 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +03 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) +03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +05 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) +05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +06 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0 => OK) +06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb (0 => OK) +07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a (0 => OK) +08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) +10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0x18 => UNDERFLOW INEXACT ) +Converting double-precision to half-precision +00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) +00 HALF: 0x0000fbff (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 HALF: 0x0000c000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 HALF: 0x0000bc00 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 HALF: 0x00008000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 HALF: 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 HALF: 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 HALF: 0x00003c00 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 HALF: 0x00004000 (0 => OK) +08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) +08 HALF: 0x0000416f (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) +09 HALF: 0x00004248 (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 HALF: 0x00007bff (0x14 => OVERFLOW INEXACT ) +Converting double-precision to single-precision +00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) +00 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x14 => OVERFLOW INEXACT ) +01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) +03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +04 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) +05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) +05 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) +06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) +07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) +08 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) +09 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00 (0 => OK) +10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50 (0x10 => INEXACT ) +Converting half-precision to single-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) +Converting half-precision to double-precision +00 HALF: 0x0000ffff (0 => OK) +00 DOUBLE: -nan / 0x00fffffc0000000000 (0 => OK) +01 HALF: 0x0000fcff (0 => OK) +01 DOUBLE: -nan / 0x00fffbfc0000000000 (0x1 => INVALID) +02 HALF: 0x0000fc01 (0 => OK) +02 DOUBLE: -nan / 0x00fff8040000000000 (0x1 => INVALID) +03 HALF: 0x0000fc00 (0 => OK) +03 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) +04 HALF: 0x0000fbff (0 => OK) +04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000 (0 => OK) +05 HALF: 0x0000c000 (0 => OK) +05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) +06 HALF: 0x0000bc00 (0 => OK) +06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) +07 HALF: 0x00008001 (0 => OK) +07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000 (0 => OK) +08 HALF: 0x00008000 (0 => OK) +08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000 (0 => OK) +09 HALF: 0000000000 (0 => OK) +09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) +10 HALF: 0x00000001 (0 => OK) +10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000 (0 => OK) +11 HALF: 0x00003c00 (0 => OK) +11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) +12 HALF: 0x00007bff (0 => OK) +12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) +13 HALF: 0x00007c00 (0 => OK) +13 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) +14 HALF: 0x00007c01 (0 => OK) +14 DOUBLE: nan / 0x007ff8040000000000 (0x1 => INVALID) +15 HALF: 0x00007cff (0 => OK) +15 DOUBLE: nan / 0x007ffbfc0000000000 (0x1 => INVALID) +16 HALF: 0x00007fff (0 => OK) +16 DOUBLE: nan / 0x007ffffc0000000000 (0 => OK) diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index be9d3fb4a1..f1c7ec46b5 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -8,7 +8,9 @@ ARM_SRC=$(SRC_PATH)/tests/tcg/arm # Set search path for all sources VPATH += $(ARM_SRC) -TESTS += hello-arm test-arm-iwmmxt +ARM_TESTS=hello-arm test-arm-iwmmxt + +TESTS += $(ARM_TESTS) hello-arm: CFLAGS+=-marm -ffreestanding hello-arm: LDFLAGS+=-nostdlib From patchwork Thu Apr 19 13:58:47 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: 133802 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp709339ljf; Thu, 19 Apr 2018 07:33:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+s1/dOzdYe1oKgKm9xyS4CpRl2O/j5fU+eIxgyyLh2GuqTUihV1KOAE9TSV9gPBu4gzrWO X-Received: by 2002:aed:3741:: with SMTP id i59-v6mr6299597qtb.172.1524148437953; Thu, 19 Apr 2018 07:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148437; cv=none; d=google.com; s=arc-20160816; b=qF2558A+NRaYT+vI4AysiVsfI8ePQRUcM7vFD1o1nFRLqF6UDwWDcXZLoYDNuJVK9q wKC/iHWpdbn6eSGQwcC9W4xhBl81hDue4RoEmrYSjPQYae7QBO3pk9I6lzpUumIamcQQ Hsl0WHVVddILkPuPWdWKGvJDgn2RF+ku3LuZbSj5AFoEJ3eFVhF0jBJdYghkQOBUSyaz RzpBt5SUQry8VNVnv8zMEUxQLnkao4boNXUEAYoDutuv1ZeHLy9CN9nW7HDBIlRbhPb3 jixIziy9xvbks+o1/xBPf/dDzgbeKAws19Qjxs7fhv5HGabxnpQLEQYnRdxaJdNDXRHI tjCg== 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=JY06l5DWxdJxKT634AuNPykbRw/99mm1S+tOMirFWWw=; b=wbvLmO2FvHPByPVpTH3RCJTL8abJD+87TPtZM11kV7nqzxqNTPmdrF3SoZMYq3ZH1d 3u7w0oJu0nhY0hycKIBPmI45RrN+uVvfnHsPEDLhz+ilm8pnigyX4IwWIWRmLSdAaS+w iUVWkkK1P8wQP6gLAYR4DG3n8reWPQFDNfKFaUyH9zBvaMcuBNNtnrjKbM/iVcxmI8P0 lbCs3w5EyNBQNFhBQTLYCktqUV1+SRGupIMYNg/Vhku84Ktj7j1iXGsPNnNLXwecT0zk 0pZcs962ptH+riKbRyPhIRqtA3ZJF4GBzgtKT0tYmlQF9UuaP8XFNNfg/9q441d9F95K n4Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hkY8zpPn; 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 i62si1046117qkf.319.2018.04.19.07.33.57 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:33:57 -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=hkY8zpPn; 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]:50920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AdJ-0004RO-AY for patch@linaro.org; Thu, 19 Apr 2018 10:33:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADx-0004df-TD for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADt-0005NA-DE for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:45 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:43740) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADt-0005LH-47 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:41 -0400 Received: by mail-wr0-x244.google.com with SMTP id u4-v6so14413631wrg.10 for ; Thu, 19 Apr 2018 07:07:41 -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=JY06l5DWxdJxKT634AuNPykbRw/99mm1S+tOMirFWWw=; b=hkY8zpPniSAaVN5PQa17OPqgdGkQBknWPTUjwd369McqUYUQuDkPvwLlesrPZhg2Cc X5JdXx3TGrvrwvwOjJYwicHzuKlcnC9As73wUkTbY++cB7CSwZjG9cjBdzzNrbEkrc/C YunS5tVw2JJbk8Ag0qk/TAnxqvpueL34qGFko= 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=JY06l5DWxdJxKT634AuNPykbRw/99mm1S+tOMirFWWw=; b=j85d1M+K7Wlr7T7jFW/Y0sX3BCwlxkNe6ZhhTYzxMLTAGBsEsXVjl/uYr5n9Ect8hI o1vFte+zENFNsqUS/60QouIyuQijB8mFAPKXKwpl37yHUrgXFCiPzdNa5+jHO38159Cc UKwvYyF26oiXUp0a+En7KBGKbLBqRCJMlZD4TJaZtmjv0XxUtB8cADY6ePeoS5eBpplq FM5Een6wt+J6voWHxjQT+amWEqAMK3AIuDMT8rOHcVQ0/62nBHboly87/mD0TpZuo6jy dpB+HO3SKdeYtQTD8fvKtoljjOuisVXQtmR0ApiRtamJcni0A6YcGbcMxrqUWjPZa/NR Jwzg== X-Gm-Message-State: ALQs6tCKSS9EzhgkmgMYhFGalnEJzYDwdqbWuvmgVOG3Te3OZJL5mMQm 5e90UroWeAaxWfrH/rI56by4Bw== X-Received: by 2002:adf:aac5:: with SMTP id i5-v6mr4574145wrc.16.1524146860134; Thu, 19 Apr 2018 07:07:40 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a139sm5208890wma.43.2018.04.19.07.07.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B61BB3E061C; 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:47 +0100 Message-Id: <20180419135901.30035-30-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::244 Subject: [Qemu-devel] [PATCH v2 29/43] tests/tcg/aarch64: userspace system register test 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" Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.target | 2 +- tests/tcg/aarch64/sysregs.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/aarch64/sysregs.c -- 2.17.0 diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 26be1c58ef..0727bd3bd2 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -7,7 +7,7 @@ VPATH += $(AARCH64_SRC) # we don't build any of the ARM tests AARCH64_TESTS=$(filter-out $(ARM_TESTS), $(TESTS)) -AARCH64_TESTS+=fcvt +AARCH64_TESTS+=fcvt sysregs TESTS:=$(AARCH64_TESTS) fcvt: LDFLAGS+=-lm diff --git a/tests/tcg/aarch64/sysregs.c b/tests/tcg/aarch64/sysregs.c new file mode 100644 index 0000000000..0cd0c42d8c --- /dev/null +++ b/tests/tcg/aarch64/sysregs.c @@ -0,0 +1,14 @@ +#include + +#define get_cpu_reg(id) ({ \ + unsigned long __val; \ + asm("mrs %0, "#id : "=r" (__val)); \ + printf("%-20s: 0x%016lx\n", #id, __val); \ + }) + +int main(void) +{ + get_cpu_reg(cntvct_el0); + get_cpu_reg(cntfrq_el0); + return 0; +} From patchwork Thu Apr 19 13:58:48 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: 133797 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp704747ljf; Thu, 19 Apr 2018 07:29:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx48AwTc9u34HVX1T2rtvwwsXGtYPf9BPcK7DuziYm0A3vESxjYrBUCFqDjqX/A5X3fimMn6v X-Received: by 2002:ac8:1194:: with SMTP id d20-v6mr5940336qtj.400.1524148188884; Thu, 19 Apr 2018 07:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148188; cv=none; d=google.com; s=arc-20160816; b=PRlPqU2df0C2h7sWz6WipQE3JnoiIl+AZo5jJVxgrcQjbOTQjGljmkQUiCTA/s8LmD /NXzW/8SsNlnjrpBx3ZXWskYJHBj3kNVE3W8ko6hbp94PylSc1IVLfaqzkL6lxh1uqka an8/10W3YgcOz4tiCcXTDWSLD0TuHQj9soRHpzry4msKEH2GgWoiGUkw5Q0dQprivdhX aBq9DVB/nXA+kYHYtqL4ob4TAH5F3vLVA4UziZRLL5BHyRkcpmLnUGiXPQqkQfa/8pNs fgIx/wUIWueJTteuD2/5ArVPXiGY7jtEHdj41gAnhxIUIRwG9G+mnSMv+nvpRC4dh1C0 p50w== 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=FYQ82Ou+xEFIXjJj+koAUVqk54LL9OfHKMd9SZja0do=; b=sTKPvBFZs4iRajwdmnHpQCWOSMlFGQjsr36Wbi9Chj6zInUkueKGLjii52LXmfKUiW /7KiSzX1KAnLQ32MxjE7Ar4eI/PvMu7lxlOhNzQEP7iOY/Ku6Hyzp1TWqbzX+TyjtGv8 VO9ozoehZ3oe0PQQsZgyRt7/bcdaGk1NfLV0PPkwUxPloV8RLqYeAN6AhATHE80lwLDF 1KnQpqws+KMLel5a7mQnWrclbIzK3tq7hO1xV98IXGVx/Ea/QnkOMr6BLUxQx/uC5Cu+ AUtWmgn9Gfi1MspwH0eDTVB8RN1eiERUum9X6LIxJSoK0wBlezlR8z9hd2Tkl9P8JfV+ EmMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Bf0q+5C3; 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 m15si218898qkh.376.2018.04.19.07.29.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:29:48 -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=Bf0q+5C3; 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]:50845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AZI-0001bP-9q for patch@linaro.org; Thu, 19 Apr 2018 10:29:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AE1-0004k2-0E for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADw-0005Ry-Tb for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:48 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:46698) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADw-0005QP-NO for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:44 -0400 Received: by mail-wr0-x241.google.com with SMTP id d1-v6so14419559wrj.13 for ; Thu, 19 Apr 2018 07:07:44 -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=FYQ82Ou+xEFIXjJj+koAUVqk54LL9OfHKMd9SZja0do=; b=Bf0q+5C37Yr0KO35ABg9+pwP3a4/6ttewLZdL7eXUQkwqh9bwB8kXtRyX+Ru78LNHN nvugzl+D/JR3SITUzaiXKZ9dTwClKefXOkLIkhg37Hlv+nvpxcQHmVRjY731gKlDGoZ+ puCu4Z1bh6MVNJ9FkFHqdBIbnlFUkquOAwLwA= 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=FYQ82Ou+xEFIXjJj+koAUVqk54LL9OfHKMd9SZja0do=; b=c16cUhBltRaqJDgwDNbJf7bw5+qDIm0bMJKNNx9UzfCfmOKegNyS9RScYFLx51TxHr v0Y8B+eaoGWZ02GSEOOAwrTUDkSdlQZxJAeyfC96IFLY95burIr5VdVj8l36NsyrgOjR NMRoZrgDcxNrPLJfyAFWpD9/zyoUvvbtxcVPuCH6pbkCYhRBOFLaBTjQTAbd5G36wifc 2dbxkY67eXOiv8qRb1uTPtD3JLLtkLuRcIHgPL9mq6xkX3G4ZT+gBg75bkFjwoGrPLPY CJmvngvAZFBmFIH0ECliJ1gG11KJroeqt4qNDq5de2yC3cZxAAiTaybw0lCtb+CLdv3c tpfQ== X-Gm-Message-State: ALQs6tAJf3182o2ZgbqpA//u2s/LaaBb0cwWktqd12z7UEeW0Umx0QlE qVNezbdm7C8bRZzMeS6hVyrklQ== X-Received: by 10.28.236.77 with SMTP id k74mr2617278wmh.154.1524146863646; Thu, 19 Apr 2018 07:07:43 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 103-v6sm3470397wrc.57.2018.04.19.07.07.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:40 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id CA3183E0288; 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:48 +0100 Message-Id: <20180419135901.30035-31-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::241 Subject: [Qemu-devel] [PATCH v2 30/43] tests/tcg: move MIPS specific tests into subdir 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: Yongbok Kim , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These only need to be built for MIPS guests. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/README | 11 ----------- tests/tcg/mips/README | 7 +++++++ tests/tcg/{ => mips}/hello-mips.c | 0 3 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 tests/tcg/mips/README rename tests/tcg/{ => mips}/hello-mips.c (100%) -- 2.17.0 diff --git a/tests/tcg/README b/tests/tcg/README index 625f2326e6..a5643d33e7 100644 --- a/tests/tcg/README +++ b/tests/tcg/README @@ -3,17 +3,6 @@ regression testing. Tests are either multi-arch, meaning they can be built for all guest architectures that support linux-user executable, or they are architecture specific. - - -MIPS -==== - -hello-mips ----------- - -hello-mipsel ------------- - CRIS ==== The testsuite for CRIS is in tests/tcg/cris. You can run it diff --git a/tests/tcg/mips/README b/tests/tcg/mips/README new file mode 100644 index 0000000000..e5bbc58ec5 --- /dev/null +++ b/tests/tcg/mips/README @@ -0,0 +1,7 @@ +MIPS +==== + +hello-mips +---------- + +A very simple inline assembly, write syscall based hello world diff --git a/tests/tcg/hello-mips.c b/tests/tcg/mips/hello-mips.c similarity index 100% rename from tests/tcg/hello-mips.c rename to tests/tcg/mips/hello-mips.c From patchwork Thu Apr 19 13:58:49 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: 133794 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp701760ljf; Thu, 19 Apr 2018 07:26:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrI4+4SQprugZVjLjoa3wq2evAUnM0xvhsmAZrwPHPj+1yGSIUJ+/G1rOeEh4xFS/P6IWRs X-Received: by 10.233.216.67 with SMTP id u64mr5851450qkf.137.1524148001240; Thu, 19 Apr 2018 07:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148001; cv=none; d=google.com; s=arc-20160816; b=YqvJwzFJ8K8IJ3BQMqX5wtbO8n6/Xj1fpIm+zwLzmqordxfjHpuJTxl7Gq4DZPhw30 WxDEcRfEkDe9yFEFtvRdG6IeIgxifR3oOFMG2GBy7Yx+HxWaUs+xy7zeR4eLv7pCOzvb mHtll7jtI2O/+1qv1/zM+lG2RLlYpWN6+/78Y4iquMACy+BDDIsraofioTV7MP1TaXrQ iClxsflA6Sd21b1bezGoPgmXFKnzwoJXj1i/w5sDF/0ncjVe8YKrvd2fBh7MqbDcPOcP DPduqMsDyOWqxn5TOqDLdxzaiNgV7Bq9UgJXsGx+n58M+Gx2g3Fb26Y0w2UYNZ1l5Z/W OVJw== 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=X8Xbwhum6dlx4ntqNogPKvG9PhdVzE/Q/GNWe2E0KL0=; b=b44EDq9qjLNjzioyTh1fS39zUlk8pAIXwuKpVOT/3imS4oTkaTVNQ+kz0YybfoaIoi nQ0hXMVXLgZ81jE2krrSC7Y0oecF97li5XHt9YnZB1UdoM6WK/CLJ5STY1LsMXXv9xkj j5hobTtyWnXWYWKfgkU3+ex9kJQ8owFae/LPOyvoNa5Pi98mYD8LrEc+lge1yUCmS9Hf USBsPONZydirjOpGbJJMCJ0C4WnxaCCu/FwifPdj7FiRelYxOFHViK27TY8H/ESckH2b Yc4CXUzSfpT7AKBNn0epxwb7jsoj3z9BwUR1Nw87R70DFaHJ0k+j3a4AUo+ujYnOQiyv KVhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZEz8gHTb; 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 h34si494096qvc.17.2018.04.19.07.26.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:26:41 -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=ZEz8gHTb; 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]:50747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AWG-0007PU-IL for patch@linaro.org; Thu, 19 Apr 2018 10:26:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AE1-0004kQ-3Q for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADu-0005PK-IV for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:49 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:33673) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADu-0005O5-B7 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:42 -0400 Received: by mail-wr0-x242.google.com with SMTP id z73-v6so14456909wrb.0 for ; Thu, 19 Apr 2018 07:07:42 -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=X8Xbwhum6dlx4ntqNogPKvG9PhdVzE/Q/GNWe2E0KL0=; b=ZEz8gHTb4BEx7HMPO6JHAX8WtSlEuLNMEdP7CNm+LY8yVbP5bUzz8dc+z4W3wXbTZQ Ndinff3Gcpjyt6Jsn1+o0ySiMtEjcVJNIkGyGd7BhOadk+gaANt6dmyh/mEOgTNdWs4q ttV+/h9b/bzE0AHCFdVlAIzgCiYX+/e+ZBoKI= 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=X8Xbwhum6dlx4ntqNogPKvG9PhdVzE/Q/GNWe2E0KL0=; b=M/yFAGzQzezCIkabRFfF9KtHnor2d5xmFACCrRagfXf1Fi/B9m4nAXnmlJNNvp9zLR n3YvZc/4M+wyNNO6MEagRYwZLyGBOeYAXtIvJ+xtJF9PlX/bXEJNubUiQGArBS6jwmdO npczcwQN2WiQeUEm9aQfZi+Ha6bwoDhXXGXkp/kClum0f3Xou1Rr69v3Q0r76/Jcqb/6 4IUE85W0q0iGi1/pq9ONg+4yAv3uHtkPfKz3dKb0UxzPdJfo3QSC1vqCOZBoxq7jThVy 7UtpIH0CVhgrmnv3KA+bK1z6kNTFfQjCLVF1/JVD7MvnGmR1hiCNUBv5kNqIiwkjYs2C WMtQ== X-Gm-Message-State: ALQs6tCNKJ7rONUjpdfLs/WxBT7ELBUI0YJhyuCTNnDd1HDQJMVjLnY1 oIPlHYbh8f9M3sKUw2wbJk6eig== X-Received: by 10.28.234.206 with SMTP id g75mr4624755wmi.76.1524146861358; Thu, 19 Apr 2018 07:07:41 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q81sm5111478wmg.8.2018.04.19.07.07.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:37 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id DC6013E06C8; 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:49 +0100 Message-Id: <20180419135901.30035-32-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::242 Subject: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS 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: Yongbok Kim , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though. Signed-off-by: Alex Bennée --- tests/tcg/mips/Makefile.include | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/tcg/mips/Makefile.include -- 2.17.0 diff --git a/tests/tcg/mips/Makefile.include b/tests/tcg/mips/Makefile.include new file mode 100644 index 0000000000..a9beceb623 --- /dev/null +++ b/tests/tcg/mips/Makefile.include @@ -0,0 +1,17 @@ +# +# Makefile.include for all MIPs targets +# +# As Debian doesn't support mip64 in big endian mode the only way to +# build BE is to pass a working cross compiler to ./configure +# + +ifeq ($(TARGET_NAME),mips64el) +DOCKER_IMAGE=debian-mips64el-cross +DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc +else ifeq ($(TARGET_NAME),mipsel) +DOCKER_IMAGE=debian-mipsel-cross +DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc +else ifeq ($(TARGET_NAME),mips) +DOCKER_IMAGE=debian-mips-cross +DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc +endif From patchwork Thu Apr 19 13:58:50 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: 133799 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp707819ljf; Thu, 19 Apr 2018 07:32:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqPNWwUOfRA3aAT5iVFoDqdvsUBTR9E/QfYvQJ4tfqCkPWEJAQ8Y5q4bBZtTARPQjKVhdFm X-Received: by 10.55.26.89 with SMTP id a86mr6192165qka.426.1524148349869; Thu, 19 Apr 2018 07:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148349; cv=none; d=google.com; s=arc-20160816; b=1Jh0MYqNoFMQM8T9Gl2hTAk/UwFeUcGR5dpljUJwvFGKa09Ff1JQPOb1Q44VDJ942R bgmu+WKr7jNM+1n+ZW7/PEfQoKlperSCub0HvNdty2cfx7M7+q4JZTRP2YziggRSGXC2 sAIelVCXh0Xb8shYfWFMdOubv4FqjKt3MpjSn5tlk0jU31/FtOxk3urKx3BpKkm5qgnR Y5Yq/+ZdeJpPaglJVQzjsQMCpZ3MSfSg8Z4D/nikqY62zb+1xViRa4uH0KfbParCZaEa K/o+AGZdSz8XR1f8POjFOBrUEN4jibb8QP56l0xTU3pm3WXaNC73f5yR1slF/zwOEQYt 6aPw== 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=nx//1SQIIgve3wOxKqmziA6EGm0HC/aHdmx0NchGyQE=; b=GoRYdZiy0Tmz5InB2KWf6NdbjgddH1v1KcCmIee4MhxzzvxouAcmPoY9q5uSna7ILW vQEv+td9yC+d5YSR7y/e27RdyefOAdwjFUCUPQnnciSYuiIWkQ5NyKyHVq+k92vJKJQz w6r6mPXZV0/X3kAAtVXVZm1WbADuEil8HEhmswDRF9OSFuI3ZbyWlW7qHMt/ht69IP5j qnROkRpoonVxjj2jVMa0hqWBDSN3TdvjdOptrQyzdBD2I+9zKoN7CtpcTC1x28JKgv26 hQr5/b9+cSbvUouo31xUbTuMbqeJGaXm3O2cm2/w3GI117kyPMcBOIsZWb/qaYL1stWM JsCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RhX2iuDi; 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 j68si5631804qkj.221.2018.04.19.07.32.29 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:32:29 -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=RhX2iuDi; 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]:50916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9Abt-0003i9-0H for patch@linaro.org; Thu, 19 Apr 2018 10:32:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANX-0004mS-FU for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANR-00066H-20 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:38 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:38510) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANQ-000660-RH for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:32 -0400 Received: by mail-wr0-x243.google.com with SMTP id h3-v6so14533572wrh.5 for ; Thu, 19 Apr 2018 07:17:32 -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=nx//1SQIIgve3wOxKqmziA6EGm0HC/aHdmx0NchGyQE=; b=RhX2iuDiVDHpPhDUPnpDaMuIz/UHjqZiMN1GrwEJ6PxLxUcJXFmWjXKbPBmqoKWHOR qHxgZSeuQOx8X1CYxnO9Url50o+jGWW+uBrkh/SV4ts1n0UkLUFMCdLWzYChwxJ0WfsG XfcthWLuyDAGSTTqN/zBzLbeoLpFRI3qew2D4= 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=nx//1SQIIgve3wOxKqmziA6EGm0HC/aHdmx0NchGyQE=; b=aH9z616E90diZfztMlUOmRfpWEL1S0nlQ+ko1ImhF127PilC3+EP2LuukxwXqBoJNn MYvCXM0nAOm6ds2JYwsw4Mp8JI67Qmk/8ulvizWQloewXX//X/ht5rhnUmxccNKQQQT5 /4+E+TS7DPlwsiwQpe2okoA9Qga3fH+U0xnN6x/Lrv8eqOmmiW8Y3F8SWW+5ITvfkHbU 3uZOb2UTpNP0oBdfayZ7Q7vcJy4lRlQbYgSe69GC8Rg+wCa1VpV1khlmn292+Bvm0sUL U4StGZ5jI4TiWQ6YqvUBL3hsDLnbKq+NZu5YBEirxn2H60me64rKhaOxt9a8dwIBA3Qn ajKQ== X-Gm-Message-State: ALQs6tD1ZjfSfxqMUJYTX6s3zrYloSw4E85brqJLJ67gKtGoM0D5zhMn wvHE0hCHodm3+HPHAXw7XOk7mQ== X-Received: by 2002:adf:afe4:: with SMTP id y36-v6mr5156478wrd.107.1524147451856; Thu, 19 Apr 2018 07:17:31 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id e50-v6sm5259213wre.4.2018.04.19.07.17.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id EDF693E0733; 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:50 +0100 Message-Id: <20180419135901.30035-33-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 32/43] tests/tcg/mips: include common mips hello-mips 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: Yongbok Kim , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- tests/tcg/mips/Makefile.target | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/tcg/mips/Makefile.target -- 2.17.0 diff --git a/tests/tcg/mips/Makefile.target b/tests/tcg/mips/Makefile.target new file mode 100644 index 0000000000..71f0c2dd53 --- /dev/null +++ b/tests/tcg/mips/Makefile.target @@ -0,0 +1,19 @@ +# -*- Mode: makefile -*- +# +# MIPS - included from tests/tcg/Makefile.target +# + +MIPS_SRC=$(SRC_PATH)/tests/tcg/mips + +# Set search path for all sources +VPATH += $(MIPS_SRC) + +MIPS_TESTS=hello-mips + +TESTS += $(MIPS_TESTS) + +hello-mips: CFLAGS+=-ffreestanding +hello-mips: LDFLAGS+=-nostdlib + +# For MIPS32 and 64 we have a bunch of extra tests in sub-directories +# however they are intended for system tests. From patchwork Thu Apr 19 13:58:51 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: 133777 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp684085ljf; Thu, 19 Apr 2018 07:10:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqv933tFwxnU16joigwG1NoZBIvfHSk/JAm2BhYmHFaoIx0s4O0MwTdccrDoEoBWyfQwZJT X-Received: by 10.12.179.81 with SMTP id a17mr959036qvf.27.1524147056234; Thu, 19 Apr 2018 07:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147056; cv=none; d=google.com; s=arc-20160816; b=bD09+vSjoRTeKTTM7aOzZJ2b1NkUie4k1N0POxsJCyEW6PHfyQv6iNlK4pTqnYl+n4 f4KZ2EBI3ZLl1BXKdA/xwN5crlm02/bHtV9py2ObS4LD3+ST+29oFOGCu5Si8RbIg+0I vPHOVAU+crCz+xYtkIhmqtEy8TEx+5IUPLYKB2sBSGXoWPvc/Ock/CoxXwymm/I8KMkI P0s521Acu1uNQ26CQ/YmtV7ELWV0FNyxtGI1cPyXOLhYbAzqb4N4XT5dNPzD85Df61Oo Iy5u/qQBrfKrzHdWNUPnKE1sfWmMOf46JhKPKAha6eo0xrz7esi58p7Tn9zQWisdC6SJ wqxg== 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=uOpW0Ygoe3u1mvLzDgI/DRDAABZc8Psn+CJhL4W8FQg=; b=bfNKbZa6Hy4BuKaatJ/OlD7jouXZXo+tn64uiM4CuH+fBmPaym+UCVrk8yc3BHxPjw 5WxuMkHAG7ReyLFkZ/bD+nC9muYz6qyaDr7m2SMuZFQqlrIAghD7XOysgpd4wu5Qswhy xmUrbrQ+psZzir3wc8MnuQbAke/iaSxw7siwHV7i6CoCvrbI4B+FUTfg2LYrlrETN82p 88kRu7/kGu1b8HW00p/44t0zORlWmWaGvdJyj73XOhQy2NA3BqdnRJMJ4Ws4lzlxhLxH yfS5H9A7AAsMYgnVewUJ3WGo8q/WWL/4DR8AgN1SKqGQxvQb2Y5LP185EPOGzQIAgccz HpoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bz8kSiWa; 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 k92si117381qva.87.2018.04.19.07.10.56 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:10:56 -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=bz8kSiWa; 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]:50014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AH1-0007XA-Jd for patch@linaro.org; Thu, 19 Apr 2018 10:10:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADm-0004Nu-FI for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADg-0004hz-Fs for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:34 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:33669) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADg-0004g8-9m for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:28 -0400 Received: by mail-wr0-x244.google.com with SMTP id z73-v6so14454785wrb.0 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=uOpW0Ygoe3u1mvLzDgI/DRDAABZc8Psn+CJhL4W8FQg=; b=bz8kSiWakX0xQhgrjbn45B/kYfAQDzSLSwyJfx9WHZGfz9yTnbdt4J+8uW5oez83O5 S8enW2qaWAHjk79Qhm/E6/BJM4AYke1gTzYO8cHNgKJhDxSEwyltW/RtogsNlhVQdP7u Mh6vwJ3nIuP6aQx0MemRJV6Wak7SOdaW+1OVE= 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=uOpW0Ygoe3u1mvLzDgI/DRDAABZc8Psn+CJhL4W8FQg=; b=cpcgiuE6AgL9Y0YdcGIa9sZzFW0K8mw5t0QBU9+uLgq2l6j22+R/v5YK+5Db/AInKt Y/gXhyjz4gK9uRb8QNSFfAfp7BVlIDXnQL6sDJoLf/CQOkO53QlH8LTg7M7y50SJ+9Vw IVEGmzaHjH39B6UbN7/RQDDHp+ghAUSNnCL3B9SU4wMH25DhOOozBK5braOoN7bmdte+ J+gqcB/b2wR5EHVVOQ8aZxodSuUfMhqeMHsNIJe4s+hrWfrDVRAEYv4u6LOwFKJ7vr7T 6zeo6v2w1rxwG5i6UcFUBiihz8ii1ntxfccXmybhhcSLNWXLnQGjoCwp9UWnWdhrCMF0 MLvg== X-Gm-Message-State: ALQs6tD4Od1ACtIenlPrOxqKC4M4sPxhfaoKNkHaCa66dxnO9yGDZ+6A DfZ61G5DkAvC1it1wknlT2GT9w== X-Received: by 10.28.10.195 with SMTP id 186mr5057463wmk.136.1524146847083; 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 h133sm5262451wmf.47.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 0B5EF3E075F; Thu, 19 Apr 2018 14:59:04 +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:51 +0100 Message-Id: <20180419135901.30035-34-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::244 Subject: [Qemu-devel] [PATCH v2 33/43] tests/tcg: enable building for s390x 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: "open list:S390" , Cornelia Huck , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This doesn't add any additional tests but enables building the multiarch tests for s390x. Signed-off-by: Alex Bennée Acked-by: Cornelia Huck Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/s390x/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/tcg/s390x/Makefile.include -- 2.17.0 diff --git a/tests/tcg/s390x/Makefile.include b/tests/tcg/s390x/Makefile.include new file mode 100644 index 0000000000..1f58115d96 --- /dev/null +++ b/tests/tcg/s390x/Makefile.include @@ -0,0 +1,2 @@ +DOCKER_IMAGE=debian-s390x-cross +DOCKER_CROSS_COMPILER=s390x-linux-gnu-gcc From patchwork Thu Apr 19 13:58:52 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: 133790 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp697054ljf; Thu, 19 Apr 2018 07:22:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrUJnTaCwJAe8Z5mdwBxetZxnN9rVMBYpIh87AW2/rpc01/9tVZloovYZEzyhIQZdjUb7A9 X-Received: by 10.12.149.87 with SMTP id m23mr994712qvm.142.1524147739525; Thu, 19 Apr 2018 07:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147739; cv=none; d=google.com; s=arc-20160816; b=En9/C/W/2Lwp2uyHP+03SXIoKXL5Xb3r2or0AMj/ceDHCDwp4tiShcJ+AcYFm2wwR/ 6lzlHQnTF9z+Nc98VlVYBujaY5UrYFIqmLQfTqCUo4KKNhxYXbFF148mP4k5P3bupG7l bKNJpwq1qysnYzw+g44lwATUCtEwO4WAce5SkkqKy27Hlwh+rky8x9/I1k94FZKA1IMv 1N1YA8e5F9MhJ2QD0b1vtrlpXZX+4y2x0OOhatVVJWsCffp/3C1dsW53VhkMBrag7m/S I94k/QFtupU4WHZ2U8CXcRQVgSgfk7+OISQvv+dD/NQ4EIKAZeMJ7NqM28GRqKB65M3r WyIg== 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=N+Yt0V8P8ncsq0xlCoJleeiWA+dT2h31z2H2F2pLSIk=; b=ti0cvkXyhktGbdvQPNFyLX7TP2IK/7TKhhzQye7N0H9jp/HI7vl0NGg4iBHp6isn3t h7f2ZzlyRWys+qorfL0H9ZOhhUo+UD5zF5eLgZs0GVjs0XkTstki30JFvGteKXc9lDme iXtZC0tBGidVsPsAqCQ89h3QgQ1BP8Whc3+HLMX1MCNzhAOkpkTjlIJXuzghmSUHstY1 PMsWsjDvkbzZXLdTIe1VEzBT8XM6ozzivwK4bycq7mmQwHXTKtgxDaQmmafZmdXKWHZ8 vuMCmXUs3iMHK5JTYb4qt7Z/sjUvkeB8jIjvjxoorxiH+AKEn/8NEA0RFKuvcHefww16 Q69Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OQVVnN6m; 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 f6si2456835qkm.73.2018.04.19.07.22.19 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:22:19 -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=OQVVnN6m; 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]:50372 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AS3-0003G3-0v for patch@linaro.org; Thu, 19 Apr 2018 10:22:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADu-0004YD-0f for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADp-00055L-HG for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:41 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:39033) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADp-00051e-BQ for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:37 -0400 Received: by mail-wr0-x242.google.com with SMTP id q3-v6so4397517wrj.6 for ; Thu, 19 Apr 2018 07:07:37 -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=N+Yt0V8P8ncsq0xlCoJleeiWA+dT2h31z2H2F2pLSIk=; b=OQVVnN6mtPJNAMyBKAiL+ivIyYgRl8lA0/i9qBxW+D26QQ7ZxB+q5vwSKQB/Jf7sgh trDrsUy4AxH+sbUFmkyKj8QioXdPvhYrVBQIOg4dGpp/2gBFCUUaWlnNSORcUiy0xpwh 7jjOBIz0iBC5yWnUDYR6t0f8HHiqaHYhyVgdE= 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=N+Yt0V8P8ncsq0xlCoJleeiWA+dT2h31z2H2F2pLSIk=; b=DN+CrobqAC2T9oi+FF+sy5BInKbAdtckDjs2jqYGJuH7cOLsdhWx6WMqlxlimytVc2 QsE5EI8O1t+8/0NXB+kVVZwNvnDyxXQKNASnpy6ey3mC7RbeQzlwdBTIe6UmtF3vwEdh ogWpabO6Zr2xzSdAswLy36UcueYv833bkfTRFImUEMHqvMF4k+PUTUaNLM1+iO8NJmBE gqkKZc8uWpT3jWCxDoAPxJOLuPRUUUHzp9G2cZQrkQbq2kapbT5bd54VHx5RSRArgZLz ePqcoMqD+MidkJgzS5ZLb70y9KFu6egmRh8pmPSvwWM/WuMTknGRrzj7PZUVS/HhVvfl SKzg== X-Gm-Message-State: ALQs6tA7onGQLleLEQ5+6FI+DPr7gk0s7kOb54rFipl1V3r5XwE5Pz9y wKuhwHGFC/Z/1jgPmOLRdPPKyA== X-Received: by 2002:adf:af65:: with SMTP id z92-v6mr5141114wrc.250.1524146856393; Thu, 19 Apr 2018 07:07:36 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id e11sm5510295wma.4.2018.04.19.07.07.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1C7963E079E; Thu, 19 Apr 2018 14:59:04 +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:52 +0100 Message-Id: <20180419135901.30035-35-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::242 Subject: [Qemu-devel] [PATCH v2 34/43] tests/tcg: enable building for ppc64 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" Currently this just enables building the multiarch tests. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/ppc64le/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/tcg/ppc64le/Makefile.include -- 2.17.0 diff --git a/tests/tcg/ppc64le/Makefile.include b/tests/tcg/ppc64le/Makefile.include new file mode 100644 index 0000000000..d71cfc9aa7 --- /dev/null +++ b/tests/tcg/ppc64le/Makefile.include @@ -0,0 +1,2 @@ +DOCKER_IMAGE=debian-ppc64el-cross +DOCKER_CROSS_COMPILER=powerpc64le-linux-gnu-gcc From patchwork Thu Apr 19 13:58:53 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: 133774 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp682520ljf; Thu, 19 Apr 2018 07:09:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqGGXipEEFjQo/a57i0F9R9p60YdnAM4mBCuO1FDEHYbB2LTxBRnLW7CrOLEHoc5SkC/0sL X-Received: by 10.55.190.1 with SMTP id o1mr6290978qkf.101.1524146980079; Thu, 19 Apr 2018 07:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146980; cv=none; d=google.com; s=arc-20160816; b=WbkSADA+Q6D5FeMolWbJhfRZ7JxDYqsmPTEl9iSGhY5YkaSXCkYvZRbTPDIqTqS0/8 VtQBabvPoxJpH166PdtpuPQkdLJYG8q/9dSAzk95uBu5Pc3YENhul8tA9Z6edPMGIuDv yCStzQ1uKePKnOlTS5YUGo43JYhcdIeCU8UDnYV/cMRsQLYXZ94rqC4z0TxKaeGWSzwR RAA0S4z1UrByEeQ8bSlrulFkzn7H3TSnOnwLaTYglSUm73SV/qQp42NIaTXZm667aXoy OxA9/WZnFyEo975m/w4aQDMxPVuwNdMtIyXKewS9/v02KN8Jcp5NQswRMkgNktqp+Byh J0Qw== 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=zpwPN3kyB3DuJjgTSr0MdWqWfN/WdXQL2Vc5hgHFh/0=; b=IHL9ygu0Qjgdc5F+Eqpu/hL9ey3mGfs4Z/p0gSPK0TpqOkbEVk2vbSdOJ52VKUVy+J FFoZL+CHL04TOR8FrS8Wx4opR1DBwqAME9MYlXoPwr01gJDqyLhqPlb+Q35GQjMUn/Ul wt4quEsubisowQzBYrSFPTJvRrYp2VqOSUDBOGhL34lXczPI2jWAPdOOkWxIhNgBUBCx k29osiQpVdz2jeCFlkY/oCg/7saetNGw++wNcTqn3SwEjRjDV+t9+80vj+uY8D77ycvB VI3vhDZ7Hy4cQOHcwDGtRYGU+XAMpx6k1YR7p5IgrNe1/a68o6CyWsGoxUI4TR3VWHkn 2qVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SJ3UZoif; 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 d3-v6si1185304qtd.57.2018.04.19.07.09.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:09:40 -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=SJ3UZoif; 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]:50000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AFn-0005wR-F4 for patch@linaro.org; Thu, 19 Apr 2018 10:09:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5q-00069b-CS for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5p-0002dY-4O for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:22 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:37488) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5o-0002bI-Qu for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:21 -0400 Received: by mail-wr0-x242.google.com with SMTP id f14-v6so14351717wre.4 for ; Thu, 19 Apr 2018 06:59:20 -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=zpwPN3kyB3DuJjgTSr0MdWqWfN/WdXQL2Vc5hgHFh/0=; b=SJ3UZoifxIJatn5b4jONGf4LCaCYkvlqBreWuohOrN/vTxWdvRj+sWIErE0M++oPZr OPoFoGC2ZATRTyLt56bcl065vUqDtMJQfeUTcRHI4W2sztIjuZRIOm+zvRE703AIlixW zYvGCRT3IuDGJmApFvK4Ljfh7/Q0KFQ/qdSSk= 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=zpwPN3kyB3DuJjgTSr0MdWqWfN/WdXQL2Vc5hgHFh/0=; b=os+mge/FT94FI+mF0EV2UdZ3JLKV73wn1gjEE/xukBrcHudBMEsy6FGgcBzCSZdSaQ SYuSCbLRD2/pb3nTHt4INEhs2YArShbrBq9FStNrQ4JiQJ0vxERSYSR4HrWcJNdrlQ58 ODDu6F0J6coSZQHlYvbyYawuePn3zYn829EKzWKr8+/BkbkiVxnkJE/R3u7/fi3FpuHH Ss1LebOOI1oRjHbTRRBQpEqJmK6qZTLgWMN23v3FA45MQzQnXxG6c4DKNlxvpe+e1rzz RHZIEguu2FBXaT8nkXqzy0QOvNbwnE2BAcx2JqrcXN/jkOmiIqe3E9VpmX7raMkNWnhT z7ig== X-Gm-Message-State: ALQs6tAbxsFxhbwuGPUdYWeDGoAom1zQMhxFSQQtNrYXu4G8ywN0gj12 x+2KwXbyhlA/N0mHyNGqFSVmYHwjy94= X-Received: by 10.28.141.148 with SMTP id p142mr4878133wmd.50.1524146359638; Thu, 19 Apr 2018 06:59:19 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c18sm3973969wmd.13.2018.04.19.06.59.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:17 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 2E5333E0916; Thu, 19 Apr 2018 14:59:04 +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:53 +0100 Message-Id: <20180419135901.30035-36-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::242 Subject: [Qemu-devel] [PATCH v2 35/43] tests/tcg/Makefile: update to be called from Makefile.target 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" This make is now invoked from each individual target make with the appropriate CC and EXTRA_CFLAGS set for each guest. It then includes additional Makefile.targets from: - tests/tcg/multiarch (always) - tests/tcg/$(TARGET_BASE_ARCH) (if available) - tests/tcg/$(TARGET_NAME) The order is important as the later Makefile's may want to suppress TESTS from it's base arch profile. Each included Makefile.target is responsible for adding TESTS as well as defining any special build instructions for individual tests. Signed-off-by: Alex Bennée --- v2 - cleaner approach to include sub makefiles - move TESTS/VPATH manipulation into sub-makefile - avoid double inclusion when TARGET_BASE_ARCH==TARGET_NAME --- tests/tcg/Makefile | 153 +++++++++++---------------------------------- 1 file changed, 38 insertions(+), 115 deletions(-) -- 2.17.0 diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index e12395117a..b9291acc89 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -1,125 +1,48 @@ --include ../../config-host.mak --include $(SRC_PATH)/rules.mak +# -*- Mode: makefile -*- +# +# TCG tests +# +# These are complicated by the fact we want to build them for guest +# systems. This requires knowing what guests we are building and which +# ones we have cross-compilers for or docker images with +# cross-compilers. +# +# The tests themselves should be as minimal as possible as +# cross-compilers don't always have a large amount of libraries +# available. +# +# We only include the host build system for SRC_PATH and we don't +# bother with the common rules.mk. We expect CC/LD to have been set for +# us from the parent make as well as being passed EXTRA_CFLAGS. +# +# We also expect to be in the tests build dir for the FOO-linux-user. +# -$(call set-vpath, $(SRC_PATH)/tests/tcg) +-include ../../config-host.mak +-include ../config-target.mak -QEMU=../../i386-linux-user/qemu-i386 -QEMU_X86_64=../../x86_64-linux-user/qemu-x86_64 -CC_X86_64=$(CC_I386) -m64 +# Tests we are building +TESTS= -QEMU_INCLUDES += -I../.. -CFLAGS=-Wall -O2 -g -fno-strict-aliasing -#CFLAGS+=-msse2 +# Start with a blank slate, the build targets get to add stuff first +CFLAGS= +QEMU_CFLAGS= LDFLAGS= -# TODO: automatically detect ARM and MIPS compilers, and run those too - -# runcom maps page 0, so it requires root privileges -# also, pi_10.com runs indefinitely - -I386_TESTS=hello-i386 \ - sha1-i386 \ - test-i386 \ - test-i386-fprem \ - # runcom - -# native i386 compilers sometimes are not biarch. assume cross-compilers are -ifneq ($(ARCH),i386) -I386_TESTS+=run-test-x86_64 -endif - -TESTS = test_path -ifneq ($(call find-in-path, $(CC_I386)),) -TESTS += $(I386_TESTS) +# The order we include is important. We include multiarch, base arch and finally arch +-include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target +-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.target +ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME)) +-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target endif -all: $(patsubst %,run-%,$(TESTS)) -test: all - -# rules to run tests - -.PHONY: $(patsubst %,run-%,$(TESTS)) - -run-%: % - -$(QEMU) ./$* - -run-hello-i386: hello-i386 -run-sha1-i386: sha1-i386 - -run-test-i386: test-i386 - ./test-i386 > test-i386.ref - -$(QEMU) test-i386 > test-i386.out - @if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi - -run-test-i386-fprem: test-i386-fprem - ./test-i386-fprem > test-i386-fprem.ref - -$(QEMU) test-i386-fprem > test-i386-fprem.out - @if diff -u test-i386-fprem.ref test-i386-fprem.out ; then echo "Auto Test OK"; fi - -run-test-x86_64: test-x86_64 - ./test-x86_64 > test-x86_64.ref - -$(QEMU_X86_64) test-x86_64 > test-x86_64.out - @if diff -u test-x86_64.ref test-x86_64.out ; then echo "Auto Test OK"; fi - - -run-runcom: runcom - -$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com - -run-test_path: test_path - ./test_path - -# rules to compile tests - -hello-i386: hello-i386.c - $(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< - strip $@ - -# i386/x86_64 emulation test (test various opcodes) */ -test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \ - test-i386.h test-i386-shift.h test-i386-muldiv.h - $(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ \ - $( X-Patchwork-Id: 133820 Delivered-To: patch@linaro.org Received: by 10.80.173.174 with SMTP id a43csp882232edd; Thu, 19 Apr 2018 07:40:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrNEKsQxhW17L6m+YUKCtpy41u/hOi7LBLnCJ6symeovKlgq2cT+uta6mMDep3qhKZWT73O X-Received: by 10.55.159.131 with SMTP id i125mr5903594qke.188.1524148848193; Thu, 19 Apr 2018 07:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148848; cv=none; d=google.com; s=arc-20160816; b=z4vsjGvnYhwos6KeaDao8/KkwL4yZ3diZol1456jdB4WE2TzsR3an4e8YA910NFehQ pcK+H2+Uwkoa8LnF3Ik6umqyYVo6xbkq8I/VcQDolVaYx7amnCiiLdylRGkXKuIx8ECK le37kcz5Rj3fJMnJTc/txjOQY6nlHlV4J43CAXRqTJ/EHD8DIiVBo/3paMeya5nwEOWo a1RZ5y6gHrr7iLephbcunAWsZMQ0mw/iWmd38FOc/sr+pDhNdPPlTa4863sgjMF+Ghc5 pKJEvoROpS2bV/VDsLFbXbxv0yqUbSu1WQg2Qn3+1tUxExd99gllQjEyx8yzYv8NkK0d ++Ww== 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=8sTsQiWizzrwf7qM4i18PQWMiCuOPDmGd5KJ55R6e78=; b=ecEJxhmPAfXmQiLK7KLOMK8Wpr4iDYMXpeFkrqnn//NhtuOY+2RpqQyMs/lqZiXR4X kXQqudRWcc4OTHdDxH39ZQUFFm7hO5uEMH/GF9QYpLmTFVJm/ytL377RZuoHZEPI64cd RXQ+BdYnQaiLUayhuE2hlsM1J4LwTQ5n1+NgqBZOYuGMhp7lQxmSH8UUbpjKE69x000F X18k9/t67BweBrozIQhgrsGcpwMtlnRJQTxxwua2fdaXCgOn7RgvjP9aB/aVkf9PisQ2 noFrVARyncgGuIcoo9nnI8aNoqSpTyY4BrO20+UCFLKlSBs/lVLCTMaRAFlaEqi+CogN SMJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Z2gaifJh; 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 i27-v6si5337128qte.88.2018.04.19.07.40.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:40:48 -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=Z2gaifJh; 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]:51937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9Ajv-00020y-L1 for patch@linaro.org; Thu, 19 Apr 2018 10:40:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANN-0004dz-Na for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANM-00064F-Md for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:29 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:40968) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANM-00063n-FU for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:28 -0400 Received: by mail-wr0-x241.google.com with SMTP id v24-v6so14503846wra.8 for ; Thu, 19 Apr 2018 07:17: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=8sTsQiWizzrwf7qM4i18PQWMiCuOPDmGd5KJ55R6e78=; b=Z2gaifJhQWzrajKpNy4THqjTsXBziHeD19UHhvt/FqKhvsL9sCfNUy6PbllfMFdKzC cZR/1yywFT3L4k0mBun0kD7vwhNcGtiO9laEo6AWqOuu+HoZbWA7045Xlr58P35WWpvC znAUUEMLxDRyghaBvvLPT/ao/BO7Ud5NBuDnE= 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=8sTsQiWizzrwf7qM4i18PQWMiCuOPDmGd5KJ55R6e78=; b=TbckG/yYWMEmtbbqvQN5PihwVcoSCvf6bdrPUHQba0Ja78fISoIAc4kWT1K8gH+p3a 7XOhMg9xt3HGmeSSArYRFzEWvzfwBMhDqqmEdoOcntUAXA1quajpAjSnqc3kXJ4MxdpC 4TYDuG0MS5WlKNx6ZQFI4Yfg+uFn2bRYROzENoB1xbU9wDqQ59hg2E1YT7Lc6qyUHcbe fG6YEzSsFBck6h6H9PoBdAk8SpeONT/W0LukBXw5FilqN2L4+jakugnEhvNLbVNlL5e9 ZnzzRrql9AKoRgyh3O8f0SwiZcvQ8lWpCEzunct1HgK/1s4Rh4wMNTQnq/mxLhsd2KyN Zkmw== X-Gm-Message-State: ALQs6tArMmvbRk2bZLN7k/u4n+0v/xHotu9egV+1IKIDAeEULUO17LHJ s8nKlBb3+iSZJvymCmbYUsv2vg== X-Received: by 10.28.135.195 with SMTP id j186mr4830648wmd.143.1524147447431; Thu, 19 Apr 2018 07:17:27 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v5sm3131988wmh.19.2018.04.19.07.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:25 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 40DC03E0930; Thu, 19 Apr 2018 14:59:04 +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:54 +0100 Message-Id: <20180419135901.30035-37-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::241 Subject: [Qemu-devel] [PATCH v2 36/43] Makefile.target: add (clean-)guest-tests targets 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" Now all the build infrastructure is in place we can build tests for each guest that we support. That support mainly depends on having cross compilers installed or docker setup. To keep all the logic for that together we put the rules in tests/tcg/Makefile.include and include it from the main Makefile.target. Signed-off-by: Alex Bennée --- Makefile.target | 5 +++ tests/tcg/Makefile.include | 79 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 tests/tcg/Makefile.include -- 2.17.0 diff --git a/Makefile.target b/Makefile.target index d0ec77a307..a30fd40257 100644 --- a/Makefile.target +++ b/Makefile.target @@ -36,6 +36,11 @@ endif PROGS=$(QEMU_PROG) $(QEMU_PROGW) STPFILES= +# Makefile Tests +ifdef CONFIG_USER_ONLY +include $(SRC_PATH)/tests/tcg/Makefile.include +endif + config-target.h: config-target.h-timestamp config-target.h-timestamp: config-target.mak diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include new file mode 100644 index 0000000000..cb8bb36026 --- /dev/null +++ b/tests/tcg/Makefile.include @@ -0,0 +1,79 @@ +# -*- Mode: makefile -*- +# +# TCG tests (per-target rules) +# +# This Makefile fragement is included from the per-target +# Makefile.target so will be invoked for each linux-user program we +# build. We have two options for compiling, either using a configured +# guest compiler or calling one of our docker images to do it for us. +# + +# The per ARCH makefile, if it exists holds extra information about +# useful docker images or alternative compiler flags. Include it if it +# exists + +ARCH_MAKEFILE=$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include +CHECK_INCLUDE=$(wildcard $(ARCH_MAKEFILE)) + +ifeq ($(ARCH_MAKEFILE),$(CHECK_INCLUDE)) +include $(ARCH_MAKEFILE) +endif + +GUEST_BUILD= + +# Support installed Cross Compilers + +ifdef CROSS_CC_GUEST + +.PHONY: cross-build-guest-tests +cross-build-guest-tests: + $(call quiet-command, \ + (mkdir -p tests && cd tests && \ + make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(CROSS_CC_GUEST)), \ + "CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)") + + +GUEST_BUILD=cross-build-guest-tests + +endif + +# Support building with Docker + +ifeq ($(HAVE_USER_DOCKER)$(GUEST_BUILD),y) +ifneq ($(DOCKER_IMAGE),) + +# We also need the Docker make rules to depend on +include $(SRC_PATH)/tests/docker/Makefile.include + +DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ + --cc $(DOCKER_CROSS_COMPILER) \ + -i qemu:$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " +DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE) + +.PHONY: docker-build-guest-tests +docker-build-guest-tests: $(DOCKER_PREREQ) + $(call quiet-command, \ + (mkdir -p tests && cd tests && \ + make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(DOCKER_COMPILE_CMD)), \ + "CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)") + +GUEST_BUILD=docker-build-guest-tests + +endif +endif + +# Final targets +.PHONY: guest-tests + +ifneq ($(GUEST_BUILD),) +guest-tests: $(GUEST_BUILD) +else +guest-tests: + $(call quiet-command, /bin/true, "CROSS-BUILD", "$(TARGET_NAME) guest-tests SKIPPED") +endif + +# It doesn't mater if these don't exits +.PHONY: clean-guest-tests +clean-guest-tests: + rm -rf tests || echo "no $(TARGET_NAME) tests to remove" From patchwork Thu Apr 19 13:58:55 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: 133793 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp700488ljf; Thu, 19 Apr 2018 07:25:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp6w0IkRY7y0rJ3rPdVnVkmrKK9lIO0tlANjGUu9Pe49WS5ar2x/J+bxMZcGA2Xjuy0RzSF X-Received: by 10.55.99.133 with SMTP id x127mr6228843qkb.182.1524147931707; Thu, 19 Apr 2018 07:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147931; cv=none; d=google.com; s=arc-20160816; b=U6NE47m8Vuy8zWmVEHIwm4SqZnrgcYkA7y2SUpkIZQtnz2dLEKtdXEyr6txMI+g6Nm 391zaI9FE2a0A8QWPB313GZycPivlUXCBw77oY1KwCywLWwRfzUW5DhZY9G8ixiyCKc6 iiAgiCKFcxika/jml5uzwsscUKT4seMbzuuyHNXPyRrpFuncWRHnQorvzCFLwcgqdLCv pQzX2x6w8GJTArTe9b/Oa6AlD7/ZZdJqSJQWmYTNbL8xVUeFc/oB7b9HkrHnxfxXyYOY VEKDfllxj+bprYL/SKC+KX5beU0x1TXpegV3TaNpdB1ABVl3029/qeX+pU0U1mH3FVeX bVgg== 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=u+JexeW98uwVMWd49e+fXUJrFZYYOkAinPZpIL5lcAQ=; b=huEi/YjOEjJc/9mVQP1HIft0SbGDlanQPDyYdsyb6wkE8SpVT8jcU7G2UzxGJNN0tX aryEY3kh2jIafZC/LNKR3WlVaXON2Zuxw6aKZhYomE7e8H4kDZZci6T4y6xqyoA9F0hg Y1l+r1n1DxKPqeS7GykcY265Jwkut0hti5zIQbyVnL1LPZAWsF6AQKaeR8ITG7j2Gylg jTNwlSk7KsNBu4OL3WKI4gAGGHJlOzG+8Idevg2VvHhfO98EPNwOgC7O2z8+s/yB7QqQ XQ7xvA6DLhZGEOs2tdDzwcLtA/rGqwMcy6dz5xBVPjj4SjVDXZTjn8pGJ1xkFUn77KuN jNFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DlDdp6th; 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 i66si4711514qkc.337.2018.04.19.07.25.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:25:31 -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=DlDdp6th; 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]:50649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AV9-0006Sm-2h for patch@linaro.org; Thu, 19 Apr 2018 10:25:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADt-0004Xq-MJ for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADn-0004zc-K1 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:41 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:42308) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADn-0004yu-Ao for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:35 -0400 Received: by mail-wr0-x244.google.com with SMTP id s18-v6so14410621wrg.9 for ; Thu, 19 Apr 2018 07:07:35 -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=u+JexeW98uwVMWd49e+fXUJrFZYYOkAinPZpIL5lcAQ=; b=DlDdp6thl8tEMkTzH12uBScEWV7vbuOKPQ8rz4VncbSRzxsZNyuZVYGvo5nDgk4KMQ vMnAgEi5EjXqz6dlS8g5fsZDf5Bv3MU9cOsvmr6jA476Uy6bJXaJ+6uK+pcOXG/eR+/Q oqHKV/w80/pU/KPZrYIIaXICsbEF4hy2ePx5A= 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=u+JexeW98uwVMWd49e+fXUJrFZYYOkAinPZpIL5lcAQ=; b=U7hYuUPiiOZ2YrDUblXWtLRl4PQV4L6jnSLJUl+Ik4LO6PkJkFluVoS+7DYxIp/YRI Je45ChQHNDsenw7cklOYNLfMtSqj7qkgpaglOg0JqSXv+sM8SojcDtIZ2733p25io3qx ugDX4+gucVqalEsVAt1GkwJgQWvQdNvT1eQw5m4MFXmP65W9iV1bpVi8NXiCq6Qesf0A HyWwCt5ZBkThU5JMbMbA8kHKAWj2c8FhFbbpBM73kcpRnHGe+0tv1y+DkKSb6YlSzGXv GdIEThd5Ai6xuKtdjbgmMthPe33LC5TMSiitqBxwSRdcvqkdDLeuxQSzvXIJcxMy689G oRBg== X-Gm-Message-State: ALQs6tCWtZU5ucL8mC7Q3/q9i6JzJCtp9HmJMfWNS2/0v3A4TjA1WXH2 NUL8aNk3YC5Oq0cTYUmOFL/vXQ== X-Received: by 10.28.196.139 with SMTP id u133mr5044721wmf.161.1524146853535; Thu, 19 Apr 2018 07:07:33 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v6-v6sm3836322wrd.54.2018.04.19.07.07.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 537133E0968; Thu, 19 Apr 2018 14:59:04 +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:55 +0100 Message-Id: <20180419135901.30035-38-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::244 Subject: [Qemu-devel] [PATCH v2 37/43] tests/Makefile.include: add (clean-)check-tcg targets 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" This will ensure all linux-user targets build their guest test programs. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - use -include instead of complex macro stuff - also include TARGET_BASE_ARCH/Makefile --- tests/Makefile.include | 19 ++++++++++++++++++- tests/tcg/Makefile.include | 33 +++++++++++++++------------------ 2 files changed, 33 insertions(+), 19 deletions(-) -- 2.17.0 diff --git a/tests/Makefile.include b/tests/Makefile.include index 3d2f0458ab..c402de901e 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -10,6 +10,7 @@ check-help: @echo " $(MAKE) check-speed Run qobject speed tests" @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" @echo " $(MAKE) check-block Run block tests" + @echo " $(MAKE) check-tcg Run TCG tests" @echo " $(MAKE) check-report.html Generates an HTML test report" @echo " $(MAKE) check-clean Clean the tests" @echo @@ -916,6 +917,23 @@ check-report.xml: $(patsubst %,check-report-qtest-%.xml, $(QTEST_TARGETS)) check check-report.html: check-report.xml $(call quiet-command,gtester-report $< > $@,"GEN","$@") +# Per guest TCG tests + +LINUX_USER_TARGETS=$(filter %-linux-user,$(TARGET_LIST)) +BUILD_TCG_TARGET_RULES=$(patsubst %,tcg-tests-%, $(LINUX_USER_TARGETS)) +CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(LINUX_USER_TARGETS)) + +tcg-tests-%: + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" guest-tests,) + +clean-tcg-tests-%: + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" clean-guest-tests,) + +.PHONY: check-tcg +check-tcg: $(BUILD_TCG_TARGET_RULES) + +.PHONY: clean-tcg +clean-tcg: $(CLEAN_TCG_TARGET_RULES) # Other tests @@ -958,7 +976,6 @@ check-speed: $(patsubst %,check-%, $(check-speed-y)) check-block: $(patsubst %,check-%, $(check-block-y)) check: check-qapi-schema check-unit check-qtest check-decodetree check-clean: - $(MAKE) -C tests/tcg clean rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y) rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y)) rm -f tests/test-qapi-gen-timestamp diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include index cb8bb36026..d82f4d32fb 100644 --- a/tests/tcg/Makefile.include +++ b/tests/tcg/Makefile.include @@ -8,19 +8,14 @@ # guest compiler or calling one of our docker images to do it for us. # -# The per ARCH makefile, if it exists holds extra information about -# useful docker images or alternative compiler flags. Include it if it -# exists +# The per ARCH makefile, if it exists, holds extra information about +# useful docker images or alternative compiler flags. -ARCH_MAKEFILE=$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include -CHECK_INCLUDE=$(wildcard $(ARCH_MAKEFILE)) - -ifeq ($(ARCH_MAKEFILE),$(CHECK_INCLUDE)) -include $(ARCH_MAKEFILE) -endif +-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include +-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include GUEST_BUILD= - +TCG_MAKE=$(SRC_PATH)/tests/tcg/Makefile # Support installed Cross Compilers ifdef CROSS_CC_GUEST @@ -28,10 +23,10 @@ ifdef CROSS_CC_GUEST .PHONY: cross-build-guest-tests cross-build-guest-tests: $(call quiet-command, \ - (mkdir -p tests && cd tests && \ - make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(CROSS_CC_GUEST)), \ - "CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)") - + (mkdir -p tests && cd tests && \ + make -f $(TCG_MAKE) CC=$(CROSS_CC_GUEST) \ + EXTRA_CFLAGS=$(CROSS_CC_GUEST_CFLAGS)), \ + "CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)") GUEST_BUILD=cross-build-guest-tests @@ -54,9 +49,10 @@ DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE) .PHONY: docker-build-guest-tests docker-build-guest-tests: $(DOCKER_PREREQ) $(call quiet-command, \ - (mkdir -p tests && cd tests && \ - make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(DOCKER_COMPILE_CMD)), \ - "CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)") + (mkdir -p tests && cd tests && \ + make -f $(TCG_MAKE) CC=$(DOCKER_COMPILE_CMD) \ + EXTRA_CFLAGS=$(DOCKER_CROSS_COMPILER_CFLAGS)), \ + "CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)") GUEST_BUILD=docker-build-guest-tests @@ -70,7 +66,8 @@ ifneq ($(GUEST_BUILD),) guest-tests: $(GUEST_BUILD) else guest-tests: - $(call quiet-command, /bin/true, "CROSS-BUILD", "$(TARGET_NAME) guest-tests SKIPPED") + $(call quiet-command, /bin/true, "CROSS-BUILD", \ + "$(TARGET_NAME) guest-tests SKIPPED") endif # It doesn't mater if these don't exits From patchwork Thu Apr 19 13:58:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 133825 Delivered-To: patch@linaro.org Received: by 10.80.173.174 with SMTP id a43csp884390edd; Thu, 19 Apr 2018 07:42:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrlkUNv+In8yLxfv1WhUvRa81fJr7sYE/f8lQBIT/s0pwiim/WXs1nYOxpsQoBUepGmorEl X-Received: by 2002:aed:30c1:: with SMTP id 59-v6mr6107062qtf.237.1524148974180; Thu, 19 Apr 2018 07:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148974; cv=none; d=google.com; s=arc-20160816; b=ssQMwpO/vG68034XGxZqNPEYaDx6jcx3M5R+1OTy81cpjo2wv0LYhwC3VFACdZvGwy QgebcJXVywVsx9D59cacjLAWwdDHv6tDok4JguvgQxVZQWxJMu06JVIbUUb30R+3N8an Zrw+kWb+pHqLomN/LPJYu4gTFAKdiY4xawedfHqiZw5d/1yHTUGdwVaCn9iSxRkOU1j3 yXBDxInne0yzATWm20Wh2lpSG2fY4pJBWolCjrHnEY9MuUS0UwzHz3hUh9tgP/w23a6r vPTV0RUNt8B4jZ962Ja5D16Q6+eyFRTHM218A1v7+JSbV9+BjRD+gOKPDlgmv6kMtyR4 f8IQ== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=o6jq0Btnf1Qru0BA/cZYrVWAKz/yNfKu2mK1C9T9KD8=; b=aSj85zW46uHgMwo+2oByi2W7ZnSJAOnD2qssEQGe043pSTfZEd2zHW9f5OQyEwwLVZ tJsC3WuI/G9yfCHtstwmb8b2E87O5pSvkK9ekyaRWxuzIYzDFF8lk1rTLoySxnc3nVWX hZgOaHRMGc8w1S3M0SXtUSSgaxXLtGb1fcIO+Tjd+2uUksezZW3AODMzSiP1q3WNB188 Aur1eKnL4eUfj0HZLgsM33gdm8mj1s/PZctVMrzYayJfGuvt5cmieMF0TalSpWpmC39g S9YXyMp7SViC+5mf8cO0c72HMwXKs522uZ/y66WugFNK3vFXhlCR2EVqzwOSJ5pk+mpv h2sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=USMrE6Gb; 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 y4si485987qve.161.2018.04.19.07.42.54 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:42:54 -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=USMrE6Gb; 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]:52040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9Alx-0003XQ-MN for patch@linaro.org; Thu, 19 Apr 2018 10:42:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANO-0004ex-O1 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANN-00064r-Tt for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:30 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:44257) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANN-00064P-M5 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:29 -0400 Received: by mail-wr0-x241.google.com with SMTP id o15-v6so14509463wro.11 for ; Thu, 19 Apr 2018 07:17:29 -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; bh=o6jq0Btnf1Qru0BA/cZYrVWAKz/yNfKu2mK1C9T9KD8=; b=USMrE6GbmcgQxNIhCsWTKWOq4nzFMbxyHBra900Q41fQhQLDKCKYcQgaUbQM1burWZ tslGZFddAXTjC3vckYbRvaIkUU8MXh1eB7GZFtVTWpCJ2vi9zMjSjh6iU/54RqYKcsNp WfIIlYeTYTYpScU7RWDbXqxL0fsAvSJ80QtTc= 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; bh=o6jq0Btnf1Qru0BA/cZYrVWAKz/yNfKu2mK1C9T9KD8=; b=Xbjqz0xueUYTFXzpFLe8RWusGqMOS5aa8F7TD16imo/3nPNFGmDXOvxuYyP6MmCxn5 Riq1skkZ+cjEXx+Ap3Dxprm6iY/yjk4/A4gHxDtg6TWTj4h2OdGwirNBFc6FMQmqKaIT pb4Hy/QHNjHwRGlLZ1pWD8i8J4SAMtmJmD5ij54tm4bw9LaFQPAbcR1hXJQEeGqYo59B wV4Yv/gxhXgpaoh3J3eXugOp6T2BtRo0PWy/R1s4kofo6e1b1sbL1qwmi/er5LGDT+r2 pJXAw8HVNW5IqgNndi52dydrCrelEQtVuL7jup2PJyl6oMoy+yb8sACdfclRxEBr3EEh ghgQ== X-Gm-Message-State: ALQs6tBSJO+kN78VJf7cr3he7J3I37ApFIl8O7M7CkWrVJiTcoT+d7lW YmrGjn/ho9Vngzshas9xeUBNTA== X-Received: by 10.28.234.206 with SMTP id g75mr4651308wmi.76.1524147448364; Thu, 19 Apr 2018 07:17:28 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id d8-v6sm3984294wrb.72.2018.04.19.07.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:25 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 643E33E0971; Thu, 19 Apr 2018 14:59:04 +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:56 +0100 Message-Id: <20180419135901.30035-39-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> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PATCH v2 38/43] osdep: disable glib-compat.h include with QEMU_NO_GLIB 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" To ease the cross-compilation of tests that do not use glib. Signed-off-by: Emilio G. Cota --- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 41658060a7..fabaf73007 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -104,7 +104,9 @@ extern int daemon(int, int); #include "sysemu/os-posix.h" #endif +#ifndef QEMU_NO_GLIB #include "glib-compat.h" +#endif #include "qemu/typedefs.h" /* From patchwork Thu Apr 19 13:58:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 133826 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp720006ljf; Thu, 19 Apr 2018 07:45:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrH/sj8WuuuY2BKH+oLIHTYP+QZlrJxJTLci2P9HQe51RnpfC5+r9gj97+zoJ/+Au1cSdCN X-Received: by 10.55.106.193 with SMTP id f184mr6466144qkc.394.1524149101247; Thu, 19 Apr 2018 07:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524149101; cv=none; d=google.com; s=arc-20160816; b=w7CycUstbCbChLfjlzdU4Qp9qKG4OcEnz+SEZHO3JbUj5cAUeJ/pXgLgTYQyBxsf1D 65N+FsuEh4GqrSYVZDVPnERrhbZvh6lZgWvc0+wDA0nhK6GMgTzVr+zoM6ZNbH8u3u8X nkvIg9Kf55IMqUXu4AOn52oPjPRprOZuADGsP/ZLtPjz3MV7FQuak3Tvko44PIFWqR1d Y4mijUO025cE3qxDA+bfnK7o4Fhuy8WZkEpf08Bs0qi45oMXc8iU9gZojJn9N15G5aJJ vrdCg4EkDnSQSf/kEa1514mteBMvtkv581GH7bdEs2TFw/R5nOLB0jDXp2f/933bNunK galg== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=j5kn0bELVxEmf6Rj0VJYC410pqYZPaaLhA5Ob+eKTB8=; b=AnL+1WQvvp5M8ln4T7ERUZ8FIX3oMceZLJJ2SlN+xH2decbNF4t2eY3EVTYmlldDCw 780kfRc7kJGBLChsVYMvBuQz8D5lRqoidlefzCvxvClbAVRL9+LBn835TUzAJkbTA4aB 6oIwkg/TKy1vGTKNmj6mggiSZ5KrVYIW9y7TLzqEVO0qwb+cpW237eWwe8YzUtDtGAmP Wb3yKCVtXUN43dXf4la90XxOfB3Rx/sqTystNHJNH7vk6cvcY4wiU7NGDXWYY5ltIhA1 5dnq1yHZ7HposHSOjy+dPb9dLh1ZN84U89gL59oc3eG6+earPEbMvhVCkX+fwYGP1oc+ EY7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Qc+EQENM; 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 b100si2898417qkb.289.2018.04.19.07.45.00 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:45:01 -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=Qc+EQENM; 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]:52178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9Ao0-00059k-Ga for patch@linaro.org; Thu, 19 Apr 2018 10:45:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANP-0004fo-Kl for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANO-00065G-N5 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:31 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:34578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANO-00064l-FL for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:30 -0400 Received: by mail-wr0-x243.google.com with SMTP id d19-v6so14540934wre.1 for ; Thu, 19 Apr 2018 07:17:30 -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; bh=j5kn0bELVxEmf6Rj0VJYC410pqYZPaaLhA5Ob+eKTB8=; b=Qc+EQENMUzgQQWrBv8Zezs9E/FB6cq/OkSYIH0LWidNwIhYHjFCKM4hHpL+A2BobH8 398QZ78tL2GXwpmEzjBbyKiVcGHfLuPRnJVUunN6tlEP1/ssSiRZBtWLmRh7wxfkcYjp uZ9NZwrlFqtTomD1eJWIr1BxYVJh6Pt+6dufk= 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; bh=j5kn0bELVxEmf6Rj0VJYC410pqYZPaaLhA5Ob+eKTB8=; b=FczZryP2ZWCT8OrqVzcNHpHjUv1c8ZZy46CUbszvjAwqwHyF/6SXpRMy+4RcFr2d6z ctB98YithWH56avdFNduPAXtMl6lU4xSYia4Bc64NUjuCKKgk0eM6SgJhKuwd1AMKPj5 qBTln9t1tqcg2eSRU6lRUnT3nsfzFerNrKVQrCPOT4pdURkZPshhU++1HsqwGGUXyXAB JiDuc6qTUhY+G/BPILr5joZAObyduIH5+GgkJL8Wsiv2m1cjMz8bUJCcY01RkdQf+eft Olp6pHk8DcdAKnznwBb17YI+NxYSfz0BljC/8a4enAppaiWxlk2gcAK4plqjxLDXka+W 1/Bw== X-Gm-Message-State: ALQs6tD61CVBr8dcRRptVSNekhpI1U64E6Uc2Mafn2qllAwgR69MOWw5 M9puiDaQuXTOyJfFPoQ5GeLH4w== X-Received: by 2002:adf:b594:: with SMTP id c20-v6mr5075296wre.65.1524147449383; Thu, 19 Apr 2018 07:17:29 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y9-v6sm4871641wrg.46.2018.04.19.07.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:25 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 758F03E09A8; Thu, 19 Apr 2018 14:59:04 +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:57 +0100 Message-Id: <20180419135901.30035-40-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> 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 39/43] softfloat: do not include glib headers 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" To ease the cross-compilation of softfloat.o. Signed-off-by: Emilio G. Cota --- fpu/softfloat.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.0 Reviewed-by: Richard Henderson diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 70e0c40a1c..a2a5d4ea33 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -82,6 +82,7 @@ this code that are retained. /* softfloat (and in particular the code in softfloat-specialize.h) is * target-dependent and needs the TARGET_* macros. */ +#define QEMU_NO_GLIB #include "qemu/osdep.h" #include "qemu/bitops.h" #include "fpu/softfloat.h" @@ -105,6 +106,9 @@ this code that are retained. *----------------------------------------------------------------------------*/ #include "softfloat-specialize.h" +/* glib headers are not included due to QEMU_NO_GLIB */ +#define g_assert_not_reached() assert(false) + /*---------------------------------------------------------------------------- | Returns the fraction bits of the half-precision floating-point value `a'. *----------------------------------------------------------------------------*/ From patchwork Thu Apr 19 13:58:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 133792 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp699620ljf; Thu, 19 Apr 2018 07:24:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZof6/xX5Ds5sQIfQzBa2ySx8fAewMfR3GCnuvARtwYqFpbM+fxtRXB1pa1IClhL+MHTw4sd X-Received: by 2002:ac8:239d:: with SMTP id q29-v6mr520054qtq.212.1524147885475; Thu, 19 Apr 2018 07:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147885; cv=none; d=google.com; s=arc-20160816; b=wFvtrMGI70zr0OH/7e0NCfsr62TUJsDq0YXNiylEetDf9BEmQPF5XryFuequB7Ec1p 3YPIet2OHgCDaSnBwpPaRHv63CB9yZW1icg1vZgQbQN50FVNoQqZKbK0BAUWZ2orB7K6 BT1OKEzd2JfTkNQl+Aui8/FozECRoOVyS2ensvNS+kd+eVrbKqQs4LgOkeqRl7tJgRtJ 3xX6pPEQZfaCLGk+pcCDjserWo/cqzweriL8V9Y+Zi3ykS8GJIy3WdwQEN0u3YVrHJiq 0O84dKlnZ5QbxH9oEFoOD/LblF9SXfUQMs1fFW9AD/rW/tOsnckyXheeQ3vDjYsEhfce bU4A== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=NyV6e5ddt2DXkORI5weT7caJx4I5yLwmyJAbIzQJy9A=; b=kJI1n19pzsl43scTWQjiKxFvreo3rf73jHp5IEfZRxoVvn/t1V+waJWksgrJOgvUOu NDQpywM+HqD7IpNQ4etLtXMA1cvcumO3+p+C6jEShMEMjYm1bhjPmkEafTL8m+oe9MV+ KqNL/zCDNZ+wNLr9QT62j4EHESSUCq749GEch/MDq/RZlLaqWI20KklkEElc9YULi//Y igu3hL3UQA9EWYwzB/2C13Yy34FMEcbOmoU2XvtLcsu8CW7b4exESAUFxK6sE4bUndVc IqFbyUzWpyJ7TxwuFP7aGbIcyJ3Own83T6pyFjm5NQo+XDusdFcTeHWHJzlzu997B7DQ bL1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DJAoa8Eh; 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 t125si1496634qkb.95.2018.04.19.07.24.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:24:45 -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=DJAoa8Eh; 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]:50592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AUO-0005VT-OL for patch@linaro.org; Thu, 19 Apr 2018 10:24:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADv-0004ad-OY for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADp-000561-LB for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:43 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:45028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADp-000508-2Q for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:37 -0400 Received: by mail-wr0-x242.google.com with SMTP id o15-v6so14414787wro.11 for ; Thu, 19 Apr 2018 07:07:37 -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; bh=NyV6e5ddt2DXkORI5weT7caJx4I5yLwmyJAbIzQJy9A=; b=DJAoa8EhVP06ZDmYRRjp353NUaAuvTrmPSh4Ga8J/3/amE26nN7w2x17xqZBUVHLiz Ions4UAWu/MT3xCA1w82vaSLXqzGqPNF4JikkQEWa9r/oLjgcZpOd+GUpw3mg0RMZZQs 49RD6KW8HRJ3Vqh4Xg0wTha/qxYQ2whyZSl8g= 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; bh=NyV6e5ddt2DXkORI5weT7caJx4I5yLwmyJAbIzQJy9A=; b=pcpJnWiFFnJbk4RLXTVKK/7MgMgr/aVOHxyGygvdmT80+HSzzxWtYbJUHh9kRecKXk AFL1MNp6ZLqDUC5xVjUcNqIxpF7sEZSQBBflZmEr4hc8fui+G4+l0qJao80OVPXl9xjC l5/It8mxiZD+rA7u2GoieebY+ci2wgiv2+vj6GQFLca/e81djkMRP7E7HhnxmwZaC2Qo JxY/FD1pFLzYwQhw+lSt7CV6v8iTmEsGAJn6xqYxI6goAKosMapoBkXwPsewPtuQWFgC X49iE3Msd7Mv37cqBxSeECkZnLfzbU0nPG+mzp9EZYk8V252h7XDlghMWVfNbZdtAxy/ 8WPw== X-Gm-Message-State: ALQs6tAHj1Mnn0gff/0lb4pBAzzqD0UduY3HksCIV7Hn/X+WZCvrl/AD WgDT/y1TgGh9xygdlfDtf7P5ZQ== X-Received: by 10.28.27.194 with SMTP id b185mr4820905wmb.57.1524146855359; Thu, 19 Apr 2018 07:07:35 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 103-v6sm3470186wrc.57.2018.04.19.07.07.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 8E7F43E0A07; Thu, 19 Apr 2018 14:59:04 +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:58 +0100 Message-Id: <20180419135901.30035-41-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> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PATCH v2 40/43] tests: add fp-test, a floating point test suite 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" This will allow us to run correctness tests against our FP implementation. The test can be run in two modes (called "testers"): host and soft. With the former we check the results and FP flags on the host machine against the model. With the latter we check QEMU's fpu primitives against the model. Note that in soft mode we are not instantiating any particular CPU (hence the HW_POISON_H hack to avoid macro poisoning); for that we need to run the test in host mode under QEMU. The input files are taken from IBM's FPGen test suite: https://www.research.ibm.com/haifa/projects/verification/fpgen/ I see no license file in there so I am just downloading them with wget. We might want to keep a copy on a qemu server though, in case IBM takes those files down in the future. The "IBM" syntax of those files (for now the only syntax supported in fp-test) is documented here: https://www.research.ibm.com/haifa/projects/verification/fpgen/papers/ieee-test-suite-v2.pdf Note that the syntax document has some inaccuracies; the appended parsing code works around some of those. The exception flag (-e) is important: many of the optimizations included in the following commits assume that the inexact flag is set, so "-e x" is necessary in order to test those code paths. The whitelist flag (-w) points to a file with test cases to be ignored. I have put some whitelist files online, but we should have them on a QEMU-related server. Thus, a typical of fp-test is as follows: $ cd qemu/build/tests/fp-test $ make -j && \ ./fp-test -t soft ibm/*.fptest \ -w whitelist.txt \ -e x If we want to test after-rounding tininess detection, then we need to pass "-a -w whitelist-tininess-after.txt" in addition to the above. (NB. we can pass "-w" as many times as we want.) The patch immediately after this one fixes a mismatch against the model in softfloat, but after that is applied the above should finish with a 0 return code, and print something like: All tests OK. Tests passed: 76572. Not handled: 51237, whitelisted: 2662 The tests pass on "host" mode on x86_64 and aarch64 machines, although note that for the x86_64 you need to pass -w whitelist-tininess-after.txt. Running on host mode under QEMU reports flag mismatches (e.g. for x86_64-linux-user), but that isn't too surprising given how little love the i386 frontend gets. Host mode under aarch64-linux-user passes OK. Flush-to-zero and flush-inputs-to-zero modes can be tested with the -z and -Z flags. Note however that the IBM input files are only IEEE-compliant, so for now I've tested these modes by diff'ing the reported errors against the model files. We should look into generating files for these non-standard modes to make testing these modes less painful. Signed-off-by: Emilio G. Cota --- v2 (ajb,cota): - build fixes to avoid glib dependency --- configure | 2 + tests/Makefile.include | 3 + tests/fp/.gitignore | 3 + tests/fp/Makefile | 34 ++ tests/fp/fp-test.c | 1173 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1215 insertions(+) create mode 100644 tests/fp/.gitignore create mode 100644 tests/fp/Makefile create mode 100644 tests/fp/fp-test.c -- 2.17.0 diff --git a/configure b/configure index 0988c88d9f..6362f3af8e 100755 --- a/configure +++ b/configure @@ -7222,12 +7222,14 @@ fi # build tree in object directory in case the source is not in the current directory DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests tests/vm" +DIRS="$DIRS tests/fp" DIRS="$DIRS docs docs/interop fsdev scsi" DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw" DIRS="$DIRS roms/seabios roms/vgabios" FILES="Makefile tests/tcg/Makefile qdict-test-data.txt" FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit" FILES="$FILES tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile" +FILES="$FILES tests/fp/Makefile" FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" FILES="$FILES pc-bios/spapr-rtas/Makefile" FILES="$FILES pc-bios/s390-ccw/Makefile" diff --git a/tests/Makefile.include b/tests/Makefile.include index c402de901e..c019aa46a2 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -644,6 +644,9 @@ tests/qht-bench$(EXESUF): tests/qht-bench.o $(test-util-obj-y) tests/test-bufferiszero$(EXESUF): tests/test-bufferiszero.o $(test-util-obj-y) tests/atomic_add-bench$(EXESUF): tests/atomic_add-bench.o $(test-util-obj-y) +tests/fp/%: + $(MAKE) -C $(dir $@) $(notdir $@) + tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \ hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\ hw/core/bus.o \ diff --git a/tests/fp/.gitignore b/tests/fp/.gitignore new file mode 100644 index 0000000000..0a9fef4368 --- /dev/null +++ b/tests/fp/.gitignore @@ -0,0 +1,3 @@ +ibm +*.txt +fp-test diff --git a/tests/fp/Makefile b/tests/fp/Makefile new file mode 100644 index 0000000000..a208f4cefc --- /dev/null +++ b/tests/fp/Makefile @@ -0,0 +1,34 @@ +BUILD_DIR=$(CURDIR)/../.. + +include ../../config-host.mak +include $(SRC_PATH)/rules.mak + +$(call set-vpath, $(SRC_PATH)/tests/fp $(SRC_PATH)/fpu) + +QEMU_INCLUDES += -I../.. +QEMU_INCLUDES += -I$(SRC_PATH)/fpu +# work around TARGET_* poisoning +QEMU_CFLAGS += -DHW_POISON_H + +IBMFP := ibm-fptests.zip + +OBJS := fp-test$(EXESUF) + +WHITELIST_FILES := whitelist.txt whitelist-tininess-after.txt + +all: $(OBJS) ibm $(WHITELIST_FILES) + +ibm: + wget -nv -O $(IBMFP) http://www.haifa.il.ibm.com/projects/verification/fpgen/download/test_suite.zip + mkdir -p $@ + unzip $(IBMFP) -d $@ + rm -rf $(IBMFP) + +# XXX: upload this to a qemu server, or just commit it. +$(WHITELIST_FILES): + wget -nv -O $@ http://www.cs.columbia.edu/~cota/qemu/fpbench-$@ + +fp-test$(EXESUF): fp-test.o softfloat.o + +clean: + rm -f *.o *.d $(OBJS) diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c new file mode 100644 index 0000000000..27db552160 --- /dev/null +++ b/tests/fp/fp-test.c @@ -0,0 +1,1173 @@ +/* + * fp-test.c - Floating point test suite. + * + * Copyright (C) 2018, Emilio G. Cota + * + * License: GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#ifndef HW_POISON_H +#error Must define HW_POISON_H to work around TARGET_* poisoning +#endif + +#define QEMU_NO_GLIB +#include "qemu/osdep.h" +#include +#include +#include +#include "fpu/softfloat.h" + +enum error { + ERROR_NONE, + ERROR_NOT_HANDLED, + ERROR_WHITELISTED, + ERROR_COMMENT, + ERROR_INPUT, + ERROR_RESULT, + ERROR_EXCEPTIONS, + ERROR_MAX, +}; + +enum input_fmt { + INPUT_FMT_IBM, +}; + +struct input { + const char * const name; + enum error (*test_line)(const char *line); +}; + +enum precision { + PREC_FLOAT, + PREC_DOUBLE, + PREC_QUAD, + PREC_FLOAT_TO_DOUBLE, +}; + +struct op_desc { + const char * const name; + int n_operands; +}; + +enum op { + OP_ADD, + OP_SUB, + OP_MUL, + OP_MULADD, + OP_DIV, + OP_SQRT, + OP_MINNUM, + OP_MAXNUM, + OP_MAXNUMMAG, + OP_ABS, + OP_IS_NAN, + OP_IS_INF, + OP_FLOAT_TO_DOUBLE, +}; + +static const struct op_desc ops[] = { + [OP_ADD] = { "+", 2 }, + [OP_SUB] = { "-", 2 }, + [OP_MUL] = { "*", 2 }, + [OP_MULADD] = { "*+", 3 }, + [OP_DIV] = { "/", 2 }, + [OP_SQRT] = { "V", 1 }, + [OP_MINNUM] = { "C", 2 }, + [OP_MAXNUMMAG] = { ">A", 2 }, + [OP_ABS] = { "A", 1 }, + [OP_IS_NAN] = { "?N", 1 }, + [OP_IS_INF] = { "?i", 1 }, + [OP_FLOAT_TO_DOUBLE] = { "cff", 1 }, +}; + +/* + * We could enumerate all the types here. But really we only care about + * QNaN and SNaN since only those can vary across ISAs. + */ +enum op_type { + OP_TYPE_NUMBER, + OP_TYPE_QNAN, + OP_TYPE_SNAN, +}; + +struct operand { + uint64_t val; + enum op_type type; +}; + +struct test_op { + struct operand operands[3]; + struct operand expected_result; + enum precision prec; + enum op op; + signed char round; + uint8_t trapped_exceptions; + uint8_t exceptions; + bool expected_result_is_valid; +}; + +typedef enum error (*tester_func_t)(struct test_op *); + +struct tester { + tester_func_t func; + const char *name; +}; + +struct whitelist { + char **lines; + size_t n; + struct hsearch_data ht; +}; + +static uint64_t test_stats[ERROR_MAX]; +static struct whitelist whitelist; +static uint8_t default_exceptions; +static bool die_on_error = true; +static struct float_status soft_status = { + .float_detect_tininess = float_tininess_before_rounding, +}; + +static inline float u64_to_float(uint64_t v) +{ + uint32_t v32 = v; + uint32_t *v32p = &v32; + + return *(float *)v32p; +} + +static inline double u64_to_double(uint64_t v) +{ + uint64_t *vp = &v; + + return *(double *)vp; +} + +static inline uint64_t float_to_u64(float f) +{ + float *fp = &f; + + return *(uint32_t *)fp; +} + +static inline uint64_t double_to_u64(double d) +{ + double *dp = &d; + + return *(uint64_t *)dp; +} + +static inline bool is_err(enum error err) +{ + return err != ERROR_NONE && + err != ERROR_NOT_HANDLED && + err != ERROR_WHITELISTED && + err != ERROR_COMMENT; +} + +static int host_exceptions_translate(int host_flags) +{ + int flags = 0; + + if (host_flags & FE_INEXACT) { + flags |= float_flag_inexact; + } + if (host_flags & FE_UNDERFLOW) { + flags |= float_flag_underflow; + } + if (host_flags & FE_OVERFLOW) { + flags |= float_flag_overflow; + } + if (host_flags & FE_DIVBYZERO) { + flags |= float_flag_divbyzero; + } + if (host_flags & FE_INVALID) { + flags |= float_flag_invalid; + } + return flags; +} + +static inline uint8_t host_get_exceptions(void) +{ + return host_exceptions_translate(fetestexcept(FE_ALL_EXCEPT)); +} + +static void host_set_exceptions(uint8_t flags) +{ + int host_flags = 0; + + if (flags & float_flag_inexact) { + host_flags |= FE_INEXACT; + } + if (flags & float_flag_underflow) { + host_flags |= FE_UNDERFLOW; + } + if (flags & float_flag_overflow) { + host_flags |= FE_OVERFLOW; + } + if (flags & float_flag_divbyzero) { + host_flags |= FE_DIVBYZERO; + } + if (flags & float_flag_invalid) { + host_flags |= FE_INVALID; + } + feraiseexcept(host_flags); +} + +#define STANDARD_EXCEPTIONS \ + (float_flag_inexact | float_flag_underflow | \ + float_flag_overflow | float_flag_divbyzero | float_flag_invalid) +#define FMT_EXCEPTIONS "%s%s%s%s%s%s" +#define PR_EXCEPTIONS(x) \ + ((x) & STANDARD_EXCEPTIONS ? "" : "none"), \ + (((x) & float_flag_inexact) ? "x" : ""), \ + (((x) & float_flag_underflow) ? "u" : ""), \ + (((x) & float_flag_overflow) ? "o" : ""), \ + (((x) & float_flag_divbyzero) ? "z" : ""), \ + (((x) & float_flag_invalid) ? "i" : "") + +static enum error tester_check(const struct test_op *t, uint64_t res64, + bool res_is_nan, uint8_t flags) +{ + enum error err = ERROR_NONE; + + if (t->expected_result_is_valid) { + if (t->expected_result.type == OP_TYPE_QNAN || + t->expected_result.type == OP_TYPE_SNAN) { + if (!res_is_nan) { + err = ERROR_RESULT; + goto out; + } + } else if (res64 != t->expected_result.val) { + err = ERROR_RESULT; + goto out; + } + } + if (t->exceptions && flags != (t->exceptions | default_exceptions)) { + err = ERROR_EXCEPTIONS; + goto out; + } + + out: + if (is_err(err)) { + int i; + + fprintf(stderr, "%s ", ops[t->op].name); + for (i = 0; i < ops[t->op].n_operands; i++) { + fprintf(stderr, "0x%" PRIx64 "%s", t->operands[i].val, + i < ops[t->op].n_operands - 1 ? " " : ""); + } + fprintf(stderr, ", expected: 0x%" PRIx64 ", returned: 0x%" PRIx64, + t->expected_result.val, res64); + if (err == ERROR_EXCEPTIONS) { + fprintf(stderr, ", expected exceptions: " FMT_EXCEPTIONS + ", returned: " FMT_EXCEPTIONS, + PR_EXCEPTIONS(t->exceptions), PR_EXCEPTIONS(flags)); + } + fprintf(stderr, "\n"); + } + return err; +} + +static enum error host_tester(struct test_op *t) +{ + uint64_t res64; + bool result_is_nan; + uint8_t flags = 0; + + feclearexcept(FE_ALL_EXCEPT); + if (default_exceptions) { + host_set_exceptions(default_exceptions); + } + + if (t->prec == PREC_FLOAT) { + float a, b, c; + float *in[] = { &a, &b, &c }; + float res; + int i; + + assert(ops[t->op].n_operands <= ARRAY_SIZE(in)); + for (i = 0; i < ops[t->op].n_operands; i++) { + /* use the host's QNaN/SNaN patterns */ + if (t->operands[i].type == OP_TYPE_QNAN) { + *in[i] = __builtin_nanf(""); + } else if (t->operands[i].type == OP_TYPE_SNAN) { + *in[i] = __builtin_nansf(""); + } else { + *in[i] = u64_to_float(t->operands[i].val); + } + } + + if (t->expected_result.type == OP_TYPE_QNAN) { + t->expected_result.val = float_to_u64(__builtin_nanf("")); + } else if (t->expected_result.type == OP_TYPE_SNAN) { + t->expected_result.val = float_to_u64(__builtin_nansf("")); + } + + switch (t->op) { + case OP_ADD: + res = a + b; + break; + case OP_SUB: + res = a - b; + break; + case OP_MUL: + res = a * b; + break; + case OP_MULADD: + res = fmaf(a, b, c); + break; + case OP_DIV: + res = a / b; + break; + case OP_SQRT: + res = sqrtf(a); + break; + case OP_ABS: + res = fabsf(a); + break; + case OP_IS_NAN: + res = !!isnan(a); + break; + case OP_IS_INF: + res = !!isinf(a); + break; + default: + return ERROR_NOT_HANDLED; + } + flags = host_get_exceptions(); + res64 = float_to_u64(res); + result_is_nan = isnan(res); + } else if (t->prec == PREC_DOUBLE) { + double a, b, c; + double *in[] = { &a, &b, &c }; + double res; + int i; + + assert(ops[t->op].n_operands <= ARRAY_SIZE(in)); + for (i = 0; i < ops[t->op].n_operands; i++) { + /* use the host's QNaN/SNaN patterns */ + if (t->operands[i].type == OP_TYPE_QNAN) { + *in[i] = __builtin_nan(""); + } else if (t->operands[i].type == OP_TYPE_SNAN) { + *in[i] = __builtin_nans(""); + } else { + *in[i] = u64_to_double(t->operands[i].val); + } + } + + if (t->expected_result.type == OP_TYPE_QNAN) { + t->expected_result.val = double_to_u64(__builtin_nan("")); + } else if (t->expected_result.type == OP_TYPE_SNAN) { + t->expected_result.val = double_to_u64(__builtin_nans("")); + } + + switch (t->op) { + case OP_ADD: + res = a + b; + break; + case OP_SUB: + res = a - b; + break; + case OP_MUL: + res = a * b; + break; + case OP_MULADD: + res = fma(a, b, c); + break; + case OP_DIV: + res = a / b; + break; + case OP_SQRT: + res = sqrt(a); + break; + case OP_ABS: + res = fabs(a); + break; + case OP_IS_NAN: + res = !!isnan(a); + break; + case OP_IS_INF: + res = !!isinf(a); + break; + default: + return ERROR_NOT_HANDLED; + } + flags = host_get_exceptions(); + res64 = double_to_u64(res); + result_is_nan = isnan(res); + } else if (t->prec == PREC_FLOAT_TO_DOUBLE) { + float a; + double res; + + if (t->operands[0].type == OP_TYPE_QNAN) { + a = __builtin_nanf(""); + } else if (t->operands[0].type == OP_TYPE_SNAN) { + a = __builtin_nansf(""); + } else { + a = u64_to_float(t->operands[0].val); + } + + if (t->expected_result.type == OP_TYPE_QNAN) { + t->expected_result.val = double_to_u64(__builtin_nan("")); + } else if (t->expected_result.type == OP_TYPE_SNAN) { + t->expected_result.val = double_to_u64(__builtin_nans("")); + } + + switch (t->op) { + case OP_FLOAT_TO_DOUBLE: + res = a; + break; + default: + return ERROR_NOT_HANDLED; + } + flags = host_get_exceptions(); + res64 = double_to_u64(res); + result_is_nan = isnan(res); + } else { + return ERROR_NOT_HANDLED; /* XXX */ + } + return tester_check(t, res64, result_is_nan, flags); +} + +static enum error soft_tester(struct test_op *t) +{ + float_status *s = &soft_status; + uint64_t res64; + enum error err = ERROR_NONE; + bool result_is_nan; + + s->float_rounding_mode = t->round; + s->float_exception_flags = default_exceptions; + + if (t->prec == PREC_FLOAT) { + float32 a, b, c; + float32 *in[] = { &a, &b, &c }; + float32 res; + int i; + + assert(ops[t->op].n_operands <= ARRAY_SIZE(in)); + for (i = 0; i < ops[t->op].n_operands; i++) { + *in[i] = t->operands[i].val; + } + + switch (t->op) { + case OP_ADD: + res = float32_add(a, b, s); + break; + case OP_SUB: + res = float32_sub(a, b, s); + break; + case OP_MUL: + res = float32_mul(a, b, s); + break; + case OP_MULADD: + res = float32_muladd(a, b, c, 0, s); + break; + case OP_DIV: + res = float32_div(a, b, s); + break; + case OP_SQRT: + res = float32_sqrt(a, s); + break; + case OP_MINNUM: + res = float32_minnum(a, b, s); + break; + case OP_MAXNUM: + res = float32_maxnum(a, b, s); + break; + case OP_MAXNUMMAG: + res = float32_maxnummag(a, b, s); + break; + case OP_IS_NAN: + { + float f = !!float32_is_any_nan(a); + + res = float_to_u64(f); + break; + } + case OP_IS_INF: + { + float f = !!float32_is_infinity(a); + + res = float_to_u64(f); + break; + } + case OP_ABS: + /* Fall-through: float32_abs does not handle NaN's */ + default: + return ERROR_NOT_HANDLED; + } + res64 = res; + result_is_nan = isnan(*(float *)&res); + } else if (t->prec == PREC_DOUBLE) { + float64 a, b, c; + float64 *in[] = { &a, &b, &c }; + int i; + + assert(ops[t->op].n_operands <= ARRAY_SIZE(in)); + for (i = 0; i < ops[t->op].n_operands; i++) { + *in[i] = t->operands[i].val; + } + + switch (t->op) { + case OP_ADD: + res64 = float64_add(a, b, s); + break; + case OP_SUB: + res64 = float64_sub(a, b, s); + break; + case OP_MUL: + res64 = float64_mul(a, b, s); + break; + case OP_MULADD: + res64 = float64_muladd(a, b, c, 0, s); + break; + case OP_DIV: + res64 = float64_div(a, b, s); + break; + case OP_SQRT: + res64 = float64_sqrt(a, s); + break; + case OP_MINNUM: + res64 = float64_minnum(a, b, s); + break; + case OP_MAXNUM: + res64 = float64_maxnum(a, b, s); + break; + case OP_MAXNUMMAG: + res64 = float64_maxnummag(a, b, s); + break; + case OP_IS_NAN: + { + double d = !!float64_is_any_nan(a); + + res64 = double_to_u64(d); + break; + } + case OP_IS_INF: + { + double d = !!float64_is_infinity(a); + + res64 = double_to_u64(d); + break; + } + case OP_ABS: + /* Fall-through: float64_abs does not handle NaN's */ + default: + return ERROR_NOT_HANDLED; + } + result_is_nan = isnan(*(double *)&res64); + } else if (t->prec == PREC_FLOAT_TO_DOUBLE) { + float32 a = t->operands[0].val; + + switch (t->op) { + case OP_FLOAT_TO_DOUBLE: + res64 = float32_to_float64(a, s); + break; + default: + return ERROR_NOT_HANDLED; + } + result_is_nan = isnan(*(double *)&res64); + } else { + return ERROR_NOT_HANDLED; /* XXX */ + } + return tester_check(t, res64, result_is_nan, s->float_exception_flags); + return err; +} + +static const struct tester valid_testers[] = { + [0] = { + .name = "soft", + .func = soft_tester, + }, + [1] = { + .name = "host", + .func = host_tester, + }, +}; + +static const struct tester *tester = &valid_testers[0]; + +static int ibm_get_exceptions(const char *p, uint8_t *excp) +{ + while (*p) { + switch (*p) { + case 'x': + *excp |= float_flag_inexact; + break; + case 'u': + *excp |= float_flag_underflow; + break; + case 'o': + *excp |= float_flag_overflow; + break; + case 'z': + *excp |= float_flag_divbyzero; + break; + case 'i': + *excp |= float_flag_invalid; + break; + default: + return 1; + } + p++; + } + return 0; +} + +static uint64_t fp_choose(enum precision prec, uint64_t f, uint64_t d) +{ + switch (prec) { + case PREC_FLOAT: + return f; + case PREC_DOUBLE: + return d; + default: + assert(false); + } +} + +static int +ibm_fp_hex(const char *p, enum precision prec, struct operand *ret) +{ + int len; + + ret->type = OP_TYPE_NUMBER; + + /* QNaN */ + if (unlikely(!strcmp("Q", p))) { + ret->val = fp_choose(prec, 0xffc00000, 0xfff8000000000000); + ret->type = OP_TYPE_QNAN; + return 0; + } + /* SNaN */ + if (unlikely(!strcmp("S", p))) { + ret->val = fp_choose(prec, 0xffb00000, 0xfff7000000000000); + ret->type = OP_TYPE_SNAN; + return 0; + } + if (unlikely(!strcmp("+Zero", p))) { + ret->val = fp_choose(prec, 0x00000000, 0x0000000000000000); + return 0; + } + if (unlikely(!strcmp("-Zero", p))) { + ret->val = fp_choose(prec, 0x80000000, 0x8000000000000000); + return 0; + } + if (unlikely(!strcmp("+inf", p) || !strcmp("+Inf", p))) { + ret->val = fp_choose(prec, 0x7f800000, 0x7ff0000000000000); + return 0; + } + if (unlikely(!strcmp("-inf", p) || !strcmp("-Inf", p))) { + ret->val = fp_choose(prec, 0xff800000, 0xfff0000000000000); + return 0; + } + + len = strlen(p); + + if (strchr(p, 'P')) { + bool negative = p[0] == '-'; + char *pos; + bool denormal; + + if (len <= 4) { + return 1; + } + denormal = p[1] == '0'; + if (prec == PREC_FLOAT) { + uint32_t exponent; + uint32_t significand; + uint32_t h; + + significand = strtoul(&p[3], &pos, 16); + if (*pos != 'P') { + return 1; + } + pos++; + exponent = strtol(pos, &pos, 10) + 127; + if (pos != p + len) { + return 1; + } + /* + * When there's a leading zero, we have a denormal number. We'd + * expect the input (unbiased) exponent to be -127, but for some + * reason -126 is used. Correct that here. + */ + if (denormal) { + if (exponent != 1) { + return 1; + } + exponent = 0; + } + h = negative ? (1 << 31) : 0; + h |= exponent << 23; + h |= significand; + ret->val = h; + return 0; + } else if (prec == PREC_DOUBLE) { + uint64_t exponent; + uint64_t significand; + uint64_t h; + + significand = strtoul(&p[3], &pos, 16); + if (*pos != 'P') { + return 1; + } + pos++; + exponent = strtol(pos, &pos, 10) + 1023; + if (pos != p + len) { + return 1; + } + if (denormal) { + return 1; /* XXX */ + } + h = negative ? (1ULL << 63) : 0; + h |= exponent << 52; + h |= significand; + ret->val = h; + return 0; + } else { /* XXX */ + return 1; + } + } else if (strchr(p, 'e')) { + char *pos; + + if (prec == PREC_FLOAT) { + float f = strtof(p, &pos); + + if (*pos) { + return 1; + } + ret->val = float_to_u64(f); + return 0; + } + if (prec == PREC_DOUBLE) { + double d = strtod(p, &pos); + + if (*pos) { + return 1; + } + ret->val = double_to_u64(d); + return 0; + } + return 0; + } else if (!strcmp(p, "0x0")) { + if (prec == PREC_FLOAT) { + ret->val = float_to_u64(0.0); + } else if (prec == PREC_DOUBLE) { + ret->val = double_to_u64(0.0); + } else { + assert(false); + } + return 0; + } else if (!strcmp(p, "0x1")) { + if (prec == PREC_FLOAT) { + ret->val = float_to_u64(1.0); + } else if (prec == PREC_DOUBLE) { + ret->val = double_to_u64(1.0); + } else { + assert(false); + } + return 0; + } + return 1; +} + +static int find_op(const char *name, enum op *op) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(ops); i++) { + if (strcmp(ops[i].name, name) == 0) { + *op = i; + return 0; + } + } + return 1; +} + +/* Syntax of IBM FP test cases: + * https://www.research.ibm.com/haifa/projects/verification/fpgen/syntax.txt + */ +static enum error ibm_test_line(const char *line) +{ + struct test_op t; + /* at most nine fields; this should be more than enough for each field */ + char s[9][64]; + char *p; + int n, field; + int i; + + /* data lines start with either b32 or d(64|128) */ + if (unlikely(line[0] != 'b' && line[0] != 'd')) { + return ERROR_COMMENT; + } + n = sscanf(line, "%63s %63s %63s %63s %63s %63s %63s %63s %63s", + s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8]); + if (unlikely(n < 5 || n > 9)) { + return ERROR_INPUT; + } + + field = 0; + p = s[field]; + if (unlikely(strlen(p) < 4)) { + return ERROR_INPUT; + } + if (strcmp("b32b64cff", p) == 0) { + t.prec = PREC_FLOAT_TO_DOUBLE; + if (find_op(&p[6], &t.op)) { + return ERROR_NOT_HANDLED; + } + } else { + if (strncmp("b32", p, 3) == 0) { + t.prec = PREC_FLOAT; + } else if (strncmp("d64", p, 3) == 0) { + t.prec = PREC_DOUBLE; + } else if (strncmp("d128", p, 4) == 0) { + return ERROR_NOT_HANDLED; /* XXX */ + } else { + return ERROR_INPUT; + } + if (find_op(&p[3], &t.op)) { + return ERROR_NOT_HANDLED; + } + } + + field = 1; + p = s[field]; + if (!strncmp("=0", p, 2)) { + t.round = float_round_nearest_even; + } else { + return ERROR_NOT_HANDLED; /* XXX */ + } + + /* The trapped exceptions field is optional */ + t.trapped_exceptions = 0; + field = 2; + p = s[field]; + if (ibm_get_exceptions(p, &t.trapped_exceptions)) { + if (unlikely(n == 9)) { + return ERROR_INPUT; + } + } else { + field++; + } + + for (i = 0; i < ops[t.op].n_operands; i++) { + enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ? + PREC_FLOAT : t.prec; + + p = s[field++]; + if (ibm_fp_hex(p, prec, &t.operands[i])) { + return ERROR_INPUT; + } + } + + p = s[field++]; + if (strcmp("->", p)) { + return ERROR_INPUT; + } + + p = s[field++]; + if (unlikely(strcmp("#", p) == 0)) { + t.expected_result_is_valid = false; + } else { + enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ? + PREC_DOUBLE : t.prec; + + if (ibm_fp_hex(p, prec, &t.expected_result)) { + return ERROR_INPUT; + } + t.expected_result_is_valid = true; + } + + /* + * A 0 here means "do not check the exceptions", i.e. it does NOT mean + * "there should be no exceptions raised". + */ + t.exceptions = 0; + /* the expected exceptions field is optional */ + if (field == n - 1) { + p = s[field++]; + if (ibm_get_exceptions(p, &t.exceptions)) { + return ERROR_INPUT; + } + } + + /* + * We ignore "trapped exceptions" because we're not testing the trapping + * mechanism of the host CPU. + * We test though that the exception bits are correctly set. + */ + if (t.trapped_exceptions) { + return ERROR_NOT_HANDLED; + } + return tester->func(&t); +} + +static const struct input valid_input_types[] = { + [INPUT_FMT_IBM] = { + .name = "ibm", + .test_line = ibm_test_line, + }, +}; + +static const struct input *input_type = &valid_input_types[INPUT_FMT_IBM]; + +static bool line_is_whitelisted(char *line) +{ + ENTRY e, *ep; + + if (whitelist.ht.size == 0) { + return false; + } + e.key = line; + return hsearch_r(e, FIND, &ep, &whitelist.ht); +} + +static void test_file(const char *filename) +{ + static char line[256]; + unsigned int i; + FILE *fp; + + fp = fopen(filename, "r"); + if (fp == NULL) { + fprintf(stderr, "cannot open file '%s': %s\n", + filename, strerror(errno)); + exit(EXIT_FAILURE); + } + i = 0; + while (fgets(line, sizeof(line), fp)) { + enum error err; + + i++; + if (unlikely(line_is_whitelisted(line))) { + test_stats[ERROR_WHITELISTED]++; + continue; + } + err = input_type->test_line(line); + if (unlikely(is_err(err))) { + switch (err) { + case ERROR_INPUT: + fprintf(stderr, "error: malformed input @ %s:%d:\n", + filename, i); + break; + case ERROR_RESULT: + fprintf(stderr, "error: result mismatch for input @ %s:%d:\n", + filename, i); + break; + case ERROR_EXCEPTIONS: + fprintf(stderr, "error: flags mismatch for input @ %s:%d:\n", + filename, i); + break; + default: + assert(false); + } + fprintf(stderr, "%s", line); + if (die_on_error) { + exit(EXIT_FAILURE); + } + } + test_stats[err]++; + } + if (fclose(fp)) { + fprintf(stderr, "warning: cannot close file '%s': %s\n", + filename, strerror(errno)); + } +} + +static void set_input_fmt(const char *optarg) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(valid_input_types); i++) { + const struct input *type = &valid_input_types[i]; + + if (strcmp(optarg, type->name) == 0) { + input_type = type; + return; + } + } + fprintf(stderr, "Unknown input format '%s'", optarg); + exit(EXIT_FAILURE); +} + +static void set_tester(const char *optarg) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(valid_testers); i++) { + const struct tester *t = &valid_testers[i]; + + if (strcmp(optarg, t->name) == 0) { + tester = t; + return; + } + } + fprintf(stderr, "Unknown tester '%s'", optarg); + exit(EXIT_FAILURE); +} + +static void whitelist_add_line(const char *orig_line) +{ + char *line = strdup(orig_line); + bool inserted; + ENTRY e, *ep; + int r; + + if (whitelist.ht.size == 0) { + if (!hcreate_r(4096, &whitelist.ht)) { + fprintf(stderr, "%s: error creating hash table\n", __func__); + } + } + + int hsearch_r(ENTRY item, ACTION action, ENTRY **retval, + struct hsearch_data *htab); + + e.key = line; + r = hsearch_r(e, FIND, &ep, &whitelist.ht); + if (unlikely(r)) { + free(line); + return; + } + whitelist.n++; + whitelist.lines = realloc(whitelist.lines, (whitelist.n * sizeof(line))); + whitelist.lines[whitelist.n - 1] = line; + e.data = line; + inserted = hsearch_r(e, ENTER, &ep, &whitelist.ht); + assert(inserted); +} + +static void set_whitelist(const char *filename) +{ + FILE *fp; + static char line[256]; + + fp = fopen(filename, "r"); + if (fp == NULL) { + fprintf(stderr, "warning: cannot open white list file '%s': %s\n", + filename, strerror(errno)); + return; + } + while (fgets(line, sizeof(line), fp)) { + if (isspace(line[0]) || line[0] == '#') { + continue; + } + whitelist_add_line(line); + } + if (fclose(fp)) { + fprintf(stderr, "warning: cannot close file '%s': %s\n", + filename, strerror(errno)); + } +} + +static void set_default_exceptions(const char *str) +{ + if (ibm_get_exceptions(str, &default_exceptions)) { + fprintf(stderr, "Invalid exception '%s'\n", str); + exit(EXIT_FAILURE); + } +} + +static void usage_complete(int argc, char *argv[]) +{ + fprintf(stderr, "Usage: %s [options] file1 [file2 ...]\n", argv[0]); + fprintf(stderr, "options:\n"); + fprintf(stderr, " -n = do not die on error. Default: dies on error\n"); + fprintf(stderr, " -e = default exception flags (xiozu). Default: none\n"); + fprintf(stderr, " -f = format of the input file(s). Default: %s\n", + valid_input_types[0].name); + fprintf(stderr, " -t = tester. Default: %s\n", valid_testers[0].name); + fprintf(stderr, " -w = path to file with test cases to be whitelisted\n"); + fprintf(stderr, " -a = Perform tininess detection after rounding " + "(soft tester only). Default: before\n"); + fprintf(stderr, " -z = flush inputs to zero (soft tester only). " + "Default: disabled\n"); + fprintf(stderr, " -Z = flush output to zero (soft tester only). " + "Default: disabled\n"); +} + +static void parse_opts(int argc, char *argv[]) +{ + int c; + + for (;;) { + c = getopt(argc, argv, "ae:f:hnt:w:zZ"); + if (c < 0) { + return; + } + switch (c) { + case 'e': + set_default_exceptions(optarg); + break; + case 'f': + set_input_fmt(optarg); + break; + case 'h': + usage_complete(argc, argv); + exit(EXIT_SUCCESS); + case 'n': + die_on_error = false; + break; + case 't': + set_tester(optarg); + break; + case 'w': + set_whitelist(optarg); + break; + case 'a': + soft_status.float_detect_tininess = float_tininess_after_rounding; + break; + case 'z': + soft_status.flush_inputs_to_zero = 1; + break; + case 'Z': + soft_status.flush_to_zero = 1; + break; + } + } + assert(false); +} + +static uint64_t count_errors(void) +{ + uint64_t ret = 0; + int i; + + for (i = ERROR_INPUT; i < ERROR_MAX; i++) { + ret += test_stats[i]; + } + return ret; +} + +int main(int argc, char *argv[]) +{ + uint64_t n_errors; + int i; + + if (argc == 1) { + usage_complete(argc, argv); + exit(EXIT_FAILURE); + } + parse_opts(argc, argv); + for (i = optind; i < argc; i++) { + test_file(argv[i]); + } + + n_errors = count_errors(); + if (n_errors) { + printf("Tests failed: %"PRIu64". Parsing: %"PRIu64 + ", result:%"PRIu64", flags:%"PRIu64"\n", + n_errors, test_stats[ERROR_INPUT], test_stats[ERROR_RESULT], + test_stats[ERROR_EXCEPTIONS]); + } else { + printf("All tests OK.\n"); + } + printf("Tests passed: %" PRIu64 ". Not handled: %" PRIu64 + ", whitelisted: %"PRIu64 "\n", + test_stats[ERROR_NONE], test_stats[ERROR_NOT_HANDLED], + test_stats[ERROR_WHITELISTED]); + return !!n_errors; +} From patchwork Thu Apr 19 13:58:59 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: 133804 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp713304ljf; Thu, 19 Apr 2018 07:37:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx49YnSBhbt3Mr419E2R6QV1m4qsy0UQN2JcPX1V0Jn5Eh7XqIQc58ttjTyZrVojSrcyKyqvx X-Received: by 2002:aed:232c:: with SMTP id h41-v6mr6469171qtc.115.1524148668837; Thu, 19 Apr 2018 07:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148668; cv=none; d=google.com; s=arc-20160816; b=atdJP3uHgnQjm0LxK5WwzGt8STuE39ZpLCgv+EQNOrIldLOs5vJDyjTwOSwUhxoJ74 LSgvEnQ7w9gnpeyKoR8IQMxXqVl6HkR6NCACBWFn82pY4/IrFB2w1yM2g7Y57UF79W7e rJvJM9Hfvcc5cpAtFBJrTuXVIjnoh9U1gJZaLGiWK9N5VoYMC7g6U1kDNxJC++2Utj8M mmFPuFXwYMVpPxCCxxqE5n+kW9G0yflRPw23v/NaTcr5GpH2UfbCqBzNGkPWNWr6TWX4 Mibkbzy8bynnIpxeS5H0TIHiT9fK+gi8BnAIiRvQW8UbQp0gS28OAlML5vTmiDr4Dhkk xmVg== 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=o4H2aEHrCUWjd65LdAgAbF6cZHgmMOMeakm1BTDNz9M=; b=Z6z/fJ60QhLsjUt602K/zUYjEyP2M9oYQUjgUJcyYKV2yio1HDvD6iYdHnOKZB4Fa6 q+RXYiatXaNE4VqLnmCndrKWnEVv5p87vYXqoV4nPkCG9WwYzN6P5ZjYEci1S3RcYVrB LgWlbEBY0E+eNO1nqcgl1sUP9S1eIy+wBjBeMpbAdcUim5f5rvx2nF97IoqmU7Vxt4Kr gOmhuW1gNMqnaeNXVLL2nRtOOX+/lKUzkdlbW3f5Yaaxq1luDslrVDFxcNpbhi1JrVNN zgVI1qYHJb5RT21kug9ohmoQuCsdrDLVNyM4bIGyv1BjAkkoalCFlfwQf6nWalqR/5mW NQkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Yu5hCit9; 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 r25si489869qve.3.2018.04.19.07.37.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:37:48 -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=Yu5hCit9; 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]:51567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9Ah2-00088z-Ad for patch@linaro.org; Thu, 19 Apr 2018 10:37:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANX-0004mT-Fm for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANU-00068x-5L for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:38 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:38511) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANT-00068H-Uf for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:36 -0400 Received: by mail-wr0-x242.google.com with SMTP id h3-v6so14534057wrh.5 for ; Thu, 19 Apr 2018 07:17:35 -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=o4H2aEHrCUWjd65LdAgAbF6cZHgmMOMeakm1BTDNz9M=; b=Yu5hCit9RuckPO96XD6kGc9Gn6z7vlkWXDwLdKCye3YCCGIXKQRG0Fg5aKExDrIL6s tIdJ80SM+Q9dy37EZmrwVfyEmEVhTu6RX+p0dVnUOYvdIi7gixJBI2PDzjaJamP1igDs ibJIRYpqtx7mv/gdig7fUF2HpfD6Fh3usCV5g= 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=o4H2aEHrCUWjd65LdAgAbF6cZHgmMOMeakm1BTDNz9M=; b=WMJtNYYHqII6dlpc9iWjQRzyaroh0/EipGoauxtvTnTsGnup9LxTAvd4Mhb5ldj0jN yeajThBf+lXJA4TxvMjMSvHcTPY/SdnRGFJQKpOPWHUUSlDvTp4t8PTsOTjs/r8m2foq aKbqze38/6g+idrt9CLX+I1lNDAKicz61DRu5gzXQwML0d1W1wqibSolwVtinAtuL+zW H9qSOWpYF2swhATdfGgFXeQ+w+Rrj3IwYLZUZ1m35OCejXwkQj/5HXktP4LY1pS2NDKt 2B2BgyE+tjfMUs3qckHF8nz62VCRi7kJHGXLV0o3WSDkAW1Cdg3sNp75qHF2Y6ayRWkX W8Dw== X-Gm-Message-State: ALQs6tAYC1XzmRgIuaPuNP/DBlKQU8gef5b/jzfssAUuAiheuIcT/CKn Ui73Hrgy4edd+frPH5G1xLJsasizKSw= X-Received: by 10.28.112.3 with SMTP id l3mr5048869wmc.90.1524147454874; Thu, 19 Apr 2018 07:17:34 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 11sm5011550wmr.16.2018.04.19.07.17.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 9F4673E02CB; Thu, 19 Apr 2018 14:59:04 +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:59 +0100 Message-Id: <20180419135901.30035-42-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::242 Subject: [Qemu-devel] [PATCH v2 41/43] tests/tcg/multiarch: add fp-test into multiarch set 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" The compile for fp-test is a little funky as we need to include a build of QEMU's softfloat as well. There is still a problem caused by the inclusion of config-host.h by osdep.h as it will trigger problems like: In file included from /home/alex/lsrc/qemu/qemu.git/include/qemu/bitops.h:16:0, from /home/alex/lsrc/qemu/qemu.git/fpu/softfloat.c:87: /home/alex/lsrc/qemu/qemu.git/include/qemu/host-utils.h: In function ‘mulu64’: /home/alex/lsrc/qemu/qemu.git/include/qemu/host-utils.h:35:5: error: unknown type name ‘__uint128_t’ __uint128_t r = (__uint128_t)a * b; ^ When trying to cross build i386 on an x86_64 host. Signed-off-by: Alex Bennée --- tests/tcg/multiarch/Makefile.target | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.17.0 diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target index a691fd59d3..52adc18625 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -28,3 +28,21 @@ run-test-mmap: test-mmap -$(QEMU) -p 16384 ./test-mmap 16384 -$(QEMU) -p 32768 ./test-mmap 32768 +# +# Include the fp-test from the main test suite +# + +VPATH+=$(SRC_PATH)/tests/fp +VPATH+=$(SRC_PATH)/fpu +TESTS+=fp-test + +FP_CFLAGS := $(CFLAGS) -Wall -O0 -g -fno-strict-aliasing +FP_CFLAGS += $(QEMU_INCLUDES) +FP_CFLAGS += -D_GNU_SOURCE -DHW_POISON_H + +fp-test.o softfloat.o: %.o: %.c + $(CC) $(FP_CFLAGS) -c $< -o $@ + +fp-test: fp-test.o softfloat.o + $(CC) $^ -o $@ -lm -static + From patchwork Thu Apr 19 13:59:00 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: 133780 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp688714ljf; Thu, 19 Apr 2018 07:14:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx48rS7Swc0+YxjU1Ay0nDhWO4GmKatRyEgvnYSwHyGHfUS42aRW7I6xIpshvvB0NsAU9liSE X-Received: by 2002:ac8:3109:: with SMTP id g9-v6mr6180315qtb.399.1524147278549; Thu, 19 Apr 2018 07:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147278; cv=none; d=google.com; s=arc-20160816; b=qEczHErpNfmkLcAmBOduhgnEcDgWb4ONC5Pt4gGD1yFyMLjG+An/V/s1gXrmIHIrfy qRx8z/TeRP5CJagK++bBIlq4drPbxEnkmzNTnUJsCHUf3pOWf60h9gptW2j0qKCvNJFV 0NSGBzoFtsOyz9lvtn6HpvbL5fQ8HoboWx5CM9+A0OsK4gmcFrt/yETLG9Ge0qV/dI9I 6WvxzxdGFC3BTH4U+rZXrxFk5sTAh7IEPP19R5A/L4CjKXPXkKCqAAq9GAyQD9EMFuwK Fei26psM+8XKBb/VPCzSMSmxBpvwxpLATnYn6aG70s52OZ0OAQE8uvBU/JCgtQpfoxjC rdoQ== 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=mY3PXU5krKzSB4MJ2lZkE+sRdzZgSATMBkdhuzagHLY=; b=piZUkhIuOVHnLXuwUUZBI+4XrI8COxBeVn/tSpmsWT3iduyrJkOndAYlWaDaZZSxsY uLkJQNMU/nnD0t0UMQMJOwzq1oV3XOyxYN+pm4s5d0F57p2cTP5IbEUOXLiYqMW34SKg yz42pR0P+Yp3ToP0kDxZNMz7IAL2ZC80Jk65C6l8oxcFbZziYQpC9sO2t6n8ssOSvNAH PvWm9g/4PERIpXCi8ODpWUp3j22JkbjLFc+EuuDilZKWid1y4ZNlWFHlo63wUOrOlIET JIH6zyH4iwGSRDNkdu5M3i4d4eCQbnD304uUo+Pk8mU3oo6U8a/G+6ezEPqny1Z1kOk+ kOsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=B3X0ECM0; 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 w21-v6si767381qtg.389.2018.04.19.07.14.38 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:14:38 -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=B3X0ECM0; 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]:50136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AKc-0001ph-03 for patch@linaro.org; Thu, 19 Apr 2018 10:14:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADt-0004Xs-OP for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADs-0005LT-KS for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:41 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:45632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADs-0005HQ-9X for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:40 -0400 Received: by mail-wr0-x244.google.com with SMTP id u11-v6so14408163wri.12 for ; Thu, 19 Apr 2018 07:07:40 -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=mY3PXU5krKzSB4MJ2lZkE+sRdzZgSATMBkdhuzagHLY=; b=B3X0ECM0/r57krWZifBLO/f5T8jYFEaLobtZRjZFi9AoA2zGc3ugiZM3sL08OsQ773 k/5Y+/Dzr3+/W1DoSVwxG4wUndSIATkhnFqFRamxmFugDNjIRKTY193/Nj7ftLCgvFkj 4apR4z7/L4xFoUWZIN+00DvdW4hOJjxuvloUI= 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=mY3PXU5krKzSB4MJ2lZkE+sRdzZgSATMBkdhuzagHLY=; b=aX1fHN8Bhh7Xp600y6IY/BSfGPafRRnpcBZbnBgyie+uDtJbBWTM4ZbOYfw6lbtcfz qqFQbzOszb2UhWwVGo8+0aAHUcRRESbDxXr81Tz8AZchZ17AmogxBLHpNDkQUbgjZOaW HuajjTaTl+sGHCXHdL0bv71df47UBzwqlz0t+cJjTjAmkrANmJW9mwrOIS3r8jpAvqHE wVkQHn8/sUGk1VDdLVDjrV7DEK0KYepqPkL4rMmSV8IRGunxfFUU7N3abJ9/tUqll1uW +yPp8RDZsM++SapGOYsqiy/uiYJcVp9s13aea2bhD9sEs7wnIKECabE8CImVvkdAmAjn 7t1Q== X-Gm-Message-State: ALQs6tATLRjoR/RaDEab7/BE4bEd5GvaklulsbZf/bwBPFk4qSHVdBH5 JzXXi8kb1QiLg7sPPfT6xao15g== X-Received: by 2002:adf:e64b:: with SMTP id b11-v6mr1057397wrn.51.1524146859349; Thu, 19 Apr 2018 07:07:39 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 2-v6sm6974056wrb.22.2018.04.19.07.07.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B0FCA3E0A5F; Thu, 19 Apr 2018 14:59:04 +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:59:00 +0100 Message-Id: <20180419135901.30035-43-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::244 Subject: [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!) 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" This prevents us trying to build fp-test for 32 bit guests as they would fail due to pollution from config-host.h when including osdep.h. As keeping softfloat.o would be useful maybe we can conditionally disabled it? Signed-off-by: Alex Bennée --- tests/tcg/multiarch/Makefile.target | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.0 diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target index 52adc18625..8bf6f3f8dc 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -31,6 +31,7 @@ run-test-mmap: test-mmap # # Include the fp-test from the main test suite # +ifneq (,$(findstring 64,$(TARGET_NAME))) VPATH+=$(SRC_PATH)/tests/fp VPATH+=$(SRC_PATH)/fpu @@ -46,3 +47,4 @@ fp-test.o softfloat.o: %.o: %.c fp-test: fp-test.o softfloat.o $(CC) $^ -o $@ -lm -static +endif From patchwork Thu Apr 19 13:59:01 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: 133817 Delivered-To: patch@linaro.org Received: by 10.80.173.174 with SMTP id a43csp881706edd; Thu, 19 Apr 2018 07:40:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqzy3i6IvY+KiPNaORQgj1qaX1RKK6K9tjw687JJ/Nzb2Xevh/z39HHnupRs0Lf8BOn1HeA X-Received: by 2002:ac8:36f3:: with SMTP id b48-v6mr6557584qtc.334.1524148817704; Thu, 19 Apr 2018 07:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148817; cv=none; d=google.com; s=arc-20160816; b=WHbz9+uE0hks3vpbZvpGmYq7r+kXfCKQBO/GRKR00ts4nswSOAuZWNbECTyee+Suyw nGvqNbV6IRt3KG1I6O0qyXjq1D0mZDgWgAqTNEGIvzQOKKEs9YXwXqTomsBmNgR3G/iB 1xpnsEQgaTJkalrVQQ5605aS68T80NnGlXL0Fzw8OXAnDORBRismiJH1QtdvAdvIjU8j h4MuIvSnICBEytIaWt6RugaB3v+puzIzczwDnfsj2RTyvCT0dfc0s6hVBOXAk43xcUo0 Yt4UOBhVTaO4544ZiN+ga7vkhKKqx7TqBHyLZVlyO450varZydDWk4SEx18MCVIVswUH fTAg== 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=P3asiZvmEFcfZLk1LuNlofp3lbV5s5ec5DQZs8UIfRQ=; b=WnjyzCHH9Z0nUSWE3XWv1Mldcvp3JBkd7zIoBH+a4oLWzvDRSVEn27eKfngMoWSL3W 8aONl8Jgh7Ja1WTtLbKg+gyi0GpYUKMYp2762AFsq9alqFsRae2lY2VofJjqw97Dolau VaUocodZT8mGn1/6kqi/MfjUx9asEmOmI3moX0lrl9+uXS3i6t2TCo3UsEZP5ykK6eGk R/T7pIm2FkvbLHDXkyWX4Q0gfyEjh6GlFLh9ZTc2vCZWxypXGrWiUeE6vuLxzdPzDVN8 rgvcSMXHiROpsk0/KLD7WknACEL1Z7+2xup9Ucp18lY8vU9MjraQlvcNIjQ1OUzoIPXc kh2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fIJLtgYd; 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 y36si478450qve.75.2018.04.19.07.40.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:40:17 -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=fIJLtgYd; 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]:51834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AjR-0001ZE-66 for patch@linaro.org; Thu, 19 Apr 2018 10:40:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ANb-0004qA-P3 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ANV-0006AR-RJ for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:43 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:39272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ANV-00069c-Gf for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:17:37 -0400 Received: by mail-wr0-x242.google.com with SMTP id q3-v6so4491709wrj.6 for ; Thu, 19 Apr 2018 07:17:37 -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=P3asiZvmEFcfZLk1LuNlofp3lbV5s5ec5DQZs8UIfRQ=; b=fIJLtgYdor5Q5yjQLQ5JLAxWy+U9M5HBxJcy0539lMWqRfWJez3nc82gk2vI7mqYwx dkaxNVq1uUAinkL/eTVDITfyVRuJo0O6qDIgCEOiMsDWXiQ44/kQGJihljKlmsPCx5ti 0m7RL2fQVcdQJ0pDVbd4T/ompuykl6wLyuUGc= 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=P3asiZvmEFcfZLk1LuNlofp3lbV5s5ec5DQZs8UIfRQ=; b=eh2tVct3sl7Qvgil8wTpJG1qVe3YGxGaepdbKizTHf09fThrXYObTQgOvloGeEO7Nf 9aEE8YPgoPMcGdxwIth+rBqY/+jgEcpd63SgmEk9xUGaAT5Gn1nkiV3rTvkKPi5WMbEh YJ2Kbp2DSbUcHMrkTRwBcdkYilfLg1QPuJlfdwyTau9oJXDamBJZrjzGPlj0+gbJXJ+i rVfw8D6N7ygm4VmsAaM54CxtWVAegPSFuuue2H584a39S17FsFjJ/M4Fxi+1+qtwlM34 9N6Oh4YUlRUsSZ6xkeC90VqmdDm1IwD1hP1F84hU3XqI1UTlGunsFGqRNMIFDoG7f5By RExw== X-Gm-Message-State: ALQs6tAXvizphg8zRPrSP5z+RLXieJV9tOVb5up/Ak4JNCYDf0KvibD2 i6ppkGocSwtlw8/hMWsXot7ugw== X-Received: by 2002:adf:8e44:: with SMTP id n62-v6mr5205315wrb.159.1524147456271; Thu, 19 Apr 2018 07:17:36 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 14sm5294543wmo.27.2018.04.19.07.17.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:17:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id C52D83E0AC0; Thu, 19 Apr 2018 14:59:04 +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:59:01 +0100 Message-Id: <20180419135901.30035-44-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::242 Subject: [Qemu-devel] [PATCH v2 43/43] tests: fp-test add fcvt support (!INCOMPLETE WIP) 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" This adds support for the various FOO-to-BAR conversions to fp-test. It also defines PREC_HALF although currently that is not used and will need compile time detection for _Float16 support. I've added a small test file for testing against regressions. Signed-off-by: Alex Bennée --- tests/fp/fp-test.c | 535 +++++++++++++++++++++++--- tests/fp/qemu/regression-tests.fptest | 7 + 2 files changed, 479 insertions(+), 63 deletions(-) create mode 100644 tests/fp/qemu/regression-tests.fptest -- 2.17.0 diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c index 27db552160..320da2398a 100644 --- a/tests/fp/fp-test.c +++ b/tests/fp/fp-test.c @@ -38,15 +38,167 @@ struct input { }; enum precision { + PREC_HALF, PREC_FLOAT, PREC_DOUBLE, PREC_QUAD, + /* Integers */ + PREC_INT16, + PREC_INT32, + PREC_INT64, + PREC_UINT16, + PREC_UINT32, + PREC_UINT64, + /* Float to Float conversions */ + PREC_HALF_TO_FLOAT, + PREC_HALF_TO_DOUBLE, + PREC_FLOAT_TO_HALF, PREC_FLOAT_TO_DOUBLE, + PREC_DOUBLE_TO_HALF, + PREC_DOUBLE_TO_FLOAT, + /* Float to Int conversions */ + PREC_HALF_TO_INT16, + PREC_HALF_TO_INT32, + PREC_HALF_TO_INT64, + PREC_FLOAT_TO_INT16, + PREC_FLOAT_TO_INT32, + PREC_FLOAT_TO_INT64, + PREC_DOUBLE_TO_INT16, + PREC_DOUBLE_TO_INT32, + PREC_DOUBLE_TO_INT64, + /* Float to unsigned int conversions */ + PREC_HALF_TO_UINT16, + PREC_HALF_TO_UINT32, + PREC_HALF_TO_UINT64, + PREC_FLOAT_TO_UINT16, + PREC_FLOAT_TO_UINT32, + PREC_FLOAT_TO_UINT64, + PREC_DOUBLE_TO_UINT16, + PREC_DOUBLE_TO_UINT32, + PREC_DOUBLE_TO_UINT64, + /* Int to float conversions */ + PREC_INT16_TO_HALF, + PREC_INT16_TO_FLOAT, + PREC_INT16_TO_DOUBLE, + PREC_INT32_TO_HALF, + PREC_INT32_TO_FLOAT, + PREC_INT32_TO_DOUBLE, + PREC_INT64_TO_HALF, + PREC_INT64_TO_FLOAT, + PREC_INT64_TO_DOUBLE, + /* Unsigned int to float conversions */ + PREC_UINT16_TO_HALF, + PREC_UINT16_TO_FLOAT, + PREC_UINT16_TO_DOUBLE, + PREC_UINT32_TO_HALF, + PREC_UINT32_TO_FLOAT, + PREC_UINT32_TO_DOUBLE, + PREC_UINT64_TO_HALF, + PREC_UINT64_TO_FLOAT, + PREC_UINT64_TO_DOUBLE, }; +static enum precision get_input_prec(enum precision prec) +{ + /* Map conversions to input precision */ + if (prec >= PREC_HALF_TO_FLOAT) { + switch (prec) { + case PREC_HALF_TO_FLOAT: + case PREC_HALF_TO_DOUBLE: + case PREC_HALF_TO_INT16: + case PREC_HALF_TO_INT32: + case PREC_HALF_TO_INT64: + case PREC_HALF_TO_UINT16: + case PREC_HALF_TO_UINT32: + case PREC_HALF_TO_UINT64: + return PREC_HALF; + case PREC_FLOAT_TO_HALF: + case PREC_FLOAT_TO_DOUBLE: + case PREC_FLOAT_TO_INT16: + case PREC_FLOAT_TO_INT32: + case PREC_FLOAT_TO_INT64: + case PREC_FLOAT_TO_UINT16: + case PREC_FLOAT_TO_UINT32: + case PREC_FLOAT_TO_UINT64: + return PREC_FLOAT; + case PREC_DOUBLE_TO_HALF: + case PREC_DOUBLE_TO_FLOAT: + case PREC_DOUBLE_TO_INT16: + case PREC_DOUBLE_TO_INT32: + case PREC_DOUBLE_TO_INT64: + case PREC_DOUBLE_TO_UINT16: + case PREC_DOUBLE_TO_UINT32: + case PREC_DOUBLE_TO_UINT64: + return PREC_DOUBLE; + default: + assert(false); + } + } + + return prec; +} + +static enum precision get_output_prec(enum precision prec) +{ + /* Map conversions to input precision */ + if (prec >= PREC_HALF_TO_FLOAT) { + switch (prec) { + case PREC_FLOAT_TO_HALF: + case PREC_DOUBLE_TO_HALF: + case PREC_INT16_TO_HALF: + case PREC_INT32_TO_HALF: + case PREC_INT64_TO_HALF: + case PREC_UINT16_TO_HALF: + case PREC_UINT32_TO_HALF: + case PREC_UINT64_TO_HALF: + return PREC_HALF; + case PREC_HALF_TO_FLOAT: + case PREC_DOUBLE_TO_FLOAT: + return PREC_FLOAT; + case PREC_HALF_TO_DOUBLE: + case PREC_FLOAT_TO_DOUBLE: + return PREC_DOUBLE; + case PREC_HALF_TO_INT16: + case PREC_FLOAT_TO_INT16: + case PREC_DOUBLE_TO_INT16: + return PREC_INT16; + case PREC_HALF_TO_INT32: + case PREC_FLOAT_TO_INT32: + case PREC_DOUBLE_TO_INT32: + return PREC_INT32; + case PREC_HALF_TO_INT64: + case PREC_FLOAT_TO_INT64: + case PREC_DOUBLE_TO_INT64: + return PREC_INT64; + case PREC_HALF_TO_UINT16: + case PREC_FLOAT_TO_UINT16: + case PREC_DOUBLE_TO_UINT16: + return PREC_UINT16; + case PREC_HALF_TO_UINT32: + case PREC_FLOAT_TO_UINT32: + case PREC_DOUBLE_TO_UINT32: + return PREC_UINT32; + case PREC_HALF_TO_UINT64: + case PREC_FLOAT_TO_UINT64: + case PREC_DOUBLE_TO_UINT64: + return PREC_UINT64; + default: + assert(false); + } + } + + return prec; +} + +typedef struct { + char *opstr; + enum precision prec; +} map_to_prec; + struct op_desc { const char * const name; int n_operands; + map_to_prec *decode_tbl; }; enum op { @@ -62,9 +214,46 @@ enum op { OP_ABS, OP_IS_NAN, OP_IS_INF, - OP_FLOAT_TO_DOUBLE, + /* All above are conversions */ + OP_FLOAT_TO_FLOAT, + OP_FLOAT_TO_INT, + OP_FLOAT_TO_UINT, + OP_INT_TO_FLOAT, + OP_UINT_TO_FLOAT }; +map_to_prec float_to_float[] = { {"b16b32", PREC_HALF_TO_FLOAT}, + {"b16b64", PREC_HALF_TO_DOUBLE}, + {"b32b16", PREC_FLOAT_TO_HALF}, + {"b32b64", PREC_FLOAT_TO_DOUBLE}, + {"b64b16", PREC_DOUBLE_TO_HALF}, + {"b64b32", PREC_DOUBLE_TO_FLOAT}, + { NULL, 0} }; + +map_to_prec float_to_int[] = { {"b16b16", PREC_HALF_TO_INT16}, + {"b16b32", PREC_HALF_TO_INT16}, + {"b16b64", PREC_HALF_TO_INT16}, + {"b32b16", PREC_FLOAT_TO_INT16}, + {"b32b32", PREC_FLOAT_TO_INT32}, + {"b32b64", PREC_FLOAT_TO_INT64}, + {"b64b16", PREC_DOUBLE_TO_INT16}, + {"b64b32", PREC_DOUBLE_TO_INT32}, + {"b64b64", PREC_DOUBLE_TO_INT64}, + { NULL, 0} }; + +static enum precision decode_map_table(map_to_prec *tbl, char *opstr) +{ + while (tbl->opstr) { + if (strncmp(tbl->opstr, opstr, strlen(tbl->opstr)) == 0) { + return tbl->prec; + } + tbl++; + } + + /* lookup failed */ + assert(false); +} + static const struct op_desc ops[] = { [OP_ADD] = { "+", 2 }, [OP_SUB] = { "-", 2 }, @@ -78,7 +267,11 @@ static const struct op_desc ops[] = { [OP_ABS] = { "A", 1 }, [OP_IS_NAN] = { "?N", 1 }, [OP_IS_INF] = { "?i", 1 }, - [OP_FLOAT_TO_DOUBLE] = { "cff", 1 }, + [OP_FLOAT_TO_FLOAT] = { "cff", 1, float_to_float }, + [OP_FLOAT_TO_INT] = { "cfi", 1, float_to_int }, + [OP_FLOAT_TO_UINT] = { "cfu", 1 }, + [OP_INT_TO_FLOAT] = { "cif", 1 }, + [OP_UINT_TO_FLOAT] = { "cuf", 1 }, }; /* @@ -269,6 +462,159 @@ static enum error tester_check(const struct test_op *t, uint64_t res64, return err; } +static float get_float(struct operand op) +{ + switch (op.type) { + case OP_TYPE_QNAN: + return __builtin_nanf(""); + case OP_TYPE_SNAN: + return __builtin_nansf(""); + default: + return u64_to_float(op.val); + } +} + +static double get_double(struct operand op) +{ + switch (op.type) { + case OP_TYPE_QNAN: + return __builtin_nanf(""); + case OP_TYPE_SNAN: + return __builtin_nansf(""); + default: + return u64_to_double(op.val); + } +} + +static enum error host_tester_cff(struct test_op *t) +{ + float in32, res32; + double in64, res64; + bool result_is_nan; + uint8_t flags = 0; + + assert(t->op == OP_FLOAT_TO_FLOAT); + + switch (t->prec) { + case PREC_HALF_TO_FLOAT: + case PREC_HALF_TO_DOUBLE: + return ERROR_NOT_HANDLED; + case PREC_FLOAT_TO_HALF: + return ERROR_NOT_HANDLED; + case PREC_FLOAT_TO_DOUBLE: + { + in32 = get_float(t->operands[0]); + t->expected_result.val = double_to_u64(get_double(t->expected_result)); + res64 = (double) in32; + break; + } + case PREC_DOUBLE_TO_HALF: + return ERROR_NOT_HANDLED; + case PREC_DOUBLE_TO_FLOAT: + in64 = get_double(t->operands[0]); + t->expected_result.val = float_to_u64(get_float(t->expected_result)); + res32 = (float) in64; + break; + default: + return ERROR_NOT_HANDLED; + } + + flags = host_get_exceptions(); + + switch (t->prec) { + case PREC_HALF_TO_DOUBLE: + case PREC_FLOAT_TO_DOUBLE: + result_is_nan = isnan(res64); + return tester_check(t, res64, result_is_nan, flags); + case PREC_HALF_TO_FLOAT: + case PREC_DOUBLE_TO_FLOAT: + result_is_nan = isnan(res32); + return tester_check(t, res32, result_is_nan, flags); + default: + assert(false); + } + + return ERROR_NOT_HANDLED; +} + +static enum error host_tester_cfi(struct test_op *t) +{ + uint8_t flags = 0; + float in32; + double in64; + uint64_t res; + + assert(t->op == OP_FLOAT_TO_INT || t->op == OP_FLOAT_TO_UINT); + + switch (get_input_prec(t->prec)) { + case PREC_HALF: + return ERROR_NOT_HANDLED; + case PREC_FLOAT: + in32 = get_float(t->operands[0]); + break; + case PREC_DOUBLE: + in64 = get_double(t->operands[0]); + break; + default: + assert(false); + } + + + switch (t->prec) { + case PREC_HALF_TO_INT16: + case PREC_HALF_TO_INT32: + case PREC_HALF_TO_INT64: + return ERROR_NOT_HANDLED; + case PREC_FLOAT_TO_INT16: + { + int16_t oi16 = (int16_t) in32; + res = (uint64_t) oi16; + break; + } + case PREC_FLOAT_TO_INT32: + { + int32_t oi32 = (int32_t) in32; + res = (uint64_t) oi32; + break; + } + case PREC_FLOAT_TO_INT64: + { + int64_t oi64 = (int64_t) in32; + res = (uint64_t) oi64; + break; + } + case PREC_DOUBLE_TO_INT16: + { + int16_t oi16 = (int16_t) in64; + res = (uint64_t) oi16; + break; + } + case PREC_DOUBLE_TO_INT32: + { + int32_t oi32 = (int32_t) in64; + res = (uint64_t) oi32; + break; + } + case PREC_DOUBLE_TO_INT64: + { + int64_t oi64 = (int64_t) in64; + res = (uint64_t) oi64; + break; + } + default: + assert(false); + } + + flags = host_get_exceptions(); + + return tester_check(t, res, false, flags); +} + +static enum error host_tester_cif(struct test_op *t) +{ + return ERROR_NOT_HANDLED; +} + static enum error host_tester(struct test_op *t) { uint64_t res64; @@ -280,6 +626,20 @@ static enum error host_tester(struct test_op *t) host_set_exceptions(default_exceptions); } + /* Handle conversions first */ + switch (t->op) { + case OP_FLOAT_TO_FLOAT: + return host_tester_cff(t); + case OP_FLOAT_TO_INT: + case OP_FLOAT_TO_UINT: + return host_tester_cfi(t); + case OP_INT_TO_FLOAT: + case OP_UINT_TO_FLOAT: + return host_tester_cif(t); + default: + break; + } + if (t->prec == PREC_FLOAT) { float a, b, c; float *in[] = { &a, &b, &c }; @@ -396,40 +756,68 @@ static enum error host_tester(struct test_op *t) flags = host_get_exceptions(); res64 = double_to_u64(res); result_is_nan = isnan(res); - } else if (t->prec == PREC_FLOAT_TO_DOUBLE) { - float a; - double res; - - if (t->operands[0].type == OP_TYPE_QNAN) { - a = __builtin_nanf(""); - } else if (t->operands[0].type == OP_TYPE_SNAN) { - a = __builtin_nansf(""); - } else { - a = u64_to_float(t->operands[0].val); - } - - if (t->expected_result.type == OP_TYPE_QNAN) { - t->expected_result.val = double_to_u64(__builtin_nan("")); - } else if (t->expected_result.type == OP_TYPE_SNAN) { - t->expected_result.val = double_to_u64(__builtin_nans("")); - } - - switch (t->op) { - case OP_FLOAT_TO_DOUBLE: - res = a; - break; - default: - return ERROR_NOT_HANDLED; - } - flags = host_get_exceptions(); - res64 = double_to_u64(res); - result_is_nan = isnan(res); } else { return ERROR_NOT_HANDLED; /* XXX */ } return tester_check(t, res64, result_is_nan, flags); } +static enum error soft_tester_cff(struct test_op *t, float_status *s) +{ + float in32, res32; + double in64, res64; + bool result_is_nan; + + assert(t->op == OP_FLOAT_TO_FLOAT); + + switch (t->prec) { + case PREC_HALF_TO_FLOAT: + case PREC_HALF_TO_DOUBLE: + return ERROR_NOT_HANDLED; + case PREC_FLOAT_TO_HALF: + return ERROR_NOT_HANDLED; + case PREC_FLOAT_TO_DOUBLE: + { + in32 = get_float(t->operands[0]); + t->expected_result.val = double_to_u64(get_double(t->expected_result)); + res64 = float32_to_float64(in32, s); + break; + } + case PREC_DOUBLE_TO_HALF: + return ERROR_NOT_HANDLED; + case PREC_DOUBLE_TO_FLOAT: + in64 = get_double(t->operands[0]); + t->expected_result.val = float_to_u64(get_float(t->expected_result)); + res32 = float64_to_float32(in64, s); + break; + default: + return ERROR_NOT_HANDLED; + } + + switch (t->prec) { + case PREC_HALF_TO_DOUBLE: + case PREC_FLOAT_TO_DOUBLE: + result_is_nan = isnan(res64); + return tester_check(t, res64, result_is_nan, s->float_exception_flags); + case PREC_HALF_TO_FLOAT: + case PREC_DOUBLE_TO_FLOAT: + result_is_nan = isnan(res32); + return tester_check(t, res32, result_is_nan, s->float_exception_flags); + default: + assert(false); + } +} + +static enum error soft_tester_cfi(struct test_op *t, float_status *s) +{ + return ERROR_NOT_HANDLED; +} + +static enum error soft_tester_cif(struct test_op *t, float_status *s) +{ + return ERROR_NOT_HANDLED; +} + static enum error soft_tester(struct test_op *t) { float_status *s = &soft_status; @@ -440,6 +828,20 @@ static enum error soft_tester(struct test_op *t) s->float_rounding_mode = t->round; s->float_exception_flags = default_exceptions; + /* Handle conversions first */ + switch (t->op) { + case OP_FLOAT_TO_FLOAT: + return soft_tester_cff(t, s); + case OP_FLOAT_TO_INT: + case OP_FLOAT_TO_UINT: + return soft_tester_cfi(t, s); + case OP_INT_TO_FLOAT: + case OP_UINT_TO_FLOAT: + return soft_tester_cif(t, s); + default: + break; + } + if (t->prec == PREC_FLOAT) { float32 a, b, c; float32 *in[] = { &a, &b, &c }; @@ -558,17 +960,6 @@ static enum error soft_tester(struct test_op *t) return ERROR_NOT_HANDLED; } result_is_nan = isnan(*(double *)&res64); - } else if (t->prec == PREC_FLOAT_TO_DOUBLE) { - float32 a = t->operands[0].val; - - switch (t->op) { - case OP_FLOAT_TO_DOUBLE: - res64 = float32_to_float64(a, s); - break; - default: - return ERROR_NOT_HANDLED; - } - result_is_nan = isnan(*(double *)&res64); } else { return ERROR_NOT_HANDLED; /* XXX */ } @@ -752,23 +1143,41 @@ ibm_fp_hex(const char *p, enum precision prec, struct operand *ret) return 0; } return 0; - } else if (!strcmp(p, "0x0")) { - if (prec == PREC_FLOAT) { - ret->val = float_to_u64(0.0); - } else if (prec == PREC_DOUBLE) { - ret->val = double_to_u64(0.0); - } else { - assert(false); + } else if (strncmp("0x", p, 2) == 0) { + unsigned long long result; + char *end; + + result = strtoull(p, &end, 16); + if (result == 0 && end == p) { + /* not a number */ + return 1; + } else if (result == ULLONG_MAX && errno) { + /* value does not fit in unsigned long long */ + return 1; + } else if (*end) { + /* began with a number but has junk left over at the end */ + return 1; } - return 0; - } else if (!strcmp(p, "0x1")) { - if (prec == PREC_FLOAT) { - ret->val = float_to_u64(1.0); - } else if (prec == PREC_DOUBLE) { - ret->val = double_to_u64(1.0); - } else { + + switch (prec) { + case PREC_FLOAT: + ret->val = float_to_u64(result); + break; + case PREC_DOUBLE: + ret->val = double_to_u64(result); + break; + case PREC_INT16: + case PREC_INT32: + case PREC_INT64: + case PREC_UINT16: + case PREC_UINT32: + case PREC_UINT64: + ret->val = result; + break; + default: assert(false); } + return 0; } return 1; @@ -814,11 +1223,14 @@ static enum error ibm_test_line(const char *line) if (unlikely(strlen(p) < 4)) { return ERROR_INPUT; } - if (strcmp("b32b64cff", p) == 0) { - t.prec = PREC_FLOAT_TO_DOUBLE; + /* Conversions are of the form bXXbYYcZZ */ + if (p[0] == 'b' && p[3] == 'b' && p[6] == 'c') { if (find_op(&p[6], &t.op)) { + fprintf(stderr, "%s: unhandled conversion %s\n", __func__, p); return ERROR_NOT_HANDLED; } + assert(ops[t.op].decode_tbl); + t.prec = decode_map_table(ops[t.op].decode_tbl, p); } else { if (strncmp("b32", p, 3) == 0) { t.prec = PREC_FLOAT; @@ -855,9 +1267,7 @@ static enum error ibm_test_line(const char *line) } for (i = 0; i < ops[t.op].n_operands; i++) { - enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ? - PREC_FLOAT : t.prec; - + enum precision prec = get_input_prec(t.prec); p = s[field++]; if (ibm_fp_hex(p, prec, &t.operands[i])) { return ERROR_INPUT; @@ -873,8 +1283,7 @@ static enum error ibm_test_line(const char *line) if (unlikely(strcmp("#", p) == 0)) { t.expected_result_is_valid = false; } else { - enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ? - PREC_DOUBLE : t.prec; + enum precision prec = get_output_prec(t.prec); if (ibm_fp_hex(p, prec, &t.expected_result)) { return ERROR_INPUT; @@ -943,7 +1352,7 @@ static void test_file(const char *filename) enum error err; i++; - if (unlikely(line_is_whitelisted(line))) { + if (whitelist.n > 0 && unlikely(line_is_whitelisted(line))) { test_stats[ERROR_WHITELISTED]++; continue; } diff --git a/tests/fp/qemu/regression-tests.fptest b/tests/fp/qemu/regression-tests.fptest new file mode 100644 index 0000000000..a105d3aa44 --- /dev/null +++ b/tests/fp/qemu/regression-tests.fptest @@ -0,0 +1,7 @@ +QEMU Floating point regression tests +------------------------------------ + +b32b32cfi =0 -Inf -> 0xffffffff80000000 i +b32b32cfi =0 +Inf -> 0xffffffff80000000 i +b32b64cfi =0 -Inf -> 0x8000000000000000 i +b32b64cfi =0 +Inf -> 0x8000000000000000 i