From patchwork Tue May 4 10:02: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: 430866 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3661820jao; Tue, 4 May 2021 03:33:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf3FrNS8P9YyzckK0U1MY9o4xkWEqwyfC+AYdg1DxXadrcm/dlNiZLrXOto95wu8/hyfST X-Received: by 2002:a05:622a:342:: with SMTP id r2mr21431155qtw.232.1620124406713; Tue, 04 May 2021 03:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620124406; cv=none; d=google.com; s=arc-20160816; b=r4ip+o091amBBlu/CtdizthJ4AMKzR+sjQUv0a74TLHzS0suO+kTDl7f6avRH4n4Lb 8x/gcGidLCxsVewNt4Rt2tD1DvllBoexR7YqakWgLhe5p9GQXbo7D4iB1yVrv3Rlm2j6 99x6vG79p7CrtQuEEYBGkzgd43TlNa2jfKSjbFD3sfjjwHc/BcmUFQpFMtUfqdWdxJw6 7/6DJ0ItbZ1sI9E+IIy1bvvzwywZ3yGrDHambKJec+QAayKIcA2zRB2KrTO5SnPlfE0V 3l/zBq9RFWu7BaaBFx0jh6qSKFU40YG5OVPojnzI138DCNptcRSCyWI2AkcCVp9AsYT+ A1Bg== 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=N52YWnuZLlPx8wUlhZrUjpPfF72LihVfzT4a0wPQRGQ=; b=NND3K+Fe0ZKpX7GUQ/IyYBHNvha5yGtlfBZVJWGg1w0at+jCN1FdVbvl956LaJRhLv OrIi5VALmXkI53fTaBVm2Qc8wG7BL5CQwu4gsaDYc6b7pvzccGn/9dGg1jJn24aBQcxH ph+tQzPUu/jKzA/I/XBaO3fnBaQMSu3ThmeTVYU14OMe5YY9b0Y+ZWC5OGs65vSaE9/Y H5J2/CdYTllSWedhY6x12JX78fTKW54KyaIegt0DqXYVObXqugEeWm5wkNRGTpZc6r5M MJ5B+ZvmKXICo5QWV+S1RXgTRSP6Q5CBQmgqF2Qjxk9gXQFQmM9ozZ4n1wm1XrkgUkFO dwjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ml4+k5nh; 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 k4si2067732qtj.384.2021.05.04.03.33.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 May 2021 03:33: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=ml4+k5nh; 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]:36010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldsMo-0004cc-5N for patch@linaro.org; Tue, 04 May 2021 06:33:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lds9I-00066m-0U for qemu-devel@nongnu.org; Tue, 04 May 2021 06:19:28 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:51087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lds9G-0003kJ-0i for qemu-devel@nongnu.org; Tue, 04 May 2021 06:19:27 -0400 Received: by mail-wm1-x32f.google.com with SMTP id n84so5046074wma.0 for ; Tue, 04 May 2021 03:19:25 -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=N52YWnuZLlPx8wUlhZrUjpPfF72LihVfzT4a0wPQRGQ=; b=ml4+k5nhIAix7ewW6kyv9Y8HfQr2iO8dH+3b2Faqc7tCX2BPR41R6a06f0cXps5DUv byzKcAm/HT7pxW+tdq+ZVdy6kqU7GHuQy/d+9KiIQucKSdNvkPrWxYb2NP7NQdODBiBQ q9+Lc7DidHmZ1YB12JsFzLL0I4nWJa3nv9jcC/vRNTwUwLiGudd/LhDVfvl/f8AVtj1f 9MnCk5wBexPoqAh5+GXC0Z2gkAyUgS7tK7spivThoEbab1UCDnYl4mBZvwtx4UTK24d8 6z0u9Mg5Jjg2FX3V3nw02fC1HX6Zt4NM2Qrd5w38B/mVBq7E98GTMDlfJa1q7pLZeYfw uNIg== 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=N52YWnuZLlPx8wUlhZrUjpPfF72LihVfzT4a0wPQRGQ=; b=GechnXRZCcwB1Bl5c/Jw5kXiaQvAzUMh+F854whNBC3N1/u2hYSmxw4U6vdBbkkbHo 4BjBEExgElVEAiZvnwoA+ZFWiOmtEqsupdQjqhZOJqACrUjOuJZjrtvHQDQb9xiF57Bo /Ail/nVIEqiw2tKkr8Qazu6BHpxJ4vOhYvdx4JtdCgvnlIYbRMTTGV500kY6EGxnSbK8 93h7G/GuO8TwISMKoBCCLkqajnlvB+W91KJdKH+D+98qAw9p3CHV/ApC3Yh1xpDXpfED FbOE0AYY3HNHlop6uz5NY/00fAnXW8kw/OcgPEuHRxbykSh3yYiIISx6/T2sq4ixbuqg eIXg== X-Gm-Message-State: AOAM532EpUpPnvRvzvn9T7VhYtaWGxnFJB68H01+5SJZnB51HZQ2TBzO pmuKU5R9gnxzsRiKSu+m9eDOzQ== X-Received: by 2002:a05:600c:b4c:: with SMTP id k12mr3165039wmr.186.1620123564591; Tue, 04 May 2021 03:19:24 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n5sm11234319wrx.31.2021.05.04.03.19.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 03:19:23 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E70731FFAB; Tue, 4 May 2021 11:02:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 22/30] tests/tcg/tricore: Add ftoi test Date: Tue, 4 May 2021 11:02:15 +0100 Message-Id: <20210504100223.25427-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210504100223.25427-1-alex.bennee@linaro.org> References: <20210504100223.25427-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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: fam@euphon.net, berrange@redhat.com, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net 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> --- tests/tcg/tricore/macros.h | 7 +++++++ tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/test_ftoi.S | 10 ++++++++++ 3 files changed, 18 insertions(+) create mode 100644 tests/tcg/tricore/test_ftoi.S -- 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 +