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 D6AF73836D31 for ; Wed, 14 Dec 2022 05:52:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D6AF73836D31 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=1670997128; bh=PaynMBGHh80a0E1gOAwHeoWu3YoB9qAq882r8u2b32Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b658DWn1CVtrDN8OVCGijJo4/QvcvDoT6+JFmlGjfNHe8I1UUuozt5c3gnXQnpjL/ cik4wuhglxb7zJw3wJjdsDPm0rBdM/3hDPuME0d/wErIoJzTPU3TvknE/h4gNipkx4 CYNcrhKo2Cr8jP2KMuIMP9IsK9g+6Ni/9OMlMe44= 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 A50FD6019B; Wed, 14 Dec 2022 13:52:08 +0800 (CST) From: WANG Xuerui To: binutils@sourceware.org Cc: Chenghua Xu , Zhensong Liu , Qinggang Meng , Xi Ruoyao , WANG Xuerui Subject: [PATCH v3 2/6] opcodes/loongarch: remove unused code Date: Wed, 14 Dec 2022 13:52:00 +0800 Message-Id: <20221214055204.2890795-3-i.swmail@xen0n.name> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221214055204.2890795-1-i.swmail@xen0n.name> References: <20221214055204.2890795-1-i.swmail@xen0n.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.1 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 251621a239f..645599772eb 100644 --- a/include/opcode/loongarch.h +++ b/include/opcode/loongarch.h @@ -174,11 +174,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 036eb8f2b0f..d0a66e7a2a4 100644 --- a/opcodes/loongarch-dis.c +++ b/opcodes/loongarch-dis.c @@ -313,38 +313,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