From patchwork Sun May 29 22:59:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: peer.adelt@c-lab.de X-Patchwork-Id: 9140017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 22FEA60755 for ; Sun, 29 May 2016 23:10:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07E252015F for ; Sun, 29 May 2016 23:10:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDD8F28188; Sun, 29 May 2016 23:10:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 566CF2015F for ; Sun, 29 May 2016 23:10:36 +0000 (UTC) Received: from localhost ([::1]:57197 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b79qt-00035b-6D for patchwork-qemu-devel@patchwork.kernel.org; Sun, 29 May 2016 19:10:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b79qY-00033O-1d for qemu-devel@nongnu.org; Sun, 29 May 2016 19:10:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b79qS-00065W-VP for qemu-devel@nongnu.org; Sun, 29 May 2016 19:10:12 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:42017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b79qS-00065G-OX for qemu-devel@nongnu.org; Sun, 29 May 2016 19:10:08 -0400 Received: from tweenies.uni-paderborn.de ([131.234.189.21] helo=localhost.localdomain) by mail.uni-paderborn.de with esmtp (Exim 4.84_2 hoth) id 1b79qS-0004eo-Q4 for qemu-devel@nongnu.org; Mon, 30 May 2016 01:10:08 +0200 Received: from mail.uni-paderborn.de by tweenies with queue id 1136310-4 for qemu-devel@nongnu.org; Sun, 29 May 2016 22:59:38 GMT Received: from adelt@mail.uni-paderborn.de (aftr-37-201-214-239.unity-media.net [37.201.214.239]) by mail.uni-paderborn.de with SMTP id 1b79gI-0001R8-NJ; Sun, 29 May 2016 22:59:38 GMT (envelope-from adelt@mail.uni-paderborn.de) X-Envelope-From: Received: from aftr-37-201-214-239.unity-media.net ([37.201.214.239] helo=arbeitstier.patch.net) by mail.uni-paderborn.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2 nylar) id 1b79gI-0001R8-NJ; Mon, 30 May 2016 00:59:38 +0200 From: peer.adelt@c-lab.de To: qemu-devel@nongnu.org Date: Mon, 30 May 2016 00:59:28 +0200 Message-Id: <1464562768-8954-5-git-send-email-peer.adelt@c-lab.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464562768-8954-1-git-send-email-peer.adelt@c-lab.de> References: <1464562768-8954-1-git-send-email-peer.adelt@c-lab.de> X-PMX-Version: 6.3.0.2556906, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.5.29.225116 X-IMT-Spam-Score: 0.0 () X-IMT-Authenticated-Sender: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 131.234.142.9 Subject: [Qemu-devel] [PATCH 4/4] target-tricore: Added new JNE instruction 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: kbastian@mail.uni-paderborn.de, Peer Adelt Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Peer Adelt If D[15] is != sign_ext(const4) then PC will be set to (PC + zero_ext(disp4 + 16)). Signed-off-by: Peer Adelt --- target-tricore/translate.c | 1 + target-tricore/tricore-opcodes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 2145f64..9ad9fcc 100644 --- a/target-tricore/translate.c +++ b/target-tricore/translate.c @@ -3363,6 +3363,7 @@ static void gen_compute_branch(DisasContext *ctx, uint32_t opc, int r1, gen_branch_condi(ctx, TCG_COND_EQ, cpu_gpr_d[15], constant, offset); break; case OPC1_16_SBC_JNE: + case OPC1_16_SBC_JNE16: gen_branch_condi(ctx, TCG_COND_NE, cpu_gpr_d[15], constant, offset); break; /* SBRN-format jumps */ diff --git a/target-tricore/tricore-opcodes.h b/target-tricore/tricore-opcodes.h index 2f25613..7925354 100644 --- a/target-tricore/tricore-opcodes.h +++ b/target-tricore/tricore-opcodes.h @@ -318,6 +318,7 @@ enum { OPC1_16_SBR_JLEZ = 0x8e, OPC1_16_SBR_JLTZ = 0x0e, OPC1_16_SBC_JNE = 0x5e, + OPC1_16_SBC_JNE16 = 0xde, OPC1_16_SBR_JNE = 0x7e, OPC1_16_SB_JNZ = 0xee, OPC1_16_SBR_JNZ = 0xf6,