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 0E3D738367BA for ; Wed, 7 Dec 2022 13:32:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0E3D738367BA 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=1670419925; bh=IqbRZ5E3r6d19S0pD19Oki1KM6tx6NanLrQmTquZKws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SAH1cfN06nbE1iw5ub2rVu+kyceho4isk6N9b/8ADT4gCVvZwBwUZAXaz55P3p3vZ NLeJkRHXihWIikorLmaKHx7YO01YW8JYhk7iF/CWOBODQcWlKk8/W0Cu4UcOIfeuF0 lnZOnaAdGPT65vlTIfytvP4Fsrit1CTLF9prsiFs= Received: from ld50.lan (unknown [101.88.134.93]) (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 19E0C6010B; Wed, 7 Dec 2022 21:32:05 +0800 (CST) From: WANG Xuerui To: binutils@sourceware.org Cc: Chenghua Xu , Zhensong Liu , Xi Ruoyao , WANG Xuerui Subject: [PATCH v2 1/5] opcodes/loongarch: remove unused code Date: Wed, 7 Dec 2022 21:31:51 +0800 Message-Id: <20221207133155.3052074-2-i.swmail@xen0n.name> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221207133155.3052074-1-i.swmail@xen0n.name> References: <20221207133155.3052074-1-i.swmail@xen0n.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_BARRACUDACENTRAL,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 List-Id: From: WANG Xuerui Remove some unused declarations and code. --- include/opcode/loongarch.h | 5 ----- opcodes/loongarch-dis.c | 35 ----------------------------------- 2 files changed, 40 deletions(-) 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/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.38.1