From nobody Fri Oct 24 21:59:45 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 1519992003963512.8827135614596; Fri, 2 Mar 2018 04:00:03 -0800 (PST) Received: from localhost ([::1]:34379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erjM3-000341-58 for importer@patchew.org; Fri, 02 Mar 2018 07:00:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erjK2-0001oF-Ol for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erjJy-0001zW-ON for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:58 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:46788) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erjJy-0001xu-Dh for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:54 -0500 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=RM8/e2LIKHFCIyjcsoWDcJ2qyUQ43Trroi0ECJztAhU=; b=ZB2KEeTKOTVWxx5K3xA1Lykih st0GLyBdsQGCYYpjjq1SP5QT6zSPGNORvOYk/X9ZsQuqEP7/RayzNY7E4yFinorN27UbGgnXNpKQF wCNuSrU7C4KVmrYKfWmlo5TZF8T1PvklmeOgDZ3I5f5dYeacOpUHV9qmMjRoFX/wahMsU=; From: Bastian Koppelmann To: peter.maydell@linaro.org Date: Fri, 2 Mar 2018 12:57:40 +0100 Message-Id: <20180302115743.3409-2-kbastian@mail.uni-paderborn.de> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180302115743.3409-1-kbastian@mail.uni-paderborn.de> References: <20180302115743.3409-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.3.2.115116, AntiVirus-Engine: 5.46.1.0, AntiVirus-Data: 2018.2.23.5461000 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] [PULL 1/4] target/tricore: added JNE/JEQ/MOV variant 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: Florian Artmeier , David Brenken , qemu-devel@nongnu.org, Georg Hofstetter 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" From: David Brenken Signed-off-by: David Brenken Signed-off-by: Florian Artmeier Signed-off-by: Georg Hofstetter Message-Id: <20180301155619.8640-2-david.brenken@efs-auto.org> Signed-off-by: Bastian Koppelmann [BK: Fixed commit message, to reflect which insn were added] --- target/tricore/translate.c | 27 +++++++++++++++++++++++++++ target/tricore/tricore-opcodes.h | 3 +++ 2 files changed, 30 insertions(+) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 4e5b083665..54de0dd346 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -3389,10 +3389,18 @@ static void gen_compute_branch(DisasContext *ctx, u= int32_t opc, int r1, gen_branch_cond(ctx, TCG_COND_EQ, cpu_gpr_d[r1], cpu_gpr_d[15], offset); break; + case OPC1_16_SBR_JEQ2: + gen_branch_cond(ctx, TCG_COND_EQ, cpu_gpr_d[r1], cpu_gpr_d[15], + offset + 16); + break; case OPC1_16_SBR_JNE: gen_branch_cond(ctx, TCG_COND_NE, cpu_gpr_d[r1], cpu_gpr_d[15], offset); break; + case OPC1_16_SBR_JNE2: + gen_branch_cond(ctx, TCG_COND_NE, cpu_gpr_d[r1], cpu_gpr_d[15], + offset + 16); + break; case OPC1_16_SBR_JNZ: gen_branch_condi(ctx, TCG_COND_NE, cpu_gpr_d[r1], 0, offset); break; @@ -4121,6 +4129,16 @@ static void decode_16Bit_opc(CPUTriCoreState *env, D= isasContext *ctx) gen_compute_branch(ctx, op1, 0, 0, const16, address); break; /* SBR-format */ + case OPC1_16_SBR_JEQ2: + case OPC1_16_SBR_JNE2: + if (tricore_feature(env, TRICORE_FEATURE_16)) { + r1 =3D MASK_OP_SBR_S2(ctx->opcode); + address =3D MASK_OP_SBR_DISP4(ctx->opcode); + gen_compute_branch(ctx, op1, r1, 0, 0, address); + } else { + generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC); + } + break; case OPC1_16_SBR_JEQ: case OPC1_16_SBR_JGEZ: case OPC1_16_SBR_JGTZ: @@ -6256,6 +6274,15 @@ static void decode_rr_accumulator(CPUTriCoreState *e= nv, DisasContext *ctx) generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC); } break; + case OPC2_32_RR_MOVS_64: + if (tricore_feature(env, TRICORE_FEATURE_16)) { + CHECK_REG_PAIR(r3); + tcg_gen_mov_tl(cpu_gpr_d[r3], cpu_gpr_d[r2]); + tcg_gen_sari_tl(cpu_gpr_d[r3 + 1], cpu_gpr_d[r2], 31); + } else { + generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC); + } + break; case OPC2_32_RR_NE: tcg_gen_setcond_tl(TCG_COND_NE, cpu_gpr_d[r3], cpu_gpr_d[r1], cpu_gpr_d[r2]); diff --git a/target/tricore/tricore-opcodes.h b/target/tricore/tricore-opco= des.h index 08394b85ac..2c3baab694 100644 --- a/target/tricore/tricore-opcodes.h +++ b/target/tricore/tricore-opcodes.h @@ -313,6 +313,7 @@ enum { OPC1_16_SBC_JEQ =3D 0x1e, OPC1_16_SBC_JEQ2 =3D 0x9e, OPC1_16_SBR_JEQ =3D 0x3e, + OPC1_16_SBR_JEQ2 =3D 0xbe, OPC1_16_SBR_JGEZ =3D 0xce, OPC1_16_SBR_JGTZ =3D 0x4e, OPC1_16_SR_JI =3D 0xdc, @@ -321,6 +322,7 @@ enum { OPC1_16_SBC_JNE =3D 0x5e, OPC1_16_SBC_JNE2 =3D 0xde, OPC1_16_SBR_JNE =3D 0x7e, + OPC1_16_SBR_JNE2 =3D 0xfe, OPC1_16_SB_JNZ =3D 0xee, OPC1_16_SBR_JNZ =3D 0xf6, OPC1_16_SBR_JNZ_A =3D 0x7c, @@ -1064,6 +1066,7 @@ enum { OPC2_32_RR_MIN_H =3D 0x78, OPC2_32_RR_MIN_HU =3D 0x79, OPC2_32_RR_MOV =3D 0x1f, + OPC2_32_RR_MOVS_64 =3D 0x80, OPC2_32_RR_MOV_64 =3D 0x81, OPC2_32_RR_NE =3D 0x11, OPC2_32_RR_OR_EQ =3D 0x27, --=20 2.16.2 From nobody Fri Oct 24 21:59:45 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 151999218366853.48082387933346; Fri, 2 Mar 2018 04:03:03 -0800 (PST) Received: from localhost ([::1]:34398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erjOw-0005mH-Pc for importer@patchew.org; Fri, 02 Mar 2018 07:03:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erjK2-0001oE-OM for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erjJy-0001zg-Ov for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:58 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:46782) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erjJy-0001xx-Ej for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:54 -0500 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=cnCnrG4qbDJ8XFbWmDm4CBZI+Ijuz2/4L6xQlo0Iy9A=; b=cviOFt96MolfMvnKJiwVIT+0k FPhdwRK4NLfWdc1u+gLkLfPuWZ8ESSIPtJYvP9k0RxiQdRDKeb6UUZUJrSirWgCmXeRdgTKz1m6X5 vjjgmWl9LLbUEHdzsHegfKA+y2W4D5EkDvg7FB5oUXxUeTfXgB2rGShu91eULtyD2IETI=; From: Bastian Koppelmann To: peter.maydell@linaro.org Date: Fri, 2 Mar 2018 12:57:41 +0100 Message-Id: <20180302115743.3409-3-kbastian@mail.uni-paderborn.de> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180302115743.3409-1-kbastian@mail.uni-paderborn.de> References: <20180302115743.3409-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.3.2.115116, AntiVirus-Engine: 5.46.1.0, AntiVirus-Data: 2018.2.23.5461000 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] [PULL 2/4] tricore: added CORE_ID 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: Florian Artmeier , David Brenken , qemu-devel@nongnu.org, Georg Hofstetter 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" From: David Brenken Signed-off-by: David Brenken Signed-off-by: Florian Artmeier Signed-off-by: Georg Hofstetter Message-Id: <20180301155619.8640-3-david.brenken@efs-auto.org> Signed-off-by: Bastian Koppelmann --- target/tricore/cpu.h | 1 + target/tricore/csfr.def | 1 + 2 files changed, 2 insertions(+) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index e7dfe4bcc6..045126181a 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -58,6 +58,7 @@ struct CPUTriCoreState { uint32_t PC; uint32_t SYSCON; uint32_t CPU_ID; + uint32_t CORE_ID; uint32_t BIV; uint32_t BTV; uint32_t ISP; diff --git a/target/tricore/csfr.def b/target/tricore/csfr.def index 05c45dd628..ff004cbddc 100644 --- a/target/tricore/csfr.def +++ b/target/tricore/csfr.def @@ -10,6 +10,7 @@ A(0xfe00, PCXI, TRICORE_FEATURE_13) A(0xfe08, PC, TRICORE_FEATURE_13) A(0xfe14, SYSCON, TRICORE_FEATURE_13) R(0xfe18, CPU_ID, TRICORE_FEATURE_13) +R(0xfe1c, CORE_ID, TRICORE_FEATURE_161) E(0xfe20, BIV, TRICORE_FEATURE_13) E(0xfe24, BTV, TRICORE_FEATURE_13) E(0xfe28, ISP, TRICORE_FEATURE_13) --=20 2.16.2 From nobody Fri Oct 24 21:59:45 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 1519992005977971.1919101361034; Fri, 2 Mar 2018 04:00:05 -0800 (PST) Received: from localhost ([::1]:34378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erjM1-00032f-82 for importer@patchew.org; Fri, 02 Mar 2018 07:00:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erjK2-0001oD-Kw for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erjJy-0001zT-P3 for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:58 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:46786) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erjJy-0001xw-Dt for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:54 -0500 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=ooa0Ypo0Pn1iLB6TPYc+gLS2CnIXZTzJ8oWpZUR5Kl4=; b=Hb8H9QZCTBx9NZXw8ALGLAFbj xjHrGkaLtoRUtoaay/MUL2PnvCgr1jgEECaJU51KF7cxWz88g+sFKIczLLIocWeL1jq0ynxnRCj7j hazPnxZivI+pYt/DPmTi4/h/PeCf/0GDP1+LP++PN/qx/5GUDxZI09y+p+4ZUmGsfxiTo=; From: Bastian Koppelmann To: peter.maydell@linaro.org Date: Fri, 2 Mar 2018 12:57:42 +0100 Message-Id: <20180302115743.3409-4-kbastian@mail.uni-paderborn.de> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180302115743.3409-1-kbastian@mail.uni-paderborn.de> References: <20180302115743.3409-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.3.2.115116, AntiVirus-Engine: 5.46.1.0, AntiVirus-Data: 2018.2.23.5461000 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] [PULL 3/4] tricore: renamed masking of IE 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: Florian Artmeier , David Brenken , qemu-devel@nongnu.org, Georg Hofstetter 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" From: David Brenken between 1.3 ISA and 1.6 ISA the IE mask has changed. We reflect this by add= an ISA suffix to the existing mask and add the corresponding mask for 1.6. Signed-off-by: David Brenken Signed-off-by: Florian Artmeier Signed-off-by: Georg Hofstetter Message-Id: <20180301155619.8640-4-david.brenken@efs-auto.org> Signed-off-by: Bastian Koppelmann [BK: Add why we did this change to the commit message] --- target/tricore/cpu.h | 3 ++- target/tricore/op_helper.c | 17 +++++++++-------- target/tricore/translate.c | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index 045126181a..6d89f625d0 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -256,7 +256,8 @@ void tricore_cpu_dump_state(CPUState *cpu, FILE *f, #define MASK_CPUID_REV 0x000000ff =20 #define MASK_ICR_PIPN 0x00ff0000 -#define MASK_ICR_IE 0x00000100 +#define MASK_ICR_IE_1_3 0x00000100 +#define MASK_ICR_IE_1_6 0x00008000 #define MASK_ICR_CCPN 0x000000ff =20 #define MASK_FCX_FCXS 0x000f0000 diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index 098f217c2a..475b6ce081 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -85,7 +85,7 @@ raise_exception_sync_internal(CPUTriCoreState *env, uint3= 2_t class, int tin, =20 /* PCXI.PIE =3D ICR.IE */ env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + - ((env->ICR & MASK_ICR_IE) << 15)); + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.PCPN =3D ICR.CCPN */ env->PCXI =3D (env->PCXI & 0xffffff) + ((env->ICR & MASK_ICR_CCPN) << 24); @@ -2465,7 +2465,7 @@ void helper_call(CPUTriCoreState *env, uint32_t next_= pc) ((env->ICR & MASK_ICR_CCPN) << 24); /* PCXI.PIE =3D ICR.IE; */ env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + - ((env->ICR & MASK_ICR_IE) << 15)); + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.UL =3D 1; */ env->PCXI |=3D MASK_PCXI_UL; =20 @@ -2563,7 +2563,7 @@ void helper_bisr(CPUTriCoreState *env, uint32_t const= 9) ((env->ICR & MASK_ICR_CCPN) << 24); /* PCXI.PIE =3D ICR.IE */ env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + - ((env->ICR & MASK_ICR_IE) << 15)); + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.UL =3D 0 */ env->PCXI &=3D ~(MASK_PCXI_UL); /* PCXI[19: 0] =3D FCX[19: 0] */ @@ -2571,7 +2571,7 @@ void helper_bisr(CPUTriCoreState *env, uint32_t const= 9) /* FXC[19: 0] =3D new_FCX[19: 0] */ env->FCX =3D (env->FCX & 0xfff00000) + (new_FCX & 0xfffff); /* ICR.IE =3D 1 */ - env->ICR |=3D MASK_ICR_IE; + env->ICR |=3D MASK_ICR_IE_1_3; =20 env->ICR |=3D const9; /* ICR.CCPN =3D const9[7: 0];*/ =20 @@ -2603,7 +2603,8 @@ void helper_rfe(CPUTriCoreState *env) } env->PC =3D env->gpr_a[11] & ~0x1; /* ICR.IE =3D PCXI.PIE; */ - env->ICR =3D (env->ICR & ~MASK_ICR_IE) + ((env->PCXI & MASK_PCXI_PIE) = >> 15); + env->ICR =3D (env->ICR & ~MASK_ICR_IE_1_3) + + ((env->PCXI & MASK_PCXI_PIE) >> 15); /* ICR.CCPN =3D PCXI.PCPN; */ env->ICR =3D (env->ICR & ~MASK_ICR_CCPN) + ((env->PCXI & MASK_PCXI_PCPN) >> 24); @@ -2627,7 +2628,7 @@ void helper_rfm(CPUTriCoreState *env) { env->PC =3D (env->gpr_a[11] & ~0x1); /* ICR.IE =3D PCXI.PIE; */ - env->ICR =3D (env->ICR & ~MASK_ICR_IE) | + env->ICR =3D (env->ICR & ~MASK_ICR_IE_1_3) | ((env->PCXI & MASK_PCXI_PIE) >> 15); /* ICR.CCPN =3D PCXI.PCPN; */ env->ICR =3D (env->ICR & ~MASK_ICR_CCPN) | @@ -2694,7 +2695,7 @@ void helper_svlcx(CPUTriCoreState *env) ((env->ICR & MASK_ICR_CCPN) << 24); /* PCXI.PIE =3D ICR.IE; */ env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + - ((env->ICR & MASK_ICR_IE) << 15)); + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.UL =3D 0; */ env->PCXI &=3D ~MASK_PCXI_UL; =20 @@ -2737,7 +2738,7 @@ void helper_svucx(CPUTriCoreState *env) ((env->ICR & MASK_ICR_CCPN) << 24); /* PCXI.PIE =3D ICR.IE; */ env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + - ((env->ICR & MASK_ICR_IE) << 15)); + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.UL =3D 1; */ env->PCXI |=3D MASK_PCXI_UL; =20 diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 54de0dd346..aef0d9cf06 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -8379,12 +8379,12 @@ static void decode_sys_interrupts(CPUTriCoreState *= env, DisasContext *ctx) /* raise EXCP_DEBUG */ break; case OPC2_32_SYS_DISABLE: - tcg_gen_andi_tl(cpu_ICR, cpu_ICR, ~MASK_ICR_IE); + tcg_gen_andi_tl(cpu_ICR, cpu_ICR, ~MASK_ICR_IE_1_3); break; case OPC2_32_SYS_DSYNC: break; case OPC2_32_SYS_ENABLE: - tcg_gen_ori_tl(cpu_ICR, cpu_ICR, MASK_ICR_IE); + tcg_gen_ori_tl(cpu_ICR, cpu_ICR, MASK_ICR_IE_1_3); break; case OPC2_32_SYS_ISYNC: break; --=20 2.16.2 From nobody Fri Oct 24 21:59:45 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 1519992002287924.8794305538859; Fri, 2 Mar 2018 04:00:02 -0800 (PST) Received: from localhost ([::1]:34377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erjM1-00032d-H4 for importer@patchew.org; Fri, 02 Mar 2018 07:00:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erjK2-0001oC-Kw for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erjJy-0001zk-P9 for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:58 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:46776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erjJy-0001xt-Dd for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:57:54 -0500 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=GuYM5AN4rXrWuOB7/I6U/k5nPd1l/xwu5hrJdBwJP1o=; b=CM0EAchM1AUo6USy4wkcKsUUs /i/2vCWNMCfFzAMbVAqWWn+kH2pAM9QoFrIOXznbiwqGLbamjCKtloZ0lvGhhQErDHfYooZQQbLS9 xPwhB9q1QkuI60cJeaCNqjaaYb8SmvQ3JMUQHr/a4ZzTTliIkLpfUpjwH1cyWTeoS1dPE=; From: Bastian Koppelmann To: peter.maydell@linaro.org Date: Fri, 2 Mar 2018 12:57:43 +0100 Message-Id: <20180302115743.3409-5-kbastian@mail.uni-paderborn.de> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180302115743.3409-1-kbastian@mail.uni-paderborn.de> References: <20180302115743.3409-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.3.2.115116, AntiVirus-Engine: 5.46.1.0, AntiVirus-Data: 2018.2.23.5461000 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] [PULL 4/4] tricore: renamed masking of PIE 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: Florian Artmeier , David Brenken , qemu-devel@nongnu.org, Georg Hofstetter 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" From: David Brenken between 1.3 ISA and 1.6 ISA the IE mask has changed. We reflect this by add= an ISA suffix to the existing mask and add the corresponding mask for 1.6. Signed-off-by: David Brenken Signed-off-by: Florian Artmeier Signed-off-by: Georg Hofstetter Message-Id: <20180301155619.8640-5-david.brenken@efs-auto.org> Signed-off-by: Bastian Koppelmann [BK: Added why we made this change to the commit message] --- target/tricore/cpu.h | 3 ++- target/tricore/op_helper.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index 6d89f625d0..07b8b59f58 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -229,7 +229,8 @@ void tricore_cpu_dump_state(CPUState *cpu, FILE *f, =20 =20 #define MASK_PCXI_PCPN 0xff000000 -#define MASK_PCXI_PIE 0x00800000 +#define MASK_PCXI_PIE_1_3 0x00800000 +#define MASK_PCXI_PIE_1_6 0x00200000 #define MASK_PCXI_UL 0x00400000 #define MASK_PCXI_PCXS 0x000f0000 #define MASK_PCXI_PCXO 0x0000ffff diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index 475b6ce081..16955f273e 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -84,7 +84,7 @@ raise_exception_sync_internal(CPUTriCoreState *env, uint3= 2_t class, int tin, ICR.IE and ICR.CCPN are saved */ =20 /* PCXI.PIE =3D ICR.IE */ - env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + + env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE_1_3) + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.PCPN =3D ICR.CCPN */ env->PCXI =3D (env->PCXI & 0xffffff) + @@ -2464,7 +2464,7 @@ void helper_call(CPUTriCoreState *env, uint32_t next_= pc) env->PCXI =3D (env->PCXI & 0xffffff) + ((env->ICR & MASK_ICR_CCPN) << 24); /* PCXI.PIE =3D ICR.IE; */ - env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + + env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE_1_3) + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.UL =3D 1; */ env->PCXI |=3D MASK_PCXI_UL; @@ -2562,7 +2562,7 @@ void helper_bisr(CPUTriCoreState *env, uint32_t const= 9) env->PCXI =3D (env->PCXI & 0xffffff) + ((env->ICR & MASK_ICR_CCPN) << 24); /* PCXI.PIE =3D ICR.IE */ - env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + + env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE_1_3) + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.UL =3D 0 */ env->PCXI &=3D ~(MASK_PCXI_UL); @@ -2604,7 +2604,7 @@ void helper_rfe(CPUTriCoreState *env) env->PC =3D env->gpr_a[11] & ~0x1; /* ICR.IE =3D PCXI.PIE; */ env->ICR =3D (env->ICR & ~MASK_ICR_IE_1_3) - + ((env->PCXI & MASK_PCXI_PIE) >> 15); + + ((env->PCXI & MASK_PCXI_PIE_1_3) >> 15); /* ICR.CCPN =3D PCXI.PCPN; */ env->ICR =3D (env->ICR & ~MASK_ICR_CCPN) + ((env->PCXI & MASK_PCXI_PCPN) >> 24); @@ -2628,8 +2628,8 @@ void helper_rfm(CPUTriCoreState *env) { env->PC =3D (env->gpr_a[11] & ~0x1); /* ICR.IE =3D PCXI.PIE; */ - env->ICR =3D (env->ICR & ~MASK_ICR_IE_1_3) | - ((env->PCXI & MASK_PCXI_PIE) >> 15); + env->ICR =3D (env->ICR & ~MASK_ICR_IE_1_3) + | ((env->PCXI & MASK_PCXI_PIE_1_3) >> 15); /* ICR.CCPN =3D PCXI.PCPN; */ env->ICR =3D (env->ICR & ~MASK_ICR_CCPN) | ((env->PCXI & MASK_PCXI_PCPN) >> 24); @@ -2694,7 +2694,7 @@ void helper_svlcx(CPUTriCoreState *env) env->PCXI =3D (env->PCXI & 0xffffff) + ((env->ICR & MASK_ICR_CCPN) << 24); /* PCXI.PIE =3D ICR.IE; */ - env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + + env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE_1_3) + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.UL =3D 0; */ env->PCXI &=3D ~MASK_PCXI_UL; @@ -2737,7 +2737,7 @@ void helper_svucx(CPUTriCoreState *env) env->PCXI =3D (env->PCXI & 0xffffff) + ((env->ICR & MASK_ICR_CCPN) << 24); /* PCXI.PIE =3D ICR.IE; */ - env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE) + + env->PCXI =3D ((env->PCXI & ~MASK_PCXI_PIE_1_3) + ((env->ICR & MASK_ICR_IE_1_3) << 15)); /* PCXI.UL =3D 1; */ env->PCXI |=3D MASK_PCXI_UL; --=20 2.16.2