From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by sourceware.org (Postfix) with ESMTPS id A31773858400 for ; Tue, 19 Jul 2022 03:04:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A31773858400 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=xen0n.name Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xen0n.name DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1658199842; bh=LiwKsJgvuNSCt/2cBFPQT7cG4VbpB3bWDjJ82jtC8q4=; h=From:To:Cc:Subject:Date:From; b=gpPi6062Hk/faAl8SjXSFUrqVXTDZFiktp7HRXgj7vfRd4/eLiR4YjKee3tfLqn0j yVW/sMAJ+C8RvmKyA1OEMfZBpYECLuQ/ugRf8Bgi2/+wbBH50XTF99SY0tyTVxI1T8 h/53eU6KYWBDKM8Le5Y2Ik/UWiMRAtyvcKYlxYeE= Received: from ld50.lan (unknown [101.228.137.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 900D760104; Tue, 19 Jul 2022 11:04:01 +0800 (CST) From: WANG Xuerui To: binutils@sourceware.org Cc: Chenghua Xu , Zhensong Liu , Xi Ruoyao , WANG Xuerui Subject: [PATCH 1/2] opcodes/loongarch: Remove unused code Date: Tue, 19 Jul 2022 11:03:44 +0800 Message-Id: <20220719030345.1125329-1-i.swmail@xen0n.name> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2022 03:04:06 -0000 From: WANG Xuerui include/ChangeLog * opcode/loongarch.h (loongarch_parse_dis_options): Remove unused declarations. (loongarch_disassemble_one): Likewise. opcodes/ChangeLog * loongarch-dis.c (loongarch_parse_dis_options): Remove unused code. (my_print_address_func): Likewise. (loongarch_disassemble_one): Likewise. Signed-off-by: WANG Xuerui --- include/ChangeLog | 6 ++++++ include/opcode/loongarch.h | 5 ----- opcodes/ChangeLog | 7 +++++++ opcodes/loongarch-dis.c | 35 ----------------------------------- 4 files changed, 13 insertions(+), 40 deletions(-) diff --git a/include/ChangeLog b/include/ChangeLog index f8f7747640e..40cb717906c 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,9 @@ +2022-07-19 WANG Xuerui + + * opcode/loongarch.h (loongarch_parse_dis_options): Remove + unused declarations. + (loongarch_disassemble_one): Likewise. + 2022-07-08 Nick Clifton * 2.39 branch created. diff --git a/include/opcode/loongarch.h b/include/opcode/loongarch.h index c3922348a56..448e5e0bbc4 100644 --- a/include/opcode/loongarch.h +++ b/include/opcode/loongarch.h @@ -172,11 +172,6 @@ dec2 : [1-9][0-9]? extern void loongarch_eliminate_adjacent_repeat_char (char *dest, char c); - extern int loongarch_parse_dis_options (const char *opts_in); - extern void loongarch_disassemble_one ( - int64_t pc, insn_t insn, - int (*fprintf_func) (void *stream, const char *format, ...), void *stream); - extern const char *const loongarch_r_normal_name[32]; extern const char *const loongarch_r_lp64_name[32]; extern const char *const loongarch_r_lp64_name1[32]; diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 3889a80f427..0ad9b5a53f8 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2022-07-19 WANG Xuerui + + * loongarch-dis.c (loongarch_parse_dis_options): Remove + unused code. + (my_print_address_func): Likewise. + (loongarch_disassemble_one): Likewise. + 2022-07-18 Claudiu Zissulescu * disassemble.c (disassemble_init_for_target): Set diff --git a/opcodes/loongarch-dis.c b/opcodes/loongarch-dis.c index 9dcf989d0df..c7c95e9e90f 100644 --- a/opcodes/loongarch-dis.c +++ b/opcodes/loongarch-dis.c @@ -305,38 +305,3 @@ with the -M switch (multiple options should be separated by commas):\n")); numeric Print numeric register names, rather than ABI names.\n")); fprintf (stream, _("\n")); } - -int -loongarch_parse_dis_options (const char *opts_in) -{ - return parse_loongarch_dis_options (opts_in); -} - -static void -my_print_address_func (bfd_vma addr, struct disassemble_info *dinfo) -{ - dinfo->fprintf_func (dinfo->stream, "0x%llx", (long long) addr); -} - -void -loongarch_disassemble_one (int64_t pc, insn_t insn, - int (*fprintf_func) (void *stream, - const char *format, ...), - void *stream) -{ - static struct disassemble_info my_disinfo = - { - .print_address_func = my_print_address_func, - }; - static int not_init_yet = 1; - if (not_init_yet) - { - loongarch_parse_dis_options (NULL); - not_init_yet = 0; - } - - my_disinfo.fprintf_func = fprintf_func; - my_disinfo.stream = stream; - my_disinfo.target = pc; - disassemble_one (insn, &my_disinfo); -} -- 2.35.1