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 +