From nobody Thu Oct 30 05:35:09 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1525185023208759.0126434804981; Tue, 1 May 2018 07:30:23 -0700 (PDT) Received: from localhost ([::1]:42804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDWIQ-0002ip-E3 for importer@patchew.org; Tue, 01 May 2018 10:30:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDWBD-0004vS-FD for qemu-devel@nongnu.org; Tue, 01 May 2018 10:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDWBB-00037T-VO for qemu-devel@nongnu.org; Tue, 01 May 2018 10:22:55 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:51996) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fDWBB-00036V-MK for qemu-devel@nongnu.org; Tue, 01 May 2018 10:22:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.uni-paderborn.de; s=20170601; h=References:In-Reply-To:Message-Id:Date :Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding: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=ucF0r9sLyXbRuCr6DtIQ0JBiF9yuiR2TPHd60ino1CA=; b=T5bgqRfpRzJat3xaiz9wt37ZI o3Ev73nSmrw7gcY10wHEUJbq792nvQKQFC9xGltpne32tiQDKfZEBFiI5X6F3WgiNxeYXp4xoPm8n /Va43vyLKpne4E+51N7m3ULSWnKAmB20+DkuFCCDkKL+Ymyq7HNMG+psJFVGLw0nlqk7I=; From: Bastian Koppelmann To: qemu-devel@nongnu.org Date: Tue, 1 May 2018 16:22:20 +0200 Message-Id: <20180501142222.19154-11-kbastian@mail.uni-paderborn.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180501142222.19154-1-kbastian@mail.uni-paderborn.de> References: <20180501142222.19154-1-kbastian@mail.uni-paderborn.de> X-IMT-Spam-Score: 0.0 () X-PMX-Version: 6.4.2.2738846, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2018.5.1.141817, AntiVirus-Engine: 5.49.1, AntiVirus-Data: 2018.3.29.5491001 X-IMT-Authenticated-Sender: uid=kbastian,ou=People,o=upb,c=de X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 131.234.142.9 Subject: [Qemu-devel] [RFC PATCH 10/12] tests/tcg/tricore: Add madd test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile | 1 + tests/tcg/tricore/macros.h | 18 ++++++++++++++++++ tests/tcg/tricore/test_madd.S | 11 +++++++++++ 3 files changed, 30 insertions(+) create mode 100644 tests/tcg/tricore/test_madd.S diff --git a/tests/tcg/tricore/Makefile b/tests/tcg/tricore/Makefile index c3c7c59065..2d32ec3077 100644 --- a/tests/tcg/tricore/Makefile +++ b/tests/tcg/tricore/Makefile @@ -15,6 +15,7 @@ TESTCASES +=3D test_dvstep.tst TESTCASES +=3D test_fadd.tst TESTCASES +=3D test_fmul.tst TESTCASES +=3D test_ftoi.tst +TESTCASES +=3D test_madd.tst =20 all: build =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.11.0