From patchwork Sat Dec 16 05:32:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82294 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DF9053858C42 for ; Sat, 16 Dec 2023 05:32:18 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 61A0F3858D28 for ; Sat, 16 Dec 2023 05:32:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 61A0F3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 61A0F3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702704726; cv=none; b=YDHeaiX2lJqyB5oF1BMGpQOfAc/+9PixfvveWtmeQMuQWGE/38bMxUFcC5jQtUJrO/4XM7Iq5L2j+Ed2N0lWGqONRIRjv2af1ioDtfp7LCUvaFAYBoV4BNBxox+jLMsdvv5k1AOUzOz8uttElPoWPo2qAGOvPqGrcAM7iS7rHaA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702704726; c=relaxed/simple; bh=+VcDObt9J5ZlJm7gdbcXUgi8IOJMI0hib60m5ioCXUM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=AyTz0bJtOy1fDISP1S+GQGooT2HMzBRM2zhUhhPpF0VZVJclJxFuq34o+06jhYTIT/dZOa1RI3N48uJfLKdldyVedi3nbMUAMesa+v6EIKGG0yUSlTOuuGEIbG+rZkWqTrAKkO+q4dUCcVIi14YfMRnoNuo3LdLZAK+ceqyCT6Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 10FC8335D77; Sat, 16 Dec 2023 05:32:05 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed] sim: cr16: clean up unused insn operands Date: Sat, 16 Dec 2023 00:32:03 -0500 Message-ID: <20231216053203.17084-1-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org The push/pop insns only have 2 operands, so delete unused "c". The pushret/popret insns use 2 operands, but they don't implement the logic directly, they call the push/pop implementations. So delete the unused "a" & "b". --- sim/cr16/simops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c index 73420a7e0c6c..2630847b93c5 100644 --- a/sim/cr16/simops.c +++ b/sim/cr16/simops.c @@ -5465,7 +5465,7 @@ OP_C_C (SIM_DESC sd, SIM_CPU *cpu) void OP_3_9 (SIM_DESC sd, SIM_CPU *cpu) { - uint16_t a = OP[0] + 1, b = OP[1], c = OP[2], i = 0; + uint16_t a = OP[0] + 1, b = OP[1], i = 0; uint32_t tmp, sp_addr = (GPR32 (15)) - (a * 2) - 4, is_regp = 0; trace_input ("push", OP_CONSTANT3, OP_REG, OP_REG); @@ -5585,7 +5585,7 @@ OP_11E_10 (SIM_DESC sd, SIM_CPU *cpu) void OP_5_9 (SIM_DESC sd, SIM_CPU *cpu) { - uint16_t a = OP[0] + 1, b = OP[1], c = OP[2], i = 0; + uint16_t a = OP[0] + 1, b = OP[1], i = 0; uint32_t tmp, sp_addr = (GPR32 (15)), is_regp = 0;; trace_input ("pop", OP_CONSTANT3, OP_REG, OP_REG); @@ -5707,7 +5707,6 @@ OP_21E_10 (SIM_DESC sd, SIM_CPU *cpu) void OP_7_9 (SIM_DESC sd, SIM_CPU *cpu) { - uint16_t a = OP[0], b = OP[1]; trace_input ("popret", OP_CONSTANT3, OP_REG, OP_REG); OP_5_9 (sd, cpu); JMP(((GPR32(14)) << 1) & 0xffffff); @@ -5719,7 +5718,6 @@ OP_7_9 (SIM_DESC sd, SIM_CPU *cpu) void OP_3_8 (SIM_DESC sd, SIM_CPU *cpu) { - uint16_t a = OP[0], b = OP[1]; trace_input ("popret", OP_CONSTANT3, OP_REG, OP_VOID); OP_2_8 (sd, cpu); JMP(((GPR32(14)) << 1) & 0xffffff);