From patchwork Tue May 18 09:06:52 2021 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: 441165 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp33782jac; Tue, 18 May 2021 02:08:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrIukKBdJRlrn26ArHu1S0PE/09VByu1HIb6k6hy7+O7YcqoCsGIvxc94nyf4gIF1anyUK X-Received: by 2002:a1f:5506:: with SMTP id j6mr4819945vkb.7.1621328911396; Tue, 18 May 2021 02:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621328911; cv=none; d=google.com; s=arc-20160816; b=V5zhCBBd3uIZQV5jwnnqVTAb4yCaly+NZPoXH8maEUNY/z/MzNSIrPSuXsh9803aeH 4mGLQjDYhHrCkKlVegvzlen8/7EfI0Q9CMJqD0ErhlYYWjG/RocxbljLLoSN13C6ScfM 1J5zRI2Ob6YqPNnh4gUR0eayPlbJG6Z4GDOpsa6E/7PaId56vYfKRkG0qtk2DyxeDJWA s//0RFaw/ecflSQfYEgMO6EIWbZvDPlNtechwP+PrV5q940J0380FpqKSbChvQGBKyou NG71LEoK2YYKvDzAHvofqPkBtxMwnek1DK0Atxh5nQK6xfJZQ1GnL5Ji0hB/onckaCyj d2Mw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=hNbaGxhqPGsZO3tTrtNT3mznUNT/xWUzHwS2o2IUsWc=; b=VEgzeWta5tpNk2Ry4la/6+Dt9Oyz/UpvSO0sg4Heu+ll5ueWYyJQGndm0zgdSTRTjb cFXK+voCp5Y7GbJAEAk1Szl4rO23e6mkst5ugoHceDyONf7P6kBlZIeQlxDmheCa/nse j3JEGTQIDBVBT0HHop/GtRml5hAEti4DO0keBKCTdmqVT1PdeFeLFikv1Mk5pt/U5znb hM/+I3f6ekv0AVdKbPMigWsYPY38AIv/bCJfgubujpntRRMz0CfFAFBaTmI+g++7GOlF LM8RDVPcKbiS/b4clq/CwI0rhx1uzuD2c4OOr2TvMze1Gxg6YEsHGDO56pPrw8aukZeq lVnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XDBDblTN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id h27si1946183uac.203.2021.05.18.02.08.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:08:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XDBDblTN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:60356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liviI-0007mP-QP for patch@linaro.org; Tue, 18 May 2021 05:08:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhG-0007m9-Rj for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:26 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:38852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhF-0005PB-4X for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:26 -0400 Received: by mail-wm1-x32c.google.com with SMTP id u4-20020a05600c00c4b02901774b80945cso1045339wmm.3 for ; Tue, 18 May 2021 02:07:24 -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=hNbaGxhqPGsZO3tTrtNT3mznUNT/xWUzHwS2o2IUsWc=; b=XDBDblTNM9H+yWCwcRRwxuhMSDMhDUBbD9nKQzW2pfvGaHiCU5olEvRchcROt4uz1Q zGMaen+sU2nsF8e5qlq6Vq5E2bm/1fsLVwla85rqnnYbpq72pwf/f9p9fddgc2zFxp/T 6LqTCNKobQUlH3S/BM93jxXFQEpTCXHFs5az3MI1uRBMaq73CIsbP74i/u2eobIuhO4A sDs+xG5pylyc6jHkaWJ4SxkfAtTXb3nJYL8d2bNxGTcgZgvpRUQ1cQr1u/fDnHvIHEq2 loL2NQuBG1d1HVPS1XOZBMl8Ke213U9iKrFopoYowbi48k82OTU/07T/NVL3IMTl0Hd7 VwMA== 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=hNbaGxhqPGsZO3tTrtNT3mznUNT/xWUzHwS2o2IUsWc=; b=KxTb9ia/TTJOcgq+BJ21POZAUHFaI2WArXAzuSF1e0u09hsxPhOoVE8kcjECVMh4CK nBzqw83wal7a1T5O1joLWwtBayhWA2vvPX8x+Cs+OtwMavwplq8LDQFs67urb95TckxQ /C1k58Z3SVeIMGbB04MHlBzEHCvoUrtVQNnWZ2VFxjmh9e/AgupGdXFe3MLxdthaztwf 6f9gaJW3EpsEOOnKxB4bjiqREnl2IZ3fMkSvLGkAKxqQLzYv9ZYw4DFuUqjqNAU2fisu +HryuodCdWkk27k5uQ1HK5EBzrA1HGxikxf0GSvZ3/ahP8mqi9yZ6J7hcvtv8uBPDHg1 XU3w== X-Gm-Message-State: AOAM5323jS7fpj+kf+Jw8Pf6dW5vuWyAE81bqN1BDUeU8+SwjDDno8gV 5BFsFYaKHy+xPW2ILp1Ry6ih/g== X-Received: by 2002:a05:600c:3798:: with SMTP id o24mr3917792wmr.12.1621328843629; Tue, 18 May 2021 02:07:23 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x2sm7276469wmj.3.2021.05.18.02.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0D5251FF87; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 01/29] tests/docker: fix copying of executable in "update" Date: Tue, 18 May 2021 10:06:52 +0100 Message-Id: <20210518090720.21915-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We have the same symlink chasing problem when doing an "update" operation. Fix that. Based-on: 5e33f7fead ("tests/docker: better handle symlinked libs") Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Message-Id: <20210512102051.12134-3-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index d28df4c140..0435a55d10 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -548,7 +548,14 @@ def run(self, args, argv): libs = _get_so_libs(args.executable) if libs: for l in libs: - tmp_tar.add(os.path.realpath(l), arcname=l) + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass # Create a Docker buildfile df = StringIO() From patchwork Tue May 18 09:06:53 2021 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: 441164 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp33256jac; Tue, 18 May 2021 02:07:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAyDSnRBEjwOCQRP6JccV68gOmh2tC6lxZxJ7YsM3Ust5+EqfJjNQAFfCY8j06XvXOnZ4/ X-Received: by 2002:a67:8008:: with SMTP id b8mr4936817vsd.13.1621328874620; Tue, 18 May 2021 02:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621328874; cv=none; d=google.com; s=arc-20160816; b=sG+CePwbSzJbb+47bY1usFV2Pscvt2ue/FKG1+rquyhhS2FmWqEu0td5rAYQUrK5ex U65Y3k7yacVhlcoU/dQRT0CSVrIeRlrn5QSeHBn9sT3AF2qiwBwn9x/2EIytrSGxuIyX xOmTvS+1kxxl43T0G0lJOMGoVej9dXosrxnjZDYKtBuQ9a+D9meloavbLaN8eM3S/kYh PwHVaZ7h8vSeBwpGuHYZ3VeHAAPKSSPfwguK2McQjMa1LJumE6YYn0tnaq7zE7uTwzz4 BUrI64+fcblsejEiF1spRU14nNkwKd3MWCCZjf8GO2/bb5aIEO3PgbgbG7o2uW+9FHTT DPNg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=oKQRss2uIBpRXo6hgFfm/Wk+D//+r61sABFE2JlaFZg=; b=lyvITfY4/TpFLmtxn6bw+Qa9M81WoaJMnpzzrHMvZ/zABxP2A/RLtDluJ6SEy+tTbW DDI1edffwWBa0UqyLnjplX1XtJXCJQVKm93pOl4K7qscJKVa0PyHTmCsVQC2Pgckr20A EPEWhOXYxpP/jPLO497PLS8zGBR3RoQcKaqZBYpsflrDQKPSXCXZqKnDEDqXdjaBWAwq QB8KzT/IgjxlSCZxUO6ojPhxOfilfW0GUZ/+/CIk7osE8ekutp4jcFYOW8SjwwEIu+P+ TAOExLx0Yk9pA9KUGKO/VC1kJs+zL5yVCSi/X/w6Qls6I7qng+Y4vPJWFCkiEP+Y2e0j yXXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WeeCyq1n; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id k13si1688678vsh.132.2021.05.18.02.07.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:07:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WeeCyq1n; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:60440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livhh-0007qS-VU for patch@linaro.org; Tue, 18 May 2021 05:07:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhI-0007mh-To for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:28 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:38834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhG-0005Pu-OC for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:28 -0400 Received: by mail-wr1-x430.google.com with SMTP id j14so7587387wrq.5 for ; Tue, 18 May 2021 02:07:26 -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=oKQRss2uIBpRXo6hgFfm/Wk+D//+r61sABFE2JlaFZg=; b=WeeCyq1n8l1luYCg9Z06/+h6ukfDsAV9uV7wM1zC8IbBA4DQZKHjia5sHAOYAJhqoJ tkoaN1UPfSChEd7Pey2H39VynxBMtmpD2LoJb2A4xE7UMLPf+s+NJFu6fn8lj6y4QhaB m6c2m1pdXyazWac4/oC4uC6WN+qyd7aw5SK1BhCAz2YoYdokUJlOuJoCJZq0aL5fSJLS 9aXwDqT+C5uv/0566PT4bGGYGn/uvHa/PQ6HXhUlb0oafW9VGaL90CmRt5HCpYHdqcXS b0Dtp1YNZ5R+sAxZy9qVH/PAafEB/G7vtX5tedELESPAY2Hg/7kc1pfOm2sVe2VcIax2 NCgg== 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=oKQRss2uIBpRXo6hgFfm/Wk+D//+r61sABFE2JlaFZg=; b=qG4Gr8AF/RVMkCyFPRmX7zyIBuSOkc7bMHSLTkgwbNtDdtts1ihVlAexw6FMGlHzk2 VqDNuJEp7xsB++OBNyrlYGX1NcuIFdc4a3w9UjoC6SDEAAbakk4Xhv4rRnLzdQVUs8ML 9VSURP4ZIG67rgPzwWNcE50gGFv5mFUHrwGna6rO4LJ6P+Z+ii7hM1Ncltiu/eVXaEwG 54bo1APAndX7Yh9vXX5UuSNcneC0OsFJWAR8gPcPe8H1Chx+zkZdaqApQ8Fmq5YaT2Fg XzUeFe0howvU+f2A4+Txdys4evNgaWpb1JmOUqDDjlqgbufO9CZE7mw832MIBg2VVDF0 S7DA== X-Gm-Message-State: AOAM531eQH9aSwm+pQiK8fdnQX+PElA2JqKh1MeE5fxGK9vuEM9xZZzd FmJa3AutKmAN1EI50cxCvVtLvA== X-Received: by 2002:a5d:6291:: with SMTP id k17mr5632498wru.247.1621328845376; Tue, 18 May 2021 02:07:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r7sm15882585wmq.18.2021.05.18.02.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 254371FF8C; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 02/29] tests/docker: make executable an optional argument to "update" Date: Tue, 18 May 2021 10:06:53 +0100 Message-Id: <20210518090720.21915-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We're going to extend the abilities of the command shortly. Reviewed-by: Willian Rampazzo Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-4-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 9f464cb92c..820423d718 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -248,7 +248,7 @@ docker-run: docker-qemu-src $(if $(EXECUTABLE), \ $(call quiet-command, \ $(DOCKER_SCRIPT) update \ - $(IMAGE) $(EXECUTABLE), \ + $(IMAGE) --executable $(EXECUTABLE), \ " COPYING $(EXECUTABLE) to $(IMAGE)")) $(call quiet-command, \ $(DOCKER_SCRIPT) run \ diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 0435a55d10..9b3425fec2 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -523,7 +523,7 @@ class UpdateCommand(SubCommand): def args(self, parser): parser.add_argument("tag", help="Image Tag") - parser.add_argument("executable", + parser.add_argument("--executable", help="Executable to copy") def run(self, args, argv): @@ -532,35 +532,37 @@ def run(self, args, argv): tmp = tempfile.NamedTemporaryFile(suffix="dckr.tar.gz") tmp_tar = TarFile(fileobj=tmp, mode='w') - # Add the executable to the tarball, using the current - # configured binfmt_misc path. If we don't get a path then we - # only need the support libraries copied - ff, enabled = _check_binfmt_misc(args.executable) - - if not enabled: - print("binfmt_misc not enabled, update disabled") - return 1 - - if ff: - tmp_tar.add(args.executable, arcname=ff) - - # Add any associated libraries - libs = _get_so_libs(args.executable) - if libs: - for l in libs: - so_path = os.path.dirname(l) - name = os.path.basename(l) - real_l = os.path.realpath(l) - try: - tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) - except FileNotFoundError: - print("Couldn't add %s/%s to archive" % (so_path, name)) - pass - # Create a Docker buildfile df = StringIO() df.write(u"FROM %s\n" % args.tag) - df.write(u"ADD . /\n") + + if args.executable: + # Add the executable to the tarball, using the current + # configured binfmt_misc path. If we don't get a path then we + # only need the support libraries copied + ff, enabled = _check_binfmt_misc(args.executable) + + if not enabled: + print("binfmt_misc not enabled, update disabled") + return 1 + + if ff: + tmp_tar.add(args.executable, arcname=ff) + + # Add any associated libraries + libs = _get_so_libs(args.executable) + if libs: + for l in libs: + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass + + df.write(u"ADD . /\n") df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) From patchwork Tue May 18 09:06:54 2021 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: 441167 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp36456jac; Tue, 18 May 2021 02:12:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJwrHMB8HM28Etyja03Qfl8xdz/cPoT7fMMkWEd6krT6EewBxXk8dRLCdT+68RbA6B+E9g X-Received: by 2002:a67:2ec9:: with SMTP id u192mr4730274vsu.57.1621329129469; Tue, 18 May 2021 02:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329129; cv=none; d=google.com; s=arc-20160816; b=yl9JfJrL6/o/lpW0NvJkoyaxmatS7Qsm8DoUe+tu9BXvcq8K8EAIYAoXcDmDqXaqKy p+j+lAWHUB3vVgIVdmluN4kfEFKcWn85aru7hb2d2akYEQUuGvISortoCP3UMxTeDILY Fy3bBmSanVTRrUueGF9FlL0RM87cv81qi3aA1KbcOxpF77BmAxuo1WIRpx+ubPlfsMCs V7CtMBVpbi8xaradOlFmLZoW68XLqfgUk0hl+SSRmGRx/NWGRlw9iz/hfPiM/0b2y93G c/fQZdetyYoPdS5Ayedzf9HVsiy2GlQCfOK9/9ZRbMsbTn1yIX4wz668TlpjUyX86h9d Ub2Q== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=k3GgIZwo1ALDw7AyuDX5LfQUKo52ZHvXcuy3wRBGlmI=; b=cCQK0cmx7N1iM+175JxmsF8v5Mdrht7Q0Fqgn6PBh3TOQbZyRsv9d1TMxNz8mYFfoA GN+dJ4hnzSLtlqNAsqtugyCcu0UMPUvPvj8Wh1NDb9aFipZsSyB6PEpwmgUMSQS62dm0 oOOKpvGMGbbdIcOCl/Ijhxu9XGjORn+yzEaf+9Ez8bvTXp4Hxyxu//T/cOxnXT6Ib7xE YYr6ZXkbjLZdFNuY7qq4G1dT2PmXbyToMRygNQXGnStrgQ56rgeO8GVEJdyavv3mP8sF YcAtEHHpZCixIdH5dGa6SZ0081NdtNaZSaoQ6mVlN9gkWls/cutrwEQ8ktaBHsLsPzYL WfzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=T1Ke2WSA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id v125si9132805vkf.22.2021.05.18.02.12.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:12:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=T1Ke2WSA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:40432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livlo-0004yk-TC for patch@linaro.org; Tue, 18 May 2021 05:12:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhJ-0007n8-4J for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:29 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:54861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhH-0005Qo-Cf for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:28 -0400 Received: by mail-wm1-x334.google.com with SMTP id o127so4979519wmo.4 for ; Tue, 18 May 2021 02:07:26 -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=k3GgIZwo1ALDw7AyuDX5LfQUKo52ZHvXcuy3wRBGlmI=; b=T1Ke2WSA+sKRz1V1wNjsW35K4N3kKn6JOCvD77u9/KQ7rqi1p7nVA97kFLrGfpHLhD oL5dnJAnYhI8dukQ6o7wuslvMuxabzj7VuKsCdC6V4PES0wFSYCJUXHY2xYVW+SMDYqm ElqNwo8wdv7JiIlSt/aPY9elcp5pWLc429P0ZtLc0zppNioM/1BQJSxTCr3C4WOm1Fhm qkwRbIxpsEZI9Ped0k2e1V76lDdtQ8sYjyG5xmuboLnWnIu3B/jefC8iOEBvNdgQQ7qI EtvAuYO1vAx07qXMZPk4S4xuzLrp5fhK3MYHeqSotBNWEUET4l1C+21eOxmd/rF/LIQi akdw== 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=k3GgIZwo1ALDw7AyuDX5LfQUKo52ZHvXcuy3wRBGlmI=; b=Ze1qbadBRwWe/1/YCOCH9KjGYusN+c3nlM5fR2lIGa81FuUgFzREsqUeOi3Jk6BHqU cwELuJ9qgZKRR/oD96eRgSNRCtaxYeyWb5dRpfkhCiOGiOVjRcL3uscgYitfltBv3eWn FOnnvYNlQovds0Yzco3te8FWw4fQOkLptsI0wSIvh0ZazsQKw0o6NENHn1gmOJRJ0WvO v8cNOSSJr6j7xp+X5NVMYPZuldJk9i2FjjWnD03NtEQRLoRaMHIF7eWuztCbaHoxwDpO vojhaCmwIbiGT7/FL+Lag3GoK1wvprLiHA87ZdJQsnReqsnRoFFuXEEuZ84I56LORc69 4gtw== X-Gm-Message-State: AOAM5311/HZprSjnT7qW2In6ADOcY9Gf3yeL3wwwyHsXORBQXYr4Jcun bhiPxxbXqcH/MvDCX+H6OBQaZA== X-Received: by 2002:a7b:cb85:: with SMTP id m5mr926923wmi.118.1621328845970; Tue, 18 May 2021 02:07:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x13sm10604875wro.31.2021.05.18.02.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:22 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3A7D81FF8F; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 03/29] tests/docker: allow "update" to add the current user Date: Tue, 18 May 2021 10:06:54 +0100 Message-Id: <20210518090720.21915-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The current user functionality is used for cross compiling to avoid complications with permissions when building test programs. However for images that come from the registry we still need the ability to add the user after the fact. Reviewed-by: Willian Rampazzo Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-5-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 9b3425fec2..7a14058801 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -517,7 +517,7 @@ def run(self, args, argv): class UpdateCommand(SubCommand): - """ Update a docker image with new executables. Args: """ + """ Update a docker image. Args: """ name = "update" def args(self, parser): @@ -525,6 +525,9 @@ def args(self, parser): help="Image Tag") parser.add_argument("--executable", help="Executable to copy") + parser.add_argument("--add-current-user", "-u", dest="user", + action="store_true", + help="Add the current user to image's passwd") def run(self, args, argv): # Create a temporary tarball with our whole build context and @@ -564,6 +567,13 @@ def run(self, args, argv): df.write(u"ADD . /\n") + if args.user: + uid = os.getuid() + uname = getpwuid(uid).pw_name + df.write("\n") + df.write("RUN id %s 2>/dev/null || useradd -u %d -U %s" % + (uname, uid, uname)) + df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) df_tar = TarInfo(name="Dockerfile") From patchwork Tue May 18 09:06:55 2021 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: 441168 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp36466jac; Tue, 18 May 2021 02:12:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2emykkl8l2mIfs1qPJnCL6xFSa29QAsFAyYjZFAy7MPk05+IX9i6BvBQIpKm2vXQO/MIe X-Received: by 2002:ab0:6803:: with SMTP id z3mr222644uar.97.1621329130597; Tue, 18 May 2021 02:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329130; cv=none; d=google.com; s=arc-20160816; b=ox3ZbpiScPtX9B6mBzuXOCI2Ti+fRuyiu0hWNEJ/ghIzqYOS1FJxbGuJS1HgRh0o2K PIDarCEaFBeUasipyNlnoeVxUVcpAVT3JHN1Wpwd5KLyVCF+2JBxysXc6xGW7N1xUOIJ OkYqdSEDzASCY5ViyRd/kok8O6XuYgQTqhr+XKb03zzmwPI+P1aps6QhLXaRVpiYhjXd FKmULtkbPF33gQ4mWsX9v5VFROlaWwTTyB5c2WduFs6SlDSB5EGqEjLlpiQ1DY0wf+L7 fVp01py8w5DA4DBaardiQ0+4RLIV1C/RWfuq8xJGEJnWd1LKakvvFOELlHIygRoaNXQJ KHcQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=iLkCUVtUulJ2g8D+2QnEZXZOurs4a/57hc6xJ37hdkM=; b=p0TkCdhd7U4hfOzd6zbVGPPYcUJIwHiDKs31CcAwHcY0tAEQTq94z315jBTj9Pz/wc DAWMFm63SRG2+oNQf/SUdwTAactEp8Y9hTjDuM9lWLmO72d1jObDL2ON/WVIvUlpg9WW PY7gykh41z+S70uLw5/htSO7t+rzwSnaXoGzNXQY54Nz9DIgfI3DbM6vuuypXTF/N/tc 0U+FNxQq5ybXYQiJGzZkNSUyAEy6z7DiKqda0xY39PpuGGFd5rEnLjUCZqY6bhAmid6v LqjESCJclEPOJp/s7UqLegabqRXPW16r2RVO06EbrSndEB4UXCA5blpxRYcVmZtJmPP4 DE4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UAzAkxue; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id v19si9977265vsk.201.2021.05.18.02.12.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:12:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UAzAkxue; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:40504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livlp-00051P-Ut for patch@linaro.org; Tue, 18 May 2021 05:12:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhL-0007tG-NJ for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:31 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:46674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhJ-0005Rx-KC for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:31 -0400 Received: by mail-wr1-x434.google.com with SMTP id y14so7241191wrm.13 for ; Tue, 18 May 2021 02:07: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 :mime-version:content-transfer-encoding; bh=iLkCUVtUulJ2g8D+2QnEZXZOurs4a/57hc6xJ37hdkM=; b=UAzAkxueHkNZvp4be7rfU4M1J81KAF0ullEP49AAgibsoS4tbdC6yPmtQcaVoVANx3 fHV1cT8hecGsYwo64Y75itJjzQT/FOfF5Xvw3vX1kzyty4rrw/vDGeHSEd7AVpoUFuQK 3+8gtWUlaJfEGX8JynPcsADr96ApeV8YZTtyiXpJcIzHqWI97YrE6L+mQvG3yhqGAwdo bmpVRbagl7Ec1DGna1SFq55O+fOr9wb2MuAOzQRZYnoyicRiI+aA7zskpWbmASrT5SpF vlodJFwz6vaAe3SErODqy0LJHgS6vpL28VAxDzU7FoA5WbggEuasrpl2Ud4Fp0MELBUZ ORPA== 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=iLkCUVtUulJ2g8D+2QnEZXZOurs4a/57hc6xJ37hdkM=; b=Fye74MptOhrRbLbcnTfyfJFnNZFRrjyjox7hrS7c42VbOXHQcZxypD31GEWcsTV5jm YZpiAG8LGyfsULzwyAPksz7SyFnd4QebtHJ2dqGgtu/bYTXiZkdJk2vSQI9nD/8HPZDT 5jRCe3jUBa8qKpGgsKcnFWpZxm9Fm00nYrz8CIjp43v24luWHhYMtQgXDNGjfWv6eLhT RgM2uU6qrgqPK9On0EBz1m5b5JqgdsHhCpCk+7kggK1YNLwthCuc1qPkOhjGDWKY1pc8 tWMm70J6esvCMH/yMp4IH7is/kBXHuQD/uOIBvr29Fi53OKnQ7PvJdesPxdjwGvWlAxM jdCQ== X-Gm-Message-State: AOAM533e7csE3WRVvDr3HJake2bUwfyVUDUf/02wGfDjUImyKLaia7bh L2yjt9llQRKO8oNMvPpP5S6lig== X-Received: by 2002:adf:ee0c:: with SMTP id y12mr5526772wrn.335.1621328848122; Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x16sm20442417wrp.6.2021.05.18.02.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5070C1FF90; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 04/29] tests/docker: add "fetch" sub-command Date: Tue, 18 May 2021 10:06:55 +0100 Message-Id: <20210518090720.21915-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This simply wraps up fetching a build from the registry and tagging it as the local build. Reviewed-by: Willian Rampazzo Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-6-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 7a14058801..4d9bb7c7ed 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -515,6 +515,23 @@ def run(self, args, argv): return 0 +class FetchCommand(SubCommand): + """ Fetch a docker image from the registry. Args: """ + name = "fetch" + + def args(self, parser): + parser.add_argument("tag", + help="Local tag for image") + parser.add_argument("registry", + help="Docker registry") + + def run(self, args, argv): + dkr = Docker() + dkr.command(cmd="pull", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag)]) + dkr.command(cmd="tag", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag), args.tag]) + class UpdateCommand(SubCommand): """ Update a docker image. Args: """ From patchwork Tue May 18 09:06:56 2021 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: 441169 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp36488jac; Tue, 18 May 2021 02:12:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp19yhof5Kxkhs5J620SLTDOHEzL0PlxEpOGN6ubAu2yO1imepH0LsceHxHoftFVpYBrH2 X-Received: by 2002:a05:6122:42:: with SMTP id q2mr3270600vkn.1.1621329131375; Tue, 18 May 2021 02:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329131; cv=none; d=google.com; s=arc-20160816; b=cJpgv7JCHkZNSnfhewfZl6SbQYCK1OXeeHqIesiK6Fi8Wm18qydtlW1KTk9Nla5mHE f8N3SbVYFojnqVxj44SMcsiZV/IkMY7hZF5lu/9ZcvPVqnGIjrvhpvOVhn546zxxJCfp MDifJbPip6WqRSbZguJw0Og1hhYdNlPw7G7ui2PV8+uMEI6aD/3/9uBYjljJSJrW8Jy7 zb2aeLC9S10UjC74l7UdO+Eh5ySD/T/dAgOF84Q3rbIqF8QKGUzlXkAMCX2MufAYVxHQ yTt2Q7JLfM49IXouiebg9SpIDVCDycgCgLrDwp8IU0GAKKpGCEuIbQ7gMO4bzc3dnrnz kSGg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=UlpFXmqq5bThry8cwDRWyiNrM1DpTdOCe+EjGMnyA/o=; b=l+PtwmJ7WhL0Xy02JJyYxpj9rs8Y+DuFaNi0qmPKP+osHZuyuyBJbCwVosO+m9Id2a CznOex29w2d4WSIw3IOu+E8ryt6X/VrS5CIOup4NogtFVs9clOUbMSxaR9AQmufwxv+/ fXAkjCnHMBwOaOVKfhjTpIKUCvXkuPfmSKdcMQ/JTH+/V33A3QQrGKmqXwNc+IjxqZDC XqxWjBH9labrnaVtbF/mdvnlPTreCrrNRqWi+CX7F6r5mckmhiDx+9rdzdyfI7AO0HJG KeyGPjN9EOLZ4eeSUTqx9Z/g6L94F600x/iTBIkqfZiUAWAPrvjH0gv+Je7IZ1WsgGLX VN6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZD4ZzbfS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id m1si10733837vsk.102.2021.05.18.02.12.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:12:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZD4ZzbfS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:40606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livlq-00054x-Nt for patch@linaro.org; Tue, 18 May 2021 05:12:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhP-00082O-SX for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:35 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:36596) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhK-0005Sj-Ff for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:35 -0400 Received: by mail-wm1-x32d.google.com with SMTP id n17-20020a7bc5d10000b0290169edfadac9so1060226wmk.1 for ; Tue, 18 May 2021 02:07: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 :mime-version:content-transfer-encoding; bh=UlpFXmqq5bThry8cwDRWyiNrM1DpTdOCe+EjGMnyA/o=; b=ZD4ZzbfSQxmyDpD/9vzlbikE0K5b14SNU9PK7XMt1Sv9cfdGIJ5YJwbNmIh1tsk4Ie di7gYdDoqsoFOnxgLYoueipY842njfLeddGb70uSeOKzcKgi5uhKBBHnvirksEtN14sd Hp1pDcX/ARHOYHTqfxS8ttumOnWbCNm+JkQ3MEe43E8GKzznSvqB+Kwwhfa4hru5pube nccE0huoRPkyKti9ne5fwmFqyGd7TfwY1dDz892I1Kqj5XhCYjFfaXdRC8bPKN+5eeTZ pJ96sLddlBXe5bqRsNgryaplFvu1rWb66Cb4k4nwlOEQ585eVzb4E5Wa4uJIP5I+YoX6 ZOpg== 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=UlpFXmqq5bThry8cwDRWyiNrM1DpTdOCe+EjGMnyA/o=; b=L+8ygX6X2LN3FD8fa8j1fYee/3FYpd6mXcZPZi6RFS0hxwp/ZghdE4bPHthp7G7LAo XxqCfWyJJ2qES0y15mROUh4f7R7hU4ZWmSdAuYEB1Y/9Mm2JVAPbdsvDaJ53olsCDYz0 i/yEWzWmww8XMFXmkOjv6vedzBdrGPWcxwI5cnkaTNssRX0X+tANy9rp5b0TRTCs0EBo RyzJxWMMRcwfSy1Y2cdasIyMUMCxc+Fw6QNf0lSFPkVafz1OMZ5rNDWfKRXFkY32nxZn b9VgGWD3YKc941pCWTwcwEvpZS4ouZUcxFL2VUoBNpvF6xnrVi14Wk+Y8KLymDrWuFEN n8ug== X-Gm-Message-State: AOAM5309dICZXG7WJqarTXFjeKoL+/R2K7Dy9+ei+i1IELsIhfZRch5c CFbK9xWEb94EwoP0KDV0DprXVw== X-Received: by 2002:a7b:c096:: with SMTP id r22mr4348791wmh.144.1621328848903; Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t11sm20710687wrz.57.2021.05.18.02.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6CB781FF91; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 05/29] docker: Add Hexagon image Date: Tue, 18 May 2021 10:06:56 +0100 Message-Id: <20210518090720.21915-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alessandro Di Federico , Brian Cain , Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alessandro Di Federico This image is a little special because it takes a long time to build. As such most users don't want to be doing that and just pull random binaries from the ether as intended by the container gods. This involves someone with credentials and a beefy machine running: make docker-image-debian-hexagon-cross V=1 NOCACHE=1 J=30 docker tag qemu/debian-hexagon-cross registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross docker push registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross With a suitable binary in the "cloud" a normal user will run: make docker-image-debian-hexagon-cross or have it run for them through the dependency mechanism of our over-engineered makefiles and get the binary they wanted. There are a few wrinkles of course including needing to tweak the final image to have the credentials of the user so we can actually do our cross compiles. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Signed-off-by: Alex Bennée Cc: Alessandro Di Federico Cc: Philippe Mathieu-Daudé Cc: Brian Cain Message-Id: <20210512102051.12134-7-alex.bennee@linaro.org> -- 2.20.1 diff --git a/MAINTAINERS b/MAINTAINERS index 78561a223f..7572859317 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -197,6 +197,8 @@ F: linux-user/hexagon/ F: tests/tcg/hexagon/ F: disas/hexagon.c F: default-configs/targets/hexagon-linux-user.mak +F: docker/dockerfiles/debian-hexagon-cross.docker +F: docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh HPPA (PA-RISC) TCG CPUs M: Richard Henderson diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 820423d718..8967ecf118 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -148,6 +148,28 @@ docker-image-debian-s390x-cross: docker-image-debian10 docker-image-debian-sh4-cross: docker-image-debian10 docker-image-debian-sparc64-cross: docker-image-debian10 +# +# The build rule for hexagon-cross is special in so far for most of +# the time we don't want to build it. While dockers caching does avoid +# this most of the time sometimes we want to force the issue. +# +docker-image-debian-hexagon-cross: $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker + $(if $(NOCACHE), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) build -t qemu/debian-hexagon-cross -f $< \ + $(if $V,,--quiet) --no-cache \ + --registry $(DOCKER_REGISTRY) --extra-files \ + $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker.d/build-toolchain.sh, \ + "BUILD", "debian-hexagon-cross"), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) fetch $(if $V,,--quiet) \ + qemu/debian-hexagon-cross $(DOCKER_REGISTRY), \ + "FETCH", "debian-hexagon-cross") \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) update $(if $V,,--quiet) \ + qemu/debian-hexagon-cross --add-current-user, \ + "PREPARE", "debian-hexagon-cross")) + # Specialist build images, sometimes very limited tools docker-image-debian-tricore-cross: docker-image-debian10 docker-image-debian-all-test-cross: docker-image-debian10 diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker new file mode 100644 index 0000000000..d5dc299dc1 --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker @@ -0,0 +1,45 @@ +# +# Docker Hexagon cross-compiler target +# +# This docker target is used for building hexagon tests. As it also +# needs to be able to build QEMU itself in CI we include it's +# build-deps. It is also a "stand-alone" image so as not to be +# triggered by re-builds on other base images given it takes a long +# time to build. +# +FROM qemu/debian10 + +# Install common build utilities +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + bison \ + cmake \ + flex \ + lld \ + rsync \ + wget + +ENV TOOLCHAIN_INSTALL /usr/local +ENV ROOTFS /usr/local + +ENV LLVM_URL https://github.com/llvm/llvm-project/archive/bfcd21876adc3498065e4da92799f613e730d475.tar.gz +ENV MUSL_URL https://github.com/quic/musl/archive/aff74b395fbf59cd7e93b3691905aa1af6c0778c.tar.gz +ENV LINUX_URL https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.18.tar.xz + +ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh + +RUN cd /root/hexagon-toolchain && ./build-toolchain.sh + +FROM debian:buster-slim +# Duplicate deb line as deb-src +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list +# Install QEMU build deps for use in CI +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy git ninja-build && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt build-dep -yy --arch-only qemu +COPY --from=0 /usr/local /usr/local +ENV PATH $PATH:/usr/local/bin/ diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh new file mode 100755 index 0000000000..19b1c9f83e --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh @@ -0,0 +1,141 @@ +#!/bin/bash + +set -e + +BASE=$(readlink -f ${PWD}) + +TOOLCHAIN_INSTALL=$(readlink -f "$TOOLCHAIN_INSTALL") +ROOTFS=$(readlink -f "$ROOTFS") + +TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/bin +HEX_SYSROOT=${TOOLCHAIN_INSTALL}/hexagon-unknown-linux-musl +HEX_TOOLS_TARGET_BASE=${HEX_SYSROOT}/usr + +function cdp() { + DIR="$1" + mkdir -p "$DIR" + cd "$DIR" +} + +function fetch() { + DIR="$1" + URL="$2" + TEMP="$(readlink -f "$PWD/tmp.tar.gz")" + wget --quiet "$URL" -O "$TEMP" + cdp "$DIR" + tar xaf "$TEMP" --strip-components=1 + rm "$TEMP" + cd - +} + +build_llvm_clang() { + fetch "$BASE/llvm-project" "$LLVM_URL" + cdp "$BASE/build-llvm" + + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${TOOLCHAIN_INSTALL} \ + -DLLVM_ENABLE_LLD=ON \ + -DLLVM_TARGETS_TO_BUILD="Hexagon" \ + -DLLVM_ENABLE_PROJECTS="clang;lld" \ + "$BASE/llvm-project/llvm" + ninja all install + cd ${TOOLCHAIN_BIN} + ln -sf clang hexagon-unknown-linux-musl-clang + ln -sf clang++ hexagon-unknown-linux-musl-clang++ + ln -sf llvm-ar hexagon-unknown-linux-musl-ar + ln -sf llvm-objdump hexagon-unknown-linux-musl-objdump + ln -sf llvm-objcopy hexagon-unknown-linux-musl-objcopy + ln -sf llvm-readelf hexagon-unknown-linux-musl-readelf + ln -sf llvm-ranlib hexagon-unknown-linux-musl-ranlib + + # workaround for now: + cat < hexagon-unknown-linux-musl.cfg +-G0 --sysroot=${HEX_SYSROOT} +EOF +} + +build_clang_rt() { + cdp "$BASE/build-clang_rt" + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_CONFIG_PATH="$BASE/build-llvm/bin/llvm-config" \ + -DCMAKE_ASM_FLAGS="-G0 -mlong-calls -fno-pic --target=hexagon-unknown-linux-musl " \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_C_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_ASM_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_INSTALL_PREFIX=${HEX_TOOLS_TARGET_BASE} \ + -DCMAKE_CROSSCOMPILING=ON \ + -DCMAKE_C_COMPILER_FORCED=ON \ + -DCMAKE_CXX_COMPILER_FORCED=ON \ + -DCOMPILER_RT_BUILD_BUILTINS=ON \ + -DCOMPILER_RT_BUILTINS_ENABLE_PIC=OFF \ + -DCMAKE_SIZEOF_VOID_P=4 \ + -DCOMPILER_RT_OS_DIR= \ + -DCAN_TARGET_hexagon=1 \ + -DCAN_TARGET_x86_64=0 \ + -DCOMPILER_RT_SUPPORTED_ARCH=hexagon \ + -DLLVM_ENABLE_PROJECTS="compiler-rt" \ + "$BASE/llvm-project/compiler-rt" + ninja install-compiler-rt +} + +build_musl_headers() { + fetch "$BASE/musl" "$MUSL_URL" + cd "$BASE/musl" + make clean + CC=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + CROSS_COMPILE=hexagon-unknown-linux-musl \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CROSS_CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}:$PATH make CROSS_COMPILE= install-headers + + cd ${HEX_SYSROOT}/.. + ln -sf hexagon-unknown-linux-musl hexagon +} + +build_kernel_headers() { + fetch "$BASE/linux" "$LINUX_URL" + mkdir -p "$BASE/build-linux" + cd "$BASE/linux" + make O=../build-linux ARCH=hexagon \ + KBUILD_CFLAGS_KERNEL="-mlong-calls" \ + CC=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + LD=${TOOLCHAIN_BIN}/ld.lld \ + KBUILD_VERBOSE=1 comet_defconfig + make mrproper + + cd "$BASE/build-linux" + make \ + ARCH=hexagon \ + CC=${TOOLCHAIN_BIN}/clang \ + INSTALL_HDR_PATH=${HEX_TOOLS_TARGET_BASE} \ + V=1 \ + headers_install +} + +build_musl() { + cd "$BASE/musl" + make clean + CROSS_COMPILE=hexagon-unknown-linux-musl- \ + AR=llvm-ar \ + RANLIB=llvm-ranlib \ + STRIP=llvm-strip \ + CC=clang \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}/:$PATH make CROSS_COMPILE= install + cd ${HEX_TOOLS_TARGET_BASE}/lib + ln -sf libc.so ld-musl-hexagon.so + ln -sf ld-musl-hexagon.so ld-musl-hexagon.so.1 + cdp ${HEX_TOOLS_TARGET_BASE}/../lib + ln -sf ../usr/lib/ld-musl-hexagon.so.1 +} + +build_llvm_clang +build_kernel_headers +build_musl_headers +build_clang_rt +build_musl From patchwork Tue May 18 09:06:57 2021 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: 441175 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp41387jac; Tue, 18 May 2021 02:18:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy//qFa8HqvFiE38PHZpwPPAfvSzjvpldCcmtpWR1v57A+V27BkM1QsytiNZ6dj1hRJvFkQ X-Received: by 2002:a67:7f49:: with SMTP id a70mr4984832vsd.42.1621329505508; Tue, 18 May 2021 02:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329505; cv=none; d=google.com; s=arc-20160816; b=j2TsbzQzp/fDVHCPFTJCsZnYnC8jjSxkGtY2yCiz7mVQip6wHwtp2bY7TgzMxIXbDC Jx+O8WzqwXkkpZweRXFqPCXTXoMMLLogO0cDq/qBxnNRi34t/gHl8BllD4hTIL1g+mhA pFTVS5eBnC2X2wMcjMce1VbKo7lmp920yYxIJmXSA3gIEc0pGdxF+xNUsNkVd/W485T0 b+77l1ijyB26RXqDxiDZ6xtqfIq9Jo9Zc+27t7hZLVuciiyDSuPTqdveYrSBcfRD9Ie2 S4zG0x0bnFmTOsCGWqabA0PzKOOXX4Ey2IBgg5Qj+IctjHf8mn6OApQY523aYa60WWpk 1HLw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=WOubj9I0hfuhKMAhvEchXd3pEKvLduIygi3tQKq1LBQ=; b=XTsdC7QV3QdfTNOtaT/BeqRzbm2zRRHFKpnUqPW4O/Nng6uk3FJAiCqFs5Suo+4TPq rbYcr9xEkhqYFXGpmHW+ih4G2qbXuXHXTGNPy6yy6DmdKfKXmyoflJU4/2tBhHVab+ey xtqbR7iGco6Txv8A0l5yktTQcFhEmuO1G5s7ZcXB8hf03j6oKjksXzzWfFEobsYk026G uxfzU/Sr2MECmqc8+ISJxcrwUxtYN9a59bkx/lFeUVOGUING96xYnok7yamaJExkqavK mV99zzToPe+fNZl5z4x9aCQB0rj+puIU1lt3ReTy0jfSdgjmZ9cCWCPuiNBy5IAUF/ku TyTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lXSVAMkf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id p22si9048836uar.85.2021.05.18.02.18.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:18:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lXSVAMkf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:57652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livrs-0008Gg-V1 for patch@linaro.org; Tue, 18 May 2021 05:18:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhR-00086u-CE for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:37 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:43540) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhP-0005Vw-GY for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:37 -0400 Received: by mail-wr1-x436.google.com with SMTP id p7so5598465wru.10 for ; Tue, 18 May 2021 02:07:34 -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=WOubj9I0hfuhKMAhvEchXd3pEKvLduIygi3tQKq1LBQ=; b=lXSVAMkf304Cu72vpEz3mLWiGeWK0Q58MYdQBQJ6c+mGuiPMZNVKHoGEtGBSItr/7e oeDnbd84DJI9EVESnxFia0IQdwwTVA8edwCGJOyzothfXxu56o+67ZxkPW+BQNS6rX/G EuWj4DT+dMx7R4QfJ55RTqbR5WNUxM/w6ZJ5DT4shMuO/7vx8eDnPMo69t/TXn8H9pbO PLhLTzNU/otTsUc8ruEdGAxXgQLOSdTJsCixjfPSL70izsXWgWio3u5W3hUzvJ+AHDLv Q8gGWy2v9UvE/CJd0HE/JXyTrTdD2x5ToleN+Wcuit4EYHrPdTepfz8aWa6lMoTPA5rK z1KA== 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=WOubj9I0hfuhKMAhvEchXd3pEKvLduIygi3tQKq1LBQ=; b=jfHxki+J2u7ySOvQja0GVXABjrLCkamSwEm31yfHa22wvalk4C630wxYTdbNc3L+Vj l0HoWCbWtz3IpD9+HASiV5PM6bT69D3qbIuZBFsAtK6I2umrj1i3DUllsdQHNRNtqNhU URR5g9ovFa/kKaHiaJMVidPwliT7aefcHscfNCdA+uOTHYnpr3yTLOzoz0ODNIbIvLO+ hg2qohzgxsrV8y49RgVizFzzWp212yNoGNihdmS3Wr7miOPN3mMlAoma1rnHVKKKfr7o Of5sCDTa2lwa+3YM6lwW2z0QioTGugEyMG1JguyI6+Kf/dLlV4IUoIJpj69RLPmTF4qH zS8g== X-Gm-Message-State: AOAM530LPGDDMvUi+MJ7vFIuGPVzX7w5u8dJptv1xrs24ekYi76RQHmx Xf80vvzDRMNH9yNmtSUwQCndvg== X-Received: by 2002:a05:6000:2cf:: with SMTP id o15mr5508177wry.243.1621328853443; Tue, 18 May 2021 02:07:33 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p187sm6411406wmp.28.2021.05.18.02.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8118E1FF92; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 06/29] tests/tcg: Use Hexagon Docker image Date: Tue, 18 May 2021 10:06:57 +0100 Message-Id: <20210518090720.21915-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alessandro Di Federico , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alessandro Di Federico [PMD: Split from 'Add Hexagon Docker image' patch] Signed-off-by: Alessandro Di Federico Signed-off-by: Philippe Mathieu-Daudé [AJB: add container_hosts] Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20210228222314.304787-5-f4bug@amsat.org> Message-Id: <20210512102051.12134-8-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 8f20ce065d..cf6062a15f 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -128,6 +128,11 @@ for target in $target_list; do container_image=fedora-cris-cross container_cross_cc=cris-linux-gnu-gcc ;; + hexagon-*) + container_hosts=x86_64 + container_image=debian-hexagon-cross + container_cross_cc=hexagon-unknown-linux-musl-clang + ;; hppa-*) container_hosts=x86_64 container_image=debian-hppa-cross From patchwork Tue May 18 09:06:58 2021 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: 441171 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp38037jac; Tue, 18 May 2021 02:14:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5w42pidJ9I20gPtDJPFW2vbdALLJufTc4S0/d3vyiEKIEADZENkgi/LLiXO/BBeH5RZjG X-Received: by 2002:a05:6102:3086:: with SMTP id l6mr5365645vsb.2.1621329260406; Tue, 18 May 2021 02:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329260; cv=none; d=google.com; s=arc-20160816; b=jsqir6ywWc4asDbLb9gXDo/zJ7FbZ48mJs4G6iKE0ysr+tTNT6mTCF15R1GR89r3ur WFDsDcL7mKtwNwXruiu03yg9aSfw/NtYuvAeHjoA1dJqDd5zvpf4CuFrLkGEQUdAr7Wv EcYjrRmWUdmSNG6hdS2Dv6YekHML72O1GrIbvlGK/KCqC9oJxf3+8VSu6GibTCaI6y7C dCOt5xxe2Io4WOgoG5yF5GayGbJVgAlPvkSgO9giRK0EauWTGu514hwqsvTIGROcRol8 Q6qnhtjsbnkT5neMMlkjT+UwbUaXkftnhE0JonS9YZMXuPIqY06BM99KcUr7+3L/8jOB f47g== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=RAXGx82XxM7VmXNOT6ej/QtLpo+ZWO9C8Z/4DJv4ABo=; b=OTi4lUQwIbamZX/SdGJokCimijU8i0zO7iiCQMXFB/yh59p1uTEqyewr/FwPrjqXgQ +AWIpOgWFShGuLuz6MwKr7c2ltnDVOWSyxpXsKW0EvMGxB4njJrxVwspLXW3VNwZYjEF WWrMruVKyJYyHsyTaPYcNy8Sj258euFeaYHeYZO20aWTaxQeaQ+/MA+UlQcm4bW2XSdd ttCwxbqa2l8DgzBulEw1LABmbG9cHBh4xROs4VMFO/2oF75DDQFbn2/N1B7et2gcbSSD JzkW3gZcNDjq0r7tWS5dGobF9kD+6IUy7dJRhsSLq+C6GlTZei05amw+EMGR3SoUbrtW Xgvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M8TdHit3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id i1si9592439vsm.20.2021.05.18.02.14.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:14:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M8TdHit3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:49008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livnv-0002Jy-Mg for patch@linaro.org; Tue, 18 May 2021 05:14:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhQ-00085A-O4 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:36 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:36602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhM-0005UK-8B for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:36 -0400 Received: by mail-wm1-x333.google.com with SMTP id n17-20020a7bc5d10000b0290169edfadac9so1060302wmk.1 for ; Tue, 18 May 2021 02:07: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=RAXGx82XxM7VmXNOT6ej/QtLpo+ZWO9C8Z/4DJv4ABo=; b=M8TdHit31d60SG5yPc79bteZkeNXOHEZb7SC0aAvQ2iNeQQXX24EnUYwLXKZHfhyyt OArEscmaOOURZAD/Lk7fvALNEL0QX8zJJyhS82pdbWq0ZW6V7/TWEQK4JTjUQh0a532r nASDVmjkEGosTX+6qe4KE9QifBbxOiyZqIsIjnZWc4vKPWE1FR8inXHOssJCvpjFBo3E xXU2q+2b1NPDGvBC2MrNSQKM6G0F6rTR4dhnWvyjSztvoX9fC4DCyajZRHMaA1MDAlYR w/icQeon8BqKpaQDkrk4zZJjIBaBuCI2K3ZsksL6QZcyOVYzqfNC3UVVBJHP7JBpAfSY jpBg== 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=RAXGx82XxM7VmXNOT6ej/QtLpo+ZWO9C8Z/4DJv4ABo=; b=k+COq1mj/koOeD+Le08u8OODqulC/KtK/Tgq3aPM8MIjilXW/NTrWMx7Q+YJ/ThKEz 5CDiP7SQrGzpgVTgj9kGjiFBAcVMVuK1NPo1RhbmUDiKQluPafwJW9QJpjUvwtAVDXkq QGvbGv+PgBi5COwD7VXZoOqubynmFvqq0+/GT8goB2Me3hZ0aTJADhrMPT1c1reWCQ1y kObw1rXxnq2WGpRbO5l3gP4vVZtwMOYunohs2/roj/DS9AbkqCTBpyttYkzYxj2dE+aW BPBz0huOmk6bHnuK75Scb52eRAReQ+JYQe4L7E3X9iJq0JIr0kNuMJ5DQGXuAVDhT/dP +c7A== X-Gm-Message-State: AOAM530g6U2fD+GSVN5wCRqozBTGK6MlmNV5rYVKgvPAVzmcaqB66Tvd 8SDuhZLwQzVpO8NdMcUXq5T7+g== X-Received: by 2002:a05:600c:3545:: with SMTP id i5mr3679740wmq.43.1621328850865; Tue, 18 May 2021 02:07:30 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s1sm2020734wmj.8.2021.05.18.02.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 958E21FF93; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 07/29] gitlab: add build-user-hexagon test Date: Tue, 18 May 2021 10:06:58 +0100 Message-Id: <20210518090720.21915-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We special case this as the container with the cross compiler for the tests takes so long to build it is manually uploaded into the registry. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Tested-by: Philippe Mathieu-Daudé Message-Id: <20210512102051.12134-9-alex.bennee@linaro.org> -- 2.20.1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24f300aace..f718b61fa7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -416,6 +416,17 @@ build-user-static: CONFIGURE_ARGS: --disable-tools --disable-system --static MAKE_CHECK_ARGS: check-tcg +# Because the hexagon cross-compiler takes so long to build we don't rely +# on the CI system to build it and hence this job has no dependency +# declared. The image is manually uploaded. +build-user-hexagon: + extends: .native_build_job_template + variables: + IMAGE: debian-hexagon-cross + TARGETS: hexagon-linux-user + CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg + MAKE_CHECK_ARGS: check-tcg + # Only build the softmmu targets we have check-tcg tests for build-some-softmmu: extends: .native_build_job_template From patchwork Tue May 18 09:06:59 2021 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: 441166 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp34179jac; Tue, 18 May 2021 02:09:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxMA9vZRZFg4cAYDefzCy28VjQOSRRQfzNdB4UNRKNu/z5CdpYXtvbZ7r6keyBnyvaIEG7 X-Received: by 2002:a67:eb86:: with SMTP id e6mr5595663vso.52.1621328946015; Tue, 18 May 2021 02:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621328946; cv=none; d=google.com; s=arc-20160816; b=mdEMvwhgRP6QorkCW9WiRwioJ1mxrwkjg16h2amK5fAhs52AFaa4ADdQiDjzEIGTP1 b/gwpeGgkCuLX5Dg22WPLHjRSciYAisYhW4lo/dcUz381TK47r46MAJYrZehUZwRtQs5 iN1d9y7xNUAxl6Y29+e1pElOL8IUiy/Jp2ShyqZznh78fwSf8/6mxCSP+QCiBNEOhv+m tMpCaoF0CmpKHtztca1why+AtcMdytbrjaPMd1v0a6U672urgQJfCaWnOgVgSlXsbUZk 1Kx8CtKSIXHdkLKALleKtZnH5DXOvErwxZJc+HE2pNdqjLE97GBlJ4KBJwSqWLnC9mZg 3zgw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Vc8LrTg4vVRcCUK0lAtqysrbfC1yfp+yZGcfve2xqWo=; b=Vk6lyMzWuCmkpsSKgdSDiAlVJNNx4MvPfa6AYh2COcnXetaJdGDKQAjKVHsFpBshgL 0THaw1rGtKTVLhselZsZkK7i2SUb14tS9iARrQRxqi/td/ImNmifR22yZ2Em0lLaFTq/ Ply6K4+AJ9ZnGMhBfRsAn+VTGtSKVgfOvPoici8n4RV5tP6hg/EvAMQw9Mgkph9sl4zb kJcgE5AwwgUzIzYyKvoTA6yhT/uuMRikSTFMuPyPuvSynxaUf3dghuG2XDs60PDu64QP 3qWYHRmASG+BMokvEzN+ngPG405mBFpfHW1uQQnNs3QykwPu78azAX1DbXUm+8tiEUGq dbnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NofdYuN1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id b22si1302436vsj.98.2021.05.18.02.09.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:09:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NofdYuN1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:60960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livir-0008Be-D9 for patch@linaro.org; Tue, 18 May 2021 05:09:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhQ-00085o-WA for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:37 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:38838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhM-0005UX-S0 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:36 -0400 Received: by mail-wr1-x433.google.com with SMTP id j14so7587737wrq.5 for ; Tue, 18 May 2021 02: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=Vc8LrTg4vVRcCUK0lAtqysrbfC1yfp+yZGcfve2xqWo=; b=NofdYuN1UIyVr2MKvADN1ap9i5m88RB4wXIrUFdo5rqI1tdKBG7j+vsDaNVxtOm2iu jiO8RyFaqmUSXwNI4LymqSjwp1CG/7aycnICIXmOUwdckqFX86CHkyReOyAcxqFVxPwL gjj83+saf4aegVXI3FnKRI5ky1HKzAgDdHv4A62bv0EEFzQCyVOc+NKWDFgj7CWnIMSF M4Lu7m/4QQqRa98/cXpKeEceTfrjrcY+yz+IbcuK/Oy5fYCVZNlzO/u9sxn+T/3izekA vx17sHPCv1jABgncshtt58QbAt6vens70HzA9n1NFO7cpeo/OI8REVnK33QDzm+4opG4 0yAQ== 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=Vc8LrTg4vVRcCUK0lAtqysrbfC1yfp+yZGcfve2xqWo=; b=blZAjV3spXDon6Jbpn60bgEiZFyxPSKPPmS84PCRAUVLCfKPrjfJ7Sdl0cfK++Qelr u4lXyS54FO+j7PKGgBgBIsBQv+Dq4SjsUnJCElOVmlZzYV6NkKU/5iWChUFHCSRQv/bR kdh1ijYUCO82yFZgMDvRIOid48PiJLL9AcB4zrbSbgXsOcbz9+dSUilM2Rgt2BmvjDkI O1+hNww0CuIig2F1VeR9GxCP+25uv/3PxCpyEtUNl1MnYH00gdqjzx/bbooy+QVu62sk +IC9CQvT138DotujTU1So1YZiccLgjxizbV6bE+vcqUZQIoHVtf+BFuU29Z3DJumy66q EREQ== X-Gm-Message-State: AOAM531EExkkcYc/eMN9vbdjPtZuJVFOc7imzYTykfBcd1Bp9g0cOmqF pmIcudve8hvqfiENHBVrGB30N2Wk5aBuwg== X-Received: by 2002:a05:6000:1c1:: with SMTP id t1mr5432842wrx.421.1621328851451; Tue, 18 May 2021 02:07:31 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f8sm16184927wmg.43.2021.05.18.02.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A93B71FF96; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 08/29] tests/tcg: don't iterate through other arch compilers Date: Tue, 18 May 2021 10:06:59 +0100 Message-Id: <20210518090720.21915-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" There should only be one compiler per architecture. Those cases where the same compiler can deal with a different architecture should be explicitly set for both cross_cc and docker configurations. Otherwise you get strangeness like: --cross-cc-aarch64=/bin/false causing the logic to attempt to use a locally available arm-linux-gnueabihf-gcc rather than forcing the use of the docker image which is what is implied by the command line option. Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-10-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index cf6062a15f..e6c1be5450 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -74,35 +74,6 @@ fi for target in $target_list; do arch=${target%%-*} - case $arch in - arm|armeb) - arches=arm - ;; - aarch64|aarch64_be) - arches="aarch64 arm" - ;; - mips*) - arches=mips - ;; - ppc*) - arches=ppc - ;; - sh4|sh4eb) - arches=sh4 - ;; - x86_64) - arches="x86_64 i386" - ;; - xtensa|xtensaeb) - arches=xtensa - ;; - alpha|cris|hexagon|hppa|i386|microblaze|microblazeel|m68k|openrisc|riscv64|s390x|sh4|sparc64) - arches=$target - ;; - *) - continue - ;; - esac container_image= case $target in @@ -236,70 +207,69 @@ for target in $target_list; do echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak got_cross_cc=no - for i in $arch $arches; do - if eval test "x\${cross_cc_$i+yes}" != xyes; then - continue - fi - eval "target_compiler=\${cross_cc_$i}" - if ! has $target_compiler; then - continue - fi - write_c_skeleton - if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then - # For host systems we might get away with building without -static - if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then - continue - fi - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - else - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - fi - echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + if eval test "x\${cross_cc_$arch}" != xyes; then + eval "target_compiler=\${cross_cc_$arch}" - # Test for compiler features for optional tests. We only do this - # for cross compilers because ensuring the docker containers based - # compilers is a requirememt for adding a new test that needs a - # compiler feature. - case $target in - aarch64-*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.1-a+sve -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.3-a -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mbranch-protection=standard -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.5-a+memtag -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak - fi - ;; - ppc*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mpower8-vector -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak - fi - ;; - i386-linux-user) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -Werror -fno-pie -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak - fi - ;; - esac + if has $target_compiler; then + write_c_skeleton + if ! do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC -static ; then + # For host systems we might get away with building without -static + if do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC ; then + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + else + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + fi + fi - enabled_cross_compilers="$enabled_cross_compilers $target_compiler" - got_cross_cc=yes - break - done + if test $got_cross_cc = yes; then + # Test for compiler features for optional tests. We only do this + # for cross compilers because ensuring the docker containers based + # compilers is a requirememt for adding a new test that needs a + # compiler feature. - if test $got_cross_cc = no && test "$container" != no && test -n "$container_image"; then + case $target in + aarch64-*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.1-a+sve -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.3-a -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mbranch-protection=standard -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.5-a+memtag -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak + fi + ;; + ppc*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mpower8-vector -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak + fi + ;; + i386-linux-user) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -Werror -fno-pie -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak + fi + ;; + esac + elif test $got_cross_cc = no && test "$container" != no && \ + test -n "$container_image"; then for host in $container_hosts; do if test "$host" = "$ARCH"; then echo "DOCKER_IMAGE=$container_image" >> $config_target_mak From patchwork Tue May 18 09:07:00 2021 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: 441170 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp36831jac; Tue, 18 May 2021 02:12:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwkU/ezzjBAsKXhSYAtE+yLwf45Q0qo0s0xpHmYBFT3mASzmYLVQPk29sIA0Ai5ZjQ6/dg X-Received: by 2002:ab0:12a:: with SMTP id 39mr5221403uak.19.1621329158562; Tue, 18 May 2021 02:12:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329158; cv=none; d=google.com; s=arc-20160816; b=WPkzwtkE42tXcIxX4ZB+9AdXMBan415Z63Nf4yw6rL0Toa+VCHjEIzi9xGZzABfAey 4eceXK4sPuJ3AQSjZZg4e15rtVMJiLU9zgrJeZboZuN1CW7J0m80h1q+qm0HoerFidwY TCKxJ1hm5hpw10DRWXbsKUhRg7N9tdcdM2iOoqhCTZVyQlkTc3GmvoXK+hKGRmEiwXk6 T5Suo/yZNN6BbJMIqWMbHIW178dAie6VgZ3TqHfBhGbyRjIHy8/F/dxtFVxOIizTi7Bs rcJEsOigjf65/CYTfNHiCfeI82i07UkjfwmmazuZO1EPA1weYOoMZ+gfsen9phjwIQrO g9OA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=gllIoUELwzPGwHAelVkrrBt4Vj2mBugD1Mj6jpwKw0GBk2T6rbM464wN+7kv24PJYY BZqBe9mraGfN70f6O0LtS7s5CjRw3sCVDilCfwwy0Q7VEu0Lfv5ifn7hm/gj2C3f4HpQ RQmKvBp96PsyvkV6GP16spzuj/Kf0HzjPyeA0TPYu1YFhq9cJjoFke/05J7N0HbCgUjE 5XLJ1D4yDYXVV5jMdE81lDIAAaB9EypVvMFZYrizK+gCTsTTaqGivtwgRcOLxrugIkuw RXGHA6J/772kPQRBV1xmASBQ8+jkyHF6LXUCa/6Vy8TG8YivgvHpEUli6hp3AOR1onbr z0ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DOGTgzm7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id x3si10179496vse.288.2021.05.18.02.12.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:12:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DOGTgzm7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:41558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livmH-0005md-Te for patch@linaro.org; Tue, 18 May 2021 05:12:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhU-0008Ao-6z for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:40 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:42683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhP-0005WX-HG for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:39 -0400 Received: by mail-wm1-x335.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so1041396wmf.1 for ; Tue, 18 May 2021 02:07:34 -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=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=DOGTgzm7Y4hsbIU1hD0KVBngRhaWqzYDFWORwZsjYwFYaY8LbArbWWqzdCbtrBCS9V 0CdgzhoKTdzzvFkwy4daYWS8YdXsNjEXcvDZSUQgqU7CYgpTk0stW35DR8z76yquns02 1qpskA1qU1yLSCvy2s1R+RBc7P7cTZwScmvl//CES+rzjZ+OXwITWNJnASqLqrMsL5T0 ZkreJt4Ph6mjZ+JIpqIOPDeiyiV+hpGWfuyIEhFz+QKgrSTvE4lxVQs11k43naVolBGH FxBfCY5LrY7Qs4W+2+IbbOk1i2b8+2brFEUoOAZbYEVuNhC04vPSf+sQ71PlRodzBQvT 2VJw== 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=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=dmZUQT68By2kh6fO9YUfXbv5/GJVFpCu1Shi/tM0T0mB3Hsx3DUOb66a5Uh/Z6FJJf SPw8q/eERZPsA43iDT7s5+p/8NUn++ilTGP0oO1+RWN5FfKKXuFcM6puArJem90fl2Bl gohkuNHDauCk8B9xqgT1w9/gKoQb67XKju3XVC7UMIk1FM71j6FUzcB+zhVGMBCPzlL8 Ulq0sXebUJ7Mmp5as0PWPtFUUi1HzgYYrwQR5MdIWkzGqlxMapoqEcsmO+KbGinCag/Z FEI5d1TSJtyLaQbU9zz0hO9oG7bt9+8lbfWC19N4j8zH0+qvNgs2Eaa3Z1vDGQwijj41 diAg== X-Gm-Message-State: AOAM530HC81P+6+ta8rGN3DUl6wyq+Lp4VcxbgBHS5on97nHFfXXOITc o5miNjNqAOcBRrTzm/dwWVKJKg== X-Received: by 2002:a7b:cc8e:: with SMTP id p14mr3797361wma.74.1621328853965; Tue, 18 May 2021 02:07:33 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x10sm18521315wrt.65.2021.05.18.02.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C0B6B1FF98; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 09/29] tests/docker: Added libbpf library to the docker files. Date: Tue, 18 May 2021 10:07:00 +0100 Message-Id: <20210518090720.21915-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Melnychenko , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= , Willian Rampazzo , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Andrew Melnychenko The series of patches for eBPF RSS adds libbpf dependency for qemu. https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg08887.html With this patch, libbpf added: Alpine - added libbpf-dev Centos 8 - added libbpf-devel Fedora - added libbpf-devel Signed-off-by: Andrew Melnychenko Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210406082947.672708-2-andrew@daynix.com> Message-Id: <20210512102051.12134-11-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker index 0ac46ddd91..7eeecacc46 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -20,6 +20,7 @@ ENV PACKAGES \ gnutls-dev \ gtk+3.0-dev \ libaio-dev \ + libbpf-dev \ libcap-ng-dev \ libjpeg-turbo-dev \ libnfs-dev \ diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index a8c6c528b0..efc1349cc8 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -14,6 +14,7 @@ ENV PACKAGES \ git \ glib2-devel \ libaio-devel \ + libbpf-devel \ libepoxy-devel \ libfdt-devel \ libgcrypt-devel \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index d8fa16372d..0979c0e1f4 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -32,6 +32,7 @@ ENV PACKAGES \ libcurl-devel \ libepoxy-devel \ libfdt-devel \ + libbpf-devel \ libiscsi-devel \ libjpeg-devel \ libpmem-devel \ From patchwork Tue May 18 09:07:01 2021 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: 441174 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp40614jac; Tue, 18 May 2021 02:17:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/biwRbTQ+dl3kzLIKPsGJg3OcsvQEAvm/U4Br2AFxBAxaRxsVTyez4HLTwP0hmcqeggAO X-Received: by 2002:a1f:1d4a:: with SMTP id d71mr4750945vkd.0.1621329444029; Tue, 18 May 2021 02:17:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329444; cv=none; d=google.com; s=arc-20160816; b=pA9afREPjPVNctH/E/mAyXCasy7L4J4Rym+V3BVI1Y9S5zvNBcK8njEnJA4yDqv+5p ykim1W6vNY9pUhgblcvmCQkwXY0JcQk2NsTBHfIor5bZl7iefylST3ZLN/KFosnyL0SK 1+vD5js7I5XCk7QPU3VcueQGBxDO9ZysPbuqJQTPjtpq+pKaUoZKNpF6bs8ykM10JSrp lai5T3NidqT8NUGH3nxcvdXpPo72CwsxaLzPSSQV4dCjJ0F6WIj95QiLvtnMxBFK9xox QZm+y+2UgGnoMFcXPuh1nJ08Zx2D1mbYFi8uM85wXvSe1YgOLhsqdyrOTDR32gj7zS31 GNhA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=iHzMEhvW9dXILlz4dLRzWbxJpqXqkKl8FediKZsJZFo=; b=o1XuwDTRzlmUjpZO+WOxxnv3tzxbPQDVyDat3iH21fDuXPaaIvb6KT0OfGad/T8Ryf fkKs/iLhFNwkKl4QIQXj+cm+XYWN6qc+pqVqIOZZYqXG7mtQKfMxEuxH7bTZ8icD3jZL PuenCTEmWBGaEHwEKw4P8GyH8RkgbCCX0I+8xAVKuohzx/0N30d1kMs6GjoXx0K/2bpC IA5lqAnr4eqWdSEierJGj602vXk2vvFwmHtm/CZB8kg/O6T9O0YvMGqVQl7I3ZTCqoND gFJawQ3lzDQulSlgLvS9ntp6FoEhf2GafHdpY7jTo+ztAjf9Gt8VVuVl0juhON8RFeB3 f4yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ds4KNmCH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id z4si10388775vse.134.2021.05.18.02.17.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:17:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ds4KNmCH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:52296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livqt-0004Vr-AH for patch@linaro.org; Tue, 18 May 2021 05:17:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhW-0008CX-4h for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:42 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:37548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhU-0005YO-0b for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:41 -0400 Received: by mail-wm1-x32a.google.com with SMTP id f19-20020a05600c1553b02901794fafcfefso431231wmg.2 for ; Tue, 18 May 2021 02: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=iHzMEhvW9dXILlz4dLRzWbxJpqXqkKl8FediKZsJZFo=; b=Ds4KNmCHRrLcxIkfVVM2ypn/EPGCzXiEJXDSGTddrTfqonltnZFKbUse1ICx8tT8tx A8KJCllqjDv1Caw8R1llzTlGeHTw5diiy0dD+cbthTxpEHLqsXGdfVvvC6u6ccg3i3yM OUv3qGDMQO3Hm4djCQqbfas3U4BuBlr1+dZenPTmMSneHk4E4LorZGFTwWW8GXft9Htr ZX9dymjw2gZnYjZ9Q9QM4bbWB9UsMChBzhXUSHKXiNw9zF/82xD1wvlFRc0Am0Q8qR+r z1paMEX5OfLJLY6vD2QBea9S76MJ4o5et5yiKHvSu+KGuT5onP4AUDm5MQ68zW9ZTY6k o70g== 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=iHzMEhvW9dXILlz4dLRzWbxJpqXqkKl8FediKZsJZFo=; b=TcAXhaZodnQpvEmwosGCypecl9cFc/x6nJuweyrw/6FNFmjIILR+w7o+zYdbiQmGOD JH9yKSX2mk7T3uvDnJvZWUk9b9IMdJAGlX5tYR+PTcQCXB8SPkSsRJlf6l2sA5S5wuxj U2ApX0n8v/JAb+0IBJrw7DVSXRyOa/gZxmk6RCpPCbcvlsMCIYuSCvqE+mBkpFZTxvsQ g2U8QkTUSbzPQP+ynrHNQ/d/u7Cnbka0arVmH7FL1FMNcUijM7fhwKeKMyDF1pfjYqjj ETeBggkwL0m8W1PpMeQ4cg/B0Js3UjSJP82vzoRdc5p2cCqpKdKeyMLfCg7wtu5SoY2T Tuvw== X-Gm-Message-State: AOAM533POFEEQESh7sX1QBXcf5lhEu/5F8OV175KlUy048135FssRyJh nrn1RtO/VO3ID3ISHDkY8LCIKQ== X-Received: by 2002:a1c:988f:: with SMTP id a137mr3806607wme.110.1621328858035; Tue, 18 May 2021 02:07:38 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k11sm1952241wmj.1.2021.05.18.02.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D72DF1FF99; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 10/29] tests/tcg: Add docker_as and docker_ld cmds Date: Tue, 18 May 2021 10:07:01 +0100 Message-Id: <20210518090720.21915-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann At least for the TriCore target no easily available c compiler exists. Thus we need to rely on "as" and "ld". This allows us to run them through the docker image. We don't test the generation capabilities of docker images as they are assumed to work. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Bastian Koppelmann [AJB: fix quoting, only handle docker & clear, test -n, tweak commit msg] Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-12-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/Makefile.qemu b/tests/tcg/Makefile.qemu index a56564660c..84c8543878 100644 --- a/tests/tcg/Makefile.qemu +++ b/tests/tcg/Makefile.qemu @@ -22,6 +22,8 @@ quiet-@ = $(if $(V),,@) quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3) CROSS_CC_GUEST:= +CROSS_AS_GUEST:= +CROSS_LD_GUEST:= DOCKER_IMAGE:= -include tests/tcg/config-$(TARGET).mak @@ -42,6 +44,8 @@ cross-build-guest-tests: $(call quiet-command, \ (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \ $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC="$(CROSS_CC_GUEST)" \ + $(if $(CROSS_AS_GUEST),AS="$(CROSS_AS_GUEST)") \ + $(if $(CROSS_LD_GUEST),LD="$(CROSS_LD_GUEST)") \ SRC_PATH="$(SRC_PATH)" BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \ EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \ "BUILD","$(TARGET) guest-tests with $(CROSS_CC_GUEST)") @@ -59,11 +63,24 @@ DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \ -i qemu/$(DOCKER_IMAGE) \ -s $(SRC_PATH) -- " +DOCKER_AS_CMD=$(if $(DOCKER_CROSS_AS_GUEST),"$(DOCKER_SCRIPT) cc \ + --cc $(DOCKER_CROSS_AS_GUEST) \ + -i qemu/$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- ") + +DOCKER_LD_CMD=$(if $(DOCKER_CROSS_LD_GUEST),"$(DOCKER_SCRIPT) cc \ + --cc $(DOCKER_CROSS_LD_GUEST) \ + -i qemu/$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- ") + + .PHONY: docker-build-guest-tests docker-build-guest-tests: docker-image-$(DOCKER_IMAGE) $(call quiet-command, \ (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \ $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC=$(DOCKER_COMPILE_CMD) \ + $(if $(DOCKER_AS_CMD),AS=$(DOCKER_AS_CMD)) \ + $(if $(DOCKER_LD_CMD),LD=$(DOCKER_LD_CMD)) \ SRC_PATH="$(SRC_PATH)" BUILD_STATIC=y \ EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \ "BUILD","$(TARGET) guest-tests with docker qemu/$(DOCKER_IMAGE)") diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index e6c1be5450..ed378e7840 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -75,7 +75,13 @@ fi for target in $target_list; do arch=${target%%-*} + # reset all container fields container_image= + container_hosts= + container_cross_cc= + container_cross_as= + container_cross_ld= + case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 @@ -273,7 +279,16 @@ for target in $target_list; do for host in $container_hosts; do if test "$host" = "$ARCH"; then echo "DOCKER_IMAGE=$container_image" >> $config_target_mak - echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak + echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> \ + $config_target_mak + if test -n "$container_cross_as"; then + echo "DOCKER_CROSS_AS_GUEST=$container_cross_as" >> \ + $config_target_mak + fi + if test -n "$container_cross_ld"; then + echo "DOCKER_CROSS_LD_GUEST=$container_cross_ld" >> \ + $config_target_mak + fi fi done fi From patchwork Tue May 18 09:07:02 2021 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: 441173 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp38837jac; Tue, 18 May 2021 02:15:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqw4ucZpfPlv5hoNjxqc9zMkkFhTn4XeNwFZYZEIbWivVjAh27duIpb80FqvtDlAjrpTW+ X-Received: by 2002:a1f:2504:: with SMTP id l4mr4641170vkl.5.1621329316548; Tue, 18 May 2021 02:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329316; cv=none; d=google.com; s=arc-20160816; b=wZlalL4HGw42d5R891+JZK0JdlgFtqSaFGkxJ2LvN889wjZ+Y34I1/vGXYSwOg0Ha2 E9brW+woWf0m/scr3tHcLD392iUBzWIlY5RRnH6cTclg/bEbNh+MHEIW/ZnPE4gaC1Bx d7wkvTllqr9+hx0TtTEKvfE75jfcZ5dawkphQ4mG0drEZ6CrFI5wZ2ccH1UTtmCmPabi h2zhSXVLZroqUxSCfqV0ewXxUGJYgOTbObp/LCvStbfCKQ3+oYqmFImyJV+86IIxUj2O f8XK/mriYl0fnrwy5lFKe3QrAh9W3vrhAYQEiO9RPKB/Bss9NLH5T6GHTfHlgP0DQGsP KqUw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=Rf1ozRwTsS4B/ArQd7Zs3LCwzcPz/pi4GqDMRQ+M+gI96mUTl9nHOJBe9b6JbyRQAT 6bOyFABWtEhAn05znskQcNPZEkH+SiYO86FbdL5sh4XKiZJYsj5/95+EcVDYs9FUv1pt prFQ5zAnz2FksDZdkHYEpU+kk4Q1klFHGVA0jw0J075H15Z4ppay4pt/S2qPP4izwEQK cUsrc/XM/DheTcEqDl5qnjGe2xY2WRpzdSv0RI+YeBwCGfg+MRPjtHbg37VRhAbDIQDj n3gYZ98KQNjyk10mkDcjykvvL7wh4RAC2kBzYLmPgr7fKQlJgs6Hc61yyc3tuB5FL3a8 rK7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QOi6OYdy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id u25si4649822vsj.186.2021.05.18.02.15.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:15:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QOi6OYdy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:49136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livop-0002P0-Vt for patch@linaro.org; Tue, 18 May 2021 05:15:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhc-0008E2-A1 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:54855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhR-0005Wk-44 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:46 -0400 Received: by mail-wm1-x32c.google.com with SMTP id o127so4979797wmo.4 for ; Tue, 18 May 2021 02:07:36 -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=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=QOi6OYdySSZFH1c6NtjIs9km37rlQRRi7NNAQc0seBUZIhPP/3FuoH7oVbGJ6im+27 t12lJTZjebh8Yy0h6et6bGUdNAZIFfcF+nK9LR6tF3q6AKW78nsoZNAsymHIOarzwcfF Ms27qWnNLjtCvz5+kyGof25pNj4aoe/bz+jc9A5hN6wARME8PbwAk02/jINvkcnf927a 7N5di5qtu0TmiBg1KydPkXfqDm1QijdxKi71HmHU25VC+ZsWuUVNQ/gOOIin9CAgNTIU UIaHNed2qpba/YItLtEN6Ijx7ilQztmLfrSoFrH2Cf0zhTet6dPRt+FT2zh8JycQDS3j UhdA== 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=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=iPOr/pr2hh9wFwGNEMIGCKlb5Kgye7o/pnOViwc0MKH/Bo93Kk/sEF1Y/MIGxoGGEv b8LkS0ipj4ggvmMVQTtks59MScNL+CaVqdN9qW9vU2K8DrnBbcZitJIuc4mhV1s2vOC3 s1Nn4QdiK92V2YF0hnLvCf/xGE0uKNKHtqW5SAE0KVKDKV6i/1QZxxpY9SKclZTfJrGw 3BR6deljEPjS3dFJILgFWsoFD9DmnXFKRIDiRtLfE2rzwhE7pZ+4VP4Upwil0/wxg6E6 83xsQ7NI/uw17EiGjD2rZy3aDSXxcanxBYAFqG8RX/Lo3x0yE+EyNuGgtCrgv4eZYJzS ZnaQ== X-Gm-Message-State: AOAM533DABSGVUwyMRvDfBeIfyhjRWfQFLzFjyBwwc5WZfg8+hjObW+T CLNdOVVfG9zrSTYhMZnWhWMvGA== X-Received: by 2002:a05:600c:2948:: with SMTP id n8mr3740468wmd.95.1621328855811; Tue, 18 May 2021 02:07:35 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p7sm20501159wrt.24.2021.05.18.02.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EBEC21FF9A; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 11/29] tests/tcg: Run timeout cmds using --foreground Date: Tue, 18 May 2021 10:07:02 +0100 Message-Id: <20210518090720.21915-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann when trying to run successful short tests from the Makefile timeout would not terminate. Rather it would wait until the time runs out. Excerpt from the manpage: --foreground when not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and get TTY signals; in this mode, chil‐ dren of COMMAND will not be timed out Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-3-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-13-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index cab8c6b3a2..b29fae4630 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -43,9 +43,10 @@ quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) # $1 = test name, $2 = cmd, $3 = desc ifdef CONFIG_USER_ONLY -run-test = $(call quiet-command, timeout $(TIMEOUT) $2 > $1.out,"TEST",$3) +run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2 > $1.out, \ + "TEST",$3) else -run-test = $(call quiet-command, timeout $(TIMEOUT) $2,"TEST",$3) +run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2,"TEST",$3) endif # $1 = test name, $2 = reference From patchwork Tue May 18 09:07:03 2021 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: 441178 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp43434jac; Tue, 18 May 2021 02:21:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGKZW/tUDQCG2GofPnhDCP8h5oYnWAl82zSC4Nkc6Zmbv7GS593noxpz/ExjP5hg3HI2Et X-Received: by 2002:a1f:5504:: with SMTP id j4mr4798395vkb.7.1621329697270; Tue, 18 May 2021 02:21:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329697; cv=none; d=google.com; s=arc-20160816; b=n+esCr3l22eGFsX/eFGcapYLfePoqBVVAL6lJnuFqVInEmrTZDAHoK/DgWWeHwTpMW sBFYYSLiHT/RjxgsOOdKP0znJ6RB27UxuMFhJ66xfHB3SjwdF5uSDwHExA0lzE8Bpf68 0bB+Ucw0aDKePM2OloQD6J/TPFHa0KAgE0jl3rxh3cHw2F7mAokcW/H/xyt3WeJQo/3P +cLFC82M9bnLisVnw7UyJPEGZPhKXmh0q59oaq8qeBJrAy0ngWbHHBn1zT3KeRxcwMv/ 7Kr6rXgCyiUqn5r99rBBUB1g55e6OsklCp9uQbv0rOuIX6fTZGpU8zLSrveb8Dt041fw V5Vw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=f8I2LQNseKoGPZewhMtDjK2bewdbq9EHrD7Ih+hewKo=; b=H8+ZcTqC3dAXhluQm4iUARqKvYtH6QEBm5s9iRxbBk6lCE7XmkRdKHHXu8qLeFMEqq exseKfOSRjg08zivsOqW+gMZ1Uac9AzsDyBNxdOaE5AWKguQ4rh2hfONESP2CtaADK7n NWCY6YFpugUQj1xGEWkie6HwygAQsti9xteTXqImkszRlnRw7aj34nLwvJq2hFZCgVHg PRlAREcGAZqHvQofvSTtGO6sL5jlMD4BCIrlez6g4kIZ0oKNhMPhxBdDoRK1Q4QDvf9B rXCcTKSuSFBSanx6xr9Klo38x4zYSpMrY7oCMf3LUQPmOPAbKHDZFp9GCFbDmzZYF2aH HaEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WIBfawg2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id i21si5382956uaq.8.2021.05.18.02.21.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:21:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WIBfawg2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:38050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livuy-0005h3-Km for patch@linaro.org; Tue, 18 May 2021 05:21:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhY-0008DU-5t for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:46867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhR-0005XW-Sa for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:43 -0400 Received: by mail-wm1-x334.google.com with SMTP id h3-20020a05600c3503b0290176f13c7715so1037646wmq.5 for ; Tue, 18 May 2021 02: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=f8I2LQNseKoGPZewhMtDjK2bewdbq9EHrD7Ih+hewKo=; b=WIBfawg2xQoOhPkSSFR9WNNt8eFkEdh3jIMo/blk9yXARgLzih+Kc1yieVdsmRvSyZ oXsHL+m5qxcbTGFoFQlB5DTcsdmtZdeUOWR3FB4k9APMrnuEi5DC0E2gPFcFnP/783HV yFOKRab/2Dw55Ke+0Kcs3L1XHya7uiG/7sRC5d0AIe+/CFbnXUK97kBz7u6wN8SGC5kb 4b3Txmw7mmVSEa4DG5yIeL1HWkTKHdOxsBfAu/hot40WDKTafODVLnEBwobivO5Xg5QA xbgC497SO6q/6QIYpfogydnIq4sd6ETC6U6BIuCIljiFWG3L/t16SY/8dyDm+RgdTMi+ fU+A== 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=f8I2LQNseKoGPZewhMtDjK2bewdbq9EHrD7Ih+hewKo=; b=mO/oALqXukqIEismN7ChuxeV1LEb312ZHU0uPxva0TesZXX+B0SlXviAgBEKW5AQ9Y B37uU8tuztWB8xZ85OfIWphRc7zfHgsBqYHHo7gkNhqojarGtog0WIvUK3oG8dNMwmqH 3AjTE071O1kL95u7LDUsuAZu1I3D+GP3efCLbJILyd1udaISoZy3qELsyKdjuqJlLSAk ppe6UP/Q70fkYuWlkyWkR7N8z7+vlsljxPNYQ5IL4QfP44vtz4Q3M9QSRveUtmdX7jN8 ODPnr+qZTOdMeODjxoHyB2Ua7kxso2iLmIAlfouy/uRb0DolflR1nOlblO1OikCJItjH nHHA== X-Gm-Message-State: AOAM531dPlG/UMnH1Fk2fBR8bpHCcA3EGgoAl3AsWDh9h6BdsR/IoUYC 0sihFs8EX/+vogWRbANUcJxOaA== X-Received: by 2002:a1c:7515:: with SMTP id o21mr4331855wmc.90.1621328856469; Tue, 18 May 2021 02:07:36 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s199sm1965381wme.43.2021.05.18.02.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 11B831FF9B; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 12/29] hw/tricore: Add testdevice for tests in tests/tcg/ Date: Tue, 18 May 2021 10:07:03 +0100 Message-Id: <20210518090720.21915-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this device is used to verify the correctness of regression tests by allowing guests to write their exit status to this device. This is then used by qemu to exit using the written status. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-4-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-14-alex.bennee@linaro.org> -- 2.20.1 diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/tricore_testdevice.h new file mode 100644 index 0000000000..2c56c51bcb --- /dev/null +++ b/include/hw/tricore/tricore_testdevice.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2018-2021 Bastian Koppelmann Paderborn University + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + + +#ifndef HW_TRICORE_TESTDEV_H +#define HW_TRICORE_TESTDEV_H + +#include "hw/sysbus.h" +#include "hw/hw.h" + +#define TYPE_TRICORE_TESTDEVICE "tricore_testdevice" +#define TRICORE_TESTDEVICE(obj) \ + OBJECT_CHECK(TriCoreTestDeviceState, (obj), TYPE_TRICORE_TESTDEVICE) + +typedef struct { + /* */ + SysBusDevice parent_obj; + + /* */ + MemoryRegion iomem; + +} TriCoreTestDeviceState; + +#endif diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c index 51658d9e37..b6810e3be0 100644 --- a/hw/tricore/tricore_testboard.c +++ b/hw/tricore/tricore_testboard.c @@ -27,6 +27,7 @@ #include "hw/loader.h" #include "elf.h" #include "hw/tricore/tricore.h" +#include "hw/tricore/tricore_testdevice.h" #include "qemu/error-report.h" @@ -56,6 +57,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id) { TriCoreCPU *cpu; CPUTriCoreState *env; + TriCoreTestDeviceState *test_dev; MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ext_cram = g_new(MemoryRegion, 1); @@ -87,6 +89,12 @@ static void tricore_testboard_init(MachineState *machine, int board_id) memory_region_add_subregion(sysmem, 0xf0050000, pcp_data); memory_region_add_subregion(sysmem, 0xf0060000, pcp_text); + test_dev = g_new(TriCoreTestDeviceState, 1); + object_initialize(test_dev, sizeof(TriCoreTestDeviceState), + TYPE_TRICORE_TESTDEVICE); + memory_region_add_subregion(sysmem, 0xf0000000, &test_dev->iomem); + + tricoretb_binfo.ram_size = machine->ram_size; tricoretb_binfo.kernel_filename = machine->kernel_filename; diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevice.c new file mode 100644 index 0000000000..a1563aa568 --- /dev/null +++ b/hw/tricore/tricore_testdevice.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2018-2021 Bastian Koppelmann Paderborn University + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#include "qemu/osdep.h" +#include "hw/sysbus.h" +#include "hw/qdev-properties.h" +#include "hw/tricore/tricore_testdevice.h" + +static void tricore_testdevice_write(void *opaque, hwaddr offset, + uint64_t value, unsigned size) +{ + exit(value); +} + +static uint64_t tricore_testdevice_read(void *opaque, hwaddr offset, + unsigned size) +{ + return 0xdeadbeef; +} + +static void tricore_testdevice_reset(DeviceState *dev) +{ +} + +static const MemoryRegionOps tricore_testdevice_ops = { + .read = tricore_testdevice_read, + .write = tricore_testdevice_write, + .valid = { + .min_access_size = 4, + .max_access_size = 4, + }, + .endianness = DEVICE_NATIVE_ENDIAN, +}; + +static void tricore_testdevice_init(Object *obj) +{ + TriCoreTestDeviceState *s = TRICORE_TESTDEVICE(obj); + /* map memory */ + memory_region_init_io(&s->iomem, OBJECT(s), &tricore_testdevice_ops, s, + "tricore_testdevice", 0x4); +} + +static Property tricore_testdevice_properties[] = { + DEFINE_PROP_END_OF_LIST() +}; + +static void tricore_testdevice_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + + device_class_set_props(dc, tricore_testdevice_properties); + dc->reset = tricore_testdevice_reset; +} + +static const TypeInfo tricore_testdevice_info = { + .name = TYPE_TRICORE_TESTDEVICE, + .parent = TYPE_SYS_BUS_DEVICE, + .instance_size = sizeof(TriCoreTestDeviceState), + .instance_init = tricore_testdevice_init, + .class_init = tricore_testdevice_class_init, +}; + +static void tricore_testdevice_register_types(void) +{ + type_register_static(&tricore_testdevice_info); +} + +type_init(tricore_testdevice_register_types) diff --git a/hw/tricore/meson.build b/hw/tricore/meson.build index 77ff6fd137..47e36bb077 100644 --- a/hw/tricore/meson.build +++ b/hw/tricore/meson.build @@ -1,5 +1,6 @@ tricore_ss = ss.source_set() tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testboard.c')) +tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testdevice.c')) tricore_ss.add(when: 'CONFIG_TRIBOARD', if_true: files('triboard.c')) tricore_ss.add(when: 'CONFIG_TC27X_SOC', if_true: files('tc27x_soc.c')) From patchwork Tue May 18 09:07:04 2021 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: 441176 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp41393jac; Tue, 18 May 2021 02:18:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaIJE3jT1yhhIf5/s3Sssic3Pr3Juh/+HwX/kYQCBxCrOE5OuT1HQ6rBmE+AfmixZKvVvS X-Received: by 2002:a05:6102:3749:: with SMTP id u9mr4961452vst.25.1621329506513; Tue, 18 May 2021 02:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329506; cv=none; d=google.com; s=arc-20160816; b=KOR6ftIinI2ahAEKvrv5tfRcNuWFG1MVACP3yxo1TUeDe7QNoTa3JFKX5ft3u/F0jc Ctv1LGH+PdxeRnG4o5SrnmHfQoAtGHlEB00taVL4wpKnqcMiJBGp1RVJtwlSEbu6auve htl2qEX3nUfBGFtNFXYkqkkUc+Eclm9OwmM3P7znj9eYfAIkLcLqQiYPTobIyknYQXuR WmyuQcywPCUuQVFLl441+gHDd0MhSQbva+JSjrVEY0tyQyEfBuF6+kcITXSQrP2UCIdK 1KajZm7yE0z2xnAC4Ce29izgFhZgaps1IBG4uSOlSypErkzL4qDn+QkbIqiimI+TlcPx SRrA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=7ixk657I5//cYk7jh7CcKVpBQwY+q/L7bzigPvOyEwc=; b=hWlfw382n9lLbbqHvYdRJP3HEU/lv/Tp2WXBjDYRXEKWoI0XvLeTjBEtt2CNCQRjQj +1z99pjsH0klDsAtweIuPI18AdSqbx/xw9TVHGa1LMS79xNii0VtsP34VaP5GaOWylYY MJZefJxXU4gAnN2TqrbMrFAa05gjexqcJxFHnluqFAeBMd57vUPMk1c8ngM70B/RkM0N xQiWSvKHtkMQgEgrmo/6FiAjrMn3ixsWSBo18maZmu+N9fo1MwLkFpehyETfhC13Qxmr TZtCPsEGoCrB2KyZWw9fSkZFvHkwcEocBHzyBZKoJul1Zkm/vDe7IxOu8ay7v2lYggHo C6UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ms7rXcqR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id l14si1976190vsj.188.2021.05.18.02.18.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:18:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ms7rXcqR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:57808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livrt-0008Mg-RS for patch@linaro.org; Tue, 18 May 2021 05:18:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhc-0008EQ-Di for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhV-0005Yf-S9 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: by mail-wr1-x42a.google.com with SMTP id q5so9331240wrs.4 for ; Tue, 18 May 2021 02: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=7ixk657I5//cYk7jh7CcKVpBQwY+q/L7bzigPvOyEwc=; b=Ms7rXcqRG5LKylAj/ep4M2EqRMQFTtztBnVgVUlG6/GFL88cFNn3uN8CkB9mh7upi2 Vrd+U/svLvwcTrInZ7ESRS8k9nf6ovcCeXRS0OMNSZzQZS+knMwF0AGhAePfDzScqkt9 cdUng4VVZHURNDCmyMhjsi+YZH24ASw0AnyMsLynfjO/QBre2KaMYgqgY304MLf+Ww6a bAdQNvWoNwFhauf6SGwcwl2FtYYKJ03/ReJBwVIOzuKrXZGjH6rETGfzU/90TXUUlBl8 7KJZv0YQwTxJ3jsYtcV8OKnyrGVj9nF0AQHClxc3wov/Bpd8KpGpKunxNheOjpydmAuq hbmg== 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=7ixk657I5//cYk7jh7CcKVpBQwY+q/L7bzigPvOyEwc=; b=Yxdz1gfnxciSO6yWbWxd37ZeT2sNN3vz/siT+MHR2bcOlj6V52ZzT8ER7o75VNcrXy ziux/hWyljaHhXNHrsnt+9zdEn3xJWE0f+TGQqblVwqOEvT1IrJTmOLwCwb01yEFPdTv 5wuDgc9uZBQD7t4gu34vvZBNAYFExf7hA2K+3qcxi3CguPcoDAVSmX09ZFw/5R8KRs84 UbBAAmfnuFoUMCtP7fKLaG1VItzeRLIvg7D18TuPkD1a5BpqMquuaEcHMTkkq8Z5rA0Q wvLXIflxmhiFN4m4BSE21jt/eOE33IfHR2VRgD35pM+qPo87YzQSgPeRWoXtBMP+z3bN kEsg== X-Gm-Message-State: AOAM533NmZBaFv7ypjBmeMmmpW05QzQD280GI31KOiuy7OkAEFh+/spO 1j165qGXeBXP6fvvbeLXwszaNQ== X-Received: by 2002:adf:e40b:: with SMTP id g11mr5482888wrm.174.1621328860102; Tue, 18 May 2021 02:07:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f188sm1954354wmf.24.2021.05.18.02.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:38 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 297F21FF9C; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 13/29] tests/tcg/tricore: Add build infrastructure Date: Tue, 18 May 2021 10:07:04 +0100 Message-Id: <20210518090720.21915-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this includes the Makefile and linker script to build all the tests. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-5-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-15-alex.bennee@linaro.org> -- 2.20.1 diff --git a/MAINTAINERS b/MAINTAINERS index 7572859317..40bba0fc4c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -349,6 +349,7 @@ S: Maintained F: target/tricore/ F: hw/tricore/ F: include/hw/tricore/ +F: tests/tcg/tricore/ Multiarch Linux User Tests M: Alex Bennée diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target new file mode 100644 index 0000000000..d64a99b95f --- /dev/null +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -0,0 +1,15 @@ +TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore + +LDFLAGS = -T$(TESTS_PATH)/link.ld +ASFLAGS = + +QEMU_OPTS += -M tricore_testboard -nographic -kernel + +%.pS: $(TESTS_PATH)/%.S + $(HOST_CC) -E -o $@ $< + +%.o: %.pS + $(AS) $(ASFLAGS) -o $@ $< + +%.tst: %.o + $(LD) $(LDFLAGS) $< -o $@ diff --git a/tests/tcg/tricore/link.ld b/tests/tcg/tricore/link.ld new file mode 100644 index 0000000000..364bcdc00a --- /dev/null +++ b/tests/tcg/tricore/link.ld @@ -0,0 +1,60 @@ +/* Default linker script, for normal executables */ +OUTPUT_FORMAT("elf32-tricore") +OUTPUT_ARCH(tricore) +ENTRY(_start) + +/* the internal ram description */ +MEMORY +{ + text_ram (rx!p): org = 0x80000000, len = 15K + data_ram (w!xp): org = 0xd0000000, len = 130K +} +/* + * Define the sizes of the user and system stacks. + */ +__USTACK_SIZE = DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ; +/* + * Define the start address and the size of the context save area. + */ +__CSA_BEGIN = 0xd0000000 ; +__CSA_SIZE = 8k ; +__CSA_END = __CSA_BEGIN + __CSA_SIZE ; + +SECTIONS +{ + .text : + { + *(.text) + . = ALIGN(8); + } > text_ram + + .rodata : + { + *(.rodata) + *(.rodata1) + } > data_ram + + .data : + { + . = ALIGN(8) ; + *(.data) + *(.data.*) + . = ALIGN(8) ; + __USTACK = . + __USTACK_SIZE -768; + + } > data_ram + /* + * Allocate space for BSS sections. + */ + .bss : + { + BSS_BASE = . ; + *(.bss) + *(COMMON) + . = ALIGN(8) ; + } > data_ram + /* Make sure CSA, stack and heap addresses are properly aligned. */ + _. = ASSERT ((__CSA_BEGIN & 0x3f) == 0 , "illegal CSA start address") ; + _. = ASSERT ((__CSA_SIZE & 0x3f) == 0 , "illegal CSA size") ; + +} From patchwork Tue May 18 09:07:05 2021 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: 441187 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp51940jac; Tue, 18 May 2021 02:35:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOcpJvQQFQhlk705xg3WUmf7nF1MGBwTSmK2SFu1wxPMatGUJ/Geyk928ZNO7jWN+/G7Ud X-Received: by 2002:a37:b643:: with SMTP id g64mr1945422qkf.6.1621330532270; Tue, 18 May 2021 02:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330532; cv=none; d=google.com; s=arc-20160816; b=0tSvQJ3Q087wAsj3Da8poKwrVsm65evvpHUdBt3Rz/2GNjvr3UnRj/Y+3hi5H0Lffb Lmbd1PkTS9LNx4ipUzu4VJxO4Xidjuymu6sCzdl/wdIfqIdO+LGXjNKRr3UD89at/NaM yLI6V+kMDXSfn9SSR5/emcBnymUf8tO7aKDPTbIFO+K0TYn+hm3nrAPKRcZ63b51Kctb jj3XltJoMtQbH7mmv7cyT5wxuCyxOnWXk1BRInzohXxr4ag8ey3UfuYypyhYrdD5vjzg 8Z+r3wmZsrXyNsDakuij+s/EO5haQ1PaZQkCgB+YnlU8hGIOM7dVktOufb8O8Cp4lkJ9 Jqbg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=WWrt4jZ0NSzBNBzliGqgwQCcmxGRrPpbYK/yR+BQ2Dp4/ADOni+lV98Ds1P401vnyl L/aIAgHb9Ttkt0Ud2vxhhUgSztfoKYqEmk183kiRPZeDMrYQcVjD89RRFKVgFTuCQZcO AeXYcRLeEq9v73Dxi9nLjYpKdgPKwLC5YWYv1NU74fNSWrC08WFIclUG1jvpfoDnEOqD 858sAQb3SwIGQJJS5G1FufMcs5xctSRAZzvnbbPwiQkOI8Nwu0cET3JrM9rMadaUo/05 YOmWLXFpRtO3Gz6BOeejKvTzC9F+ZJ9ujtwNsNjDkZr76C3IiDtH76x24Io2cwiL1QQP gcGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sC7DO1SC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id h9si372245qkn.122.2021.05.18.02.35.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:35:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sC7DO1SC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:45822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw8R-0004bR-My for patch@linaro.org; Tue, 18 May 2021 05:35:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpC-00057d-MD for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:39 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:41497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livow-00012M-66 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:37 -0400 Received: by mail-wr1-x430.google.com with SMTP id d11so9344579wrw.8 for ; Tue, 18 May 2021 02:15: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=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=sC7DO1SCnSM9+8djo2q80o2jS2TVj4z/hoWtUbIgQrqdHFIrmqfRzAKw174EvSE2Fc MkPlCLtCSFE7MKuopDYHgc9/rN8wpJyskvWTwUDTekLvv8MGVj4kg+amaSIn3269t9Or LztXsX7kzVzOq3EhCiNgb0baW0EFwJITF1dtS8qHcvsFWRuzq9abCvUt5EZcRXgmh2Od LmGUaDL1gFJPKxVubF3CmQtHzQxlAcRCXG7Eu8qZ5YioLkAyQPNqAaFuPgqkTTTTn6yM 1tLA706/1cN1v2kIaH9kKt9KWVk/zmaI9q93t6ZuwgJlm1zGziPbkqIvnFGzvhMftqt1 Hr4A== 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=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=IcFsqdKLYtPfDLsBRdBCaq8Myt4pkbVJ1hor/WxgwihXnE3XgK9CEd5KmQWxTrYBhW uy76KFR02MEsxZPYEcbO11jpw0hxfTHHDGEVbFbv+WThLNUaQ+9eqMPArWqBXvZNG5H7 BbfQVHquDM6bm1yQaW7jaz0s1ivHXXYjjiPRjP4CbGjLvoja1ZBm3spuzpyMEAR7rOVo lxJqL3uqBqTHjGMw2m4MTDpmA1D7rQzuOfo4nK1mAq8G92G0yDHXBM2RFGwy5CFfOx/r CBpADVSZjg/DRUikOh4rOWQk92z76UtmfY4X5YkEOokELVD+422DQV0Qfv8zEoKWXSAm O4jA== X-Gm-Message-State: AOAM530cvg8nM+Eg6cFAJYTwKyUmUNQhD1ypyCu6sEWlkEIn7L41P5zn hXVWBqCIujdLfHtqo7fXD9dGFw== X-Received: by 2002:adf:faca:: with SMTP id a10mr5610502wrs.9.1621329319796; Tue, 18 May 2021 02:15:19 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y14sm1908548wmj.37.2021.05.18.02.15.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3DC8D1FF9D; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 14/29] configure: Emit HOST_CC to config-host.mak Date: Tue, 18 May 2021 10:07:05 +0100 Message-Id: <20210518090720.21915-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this is needed by the tricore-tcg-tests as tricore-gcc is not easily available. Thus we rely on the HOST_CC to do the preprocessing of the tricore assembly files. Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-6-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-16-alex.bennee@linaro.org> -- 2.20.1 diff --git a/configure b/configure index 0e4233fd8a..df11c8bad0 100755 --- a/configure +++ b/configure @@ -6164,6 +6164,7 @@ echo "GENISOIMAGE=$genisoimage" >> $config_host_mak echo "MESON=$meson" >> $config_host_mak echo "NINJA=$ninja" >> $config_host_mak echo "CC=$cc" >> $config_host_mak +echo "HOST_CC=$host_cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "CONFIG_IASL=$iasl" >> $config_host_mak fi From patchwork Tue May 18 09:07:06 2021 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: 441180 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp45250jac; Tue, 18 May 2021 02:24:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxngZt2w5hkfIdlVM/52S7PoAVdESN1NbOS/Ympe4EYr1eyK5anYWoj0uel/aIz+6kvMb/Z X-Received: by 2002:ae9:f001:: with SMTP id l1mr4380132qkg.117.1621329868002; Tue, 18 May 2021 02:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329867; cv=none; d=google.com; s=arc-20160816; b=X/quxem4Ldwhyzi+xpXto7/CIpCYwIG104vo60JNSdOKcsx/kCGBjR3aiIbzHlueHj 8m82IzvNGoMrP4/Kz9WhCQFUUpczCTTpgd+z5x1kKIPu4D6o+nuKeDV0bzQhTMTLL0eE L6KZyXscLVV2bK7f3uROyRnjoVRTUgX8L0cTo0oj1a8bvrj1gJCQ988NnxCuWzQZpiG6 qYWDXay44YChT7625kaYZ22e/9RI5tFyOAAP5Ir6lNmyiqvQQnx2wmfbIMCHUSrWHBoK hRNeSHJGmwk1rNQR/gzwmDwL67KRyWxbceKgQ03H2eIxoL2lm60imVZKjlejFAcYxX1X Q9OA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=EzXXbVWjMVcY3zDKSvBfL0opTxc0lCuHUosFONzdvYg=; b=tMTWumFRU2Axhe3MbFCn+6q/GroJ4EI+dDxpFWeZeNpM3WE0YRLyg3asJr2SwD0A+S upnaV1sOywo++8lZSp9XVif7/BCzyLP2q55DcCmGGKRPQSR+2SnyurSDRne5rdMjbYGB OuBUl/BWhxzPqd54ZvGNYoqhqBMIU6xkGvBNuapCl/llrngdk3HPgh9U1k1FJDm62XPL TDG+i8vL4a/i7Ns0heMi8mqpGQjQk0/i10IIgwTvnRRzZl1n1ztqVoN+vdQF8rhodROi oBOihbE2pGUZXrN8YF98ok/IZkid7vK1JSEo0DQaU1opYLtdl5dsOG0+Ffy35g2OBLJt twkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zAAyE9Bu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id z11si7519240qtj.294.2021.05.18.02.24.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zAAyE9Bu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:46910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livxj-00037B-Bv for patch@linaro.org; Tue, 18 May 2021 05:24:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhe-0008LO-6t for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:50 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:41911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhX-0005Yk-TX for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:49 -0400 Received: by mail-wr1-x42f.google.com with SMTP id d11so9318037wrw.8 for ; Tue, 18 May 2021 02: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=EzXXbVWjMVcY3zDKSvBfL0opTxc0lCuHUosFONzdvYg=; b=zAAyE9BuOhhQrlGNhClzR8plVrO6rWdx2iTBDAfoHendAqYmcept4Q2GHw0G4D/JJY ZLwHyGxaScivHLdlQ7s0mI4Bl6JstBrfqDPJ2C/1hwZ4vDo5uSwYQzibwn6DQ1zmGYRY L7wZ96vYxWug6hbGvORVqVQZYvnPUSPlziFYu1Lyju7CWXA/mqyn5MwJlpWkhYzwI6lP AVkMPv6mO9F+eviden0UXuQYZcSeXh5I7Nu7evDIhz5NCtctebAGcb4AnNo9wpnfk7ow eS0dgIOXtRDr/77ddC4FVda7J9SH3JN6/HS+AlG1RU1J55SIdhmishp9DJs3aWXNkYzQ GaUA== 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=EzXXbVWjMVcY3zDKSvBfL0opTxc0lCuHUosFONzdvYg=; b=I0gxbpSaWoNxlhJ7L0pm1/sR7qsXW8sHV/qHkfMH74gODpIVi2kkCKazisCk/f38/U zNeSZYVIw67HJVicdjBFaBQrzDmTXs84yODqPqyJZQ0nKi1BfM2k1SKTyBGvC3xpCpGP w+HNJauOpsDW+MyxGVtSDKNGpLz2pekxzC09lwzDzyl6SHCoXWIbCEwK01GwfaD1xBNa XE5z/lwNmg/3NPaKiByvaDULCwfrvx5HFT7GFAzy1qmbi/LNUPxr4TlfmEvXiJQsSVpC c+eMn9fxxEjvQ47hNyNzLK9p9mbghBa9zXWV2HrNrympTi6n3ENBbU4dt0ShJ9RsKTJl NETw== X-Gm-Message-State: AOAM532IvUtMbBzaEEOOKFrPb7anS9+yNME1GYNPea/QxTrzzyMjRORs B0czQ0uRWdmvNXOZDmSf7SsyzDrgSj/akg== X-Received: by 2002:adf:fa45:: with SMTP id y5mr5578439wrr.311.1621328860939; Tue, 18 May 2021 02:07:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v15sm1924726wmj.39.2021.05.18.02.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:38 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 56EA81FF9E; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 15/29] tests/tcg/tricore: Add macros to create tests and first test 'abs' Date: Tue, 18 May 2021 10:07:06 +0100 Message-Id: <20210518090720.21915-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann This kind of tests is inspired by the riscv-tests repository. This adds macros that makes it easy to create single instruction self containing tests. It is achieved by macros that create a test sequence for an instruction and check for a supplied correct value. If the value is correct the next instruction is tested. Otherwise we jump to fail handler that writes is test number as a status code back to qemu that then exits on that status code. If all tests pass we write back 0 as a status code and exit. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Message-Id: <20210305170045.869437-7-kbastian@mail.uni-paderborn.de> [AJB: add container_hosts] Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-17-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h new file mode 100644 index 0000000000..76c133132a --- /dev/null +++ b/tests/tcg/tricore/macros.h @@ -0,0 +1,53 @@ +/* Helpers */ +#define LI(reg, val) \ + mov.u reg, lo:val; \ + movh DREG_TEMP_LI, up:val; \ + or reg, reg, DREG_TEMP_LI; \ + +/* Address definitions */ +#define TESTDEV_ADDR 0xf0000000 +/* Register definitions */ +#define DREG_RS1 %d0 +#define DREG_CALC_RESULT %d1 +#define DREG_TEMP_LI %d10 +#define DREG_TEMP %d11 +#define DREG_TEST_NUM %d14 +#define DREG_CORRECT_RESULT %d15 + +#define DREG_DEV_ADDR %a15 + +/* Test case wrappers */ +#define TEST_CASE(num, testreg, correct, code...) \ +test_ ## num: \ + code; \ + LI(DREG_CORRECT_RESULT, correct) \ + mov DREG_TEST_NUM, num; \ + jne testreg, DREG_CORRECT_RESULT, fail \ + +/* Actual test case type + * e.g inst %dX, %dY -> TEST_D_D + * inst %dX, %dY, %dZ -> TEST_D_DD + * inst %eX, %dY, %dZ -> TEST_E_DD + */ +#define TEST_D_D(insn, num, result, rs1) \ + TEST_CASE(num, DREG_CALC_RESULT, result, \ + LI(DREG_RS1, rs1); \ + insn DREG_CALC_RESULT, DREG_RS1; \ + ) + +/* Pass/Fail handling part */ +#define TEST_PASSFAIL \ + j pass; \ +fail: \ + LI(DREG_TEMP, TESTDEV_ADDR) \ + mov.a DREG_DEV_ADDR, DREG_TEMP; \ + st.w [DREG_DEV_ADDR], DREG_TEST_NUM;\ + debug; \ + j fail; \ +pass: \ + LI(DREG_TEMP, TESTDEV_ADDR) \ + mov.a DREG_DEV_ADDR, DREG_TEMP; \ + mov DREG_TEST_NUM, 0; \ + st.w [DREG_DEV_ADDR], DREG_TEST_NUM;\ + debug; \ + j pass; diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index ed378e7840..11009fe433 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -180,6 +180,12 @@ for target in $target_list; do container_image=debian-sparc64-cross container_cross_cc=sparc64-linux-gnu-gcc ;; + tricore-softmmu) + container_hosts=x86_64 + container_image=debian-tricore-cross + container_cross_as=tricore-as + container_cross_ld=tricore-ld + ;; x86_64-*) container_hosts="aarch64 ppc64el x86_64" container_image=debian-amd64-cross diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index d64a99b95f..3b048e49fa 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -3,6 +3,8 @@ TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore LDFLAGS = -T$(TESTS_PATH)/link.ld ASFLAGS = +TESTS += test_abs.tst + QEMU_OPTS += -M tricore_testboard -nographic -kernel %.pS: $(TESTS_PATH)/%.S diff --git a/tests/tcg/tricore/test_abs.S b/tests/tcg/tricore/test_abs.S new file mode 100644 index 0000000000..e42240159a --- /dev/null +++ b/tests/tcg/tricore/test_abs.S @@ -0,0 +1,7 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D(abs, 1, 0, 0) + + TEST_PASSFAIL From patchwork Tue May 18 09:07:07 2021 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: 441172 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp38223jac; Tue, 18 May 2021 02:14:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPNWyoDbRAjo2Vdg2XUAdoFwaiHxwYaHGqn26WnZh86zQOKnAdwXa+O83oOOWh6tv81WcY X-Received: by 2002:a05:6102:c4:: with SMTP id u4mr5005906vsp.51.1621329271936; Tue, 18 May 2021 02:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329271; cv=none; d=google.com; s=arc-20160816; b=XcKnTTbZNf+8TkoO+1nF8pMvFzD3Jinhw6VfhPGtgJTweZUimhX6T8r0od73AKNSb/ qciigoC3NnbjCi8PXBed2SIeIYUC5pYMRaUb2d/JR/trUmtvjtuQv1Re70f87BpMojr9 YVoffBCRwWrA25IkKyQEUKVwYhjScCJQfF7iIBOb2zxIdaOTwj1Ua7Lw1AFtaiyrfCf4 37q8Hl/2XrPBrK1PZOuLsHw//r5fU7atj6uhOBaZpUZ+y8XrD8kyFLP7k/waThETKIqE qcjBVRxRQjEp7BzRcSJ8bhSYdBbpYgCU44yVryS9GQay8q5xlBXqgl0MRax7S2nbKfdO VneQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=KjZ2XX0/mEu1lfy1D32TpTcB0SCk0bY9PontMklLOBw=; b=C7F7SyI+FUTmXNB0k6du/uGey+8RCa44wNO6wXCQvdJqMB93TQKU1Pn2IMOS02VjRT mkRSV2yuqO2DWn86CCS/F/REtyWCBWTZlWzOENxJRl8bmkqiSpnxsG4l1rWSDAGKtYqM jGrQEbf+ly30wYRYj2fiK6q8Ojx9O5XOyYZKdAULpAofT80f2JY6ne0WyKo2e4jBhjAW /xfNb+njLByLjMLwUHMV7CGy8LvuLSdcJzVIIuyk0zXZl5YcN+NBhPiD8zCq2ULPuPZd KmKM0aiGoNkmHIfKj3hW/aqnqllx6pJtQSiCodTqkpz2qykqlN2UaSUlFOH/kVZS1Kow /SGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xHu8kJhw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id c19si2086167uav.17.2021.05.18.02.14.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:14:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xHu8kJhw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:50040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livo7-00031h-Am for patch@linaro.org; Tue, 18 May 2021 05:14:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhc-0008GS-TI for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:46674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhY-0005ZS-2Q for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: by mail-wr1-x431.google.com with SMTP id y14so7242030wrm.13 for ; Tue, 18 May 2021 02: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=KjZ2XX0/mEu1lfy1D32TpTcB0SCk0bY9PontMklLOBw=; b=xHu8kJhwWpIOpJqouXDdPS7H4y1pdIyJUp+a8v4l+8LlrPU9EbV56RsWmBAc+DwbS3 COftDckQYe936aHPLg+0z8J2Mr5Ui210QEb43T38GSV0G8oAurGN8fKVd+yZL9LIqlYc EqyHWJT0lbnoUE7xFjVNgkBGZR4ubXK7U40JO1FRsGJpFjX/tmOErclUtooUvQJN0pNP 4qlQuqH3xVze/P+cryaOkpt4w9oyzGzgv0V/Epg6tCdGAxKCka+5YwBA9KEeITV0t4rS +h9cm8YWU4jLzjzTXFRqE7f2Vj5bmK1auFNpYyb6zRMSZP2UMcPkUHiirj1V3VO3bLGr d5Tw== 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=KjZ2XX0/mEu1lfy1D32TpTcB0SCk0bY9PontMklLOBw=; b=LAtZV98lNK1b/K3ZgWa4q0T2SL/VN1apTXBOAWj61j0UHAFr2oVE5A1y0wUBrj2xy9 kbgLYCWjA2BC4rtZgR+hhO44jo1Wal84pKpp1s9LGCS9Em0bT/UkIx/IhGH1Ap3cxXQi 0CzhX5DPCryDLZhafFFrVC28X1kg+7gwXxHoAhu53orz9ZRHkapEdXbS/gnarbk38R2z I1HHo3E4CC8rlnW+cTEwsEFOTNqQEqW8Su3AHropFVrmEe7T5/WiCw11q/ThK8YB2Hsp twdR/sGXfXUM1KdaJndG9RyEKwM6f5bKYcHMGyG3axyc5JaXGRF6azWYiLeGmD8ZRf9G oqRw== X-Gm-Message-State: AOAM531B483phd0e2X5LXFcomkKz43TgZkj6lgmZrM4NAcRB9gnkE3Gi S9X2D3YqXmbh0FtLmCqoSwShIgDFoMOhYg== X-Received: by 2002:a5d:6804:: with SMTP id w4mr5618549wru.363.1621328862726; Tue, 18 May 2021 02:07:42 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h14sm2596552wmb.1.2021.05.18.02.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:38 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6E6E01FF9F; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 16/29] tests/tcg/tricore: Add bmerge test Date: Tue, 18 May 2021 10:07:07 +0100 Message-Id: <20210518090720.21915-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-8-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-18-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index 76c133132a..52aa936c56 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -8,7 +8,10 @@ #define TESTDEV_ADDR 0xf0000000 /* Register definitions */ #define DREG_RS1 %d0 +#define DREG_RS2 %d1 #define DREG_CALC_RESULT %d1 +#define DREG_CALC_PSW %d2 +#define DREG_CORRECT_PSW %d3 #define DREG_TEMP_LI %d10 #define DREG_TEMP %d11 #define DREG_TEST_NUM %d14 @@ -24,6 +27,17 @@ test_ ## num: \ mov DREG_TEST_NUM, num; \ jne testreg, DREG_CORRECT_RESULT, fail \ +#define TEST_CASE_PSW(num, testreg, correct, correct_psw, code...) \ +test_ ## num: \ + code; \ + LI(DREG_CORRECT_RESULT, correct) \ + mov DREG_TEST_NUM, num; \ + jne testreg, DREG_CORRECT_RESULT, fail; \ + mfcr DREG_CALC_PSW, $psw; \ + LI(DREG_CORRECT_PSW, correct_psw) \ + mov DREG_TEST_NUM, num; \ + jne DREG_CALC_PSW, DREG_CORRECT_PSW, fail; + /* Actual test case type * e.g inst %dX, %dY -> TEST_D_D * inst %dX, %dY, %dZ -> TEST_D_DD @@ -35,6 +49,16 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1; \ ) +#define TEST_D_DD_PSW(insn, num, result, psw, rs1, rs2) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ + ) + + + /* Pass/Fail handling part */ #define TEST_PASSFAIL \ j pass; \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 3b048e49fa..de6a2cc88e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -4,6 +4,7 @@ LDFLAGS = -T$(TESTS_PATH)/link.ld ASFLAGS = TESTS += test_abs.tst +TESTS += test_bmerge.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_bmerge.S b/tests/tcg/tricore/test_bmerge.S new file mode 100644 index 0000000000..8a0fa6d3f6 --- /dev/null +++ b/tests/tcg/tricore/test_bmerge.S @@ -0,0 +1,8 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(bmerge, 1, 0x555557f7, 0x00000b80, 0x0000001d, 0x0000ffff) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:08 2021 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: 441191 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp54557jac; Tue, 18 May 2021 02:40:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+H6GFLnIv5NeXQVV0KnUwVqo1h9ZzzRkIOLTOc5s5EE4DhyvBj9tH59VFoiFsGmC8pV8Z X-Received: by 2002:a6b:ea0e:: with SMTP id m14mr3522017ioc.182.1621330813151; Tue, 18 May 2021 02:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330813; cv=none; d=google.com; s=arc-20160816; b=GBSvM7kSC91nV4F13E7tYuymmf0hTbKD+sK0Fqy0Y575eMI3qQ9h+Cc2yLtPUuifdN L0AZoDasnpqdeIwf7T4q7py0mGFVqP+nP7Z0+ZjCyTclRh20JaGZMCIdK9H9cZrQp1Jy Wku01eEYI16Ip6PbYnnatCkgnlxukJf6BFx9SwuL/N/5drfAAGNsL1NS37kwRBMII9Oq O0r3L3xMjidQPhzu/6FIyrhlvr7X2eDYW319ZRimL0Ud2M8sZx4vEBjgX0+hdZbUWTWk G6qpc36dekM1Fn64osW23HBpSGdzIBt/xxrxOlzy8S3lAK7uML1W9ZFR/zf+s6IMEXBu GFaA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PdmEAT7DEu3lG1EeiXD5I5CWzOVFj+yeKWzonpH0EaM=; b=ajnQ3uIRpVE0JyVUsJNhKh2zc6l0pfHe2Mg6bM6lWJ8ty93qEH7tEqKduO/G5/c+Nl kKoQViPX8HnGjNxZ0Bz/w97cFNBAtej7Ttj3jnv1PqoEVo8Z6XbBDZPXJ7u3Q81Q2Gqw gZQUauf4bq9Q8u7kkSX0y6rcwTrh3Hz4pCGTyFWnNxJ3jkPH3zsRDHtZwBv3JPE2nWwJ cdKGH//ZcquGAwboB5wZbdQfLJiZ7KiMlVt7/fuw4Hy8lAg4jvj1VhF765YAk3W2dROE zWeDd3RAXUmReUzDI6LzKbRtuMk+SEJyMeLZSMY5da5LPtWOZTEkWt5kV7FHHM3w3DXT 5lGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IrROKLW1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id y3si4024209jat.97.2021.05.18.02.40.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:40:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IrROKLW1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:34502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liwCy-0007X0-JQ for patch@linaro.org; Tue, 18 May 2021 05:40:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpH-0005IL-BR for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:46 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:41500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp3-00014f-OC for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:42 -0400 Received: by mail-wr1-x432.google.com with SMTP id d11so9345020wrw.8 for ; Tue, 18 May 2021 02:15: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=PdmEAT7DEu3lG1EeiXD5I5CWzOVFj+yeKWzonpH0EaM=; b=IrROKLW1x0JEZN6bLLel6CpBS7kYVpeUwgv0wfvxeqjDQVBLLLsljczfv4LU2L5KL+ 4Nvs9IXe0hUjWHARRXjTOLiFMqN99Bxwhonx6Sb+elj8otw+4FC8Ns6HDhNaBuF1T/Gn hEgQuKW4Ugr9KBIOyFO4NUFPk2HEC7Kx8r5NYZSZ8e2nfDIaadtICCCOTid1zLh040mI zPdf+908qcIG/Ukvm5AX/e1pHBaQKvRoAQ99Ocvl1Zq2D1xOByHUlsmVu5ZXpoPWfLwh o6qjAMqW7owDBvs+4fYMIEGRC7r9bvKpF4rOU5SjedukpErIDgzi798VFmSIf/UmVPta xgZA== 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=PdmEAT7DEu3lG1EeiXD5I5CWzOVFj+yeKWzonpH0EaM=; b=ICN27YyhWPmGs4PehXFORseM5d+wOdKi6U+yUz2eBaK3uZCNWvwgaA8r4CxjBkMHbm 21AYtznPvCdKnA99YhMaHfSs59Vvao+8BJHqHFUr5+eYameE/VMHY8+w73xlOV+uZiol XdPQzoqFG6YkNU6orKUN0+YQN3FS6i/pO6VZAsQBOKQajdDmt1L5LeAQiZVeDcHbr3n+ UHA6RrISqDiRn81rtmI9EwezDzKS7VQI3OFw1CuUmnVhVmU2v9AB8bpuIBhr15Y4sH1y E9sgjIaU0eOip9arDkzfzYsFwPS7rbF8iZGFhXwCfwyCK4515yBv+4ywLh28KdjkTCAL 0CNA== X-Gm-Message-State: AOAM532dxCgiNo1sfzrtffO+Yxy3qWtSxyz8ithI0xP1gaMWIwH4o0ou US+fwJ8le2lEbda40fyhG21FvkgPGN6Uhg== X-Received: by 2002:a5d:64aa:: with SMTP id m10mr5612210wrp.291.1621329327329; Tue, 18 May 2021 02:15:27 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l3sm948363wmh.2.2021.05.18.02.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 850101FFA5; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 17/29] tests/tcg/tricore: Add clz test Date: Tue, 18 May 2021 10:07:08 +0100 Message-Id: <20210518090720.21915-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann [AJB: dropped duplicate Makefile] Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-9-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-19-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index de6a2cc88e..a9b81545e2 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -5,6 +5,7 @@ ASFLAGS = TESTS += test_abs.tst TESTS += test_bmerge.tst +TESTS += test_clz.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_clz.S b/tests/tcg/tricore/test_clz.S new file mode 100644 index 0000000000..e03835f123 --- /dev/null +++ b/tests/tcg/tricore/test_clz.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D(cls.h, 1, 0x0, 0x6db17976) + TEST_D_D(cls.h, 2, 0x000f000f, 0x0) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:09 2021 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: 441182 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp46632jac; Tue, 18 May 2021 02:26:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCKW/E3i88qIdsGwl30VCUFhL4XuR4wpUWqz5RJs2zrSKctCTvnSLwheGTRwP1zz/glBmk X-Received: by 2002:a05:6102:c46:: with SMTP id y6mr5061318vss.22.1621329996319; Tue, 18 May 2021 02:26:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329996; cv=none; d=google.com; s=arc-20160816; b=uqWExwCtalq9cBLAM3N4qhEPdeoo7g73VSvphj23lXeCdckH6WMy3k1IyYiPoao2C0 SM08+g/00bXyCVrvddH2nUJ2Jw0QVB2PmAOxtL4+XOvy54Zj8zEZYoFX3d3ovs7y8Elm S0eH/MXMjso2sp/l9u4XWySj6kgoNTTnOEsNvb9dD4EXfYyT1lqKq5QGoVSA16OlZUrx Gc7PvwQULNFRy5CpQ6Sctmyqu2ZY/1OfPIrLZWJrOZVGHtphBNRH7848YwxTJJRpQa4+ 0Go6TDhpsi3Vjfa/abHG+brv2LVUS18Y/CMTF3Ms0Mui9VL+wL8Egi9TEfCtq7agj6Z5 vklw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=gsF0TlqIKHgI5XTG+7/s+PUC7Yv/S8qNsIgGgG42ddk=; b=ku/ptRZblnGlLUY743sKD+/jAhG8SkvkpkPtxNBP358Opjg5zyDXuoEqnX76Uyr81Y iyoke7GIbA5ZLzV9NHsyUFHSWd05CC+CthQaU9ouM2Qc0q+8g2qPOskMs94Q4A1wNM8K 2XvsnXFJwMk2TmuxzPT82z8bYvKFkMIfL1CQMJAyBsgrTlLuw22dPBWon1mOJNYApYxs UR6mM8Mue4Fw0PQ4D87myBjOgZE/tPMAnNOXQPF7vJCHnUv8FSAYGu3tAqQVXI3g99RN n9lziwJbbpGH0/52J3LJH0d00IyXhKF5qx9oSixnkqXcduWsXdSbAFmTVUshmtGwmXPO QyUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=p1peGg3v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id r4si9624197vsh.392.2021.05.18.02.26.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:26:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=p1peGg3v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:53006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livzn-0007Gv-LP for patch@linaro.org; Tue, 18 May 2021 05:26:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp2-00054F-Pg for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:29 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:39490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livop-0000zo-Ud for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:27 -0400 Received: by mail-wm1-x32d.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso1059070wmh.4 for ; Tue, 18 May 2021 02:15: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=gsF0TlqIKHgI5XTG+7/s+PUC7Yv/S8qNsIgGgG42ddk=; b=p1peGg3vKQUYV/MCVs4ASqBy3vZsEmt6Bd/NWJDqvl3lM4Ic+i/nFt49pCbFnuMZEB lVhU19A1gDNNb7g65jxQ8pav+nsg6vxup/bhv3tYuCcmY8AIxmISz+0Zj/TcoQ327qtb WgNu1lV+WZ7SEX3fJQfzRbF7LwJv7CilO9cB29r1HoD77k59PoDq07RXue0mOIUNBa7F zkbdZQCOdWv06QS0N0+M7TAYr4D0AGoD3NSsUfwkrEJs3Gw2zRJyS71tUgYQ5ND3HBAc c012ZLFgR45y/qr/mZQYuneOnJ1qWktQvpU7emYCF/47uUDnsV8z/I1nJA2xfVpZjTyF W8NA== 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=gsF0TlqIKHgI5XTG+7/s+PUC7Yv/S8qNsIgGgG42ddk=; b=s4d02dYj2rfm06IHVduPgzmXrCUHb8Mcj9vJGkZqRJkMs/eMeHVjRjXsMQacfG2Utx 4MikJfabL1BHalAJOUfCyQzOGiqEw20muUz55JCrzxo85QrUNvpGd52oFyeDj2qXbOgY Jl0H8Ahci54V5kqbgzz3Iuv+dR06oZMHnEs+MeKkkgXoS8hOykKJ5Vom42y0ydIoBoBI EtZ4/OyYOWGpm9Ew6UeKe46r6ot1/rRR2rpqxtD0jfcTx3kZlcIZU8xRCBQEX+Qxk8nc 4F+MCgauWEqsYSulnnvNIsiTbxZI3EDcAtZxh77aeYAwOuBj+cknQMAcAGicPit/Qh50 o1lw== X-Gm-Message-State: AOAM530PZ/XyuBj3thGDPOPg/RSrL2oDvEVITsX+4VjFF5Fs5J5r8lYP zeK8h7Av/OR3a0n7A/yoVxyduA== X-Received: by 2002:a1c:ed0a:: with SMTP id l10mr4303435wmh.151.1621329313164; Tue, 18 May 2021 02:15:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p14sm20632854wrm.70.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9D65D1FFA6; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 18/29] tests/tcg/tricore: Add dvstep test Date: Tue, 18 May 2021 10:07:09 +0100 Message-Id: <20210518090720.21915-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-10-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-20-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index 52aa936c56..59b4b9a352 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -19,6 +19,18 @@ #define DREG_DEV_ADDR %a15 +#define EREG_RS1 %e6 +#define EREG_RS1_LO %d6 +#define EREG_RS1_HI %d7 +#define EREG_RS2 %e8 +#define EREG_RS2_LO %d8 +#define EREG_RS2_HI %d9 +#define EREG_CALC_RESULT %e8 +#define EREG_CALC_RESULT_HI %d9 +#define EREG_CALC_RESULT_LO %d8 +#define EREG_CORRECT_RESULT_LO %d0 +#define EREG_CORRECT_RESULT_HI %d1 + /* Test case wrappers */ #define TEST_CASE(num, testreg, correct, code...) \ test_ ## num: \ @@ -27,6 +39,15 @@ test_ ## num: \ mov DREG_TEST_NUM, num; \ jne testreg, DREG_CORRECT_RESULT, fail \ +#define TEST_CASE_E(num, correct_lo, correct_hi, code...) \ +test_ ## num: \ + code; \ + mov DREG_TEST_NUM, num; \ + LI(EREG_CORRECT_RESULT_LO, correct_lo) \ + jne EREG_CALC_RESULT_LO, EREG_CORRECT_RESULT_LO, fail; \ + LI(EREG_CORRECT_RESULT_HI, correct_hi) \ + jne EREG_CALC_RESULT_HI, EREG_CORRECT_RESULT_HI, fail; + #define TEST_CASE_PSW(num, testreg, correct, correct_psw, code...) \ test_ ## num: \ code; \ @@ -57,7 +78,13 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ ) - +#define TEST_E_ED(insn, num, res_hi, res_lo, rs1_hi, rs1_lo, rs2) \ + TEST_CASE_E(num, res_lo, res_hi, \ + LI(EREG_RS1_LO, rs1_lo); \ + LI(EREG_RS1_HI, rs1_hi); \ + LI(DREG_RS2, rs2); \ + insn EREG_CALC_RESULT, EREG_RS1, DREG_RS2; \ + ) /* Pass/Fail handling part */ #define TEST_PASSFAIL \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index a9b81545e2..799b51191e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -6,6 +6,7 @@ ASFLAGS = TESTS += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst +TESTS += test_dvstep.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_dvstep.S b/tests/tcg/tricore/test_dvstep.S new file mode 100644 index 0000000000..858dbc62dd --- /dev/null +++ b/tests/tcg/tricore/test_dvstep.S @@ -0,0 +1,15 @@ +#include "macros.h" +.text +.global _start +_start: + # Result RS1 RS2 + TEST_E_ED(dvstep, 1, 0x000001ff, 0xfffe5cff, 0x00000001, 0xfffffe5c, 0x0) + TEST_E_ED(dvstep, 2, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x0) + TEST_E_ED(dvstep, 3, 0x0000f000, 0x000000fd, 0x010000f0, 0x00000000, 0x0) + TEST_E_ED(dvstep, 4, 0xfffff000, 0x00000000, 0x7ffffff0, 0x00000000, 0x0) + TEST_E_ED(dvstep.u, 5, 0xffffff00, 0x100008ff, 0xffffffff, 0x00100008, 0x0) + TEST_E_ED(dvstep.u, 6, 0x00000100, 0x00000000, 0x08000001, 0x00000000, \ + 0xffffff2d) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:10 2021 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: 441177 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp42392jac; Tue, 18 May 2021 02:20:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiQicrzEEfi92VK+A1P8ahhbGbFz1D7olzZRECJk7GINkMnFCMJ7HV/FSRwX5eBN/bgEk0 X-Received: by 2002:ab0:a8b:: with SMTP id d11mr3619719uak.75.1621329602753; Tue, 18 May 2021 02:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329602; cv=none; d=google.com; s=arc-20160816; b=OBy94jClGWkpW6FtaTze7Mo8aqq0aClTPaQG8sTMUcQleWH0nGMjuOtehFp5ySlXao /mHVZSDxLrYiEBMcSrr9O/wS4CwYEodMU5SWwiDZeb5i5AzwQP46Ic3Tx2T0ReNZEXHI LfvC+UYVrZhRmeXb+LZ4295lmHaVCuiSVWZZoLDR9A4q552CqIh+CZHNqf/aAReDiL7e uPXZJfZa9FkDu9JiwGqKz97MN9wmJhpQa327SidHqwr15zq05PaWZwtWWKk4i/0mMG6e gv/Ahw4779PLwJF3pYNOWCmcQiLaMVZDP55An78+L8u8upd6VsEJn1dRJ4e+Uxi76Obm MT1g== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=LXn6aPVAVt/bVyPUARbsnNGDxpKekSthuNr53hK5qyQ=; b=m1B+8tn1anXgxHDiGjEpwHhBzI2Qni5f0r/DpXXtmgHcf7mIUW6kMlwNzqFwMu5lcd ioDWj+WRv9ArYN2Znz1ZmZZpu8fTSW24Y8427Ktq8aLwkrUKLXxeRPbxXcLECJIU7Vqw +OlgxgDDNEEiG7j+8v821MYJc0osUM+nBrvQJJy20spIgH/76TyW8qpeai7xsvTn779C tX36fnHuiNAIv0/Fr2t8MXV3YMYlNdd1FS//iCWCEydQbvMv3TAW9HDizZ6egF/qNc9T 8GK+yrb9tylTm4/hyPpmR4rPSur50WycOEpny6J4Itk2n6Lh29P55NUOau75WuPzY9ij hpFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GyoWwF+X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id x14si6335506uaj.44.2021.05.18.02.20.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:20:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GyoWwF+X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:58818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livtS-0000dB-1z for patch@linaro.org; Tue, 18 May 2021 05:20:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhe-0008Nf-Mi for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:50 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:38835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhc-0005Zh-6c for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:50 -0400 Received: by mail-wr1-x42d.google.com with SMTP id j14so7588536wrq.5 for ; Tue, 18 May 2021 02:07:45 -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=LXn6aPVAVt/bVyPUARbsnNGDxpKekSthuNr53hK5qyQ=; b=GyoWwF+XO8HTInltMoa+RABt6hmJD9fHppPCM0KbM/6f/aMAEfZaF0pfuVdMjrjpSe XZhEmk8zt0CagbqAyOjWaZRaQgpfIozjB43NIMMhWGHtnrJkaVpdFXcUzRwyZcpDRgWu w307TqAmrVa5EqVJfWjNbDILgjKfg/nsoY1jxCHX5jfGBAAWRfME92XCnL0Z2koVA+TA qhWjdzPHPF7u8ni0b8naYZEtRvn+EYOaXHciRQEDsPSoVkBV/whfL8mFVj5A/RDsYGbQ f1anmNpCyPr1IU0Ah11BEeQl+BZCnE3rv/KPOdd5Ybf3sm4VqnlxmPm8liw0vXaQeEM/ 6hug== 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=LXn6aPVAVt/bVyPUARbsnNGDxpKekSthuNr53hK5qyQ=; b=HTBlXztVrgmpXxq9TiST3J7W61hagvYo5Xp4BA/tS+8D31EamyazsXm3S2V3e9I1hU Rypjau3kboXKuwIr6pXjC4uNW7DX+/QkQgmDvb43V4QC2VuIZ6m/PXYL/xxRrSIMlU/A z1jhQU9p+kgk04W8dEXOFGVm4R9plHUsUBbcbj2cWu4HzRTlDzBXikVo9zYymQFWT4Iq QxYaim9LNei1M2UQijhdhRsiz8dDPRHb1ORnPYdWwN2iNJUcc49ncY0VLxLiqzzEf8rg JInbPaH1PvgZD8S6qZpNoWleFfXm+w4bhPBM+H29OhUUBFEsodMZWVgkhcuY6KUtKRS5 49bA== X-Gm-Message-State: AOAM532+OwtDf6TZlEJuLhe8kOd5V4hwJy3NTbGcxD6NMM+JnHk31sNV x2dp1Ymx4yIDIHNuDgSNeBuGVA== X-Received: by 2002:a5d:6b43:: with SMTP id x3mr5508455wrw.263.1621328864591; Tue, 18 May 2021 02:07:44 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v18sm24759598wro.18.2021.05.18.02.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B64041FF7E; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 19/29] tests/tcg/tricore: Add fadd test Date: Tue, 18 May 2021 10:07:10 +0100 Message-Id: <20210518090720.21915-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-11-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-21-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 799b51191e..e7adb16af9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -7,6 +7,7 @@ TESTS += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst +TESTS += test_fadd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_fadd.S b/tests/tcg/tricore/test_fadd.S new file mode 100644 index 0000000000..1a65054803 --- /dev/null +++ b/tests/tcg/tricore/test_fadd.S @@ -0,0 +1,16 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(add.f, 1, 0x7fc00000, 0x00000b80, 0xffffff85, 0x00001234) + TEST_D_DD_PSW(add.f, 2, 0xf9c00000, 0x00000b80, 0xf9400000, 0xf9400000) + TEST_D_DD_PSW(add.f, 3, 0x8bb858ca, 0x00000b80, 0x8b3858ca, 0x8b3858ca) + TEST_D_DD_PSW(add.f, 4, 0x00000000, 0x00000b80, 0x000000ff, 0x00000000) + TEST_D_DD_PSW(add.f, 5, 0x7fc00000, 0x00000b80, 0xfffffe52, 0x0a4cf70c) + TEST_D_DD_PSW(add.f, 6, 0x9e6d5076, 0x84000b80, 0x9ded50ec, 0x9ded4fff) + TEST_D_DD_PSW(add.f, 7, 0x00000000, 0x04000b80, 0x0000e8bd, 0x00000000) + TEST_D_DD_PSW(add.f, 8, 0x7fc00000, 0xc4000b80, 0xffad546e, 0xffad546e) + TEST_D_DD_PSW(add.f, 9, 0x7fc00000, 0x04000b80, 0xfffe0000, 0x08130000) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:11 2021 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: 441181 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp45260jac; Tue, 18 May 2021 02:24:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDcCp5n9BRD81vQsMj/x2VVBHA8OpTYyOUWNfy2YULrBe9t6VRKsvAGd7VNf98RiDFVov1 X-Received: by 2002:a25:6f85:: with SMTP id k127mr6511717ybc.270.1621329868719; Tue, 18 May 2021 02:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329868; cv=none; d=google.com; s=arc-20160816; b=P6RdRVUF3VDyzyhhI0m1rqKeenIJuXvOnMEubmhbPbpQvCj/8EAfDpy4m99XnBAYxl 7Z6J8avkwraUxJPD02SC3YpRMz3zQ4+nRcwEMUzg4+mYlzMzen2YiNvsgsixc7sFhutC crZqIk7ELA4dqvYY9F/CdfwY7vYopctywuQxftbX4wqZMG75kIeLjLlZr6XPkf7MC5hY 5thO+O2Z47ALnLMwtluH52IlyHk+fg4pvSBKWBeWsPTdayPbeIuT1jdmk5UqNT1Rwhir sjrw4BtQ5q4Q+4pOppiWjydPqPUY/kYic/kOV1oo3wqdFWX5eOWi1f5L7N2CMKGI2KoM 13Pg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=P1AgBab+lMSlJGHVyOYf4zT34+22+JEN9xYs+u+KKMU=; b=aDmhV5BzCQQZlSYsYvwFaUTz/Ca4DK1PZ5Xf5AY7uETv+QKSK83N0kr+qv/FPV++42 uDkGPPKudydfTp5GGgLiTBE39CQlnCV+SyFhT8uGr6YnE37qC9RGe1/YVJUqFjYeE0Qb up8uj1OqPXaYf1So+qA26qDeyvLFMy9SDUS0Lg7g6V3h4qLy7HEtxyNNt4O62wg6oRkb n4+Rq0B7s8edCw8+PARRMRXUCnYRVexJxanmROraNXIkrwefqPBPE8EdJziQHCyagyh7 YGkQ8m6lId7eJNwbBUCuT3Nfw9LE5ltYUWXCvJhEfb5umoYVzpJyuuKhsWIRKf24/kF1 /ETg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AdrIBDez; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id x81si12076278ybx.466.2021.05.18.02.24.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:24:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AdrIBDez; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:47004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livxk-0003BO-3C for patch@linaro.org; Tue, 18 May 2021 05:24:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpE-000589-1v for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:40 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:35547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp0-00013m-Pb for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:38 -0400 Received: by mail-wr1-x42d.google.com with SMTP id a4so9388006wrr.2 for ; Tue, 18 May 2021 02:15:24 -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=P1AgBab+lMSlJGHVyOYf4zT34+22+JEN9xYs+u+KKMU=; b=AdrIBDezCwJg/1CKtDIkyxDE/KP1v0IUlQqiAqfgqR9vwLjcIa5zoMs20PPC5IfdOm h+MU1pBs3WTcIfa8mhp6N5Q+TRau9O/ilQT9qfODldMryTIYCL5X3u5wG4kq4ecAlFjb 86N7UQ959eZ9mQRmNAzhWQA5AFMfLSR6tNbI+zAOxgha3MdvbOF6N6qTAX1rN8CERZVI PV06wKwqMSr9ML1nKYAvnO8MeY2UcchvU42l7YbPUdkgbByHV0zSpUg5vznKaII7/XP4 f8QFVfbhT2kwAyIANAVvkwmItRU2QnQwES/6DZkcfGQisSii/AHel2o6jvRFxOhKpDj4 OFKg== 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=P1AgBab+lMSlJGHVyOYf4zT34+22+JEN9xYs+u+KKMU=; b=Aj1naGP51kidXoSYHR3HfGzuN5HqJqBRzzlQI+WoPqP9hQqhQSRsl6TufWHcAlXzD9 3F8SDy7+Az2OD7keFqVHEH1NfuL4ku8V35qrX/fgg8Ezm8YISgp5AwKjfPf0iFHfGq7Z qM2hiZ3meGzU4hk7VQULwNL7h9+AOpvfUV1HSzhocqV5x9MzCUcBr7oeP9jxHKDU02vp gCmJPK60OdgzbrtDKUk2A+md+tUUsraiCAKN2yzF4pVZ3dOqOhldbCwqfTatQm7gxthq Lmo1fW5iHh0mnIQWi9HHKzT3SWAoN5+qOFTep9B2InkYUrCmaiX+GnmiA6Tc/g358eM0 pM2A== X-Gm-Message-State: AOAM532zEdTyDhwx0KsGdyUxXpMpW9hozqTT1McgKAuAD3n30O5L6zKc RC9kf3Opf9wbS/CrwqcCtCwd7A== X-Received: by 2002:adf:fe8e:: with SMTP id l14mr5566893wrr.305.1621329323210; Tue, 18 May 2021 02:15:23 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c7sm11551004wrs.23.2021.05.18.02.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CC3411FFA9; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 20/29] tests/tcg/tricore: Add fmul test Date: Tue, 18 May 2021 10:07:11 +0100 Message-Id: <20210518090720.21915-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-12-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-22-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index e7adb16af9..34da1f37de 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -8,6 +8,7 @@ TESTS += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst +TESTS += test_fmul.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_fmul.S b/tests/tcg/tricore/test_fmul.S new file mode 100644 index 0000000000..fb1f634b2d --- /dev/null +++ b/tests/tcg/tricore/test_fmul.S @@ -0,0 +1,8 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(mul.f, 1, 0x974f4f0a, 0x84000b80, 0x1a0b1980, 0xbcbec42d) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:12 2021 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: 441192 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp60839jac; Tue, 18 May 2021 02:50:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykoiZ/CgdMJwrKM8K4187je3CmWTEDwfo4qlKxYc0BYjiy41K4pH9SpvV2TmFmjo2mW+Dz X-Received: by 2002:a25:c750:: with SMTP id w77mr6304096ybe.522.1621331402120; Tue, 18 May 2021 02:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621331402; cv=none; d=google.com; s=arc-20160816; b=P/kWhdJ3+0z0lp/8oiQYYjqYdXdBWd7rHn7NIezN+8k2T4GNU1f1seANdL2Qnj4XCG 4wmhdnyhtdccqVfknylTKhckTgFLvNhS/YBZDreQjLrsLQbPdr0KipuYPgVUeB6aFc1T MD8DsNkwXrlVLfPWexSBUPIe7PeD9y/xK2DNLwg3mtAVA1WnQwo4QhAXsJnqEWYhqRYG 5/feSjxjwHggBxqQmCw/ABkxCQUpQIVwe8jGpLgZWCO82sV/t58jsjDWc41tw3k2jJxt 76Ydpc+cPmncF3HF6+RvCZru4G9aVgiHYjZ3vOFfGDeG7VbtG8xuu0Le7kH+BiKbBWQB IkxQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=aNUdS1dWgsWlgWbZA5C7g7zNJF/kpztMMPeqJW24014=; b=IagEzp0oNTrcW4nn4Frcw5UrFYDpC+kaM7eWEOcScKKBAat8rzFFJETeL5lmWN81Yg CtHTHYRXaU9XhA7JjG1aI7sDePgpJ/neDZWfs1cvf44UxRIj24A1auXdVWNz/CqGVGxH K/eH1bFKYq3G1OM3q/E3TA5zuSy+RtBm7+nODjiu+C1YKesYrdXLdfrPKtulKtCXrbXh 7GzhCE5z2K1GKdE9hbBL7UpQlMlNrCgRcKi/BWyQYBnGrSVbAoTjybthfiqkWeEdBi3n R3g1VHIU3HT8AHjEfZOG1eos8tQeU6ndABicym0hzTB798QJDDW2Pqbr7T42KtCUn6Wq spkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="NldA/rvL"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id d77si3740913ybc.402.2021.05.18.02.50.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="NldA/rvL"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:41316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liwMT-0006Fv-G6 for patch@linaro.org; Tue, 18 May 2021 05:50:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livyY-00066y-MO for qemu-devel@nongnu.org; Tue, 18 May 2021 05:25:18 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:39559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livyV-0006OV-Cp for qemu-devel@nongnu.org; Tue, 18 May 2021 05:25:18 -0400 Received: by mail-wm1-x334.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso1077429wmh.4 for ; Tue, 18 May 2021 02:25: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=aNUdS1dWgsWlgWbZA5C7g7zNJF/kpztMMPeqJW24014=; b=NldA/rvLL2v+DvbvGGf+HlPpkSdYMH1OkvExgNFpY+hIwMW0jq22Siy+yLt6DHITqw 80L4CfXacKJhErId4gemtPEiKOuPA6yGR/2bwJuqJ+NgY54PFKP26PNzbxNFff+fZTBg yMZNWVkP2rF1f6oOutpbW8sA/tneq9uxtNiiIftGRtdgI1HyGyj6ilz4/4RiQ1ep/BZW XNmyMUSw0pHkJ4iXZnMsbFUU2jikppondPcNf4t7IQlhcRCLpgRUYk3PkIchUUiCvcTH ECA7yWwxKiuABElM7YjO1VK2mb9iRKnm7a01L3QoKYz4LTNz6knC7j93RfmJc9SHlma+ b2OA== 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=aNUdS1dWgsWlgWbZA5C7g7zNJF/kpztMMPeqJW24014=; b=UWrA9b+2p0ed/zx23TzdA0B5Q5dWD48A2cYEoEHd5iz2ocLoUVsu+GrYAfKIAjd73Q +HN6iesNNj02qFJWCQzXpFnhzIKyFOcYRe22a4/9isYi+JecasTpRjWCA1/Y/B7RHP1y M73bVGOURmleLgIKFw/cnjHsmnvkIugGglUUCRaCtPPl962pkm4byTPQAeOI5nWQZYMN VPRQrpMAMA4aT6T+uGrAn3cTQvwgS69X7zFpGOALJQYfo0ywVI1ZP1seNxeX/Vxq0UuK Ugplq8qjsojyoSfpSsRHbaRvyCBOlenpZBCG6+8k0hayuvnelkLIYdEfDq5WKPcQ1/lc OTmw== X-Gm-Message-State: AOAM531Vf67xJDmWw5RFrKiUhk8zdD56qY9iMJ3DfX8X62gN4S08Flt7 TgNyEn6pCoRl8SmyQVXiko2JwA== X-Received: by 2002:a1c:f614:: with SMTP id w20mr4379490wmc.70.1621329913376; Tue, 18 May 2021 02:25:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f12sm14386049wre.88.2021.05.18.02.25.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:25:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E38AA1FFAA; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 21/29] tests/tcg/tricore: Add ftoi test Date: Tue, 18 May 2021 10:07:12 +0100 Message-Id: <20210518090720.21915-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-13-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-23-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index 59b4b9a352..e6a41cd1a2 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -70,6 +70,13 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1; \ ) +#define TEST_D_D_PSW(insn, num, result, psw, rs1) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + rstv; \ + insn DREG_CORRECT_RESULT, DREG_RS1; \ + ) + #define TEST_D_DD_PSW(insn, num, result, psw, rs1, rs2) \ TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ LI(DREG_RS1, rs1); \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 34da1f37de..fcc7b6c1c9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -9,6 +9,7 @@ TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst +TESTS += test_ftoi.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_ftoi.S b/tests/tcg/tricore/test_ftoi.S new file mode 100644 index 0000000000..fb4af6b5aa --- /dev/null +++ b/tests/tcg/tricore/test_ftoi.S @@ -0,0 +1,10 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D_PSW(ftoi, 1, 0x0, 0x84000b80, 0x05f6e605) + TEST_D_D_PSW(ftoi, 2, 0x0, 0x04000b80, 0x00012200) + TEST_D_D_PSW(ftoi, 3, 0x0, 0xc4000b80, 0xffffffff) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:13 2021 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: 441188 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp52351jac; Tue, 18 May 2021 02:36:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8UmeOQZW2UlgdJDiBIF2NFVWZanTVTEV4jUqBNEvV7cVtgGuIxI+JXDJr3FOm56a32HOY X-Received: by 2002:a05:6e02:1aaa:: with SMTP id l10mr3504601ilv.29.1621330574800; Tue, 18 May 2021 02:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330574; cv=none; d=google.com; s=arc-20160816; b=VG2L5hijk2wlRuXbyC1XQcrlh7KdfdWQYO3wBFmyLvvKZ7e7hTiTJFSd0WVAy0RViT Vyy/xDdvW2K9WLMPvTTHPtC31O98loxMCsMOTU8rDZTykEZOIjSN84enVxMpOiThdlqZ WKjNJnBpaN8RXtgTFEZd2PHFS8sVT5F6mKBHg8nvPKSV/YMX17biUHN+XoBh4lQv0JWq FKn/rgA565wsjzW94bqb4MMLbu+PIA+EXOpLnvZ914qCp9oY5vcKwIf6HiIJHF9ST9JF H/8gKX5AkeMGLtXliVrIkwW4d1dGKnj7+TZbupl8D5j4amv9CIC4Vv9BdfGgXHh4cmx1 Oedw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=t8UuEZj2MtU/t2ayU7Vg0m6MuJkBOt7allBeNrJsAek=; b=UAmmwWOBpuCpHYviAYTJZMwl3aGZbRlKgqmGFEKbob4kk9zrTgh/iSoQ6NperP4HPG xTqFJqrA2zXPlV+j69NcuK/xpLvRGz/qm5pkFF/zmg/fbDeUgf9bNYJuWHL2gNgWUG6P hINHKVkm9I1Og64BQ/2sm19NsvlTJbOj0cj6dCUTo5hx/YTYxplHFL7ieab06bWDCNiB PnNRKtkUYjtQ4mLpkZ+zLwtxnbsfdDDmOGThYH28cfYr4/Sm4Hy3rJNl0fCWV4KQDuxA 1LKvysTLnx/16hEO7uOphCyZ+Sfsl9arM28aLVXQudMc6N8aZlYlzR5HhlHAeXzRVvrr wvFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XO+GYugo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id g15si1475200iln.71.2021.05.18.02.36.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:36:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XO+GYugo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:50898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw98-000816-7j for patch@linaro.org; Tue, 18 May 2021 05:36:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpF-0005DH-EH for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:41 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:39730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp0-00013s-QV for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:41 -0400 Received: by mail-wr1-x435.google.com with SMTP id v12so9358875wrq.6 for ; Tue, 18 May 2021 02:15:26 -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=t8UuEZj2MtU/t2ayU7Vg0m6MuJkBOt7allBeNrJsAek=; b=XO+GYugoApvjZK80yNsP39obaP+dfI6/GlfcwHQxW4peotsr4MLToauLslH27Q+jIu on25WKdHN2KwQvEFl0dvI847QyG5XWR2VYSQ0D4CzkBJL8EwAyKvvTluc52tGNpcSz1l bjyzYn3ZqzN5wy7BsN++vup2YQsWWoTChG11J71ZJj77Q/URwqHSIhkfx5iKX+MgWV8E xSWKZPgJa1xggW4EeOwO5DMsvRSJsi9B86IczlSEGMyiohbUwBjCKKhlDGMnkaVWT1Hu abZUMcsaSw3j/L4j6h4o2e4+UGS9fZINhNlGdCPEDJdwgkjHCwHtL0Cx6B2m3EMykcPw 2e5g== 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=t8UuEZj2MtU/t2ayU7Vg0m6MuJkBOt7allBeNrJsAek=; b=fCk2vrI0TpIXnUD7ytEDK7A851ou5UD3iPWWakj3BEFNJUMlgHvShOv+LtvftCFsTS ksm0s8Y3M/2cxcwLVe4yQc+NaSe+ANe+Px/uotv/I+wAvqsMLELPbKQOo2kQU6Lpw9yg mrRcB9XBgjrOwdxrLdmi6ZTEFBTS6MjUTcSM5+jT83Brc2LR0f/Z8yLO1wugl+0Nkc1t QJZd0pk1BcsMQbQFGVaXX6V5e4h5DhgBSxR5r5kqFfv4xOqawvXenQTJGkw+50N52E3r X7ZvY9/KhLrWubwiHtGJwPEu17VDS8GP0BXbLKJBK1B2Own6uFl1TSJ0jvDnXnvCDpOy peJQ== X-Gm-Message-State: AOAM533p8xSn73AnbiDHvgj96qtKzrRLXHGeAKZLyevH2cHxfyii6jXp XBWQ02XQ4BeA75LgwCIalaYoEQ== X-Received: by 2002:a05:6000:180e:: with SMTP id m14mr5564572wrh.229.1621329325229; Tue, 18 May 2021 02:15:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i11sm20979372wrq.26.2021.05.18.02.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 081081FFAB; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 22/29] tests/tcg/tricore: Add madd test Date: Tue, 18 May 2021 10:07:13 +0100 Message-Id: <20210518090720.21915-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-14-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-24-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index e6a41cd1a2..0d76fc403a 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -9,6 +9,7 @@ /* Register definitions */ #define DREG_RS1 %d0 #define DREG_RS2 %d1 +#define DREG_RS3 %d4 #define DREG_CALC_RESULT %d1 #define DREG_CALC_PSW %d2 #define DREG_CORRECT_PSW %d3 @@ -85,6 +86,23 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ ) +#define TEST_D_DDD_PSW(insn, num, result, psw, rs1, rs2, rs3) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + LI(DREG_RS3, rs3); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2, DREG_RS3; \ + ) + +#define TEST_D_DDI_PSW(insn, num, result, psw, rs1, rs2, imm) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2, imm; \ + ) + #define TEST_E_ED(insn, num, res_hi, res_lo, rs1_hi, rs1_lo, rs2) \ TEST_CASE_E(num, res_lo, res_hi, \ LI(EREG_RS1_LO, rs1_lo); \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index fcc7b6c1c9..8de005523e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -10,6 +10,7 @@ TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst +TESTS += test_madd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_madd.S b/tests/tcg/tricore/test_madd.S new file mode 100644 index 0000000000..5d839772bb --- /dev/null +++ b/tests/tcg/tricore/test_madd.S @@ -0,0 +1,11 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DDI_PSW(madd, 1, 0x0000fffd, 0x60000b80, 0x0000ffff, 0x7fffffff,2) + TEST_D_DDI_PSW(madd, 2, 0xffff7fff, 0x60000b80, 0xffff8001, 0x7fffffff,2) + TEST_D_DDD_PSW(madds.u, 3, 0xffffffff, 0x60000b80, 0x00000000, 0x80000000, \ + 0x80000000) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:14 2021 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: 441189 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp52616jac; Tue, 18 May 2021 02:36:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+diNY1HlWlWbTaq1remU9YpVSfvMUuQJSjLGo1xVXmqvlQiX7OUcBdW/BQsp2Wb0w2cEJ X-Received: by 2002:a25:f504:: with SMTP id a4mr6375094ybe.150.1621330609656; Tue, 18 May 2021 02:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330609; cv=none; d=google.com; s=arc-20160816; b=jSZnCfSh8dv62DF/x+X6a14VXUdihVE7PFxNgB07dV4crRMpUo0r/CQ7TqKm3qvbCT j+crSOeqwoYRGHwOrzgLcdReG6ih7vZtjjhVEXOqlbRxLNfEdYVAmqfdGDxIEyshnR37 nF9rRUqpkOpnPdTxLZFqxGOEU7K8Inm8hO0GlRMK6a/KC4yKnvj2UUCUuDxp65LL5kOS +MtjIoAoRnSr2vevzDzuRlZFCYn8vOtSSWqPZ8dzh+LXaSrBwSXAd+l6cCALff3Q4yJY pTLL62NTjAKB/djBjgt0910mZ6gaHcAS9AYfhhS2r4ND1mZbojafAJvTJMWb0PijTC07 x+qQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=jcmdAYe0KwSyd2gVv/xFHxAZ2fE+u7+DYM1mPJLmcY8=; b=0Q6Kl+XR646wsJz2HxYRTjiYq53Ycqyz+JzphsqO8P8YGpfcs1VRRGI2rLXycG4xr6 DHmHKMrIsQylAleHI/I8ILYM0Ecfs87GotuLbD1VhKXDgPw3Ylf10kLLxDukwdGsLQhh nb573Y5wl/cFoteAWZHFkTGF0fJqd/eSJJM3Qo5WxKlXN8KrXHoZCaS+zkBxH5U4csiz cfdJmf295473PV69efe9qkhtA71JBw1JcmlgDvrtsTdlsofry/nHa7UFh9oEZjSvH13b 9kGrn1I3p9EIUDRgulcwdzsByGcApcqI7LbeLQ8maoJDl5fRJWPjQUAapf5uexnYFNFu g+XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NCUfcYSJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id q129si20461206ybc.242.2021.05.18.02.36.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:36:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NCUfcYSJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:50256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw9h-0007aG-3z for patch@linaro.org; Tue, 18 May 2021 05:36:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpE-00059G-9M for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:40 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:42740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp0-00012U-Qb for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:39 -0400 Received: by mail-wr1-x42d.google.com with SMTP id x8so9345190wrq.9 for ; Tue, 18 May 2021 02:15: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=jcmdAYe0KwSyd2gVv/xFHxAZ2fE+u7+DYM1mPJLmcY8=; b=NCUfcYSJFkk8Depp/8l85q6h2DiYVdhtrudpmslvVsYOI3te5XlzU+nh4Tphy2JPMS gfzX8iNER/jW0wPUfinOLbEJMefyqPOPw0TxT7st1giEHI+AJiwy83tDWG84kx+T60GC PQClv1jDzmK25v4gd96n3lifzTb9FSSpwkyKHtD8I/wx7vBgs97VKN7YEvFy89mJxvAL Moe173RPiM5GiiA9bkHX3ISOye0rzp0AXYIiU9qhKo4CT7icaqEQgsUcOxD/+S3hLG/w VvVDRL8FPaJObQ7dx7DMiC3xWQ4XfkEUJbMK6yCw793/dpphr1F7A+gf7td4NPHclwJv w+gw== 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=jcmdAYe0KwSyd2gVv/xFHxAZ2fE+u7+DYM1mPJLmcY8=; b=FXeusEVEDJuD8niG08GE1uSFualVz4OqLGzGxsiwP+/zTMFeTdEA1nfhpw1LUQ8est NYwHN6eRvAcJ7sjbmA7LR3mWB5RQOoB2GTTct1a1U8cw/dQH+4pElBR25vOQtOcPpwdB /DLqSfEC2Tn/zslvr5uCPhOv49jeAs5boMnBlW0GssdV7/7X+XxaBOEndCcaIns+Fu7A iX4XZCzpoEugBgxXblVtImBmNN09r5m1Hj/DsOI8ZLcRURpjRsOj+A+4LApAe56I9vvt 7z91sVO5dLUF+ArQQpwSrtrLvomoTXJZcSD9Wyc+We++L3wLSNcJVdbMKCKe3NGLUD46 KmlQ== X-Gm-Message-State: AOAM533qtMiHK6yZYye7z5+BhZUCe9PiG5nVBp38loHio/qC16XqwDp7 grrc8RclCiVsAaR0QyH9oXKIe/jxcV5Aww== X-Received: by 2002:adf:d081:: with SMTP id y1mr5428333wrh.179.1621329320689; Tue, 18 May 2021 02:15:20 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l8sm1838716wry.55.2021.05.18.02.15.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1F9F01FFAC; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 23/29] tests/tcg/tricore: Add msub test Date: Tue, 18 May 2021 10:07:14 +0100 Message-Id: <20210518090720.21915-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-15-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-25-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 8de005523e..0fe6a86482 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -11,6 +11,7 @@ TESTS += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst TESTS += test_madd.tst +TESTS += test_msub.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_msub.S b/tests/tcg/tricore/test_msub.S new file mode 100644 index 0000000000..6dee87d99c --- /dev/null +++ b/tests/tcg/tricore/test_msub.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DDI_PSW(msub, 1, 0xd2fbe5e0, 0x00000b80,0x64003300, 0xff5420d4, -216) + TEST_D_DDI_PSW(msub, 2, 0xfffffc10, 0x00000b80,0xfffffe68, 0xfffffffd, -200) + TEST_D_DDD_PSW(msubs.u, 3, 0x0, 0x60000b80, 0x1, 0xffffffff, 0xffffffdb) + TEST_PASSFAIL + From patchwork Tue May 18 09:07:15 2021 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: 441186 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp51245jac; Tue, 18 May 2021 02:34:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhJzIuD722uYsvt8m9akNp2cinl/74K3WV0MmvDfTFT7DgyX/ko8X6lCbr7wQJgumK5r2P X-Received: by 2002:a02:938f:: with SMTP id z15mr4498087jah.70.1621330455775; Tue, 18 May 2021 02:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330455; cv=none; d=google.com; s=arc-20160816; b=pJHuQQSsFQpng8j7WabceX/K+mLZcWg4MuCNjSmiLtRzUEn3xj9pu9jvOVKx2dLzE8 gUsZVMk7EMjPMTmkfsOFapcstyilb4vb/zAnjlPI8KACg4DFSt4Ctp2yotEj6oG04Q0D RTWNPRX/JjcN71ZyIy+0CufmcuAMRqY86mJnDuoXbQAbPzxkyqy8q+slcKJMzpGaYyK6 +Dq6IRXPhhZ85Ab3/uN/8Q1HBVSgH1fSMcA9rD16ztRFro+hQG34YqPen4lRuxX1+1Xz uvAWwnqJHYH21npXfcOCCIbTt4c3TmqeDPs4FBITagtdm3+hxGMqIRfSy/ugnWnwdNN0 p+BA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wlStNeaFvQ478PYv8M76ZBXcwfFSAnqrSyKXAIim/UE=; b=D6xJHmwCn+KhY1hnFNJ3OL1U6SkF9QJ45VnIE4LemzT/OK2AfMBZliUr7RwVd9d49L k4ylxithV+3BkJXp5PIHM9j/VYfkHDWJj8zFIj1U8FaOk8zhVIsTlKdopvk6UbLIjqHO oXUO+aQGl5WOtsQ0rp4YzmhD2taHQyQmNVH1kAE96Ge4nvtQQF1q50buevEIU5WrVerb GZbpzavkoKJnPLkjLKbPVGCB9QhkAzCxLtye8HLKagOgML1gV1BxAqDc8DZveLj3OCqH S4H5TYj17YUyYhHpucrLPX9wjFnFIbzOebolq6PQNw4niCesShfiCwQybj8dsm9tJcrT LxKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="M5qpUg/M"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id n15si21374361ili.65.2021.05.18.02.34.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:34:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="M5qpUg/M"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:41730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw7C-0001sp-Pe for patch@linaro.org; Tue, 18 May 2021 05:34:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp6-00055g-Iz for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:34 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:36653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livot-00011P-69 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:29 -0400 Received: by mail-wm1-x336.google.com with SMTP id n17-20020a7bc5d10000b0290169edfadac9so1075273wmk.1 for ; Tue, 18 May 2021 02:15: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=wlStNeaFvQ478PYv8M76ZBXcwfFSAnqrSyKXAIim/UE=; b=M5qpUg/MLcgPNsOqoT27fE+HBVx92emyYubvG7m6o3782oEEDUrgJLEOXDEXENA5jf dOMpIb9Rbs5PgVQ7Uj272YLfEXQ4XyzGUXI3pVF4VIf1Xucwzs4aeRKVMv3sZCVu5wbP vfjpJwWYVSqHLuu9rkHLCmeqAC2YKdeTlHqGD2DRwTfSxo0znmoK5mm3z/mA/C0zJ11v YOkbgkTbJEJHzN1S4WmK2LuYuT3bfsTVnM4XV0jS4gRGccAN1lkuZ1qD5AocYC/8nWsH 6s8YdcKt5zNB221i7ib/7H0AyOxpIXkDylab614aMqdzPXcuszlrE3BpYT41rKhnSTdu Wk6Q== 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=wlStNeaFvQ478PYv8M76ZBXcwfFSAnqrSyKXAIim/UE=; b=dSBPpVxy/l7RMpodj/LPZTy2I8C24K1ViimqcGIDDEbI+qloSaGcN922C/aH5FtGm5 Q5uM9LFT+Ux511tSZOyaOdCKJMuC3FAkaLrdsmmOtEiuZSBo+wL/UB1v3oclWuvEcvYD Y+1QoYEfXtPVBl+Odd06qDIQEsNBcRRrYEvwUGyyYiciH3vluxVXe7x2xdrVOyofrZAB OayMXDhi3B+qHfl0QXlWhxhFyJKaHuCdOhSodU/yFoigRrOb+QYIHJHrY0RDJtKlX807 g5+1rRxNWJaKEfFtFS6UbVn3qS8fr9MrwucHbqwYOFqsBT7R5CxZFoGTIw+PfyoCxJPv IFSg== X-Gm-Message-State: AOAM532ETKzuLeW5QF4ZJOxFT+YhV7sqtMz0RjRluvRjqWbMWg1/5kDo 7Y+2RWmmQedTwkQa4VwT+jcj5qr5SSAltw== X-Received: by 2002:a7b:c1c5:: with SMTP id a5mr3801125wmj.63.1621329316576; Tue, 18 May 2021 02:15:16 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p7sm20526800wrt.24.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 37C191FFAE; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 24/29] tests/tcg/tricore: Add muls test Date: Tue, 18 May 2021 10:07:15 +0100 Message-Id: <20210518090720.21915-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-16-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-26-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 0fe6a86482..5007c60ce8 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -12,6 +12,7 @@ TESTS += test_fmul.tst TESTS += test_ftoi.tst TESTS += test_madd.tst TESTS += test_msub.tst +TESTS += test_muls.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_muls.S b/tests/tcg/tricore/test_muls.S new file mode 100644 index 0000000000..ca517556bc --- /dev/null +++ b/tests/tcg/tricore/test_muls.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(muls.u, 1, 0xffffffff, 0x78000b80, 0x80000001, 0xffffffff) + TEST_D_DD_PSW(muls.u, 2, 0xffffffff, 0x60000b80, 0xfffffffe, 0xffffffff) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:16 2021 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: 441183 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp47089jac; Tue, 18 May 2021 02:27:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytmGTDP89Nd5UcRzjDdxQt/EXkAPyNvIo7Zk0r7CCSZxs7bzFSOOafwBZrCi4vjswAid+m X-Received: by 2002:a5d:9516:: with SMTP id d22mr3418949iom.119.1621330046038; Tue, 18 May 2021 02:27:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330046; cv=none; d=google.com; s=arc-20160816; b=QvINJpM+MXkoX4n3e0r7BLsoOBMqiCpN1kdBv/uyk5spixGQArPO4eowUdWlJnIW9h alcfF+HTTZmEqISJ2kPslt37/r/TcTPHdQv3/R8hIut68fwyF1XGnouVHwvgiUKkUBd0 zOtdh8KL7R6unb7Orqb3wmZUXnKnj15aJjJCunqhRDuPlAPP0LFkSZ5CaiJKGrzfc7L8 er7LDdI/GC4v0iM7mIXgb0Zaef9jR0U1zM3nFC0MzOScQRGBod0haVE/JuPQXaeVskW5 FBf1DnHtnaMW0WaekOuAHulKIee2q4hR8+s3f04XOHkyZFP+Ln8o3xhPQPDQN+pkalaY BSuA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=IGgZbb9d6fn4RiL5h44cOddbHHPfM8GnVy6ohfR4kOw=; b=GOTQwKgysiUphOxaNiBHX3Aosf6P2zfgtKg374O3FcnomV9ho1JJypMO1XWeHn/+kr E+Wtv19aeLTaqvy5m1lUcE+g3LJd6Vp/w9YZBMrWhlSGbSfCQYT+nj3t7TgGvvp8qiba /6xYR34Icx70FJ1IxhvGwPqWG8WhLbBAdQba7cRNLZhbHPJMJfvcVyyMXlC++s4qmBSK B9mqV6tLiIW/B/IBjibj9EAVxcgf/Wcb+UpNk06BY5QrGAzFqaMXVHamEvLoHmX/89h2 JGPBCTW1U0LY369HZL7pETYxQ//WltbMHY0VQ3TTMlHKmzjTFij7fdcfzUpoPa8aUX1S pEtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="r1R/FLrZ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id n8si20790611jam.34.2021.05.18.02.27.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:27:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="r1R/FLrZ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:53600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw0b-0007eW-E9 for patch@linaro.org; Tue, 18 May 2021 05:27:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp6-00055f-JM for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:33 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:42748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livov-00011j-C7 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:31 -0400 Received: by mail-wr1-x436.google.com with SMTP id x8so9345052wrq.9 for ; Tue, 18 May 2021 02:15: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 :mime-version:content-transfer-encoding; bh=IGgZbb9d6fn4RiL5h44cOddbHHPfM8GnVy6ohfR4kOw=; b=r1R/FLrZoIJ+K3TXh1k5E3oKH+hVcdKbQMiPd3yCTcn/Y9ij5sarwK5fPdjEwZDg/g WybpN0B51VaIMfAeDavg6jssJ5iI9bW0D6NkLkyX/xy/b1/XBpg9JzEwv/nCXahlHbPc 66sg0Io5BsIMDMoH4caB+vB+ZH3ahKFO0iYvkJaO86Q+8fKRXJ8eMYZFAvUcBZr/kIqa P6YZ8R6yvAlXpY9bHcEpkvMbOf0JK0fpYKLmMi6SRQ8+ibuMP+YltTRWJerFzuNFKx1o CmCIJZ22SmJgnMq+NePO++mQ0hOc7ddMw/XawQ2i8TArh/qqGSCZwfr7GpceKC/MV2Fr RxTw== 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=IGgZbb9d6fn4RiL5h44cOddbHHPfM8GnVy6ohfR4kOw=; b=eaoIqrAllphXtgcIR84JNJW5V+sav9WiqgmpvLoRzDQKwWEejmaqJ3daqbxZNOD3Y6 DUlnnOx2KPPdY94iwOIsNYiSLV3VNKAumG/HEVpIbRs47PNltleaM1K0eEf/p/ZRdRVN ZHHAl6MC4VYzKk9iSPBVyE+LZSiNSBiuUlEVn8U0xfL3DYySsSRx/BQoimTv6mkRF1Xg 4cUevuGXYdZAlWn4iizuSGU+427yx/rPATM+anyxP20zTsi0yBxwnSToZw1+3RCLzw8e 17B+BLekTLxl5KKavXPZ3A78iMpllonW0n82v6FUf5b9bArd+C7L0nXNwLQdiGA9x4ox uHLg== X-Gm-Message-State: AOAM531ZR8Ls48onvyRl9YtuFA3wXoo+vKVXT3JW3slsiCIFhGEp9JtU jiZRVFHBgcdQhs6Gz9jy/Na7Ln3xvTQPzw== X-Received: by 2002:a5d:448b:: with SMTP id j11mr5467358wrq.93.1621329318447; Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u16sm2320077wmj.27.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 554F81FFAF; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 25/29] tests/docker: gcc-10 based images for ppc64{, le} tests Date: Tue, 18 May 2021 10:07:16 +0100 Message-Id: <20210518090720.21915-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Matheus Ferst , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Matheus Ferst A newer compiler is needed to build tests for Power10 instructions. As done for arm64 on c729a99d2701, a new '-test-cross' image is created for ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support is added to verify that the toolchain in use has '-mpower10'. Finally, Unused images (docker-power-cross and docker-ppc64-cross) are removed. Signed-off-by: Matheus Ferst Signed-off-by: Alex Bennée Message-Id: <20210423205757.1752480-2-matheus.ferst@eldorado.org.br> Message-Id: <20210512102051.12134-27-alex.bennee@linaro.org> -- 2.20.1 diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index 4ef76d1f54..765408ae27 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -144,19 +144,12 @@ mipsel-debian-cross-container: variables: NAME: debian-mipsel-cross -powerpc-debian-cross-container: +powerpc-test-cross-container: extends: .container_job_template stage: containers-layer2 - needs: ['amd64-debian10-container'] - variables: - NAME: debian-powerpc-cross - -ppc64-debian-cross-container: - extends: .container_job_template - stage: containers-layer2 - needs: ['amd64-debian10-container'] + needs: ['amd64-debian11-container'] variables: - NAME: debian-ppc64-cross + NAME: debian-powerpc-test-cross ppc64el-debian-cross-container: extends: .container_job_template diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 8967ecf118..ff5d732889 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -140,8 +140,6 @@ docker-image-debian-mips-cross: docker-image-debian10 docker-image-debian-mips64-cross: docker-image-debian10 docker-image-debian-mips64el-cross: docker-image-debian10 docker-image-debian-mipsel-cross: docker-image-debian10 -docker-image-debian-powerpc-cross: docker-image-debian10 -docker-image-debian-ppc64-cross: docker-image-debian10 docker-image-debian-ppc64el-cross: docker-image-debian10 docker-image-debian-riscv64-cross: docker-image-debian10 docker-image-debian-s390x-cross: docker-image-debian10 @@ -174,13 +172,14 @@ docker-image-debian-hexagon-cross: $(DOCKER_FILES_DIR)/debian-hexagon-cross.dock docker-image-debian-tricore-cross: docker-image-debian10 docker-image-debian-all-test-cross: docker-image-debian10 docker-image-debian-arm64-test-cross: docker-image-debian11 +docker-image-debian-powerpc-test-cross: docker-image-debian11 # These images may be good enough for building tests but not for test builds DOCKER_PARTIAL_IMAGES += debian-alpha-cross DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross +DOCKER_PARTIAL_IMAGES += debian-powerpc-test-cross DOCKER_PARTIAL_IMAGES += debian-hppa-cross DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross -DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross DOCKER_PARTIAL_IMAGES += debian-riscv64-cross DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross DOCKER_PARTIAL_IMAGES += debian-tricore-cross diff --git a/tests/docker/dockerfiles/debian-powerpc-cross.docker b/tests/docker/dockerfiles/debian-powerpc-cross.docker deleted file mode 100644 index 07e1789650..0000000000 --- a/tests/docker/dockerfiles/debian-powerpc-cross.docker +++ /dev/null @@ -1,12 +0,0 @@ -# -# Docker powerpc cross-compiler target -# -# This docker target builds on the debian Buster base image. -# -FROM qemu/debian10 - -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - gcc-powerpc-linux-gnu \ - libc6-dev-powerpc-cross diff --git a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker new file mode 100644 index 0000000000..36b336f709 --- /dev/null +++ b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker @@ -0,0 +1,17 @@ +# +# Docker powerpc/ppc64/ppc64le cross-compiler target +# +# This docker target builds on the debian Bullseye base image. +# +FROM qemu/debian11 + +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + gcc-powerpc-linux-gnu \ + libc6-dev-powerpc-cross \ + gcc-10-powerpc64-linux-gnu \ + libc6-dev-ppc64-cross \ + gcc-10-powerpc64le-linux-gnu \ + libc6-dev-ppc64el-cross + diff --git a/tests/docker/dockerfiles/debian-ppc64-cross.docker b/tests/docker/dockerfiles/debian-ppc64-cross.docker deleted file mode 100644 index 8efe68874e..0000000000 --- a/tests/docker/dockerfiles/debian-ppc64-cross.docker +++ /dev/null @@ -1,11 +0,0 @@ -# -# Docker ppc64 cross-compiler target -# -# This docker target builds on the debian Buster base image. -FROM qemu/debian10 - -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - gcc-powerpc64-linux-gnu \ - libc6-dev-ppc64-cross diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 11009fe433..6627318adf 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -147,18 +147,14 @@ for target in $target_list; do ;; ppc-*|ppc64abi32-*) container_hosts=x86_64 - container_image=debian-powerpc-cross - container_cross_cc=powerpc-linux-gnu-gcc + container_image=debian-powerpc-test-cross + container_cross_cc=powerpc-linux-gnu-gcc-10 ;; - ppc64-*) + ppc64-*|ppc64le-*) container_hosts=x86_64 - container_image=debian-ppc64-cross - container_cross_cc=powerpc64-linux-gnu-gcc - ;; - ppc64le-*) - container_hosts=x86_64 - container_image=debian-ppc64el-cross - container_cross_cc=powerpc64le-linux-gnu-gcc + container_image=debian-powerpc-test-cross + container_cross_cc=${target%%-*}-linux-gnu-gcc-10 + container_cross_cc=powerpc${container_cross_cc#ppc} ;; riscv64-*) container_hosts=x86_64 @@ -272,6 +268,10 @@ for target in $target_list; do -mpower8-vector -o $TMPE $TMPC; then echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mpower10 -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak + fi ;; i386-linux-user) if do_compiler "$target_compiler" $target_compiler_cflags \ From patchwork Tue May 18 09:07:17 2021 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: 441179 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp44104jac; Tue, 18 May 2021 02:22:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhsPlQaOjyDlD/eKpLm5XoL3rLwiG7d0LNaLMThE05rKfwSFgznmDJm97o4fQArRTXiJbM X-Received: by 2002:a05:6122:1349:: with SMTP id f9mr4718447vkp.18.1621329759299; Tue, 18 May 2021 02:22:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621329759; cv=none; d=google.com; s=arc-20160816; b=phCAZ9MU6pBbUHkbygvtuhgYFFYAiwMMmXlhuYmpKkFHnbK/dlwuNrCvq8Os/aZrXN GQd1oW5UxSpAh6NpwGeNpBeRwR2/2XXyew4jTYR/NMaCH1nVO8vg46wFiAXftOxMLGAW cbes6ek6ABEzJ0F60hCtJAVrGONK789j/tdvu+/JnnHSTo96ty3LrQLt8D7QIY/QZs1L KeiPI8/8GPSL0PloCIcZyeaCCuI77tpfBd0pMo/3TanD4nAovXSOjvF7zZQG+iQ9cuYl DCQYgrJtGyyrQlzLiizJvlYbPJUMnHnbCcDkGGz/MeqbmcBd2JlP5to2qa7Knj4JSk81 lAhw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=yfPAdLfj0mM5DpZOWJa8eVcwUNU1MGcAXsLejhIC64A=; b=OtGvbdxNMg6woFgwklontQ9JEgB3PU2/Zs9VZU1L1HQjald+B61R4dxAxAG/Z1p2vw pSUp1GZKrF0ISvB9j42FLgFt4+S7IjI/Fh0KufQaWhmeaNZZJ7aCt561077FnCkIVIRX pCTbk5K+WXvSrwGOiIc7boOdDhLZz1PEsqYi308rpCw96s1pWQXP8VycmNUMmq4P9Qjb aVC7bxOEfuT2EUBmmDjnJai4+SkJftC5bA8LU6kXrPuqp0V23qKiE/VC9bj6ZdOdWSea w5u8NJYrPnNH7dwws2ZlMTDy865E53PSmxEioEoBm5yvyFIbhMau7ItNGR3TsMr3ki/J uj3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bBMw+xDT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id a2si3936165uao.134.2021.05.18.02.22.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:22:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bBMw+xDT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:38306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livvy-0005qy-J8 for patch@linaro.org; Tue, 18 May 2021 05:22:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp0-00052x-8l for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:27 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:34376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livop-0000zx-VL for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:22 -0400 Received: by mail-wr1-x435.google.com with SMTP id r12so9380152wrp.1 for ; Tue, 18 May 2021 02:15: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=yfPAdLfj0mM5DpZOWJa8eVcwUNU1MGcAXsLejhIC64A=; b=bBMw+xDT3Ah6nYcYB/dMvR+UQ/MD2FTO+cQNAE/91ZROQ2MZy3CxfeJWA+onRykNjB hw6Wr7sFCnxg8H9gr/KsPsiZgQR/x1Xkzx2LbBWeb7jEv6gidxtTyGMpxQZ4FmkYfqCJ w0bjGErqfGg36bdNZBHOIuj9MgSWzb6JHpFggrzi6zc+WEIkclJrRmtPzvB68Tik9bnD IXfLk5tBXHWxvFdhqc1afjjOgsOJsiu4YNOtoT+7Zhq2G2gZivaUtRlMhoRaGB8gdKJq nKios1Ur066HLWrhFeIsY3LHBSC45WrR288jpuKBKk/oe+clS2RaowG/44V+WE5eD4L1 Pm2A== 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=yfPAdLfj0mM5DpZOWJa8eVcwUNU1MGcAXsLejhIC64A=; b=TDWO0y89mADE5UFZ2ndhtnosuxUUaNHS+2Y4rV6RfW4cKCDsZxd6xsoJChy05V0ogH tKe+2Bm9QluoW2Q4s0JKsaf4mDe7wDNERUW+Cr89IHn6xQ/gZXc7BSPEo05GC2EnP3+T VGIT3Z847H7q5ykFznpImj2fRS/CYdo5OQhLWb2ubBcw3KFDCRL+51MYhG6+KszCTBeR X9Kc7ckxoLU3HeuhpHYKl4jzjP1Km4ZP8InA0N2yC3h1clvrJRDGiAobPtEjzsDzOUjm 3cOH1WyGMlUlZ3CsNq+LP7nc+iYi49pn9s8YW7vxvazc0cvtEnp0fHY1Njr1YNXdLFKl KV1w== X-Gm-Message-State: AOAM532lqPW1NyJu3bkt3Qu/b+qYG5cYmC/dc4qO4N599OP1N1sDTKJH b52+aUohXW1AGoegNqun0Q/NLl9/PB078w== X-Received: by 2002:adf:f50f:: with SMTP id q15mr5378833wro.279.1621329314027; Tue, 18 May 2021 02:15:14 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p10sm19063326wrr.58.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6F82D1FFB1; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 26/29] tests/tcg/ppc64le: tests for brh/brw/brd Date: Tue, 18 May 2021 10:07:17 +0100 Message-Id: <20210518090720.21915-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Matheus Ferst , qemu-devel@nongnu.org, Fabiano Rosas Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Matheus Ferst Tests for Byte-Reverse Halfword, Word and Doubleword Signed-off-by: Matheus Ferst Tested-by: Fabiano Rosas [AJB: tweak to make rules for skip/plugins] Signed-off-by: Alex Bennée Message-Id: <20210423205757.1752480-3-matheus.ferst@eldorado.org.br> Message-Id: <20210512102051.12134-28-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/ppc64le/byte_reverse.c b/tests/tcg/ppc64le/byte_reverse.c new file mode 100644 index 0000000000..53b76fc2e2 --- /dev/null +++ b/tests/tcg/ppc64le/byte_reverse.c @@ -0,0 +1,21 @@ +#include + +int main(void) +{ + unsigned long var; + + var = 0xFEDCBA9876543210; + asm("brh %0, %0" : "+r"(var)); + assert(var == 0xDCFE98BA54761032); + + var = 0xFEDCBA9876543210; + asm("brw %0, %0" : "+r"(var)); + assert(var == 0x98BADCFE10325476); + + var = 0xFEDCBA9876543210; + asm("brd %0, %0" : "+r"(var)); + assert(var == 0x1032547698BADCFE); + + return 0; +} + diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.target index 0c6a4585fc..a6a4ddaeca 100644 --- a/tests/tcg/ppc64/Makefile.target +++ b/tests/tcg/ppc64/Makefile.target @@ -10,4 +10,17 @@ PPC64_TESTS=bcdsub endif bcdsub: CFLAGS += -mpower8-vector +PPC64_TESTS += byte_reverse +ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) +run-byte_reverse: QEMU_OPTS+=-cpu POWER10 +run-plugin-byte_reverse-with-%: QEMU_OPTS+=-cpu POWER10 +else +byte_reverse: + $(call skip-test, "BUILD of $@", "missing compiler support") +run-byte_reverse: + $(call skip-test, "RUN of byte_reverse", "not built") +run-plugin-byte_reverse-with-%: + $(call skip-test, "RUN of byte_reverse ($*)", "not built") +endif + TESTS += $(PPC64_TESTS) diff --git a/tests/tcg/ppc64le/Makefile.target b/tests/tcg/ppc64le/Makefile.target index 1acfcff94a..c0c14ffbad 100644 --- a/tests/tcg/ppc64le/Makefile.target +++ b/tests/tcg/ppc64le/Makefile.target @@ -9,4 +9,17 @@ PPC64LE_TESTS=bcdsub endif bcdsub: CFLAGS += -mpower8-vector +PPC64LE_TESTS += byte_reverse +ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) +run-byte_reverse: QEMU_OPTS+=-cpu POWER10 +run-plugin-byte_reverse-with-%: QEMU_OPTS+=-cpu POWER10 +else +byte_reverse: + $(call skip-test, "BUILD of $@", "missing compiler support") +run-byte_reverse: + $(call skip-test, "RUN of byte_reverse", "not built") +run-plugin-byte_reverse-with-%: + $(call skip-test, "RUN of byte_reverse ($*)", "not built") +endif + TESTS += $(PPC64LE_TESTS) From patchwork Tue May 18 09:07:18 2021 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: 441190 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp52751jac; Tue, 18 May 2021 02:37:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGPjKcdpyMa4It0CnJXZZncMcbtn5Tsj+JQz/omKz1pA/Eheh2hjNI6mnTcGgpDRQ1dFWU X-Received: by 2002:a6b:8d46:: with SMTP id p67mr3580756iod.204.1621330625508; Tue, 18 May 2021 02:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330625; cv=none; d=google.com; s=arc-20160816; b=NyaZYPQyqVmurckeJ3VcSIbiYcr8vN8iz4WegV0S9KA80pTvH15osPZOsFAHMh7AVu LPm++Jbyhg6qWbPxvO/dSfVkOFeeTDpxtSw5qgrtcZ9lF2dlgHwDmE2D1AXObWXmLy2P c4J78hGkP4oONlGHem037FIkYDgyFPadlIPXxj85REibtiWA56pkcR5eXwdNPHTghgg6 up5BPP+9bCGGGUhH/0RUu/J4rzKrORb0zZJnrGxaCJ8Z45ujC2fr1+idwJYg+r8mC6u4 XuZpR2slCr1zUCs7cgsFtXO53jgYFgneWqD13MajBzFb6qXgL89kW0e7noNZdLlT5HhE iAlw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=D5Inb5L/9oK+/2nTuHYzlDm1Dd5BgSxGl3J/R/np3c0=; b=z0wm/MYciIohJGA3QvOgVJ80DfZeGVD3DqB9kxXpxVDqWl8I8zy8qZ/yEzsxe4tThZ aF7NNlFBH2aMep1JUhKF3rE9ofVw5XYluixs1pc3FPYIIY3Vi6GRJ7RvOriMdf7k1IPA TesK4Z3kHaA8znbaqQZsnB2LjReGrylTmL5VXTdD+AaYZPfPHCkYb1F5AUeF91oltcPD umB8XtcNhs5azDinxPHFe4YHojvqNRSC1RQ5rlg+PegaFmI5bPFmzA9zgdgzeK7PtIzA bol9oNFaWeyuktsyq+iz6wKqyU4LqEfSPa0aytcDUBG16EBYKOfKATj5YLaWtIBylLus 2SRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yThcQAjH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id n4si19267025ion.59.2021.05.18.02.37.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:37:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yThcQAjH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:54354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw9w-0001si-V1 for patch@linaro.org; Tue, 18 May 2021 05:37:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpE-00058N-2G for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:40 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:42716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp2-00014H-AT for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:39 -0400 Received: by mail-wm1-x32c.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so1053865wmf.1 for ; Tue, 18 May 2021 02:15:26 -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=D5Inb5L/9oK+/2nTuHYzlDm1Dd5BgSxGl3J/R/np3c0=; b=yThcQAjHPXzskrS/7h8G3qn4/jTFlwwzQAMB9Tw3YFMSZxXIGowYlCEUxe9W/NZxww IdHfkM3WeJUcnxbEgbQ1qeFC8XJPyxAsHmpJy6lrTV/ITL4BLXbQ0iWZIc5DiQuXIGU/ Wy3eTnUS6SnDW+EcJguq98/he2fAqlChypLQSaAzZ44qRRTfPDAgre+LNdUIWaawxdEm 5cfqo1pl4zIvEhIdDs1RP27c7HwTunJZRVCo0iWVfDprozAYBZcFHZmVOxJ1Ew9NvNSA N6A1EedvcOjiyzwbfneuk7o28HWhDi+l/5QuHJSTGIiFdKQIIPCLEiMl5dzYAy5gbzJm Balg== 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=D5Inb5L/9oK+/2nTuHYzlDm1Dd5BgSxGl3J/R/np3c0=; b=jy+krfAWMFXl5T8ElpubKa1jx/1y6oh09k8I+axrbJVCgfzg4xyuJSryNNypJFDJFu WXapOQsctiYUrImV4H8cnIVlMaVQErT72Q+I1UBdAVbFW02M4o6FBIS+QGf0rVLYCZdv z4w8cGW54DeI6ak3EcTIOrvrP/mrmgrbS1d+WXl8mqpSrvj1FhUOE5ZItI1ExrknmZ6j Ihhh+E2Sz03+xfehP7fy8d19iwaqekWGCIeZz/ACZra5sVNhMCztOj3mrzpeAHTH39iG Lz+YXmBsqKARJey3wGv7BeRiMuxsiGxaFiSsCP2euW+93QN6Uro4pGv2se/vLfUZ/R46 pG8g== X-Gm-Message-State: AOAM532rP8MY3Tv3FKO63iOaI1woyWsLUyOzCIPegATUX26hZEAJiH7+ eUXos324EGm7+cY7n/8Nu1t6UA== X-Received: by 2002:a1c:638b:: with SMTP id x133mr3854378wmb.182.1621329325818; Tue, 18 May 2021 02:15:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a16sm8843047wrw.62.2021.05.18.02.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 84B761FFB3; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 27/29] tests/tcg: fix missing return Date: Tue, 18 May 2021 10:07:18 +0100 Message-Id: <20210518090720.21915-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This was picked up when clang built the test. Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-30-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé -- 2.20.1 diff --git a/tests/tcg/multiarch/system/memory.c b/tests/tcg/multiarch/system/memory.c index eb0ec6f8eb..41c7f66e2e 100644 --- a/tests/tcg/multiarch/system/memory.c +++ b/tests/tcg/multiarch/system/memory.c @@ -326,6 +326,7 @@ static bool do_unsigned_test(init_ufn fn) fn(i); ok = do_unsigned_reads(i); } + return ok; #else fn(0); return do_unsigned_reads(0); From patchwork Tue May 18 09:07:19 2021 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: 441184 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp48419jac; Tue, 18 May 2021 02:29:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlZHFO30PkeUE86f+CrkbGJGvBdJ3JeaZZnRcWBDYZqua+KpbE+t7TL4ZDieKtBf/aiCCu X-Received: by 2002:a25:204:: with SMTP id 4mr6241280ybc.342.1621330174123; Tue, 18 May 2021 02:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330174; cv=none; d=google.com; s=arc-20160816; b=Edzaq/SeFX89q4OtWF4wBaxfRowa3YUDl+yaxHXMhRCaInKEZXK/sZiFexxQrUwq3r dFsY3kYSPn1ag7lOCH+ql+3xWHnBnARJ3sscrEO6wK5hrPxZwKW0N9yPe5ijtKS9vf6b 2M0sWSpcQoQrA1YgYZytAW5EH5GmhUge136TqLjvLWk3ii3dtly5C+o3/kCgP7bKQPIy AofMu5y0/NP2GcIMKdoFHPYo2oJya/vug41YzOXZU0eY6fqy+YxFFyZpr9+LxGYegz6A xn21PtWOtui3zo6CwyrOUbVubGFl+hfS3gJPWLpR6D952qBoiZ3QH8litg9zq9GskHpF rnEw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Mn6SaZ8plyB0/DLAD6T6WLKOaxQYkXa/tSd0uVFivYE=; b=D+JFSJ/UeSty3PLJD5kp0cGk0IXVA1S6YJbbUSp9ErdUYp4R7g5vabWLQHV4n367G8 NtKDGFl3HGd50uVmA3c9dzwdX9BZ1g8pZfG7OCawwRx1cx2157RkddYu3iM+gUntnCAx DQcNbKl0aUNPUxi3PBoEquuli+LkhdA5c2tPgR8YsJ7c5KpGXkja2h6QSykICo3jH+Xp C5VlNxvgF6m1d5J3qzx4z69aAjvQtRGFgk7GMol8eLstHwqZJhlF6FTHuZn4OPOqLLOX ZsDv7mi9aHvaY1Ed/YHeNKN0QjitDyLkC9guQpTNZent5SZZFWiflvTYMQiezqziU5OE KcXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="T/NAnNMQ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id j18si4889424ybm.248.2021.05.18.02.29.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:29:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="T/NAnNMQ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:33116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw2f-0004PO-HM for patch@linaro.org; Tue, 18 May 2021 05:29:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp2-00054G-Qi for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:29 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:46906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livor-00010l-7g for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:27 -0400 Received: by mail-wm1-x32c.google.com with SMTP id h3-20020a05600c3503b0290176f13c7715so1050236wmq.5 for ; Tue, 18 May 2021 02:15: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=Mn6SaZ8plyB0/DLAD6T6WLKOaxQYkXa/tSd0uVFivYE=; b=T/NAnNMQMtJuJqPGnOvZM9pMZP6qu16G/dwEQ6BUVu1nR3Vrr0ypq/9VjnUL7AKKRS ZExWwOuiN7+JpcxMdlODVM8IKjJCuKUCqQpySj4fS27i/LAE7tLwUkROWtBoyDkyf7hH 1l0WPsib1xqPSo1BjzcJ9dr33Pjg0S3T09zNPzIleq1HPBD2CU5H56d0GHOTgDuMZ9ki /yivzFVUwjvYOwg2dkGrLiVM7zdaM2cJCHPViyp0lAFx2chLC39SNcHyM/8ZANlaA1Hy XHnc9REZiP61BczUikhk9UJz1aioos5O6SuO6ccVqKYdG2uiQSBrOt8Wq8HepmiX4us7 CpVw== 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=Mn6SaZ8plyB0/DLAD6T6WLKOaxQYkXa/tSd0uVFivYE=; b=nlRHgJ2fIzI8LRwqy+86V/DnjDtCCL9dHmUjoO2ar3EACig99zMspxKSW/XqP5p0xl QdtxDfjJSCFhd6JMWiKeZe2EjRj56J8CpUuBLxSkOgo2KMHYI0EgVjHUKtJX0gsF+Eo+ a6UJbvuZZbF/Vz6W34sdO70J8ltwRlxRt1s35+R8nYqOG06Jz8IT+08Nlv/dDlpkA9cU WIG4cV4mX4WjyXpMgmaL8Cv39TUIyssjywX3AYvYHwT3cljyBJbxJUWKrSzch02xQdsL 02bkkdQLtfYNOS3esmjx/6BH5i8oJ4GKbhQAUJ5rIxlJsUUinqyssb7NIQolSXFYDtrF zcGw== X-Gm-Message-State: AOAM531JtT/ETXwA8b/SO3YyKRGfsxJN1Ygo32+lHgX2/RSoey+a4Wdy cvVHjPJGtPamwTAs6A5s3wElvw== X-Received: by 2002:a7b:c093:: with SMTP id r19mr4319577wmh.35.1621329315938; Tue, 18 May 2021 02:15:15 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f188sm1977697wmf.24.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 98E431FFB4; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 28/29] tests/tcg: don't allow clang as a cross compiler Date: Tue, 18 May 2021 10:07:19 +0100 Message-Id: <20210518090720.21915-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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 there are two problems. The first is clang generates a preamble (that is always executed) to stack xmm registers. This causes a ILLOP on the x86_64 softmmu tests as SSE isn't enabled. The second is the inline assembler in test-i386.c breaks clangs compiler and I don't know how to fix it. Even with Theodore's patch series (D5741445-7EFD-4AF1-8DB2-E4AFA93CBB1A@icloud.com) I still get compiler failures. For now lets just skip clang and allow it to fall back to the containers which we know have compilers which work. Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-31-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 6627318adf..ed6492ce59 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -82,6 +82,9 @@ for target in $target_list; do container_cross_as= container_cross_ld= + # suppress clang + supress_clang= + case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 @@ -119,6 +122,7 @@ for target in $target_list; do container_hosts=x86_64 container_image=fedora-i386-cross container_cross_cc=gcc + supress_clang=yes ;; m68k-*) container_hosts=x86_64 @@ -186,6 +190,7 @@ for target in $target_list; do container_hosts="aarch64 ppc64el x86_64" container_image=debian-amd64-cross container_cross_cc=x86_64-linux-gnu-gcc + supress_clang=yes ;; xtensa*-softmmu) container_hosts=x86_64 @@ -200,6 +205,7 @@ for target in $target_list; do echo "# Automatically generated by configure - do not modify" > $config_target_mak echo "TARGET_NAME=$arch" >> $config_target_mak + echo "target=$target" >> $config_target_mak case $target in *-linux-user | *-bsd-user) echo "CONFIG_USER_ONLY=y" >> $config_target_mak @@ -219,21 +225,26 @@ for target in $target_list; do if eval test "x\${cross_cc_$arch}" != xyes; then eval "target_compiler=\${cross_cc_$arch}" - if has $target_compiler; then - write_c_skeleton - if ! do_compiler "$target_compiler" $target_compiler_cflags \ - -o $TMPE $TMPC -static ; then - # For host systems we might get away with building without -static - if do_compiler "$target_compiler" $target_compiler_cflags \ - -o $TMPE $TMPC ; then + if has "$target_compiler"; then + if test "$supress_clang" = yes && + $target_compiler --version | grep -qi "clang"; then + got_cross_cc=no + else + write_c_skeleton + if ! do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC -static ; then + # For host systems we might get away with building without -static + if do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC ; then + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + else got_cross_cc=yes echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak fi - else - got_cross_cc=yes - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak fi fi fi From patchwork Tue May 18 09:07:20 2021 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: 441185 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp48491jac; Tue, 18 May 2021 02:29:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf0rJZfDuzFDaNJ6nH4jS3bdyP9lYGHGnaf7n8RkrkEqkZNMcgz1MHBB8YG9tLoiOsjEYC X-Received: by 2002:a05:6902:1101:: with SMTP id o1mr6511472ybu.207.1621330180914; Tue, 18 May 2021 02:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330180; cv=none; d=google.com; s=arc-20160816; b=kj2YO+hY2g9ElQz5OJSUfkWSR2zjW68N1ehfARuDC11VMyyIHTL1+Kab2/yqmA0A6i nh6JNF16mSgk2XRqGl75+LX6g8NkH1SXx54oIUVHf4ztvvA4rkslK1uAMLqT9ZhNs0Iy nHHSgtqNGxrAVAIOLXien8sv0moAYV9cRoxyEOzDpIWBLcWYsEfbkNY5hloBe9lr0Yix oyKpbh/IMurK8FEHo8VfOnvL8bn+V+0/DQ3xD02oEFEJyyJKNcnjGQmJhhZjQI5appR0 poKCz9GdGzOaAVB/b9P4m7vvT3xe2+mhC3LlYONc0bdEHZpgbXvOz4/TcVPrttPhJSd9 FYJw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ZOEe6cez6SEgngPy3li6Y4fZAWFWB0XRBjyTyqxtFds=; b=WNzrOti26XDpf3F7ElhIgcueIcmCvzDzzsB4Q7g/v+EWFVtz72Oa7/hHF2GwZ2P3f2 kfrpaTCnnbUJihiukzYeBHyNoSAZqihad0hRTm9ziTxCEXeywtFkvkzueRwg/qKQwNek I1yXPJSWXscU1GSS8sSk9Rylt1kCs5MbFZsNtRyHHnWpQLuKzzB5+mZKfqy/CLq1Bc1j 7orW5NtUTyZ9uxgQaTGDP4D93UAi9BJiixKc/CENkCaLjoVfWYBVMXbYZramt9xuKDuL J7GFEsgQmrrbn7shigFDNUTqCwOHw4AJTK6pmRy35aw3t8h9ZKOQVnHulW+k0JWSlWAo BVYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DOx608YG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id m3si13070970ybb.374.2021.05.18.02.29.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:29:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DOx608YG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:33812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw2m-0004r4-AH for patch@linaro.org; Tue, 18 May 2021 05:29:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp9-00056w-GK for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:35 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:55852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livoz-00013i-NW for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:32 -0400 Received: by mail-wm1-x329.google.com with SMTP id b7so4403240wmh.5 for ; Tue, 18 May 2021 02:15:23 -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=ZOEe6cez6SEgngPy3li6Y4fZAWFWB0XRBjyTyqxtFds=; b=DOx608YGH1geHMpq1CWoN8aclQUGU02rm6CZbGHRD+d4Fu/6TyNZbDHCAp4yG9GxFf UU6j7xob04VeTAZSFVcvvspEhVjMSvIwp0iXbP6517W2mGWaSM1wsaMxGSK4ADey1tKY 6oECEdfAsGi/+T8XV2BSRbG9EEY6GbBzDO0tWFcDkw5WktnwO3IBKzbkmXP01YSakUxP rIKcwGK9CYyF1YCKSCm9OYGbRNmY4N3U+QKCTCMY/i6GP3V55gCxtkXF2JtRXQ5lCx8g nNxJuPWgf1Hb8/s1nRh+Bx+Ki5MHctkayp6xQiK3oUcqpT9TXhyfMx2Mk93R76v1BeMZ ylpQ== 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=ZOEe6cez6SEgngPy3li6Y4fZAWFWB0XRBjyTyqxtFds=; b=IhBjlPqyrlEqmRgmA2mDD7+1+Eojof/aJGaYkQPJpG1NIe/nXDr8OG3q75TaFRcnMt hquvDwfbs+QkGz2I0dvQXjKt1ksm34LC2+qDAkl0Bk0nd1uf9OZ4QVTnZw1+2pXSZJNk HGFZhTJfjoelPercGM/VhmJGTYblQQQZNTmByvF+8CWvWT6pAQnxq+/apu7BdrpNclDa nRkJznBGYUe59DnwnfzZ1ES8csUpcHxREyKHpT21aLM1pfq42symj8uL3tSodjAAoj0V omONaQh4o9S0+Ky6STCws/doiD+ycvyGwwtjlnKZq19yL1bMKZxuMAJ5WLTW2hEwIMXl Pz1A== X-Gm-Message-State: AOAM533W3sox2OjtCDmtxai9f5Shf0jMcbb896so1l+s2t/mqzVNoBLZ Vda3NHNAS2bhlScFQoCuMAkU8A== X-Received: by 2002:a1c:4482:: with SMTP id r124mr3827256wma.42.1621329322369; Tue, 18 May 2021 02:15:22 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r2sm21822189wrv.39.2021.05.18.02.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AD8951FF87; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 29/29] configure: use cc, not host_cc to set cross_cc for build arch Date: Tue, 18 May 2021 10:07:20 +0100 Message-Id: <20210518090720.21915-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Otherwise you run into hilarity like trying when cross compiling a 32 bit ARM build on a 64 bit system trying to use host_cc to build 32 bit test cases. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-32-alex.bennee@linaro.org> -- 2.20.1 diff --git a/configure b/configure index df11c8bad0..9470fff09a 100755 --- a/configure +++ b/configure @@ -1651,7 +1651,7 @@ case "$cpu" in # No special flags required for other host CPUs esac -eval "cross_cc_${cpu}=\$host_cc" +eval "cross_cc_${cpu}=\$cc" cross_cc_vars="$cross_cc_vars cross_cc_${cpu}" QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"