From nobody Wed Feb 11 02:12:33 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=mail.uni-paderborn.de ARC-Seal: i=1; a=rsa-sha256; t=1614966717; cv=none; d=zohomail.com; s=zohoarc; b=U6osANhN49g7zSEzttj0b+9+v9xiKdci0y5u17UYQLh0H2Qc70BNvzqtQdl/iqA40opMM3T4+bbFTVUy7qZ1vVNKM+3HingsTCsDZBva23zTiTc0wlaw7xPTCmpkfAOqwgCtwzdAbXmeBvc2C7JZC8SAZ/fvHexPScqkWuVv1Nc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614966717; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GR21nh1RzlAOaj2hpe4VWEy26dfG0L2HZZt//kJsN2M=; b=KWCDe38NPzC1pwwKW2FXopoV1H1cmtvIV9VkkYTBljn74KiKyV1NMGWpi3PnFDQydE2XhHDyT38EEl1cYWKm2RLn1zxwBM9HPVZIkeZb29vLYO3LRq4asYofbDOj/RnmCCUjdbuJLcJ4FayAMmG8m3dh7eJFb9ETKYjTx6Q9Kuw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614966717192279.42909423664105; Fri, 5 Mar 2021 09:51:57 -0800 (PST) Received: from localhost ([::1]:55770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIEcE-00082p-Tc for importer@patchew.org; Fri, 05 Mar 2021 12:51:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIDpM-0003op-OM for qemu-devel@nongnu.org; Fri, 05 Mar 2021 12:01:24 -0500 Received: from collins.uni-paderborn.de ([2001:638:502:c003::14]:43576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIDpH-0001CG-3o for qemu-devel@nongnu.org; Fri, 05 Mar 2021 12:01:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.uni-paderborn.de; s=20170601; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GR21nh1RzlAOaj2hpe4VWEy26dfG0L2HZZt//kJsN2M=; b=VLoKJxgWxDKhIuN6hQrMGWnQZn 2Og3tSvITXfGqnPnJPCoAPTcmsd4zSNNKxHfvnTBh7xwlaLNIUIm9WH4oeAqMQNoFw/m8HlPWPDMP oWoumewVt9Cepyg+eNuOsgsLWv5JAxYpxOJ+wKHT5J4DC10c0y1n4tdxK25qjZy321zo=; X-Envelope-From: From: Bastian Koppelmann To: qemu-devel@nongnu.org Subject: [PATCH v3 13/15] tests/tcg/tricore: Add madd test Date: Fri, 5 Mar 2021 18:00:43 +0100 Message-Id: <20210305170045.869437-14-kbastian@mail.uni-paderborn.de> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305170045.869437-1-kbastian@mail.uni-paderborn.de> References: <20210305170045.869437-1-kbastian@mail.uni-paderborn.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-PMX-Version: 6.4.9.2830568, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2021.3.5.165117, AntiVirus-Engine: 5.80.0, AntiVirus-Data: 2021.2.8.5800000 X-Sophos-SenderHistory: ip=2a02:908:2214:e5bc::95d, fs=30601059, da=102572740, mc=553, sc=4, hc=549, sp=0, fso=30601059, re=0, sd=0, hd=0 X-IMT-Spam-Score: 0.0 () X-IMT-Authenticated-Sender: uid=kbastian,ou=People,o=upb,c=de Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:638:502:c003::14; envelope-from=kbastian@mail.uni-paderborn.de; helo=collins.uni-paderborn.de X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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: kbastian@mail.uni-paderborn.de, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Tested-by: Alex Benn=C3=A9e Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/Makefile.softmmu-target.orig | 1 + tests/tcg/tricore/macros.h | 18 ++++++++++++++++++ tests/tcg/tricore/test_madd.S | 11 +++++++++++ 4 files changed, 31 insertions(+) create mode 100644 tests/tcg/tricore/test_madd.S 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 +=3D test_dvstep.tst TESTS +=3D test_fadd.tst TESTS +=3D test_fmul.tst TESTS +=3D test_ftoi.tst +TESTS +=3D test_madd.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 diff --git a/tests/tcg/tricore/Makefile.softmmu-target.orig b/tests/tcg/tri= core/Makefile.softmmu-target.orig index 34da1f37de..fcc7b6c1c9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target.orig +++ b/tests/tcg/tricore/Makefile.softmmu-target.orig @@ -9,6 +9,7 @@ TESTS +=3D test_clz.tst TESTS +=3D test_dvstep.tst TESTS +=3D test_fadd.tst TESTS +=3D test_fmul.tst +TESTS +=3D test_ftoi.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 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; \ ) =20 +#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/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, 0x7ffff= fff,2) + TEST_D_DDI_PSW(madd, 2, 0xffff7fff, 0x60000b80, 0xffff8001, 0x7ffff= fff,2) + TEST_D_DDD_PSW(madds.u, 3, 0xffffffff, 0x60000b80, 0x00000000, 0x80000= 000, \ + 0x80000000) + + TEST_PASSFAIL + --=20 2.30.1