From patchwork Tue Feb 19 06:11:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10819285 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E471C184E for ; Tue, 19 Feb 2019 06:19:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D18062B2A2 for ; Tue, 19 Feb 2019 06:19:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C55622B2D4; Tue, 19 Feb 2019 06:19:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 77AAA2B2A2 for ; Tue, 19 Feb 2019 06:19:53 +0000 (UTC) Received: from localhost ([127.0.0.1]:42412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvyky-0002oz-MP for patchwork-qemu-devel@patchwork.kernel.org; Tue, 19 Feb 2019 01:19:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvydy-0005Y2-Np for qemu-devel@nongnu.org; Tue, 19 Feb 2019 01:12:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvydx-0007C2-K6 for qemu-devel@nongnu.org; Tue, 19 Feb 2019 01:12:38 -0500 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:46667) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvydx-00079s-Ap for qemu-devel@nongnu.org; Tue, 19 Feb 2019 01:12:37 -0500 Received: by mail-lj1-x234.google.com with SMTP id v16so16355878ljg.13 for ; Mon, 18 Feb 2019 22:12:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=522uQM7/AIBSg2yhxMOP1wuc8nfKfSpPb5h/tqZnhg0=; b=H3G8YMJQjOxt7pnhEpyod0l0CI9BBe89kGqgv1qtJ3ecc7V+wCbMM+hii98Ak7Nlif iFtiX1SHGTh51BDE4ZFSwOBJe+nyDnPpUx6FOTMLF27VjhwFHdWSCp/ohNnmtNTqiz9P E48uCtFysO8hixWFY3CbTgqMlbfWn1SrINlP79+WUIAu1DzSjLDfJbC5evmHxS9CGqyN MHolEZPd+uKXBpB/OYR6XZnsSvkqGQi+iedIw+y6u5Xk1I5DJ7gdA0FSULe1GBIaIOmC JktLZ7oQTWo9cQq7Wm0DkcSKVumtDgkCD2MEAmjechDp3ErTHiAGBbwZGzTmM1iueFWZ TmrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=522uQM7/AIBSg2yhxMOP1wuc8nfKfSpPb5h/tqZnhg0=; b=LRK+uW6kyZMoUYLJasZFzdkYXl5UJLrC6d6QzSkvKx7y/p/EAMCYBjJ4/NATE73DvO Q58p467IsEslTPJK5K5Xki7yU7Ch3OFRZVpATRhcrFsei6LKfoKdcUJ1IcQzKVjHu53g 0FS+DbYyP5uqitKbofG6bJl41K+8+Xrw9vAZ9cME7r+I4CSoQw9RBruIaL6rOdJpzn1J Zz568TZHhsmUmqpMddb+kJoRR9Nc0s3L35n6sxydUyt/H/DMjeOY7NskbZxYrMQF2R/e NdPg8qBTCYsgmGAPmndlqz/ILg6CQpXyNpx4ktRLxSf317O+li7pkdvbmI/C6+523qOm j88g== X-Gm-Message-State: AHQUAuZRtAEagkCNYsXMAVXRenu/dqUcn7UDliaoaa4YyXVUh7920uiO 6Iw28Ftr1kzol4lvOzW4E87LdqrAEfk= X-Google-Smtp-Source: AHgI3IYnDjBwlDePVddDQN/GSmYCRrtzEfXPnSkIjSymfXeK8H0XcCWsrQI9kyF4IDFxbpL28I3n8w== X-Received: by 2002:a2e:99c9:: with SMTP id l9mr15870119ljj.60.1550556751306; Mon, 18 Feb 2019 22:12:31 -0800 (PST) Received: from octofox.hsd1.ca.comcast.net. (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id f16-v6sm4235745lji.88.2019.02.18.22.12.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 22:12:30 -0800 (PST) From: Max Filippov To: qemu-devel@nongnu.org Date: Mon, 18 Feb 2019 22:11:06 -0800 Message-Id: <20190219061111.10231-19-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190219061111.10231-1-jcmvbkbc@gmail.com> References: <20190219061111.10231-1-jcmvbkbc@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::234 Subject: [Qemu-devel] [PATCH 18/23] tests/tcg/xtensa: add test for FLIX X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Max Filippov --- tests/tcg/xtensa/Makefile | 1 + tests/tcg/xtensa/test_flix.S | 60 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 tests/tcg/xtensa/test_flix.S diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile index aee0134ef5b9..bd94ba6fe549 100644 --- a/tests/tcg/xtensa/Makefile +++ b/tests/tcg/xtensa/Makefile @@ -38,6 +38,7 @@ TESTCASES += test_cache.tst TESTCASES += test_clamps.tst TESTCASES += test_extui.tst TESTCASES += test_fail.tst +TESTCASES += test_flix.tst TESTCASES += test_interrupt.tst TESTCASES += test_loop.tst TESTCASES += test_mac16.tst diff --git a/tests/tcg/xtensa/test_flix.S b/tests/tcg/xtensa/test_flix.S new file mode 100644 index 000000000000..7c259e701897 --- /dev/null +++ b/tests/tcg/xtensa/test_flix.S @@ -0,0 +1,60 @@ +#include "macros.inc" + +test_suite flix + +#if XCHAL_HAVE_FLIX3 + +test misc + { + mov a3, a4 + mov a2, a3 + nop + } + { + nop + bne.w18 a2, a3, 1f + } + movi a2, 1f + { + mov a2, a3 + mov a3, a2 + nop + } + { + l32i a2, a3, 0 + add a4, a4, a2 + nop + } + { + mov a3, a4 + jx a3 + nop + } +1: +test_end + +test sum + + movi a2, 0 + movi a3, 2f + movi a4, 0 + movi a5, 4 + + loop a5, 1f + { + l32i a2, a3, 0 + addi a3, a3, 4 + add a4, a4, a2 + } +1: + add a4, a4, a2 + assert eqi, a4, 10 + .data +2: + .word 1, 2, 3, 4 + .previous +test_end + +#endif + +test_suite_end