From patchwork Thu Jun 29 06:10:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WANG Xuerui X-Patchwork-Id: 114170 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9426139vqr; Wed, 28 Jun 2023 23:11:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51fPM1SuNvtoHnQr+W4PFF4izJLlgT1NJc+gmrgR5NpvA1ZuGBV7R9Jp299AiX9G9ZVHoP X-Received: by 2002:a17:907:9344:b0:973:93d6:189f with SMTP id bv4-20020a170907934400b0097393d6189fmr33258994ejc.61.1688019064544; Wed, 28 Jun 2023 23:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688019064; cv=none; d=google.com; s=arc-20160816; b=B2V11mFitjOYbeEMWOyQYXwLQKxTGKrqmxpNi7WrO+KQkZtccIUDPAypd0ltvbtEHb S8SWuccZF+mszBqvFH98R0pgOvNy9Ipowt8GxPNpSXZWsnZ2kHcaR0d7xc2F9GgwfdTQ qzck/aUhO4hVjkN1Ly7z8zvJ0fGR2ltD5SbVwj/79FStmtOaAuPcYmIOagoXjIUYHjkH a8URDwzFQ6wWzS8LwrS98btwtxGt3urWjJ1RHgiIf28bdxZFSDbmqQsGZh9Eh8ceuay4 vmU6mDZoQ/pDVwTmXjHPBvz5VrcX65A8fCOW9oWgzFTyma92y6u4VHfzHSICxhy8pimW 5dZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=tOTpC3HLqALOKpvDcn+TGQon6mlOWeSyZPBUhwrzUTM=; fh=F52lMKP/ag7PTpjpGsg79bnedhkoffS1BBUct4g/1x0=; b=xBI9kn4HSCEJFzmivZIBJ7h3RyVcwLoUZof88gw2lVzl5H2nhsm4NN7ZKWs5XCypuM nQPOFtKoobvU2T4uioGrnV5sRa2HNJBoJ1YrNwTgyK324kh3MEQPU9atFE9ZmHkKcWYD rAptm5/20Kd9bsiGqFSYwqapmpyrpTG6ZO/0TuwLiRGYcaRzn05aNAwRXglcaUe6jQKx a9rVAegPMmjsqBMZ0uKyjIV4SwOJqKRTccuE2bMje9OIlCOm8MgVbr9zMoSESw8S6qUZ e2iSSdCKpMJoyfTh0FDE2JL6NhtW4cr4+L5BY98t84XLR776JHYWrrV+51iouCxC2IaS V2qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=jK238N7K; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id hb24-20020a170906b89800b00992305c9c51si2837148ejb.141.2023.06.28.23.11.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 23:11:04 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=jK238N7K; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 94691385842B for ; Thu, 29 Jun 2023 06:10:51 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by sourceware.org (Postfix) with ESMTPS id E091B3858C60 for ; Thu, 29 Jun 2023 06:10:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E091B3858C60 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=1688019038; bh=qJpCGO0cga75uzCh+6z51YQj3R4awV0QbwED+ZzPc1A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jK238N7KASqx9eQ0pjYnqaqT3Tsysc2ZLQf1m3tdODysSo4d21SLFOtgCogc667q2 m7wHnK5SNRA25E8Y9HWPnYtiF8BdBLfNtNqJrx8Hrv4E6p27n8d92rQdzQihngdwb9 PrVL9sCFzvU2+iXTfFDtLEaV7sbjGDA0x8S/VPfk= Received: from ld50.lan (unknown [101.88.25.181]) (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 1125A605CA; Thu, 29 Jun 2023 14:10:38 +0800 (CST) From: WANG Xuerui To: binutils@sourceware.org Cc: Chenghua Xu , Zhensong Liu , Qinggang Meng , Lulu Cheng , Fangrui Song , Xi Ruoyao , WANG Xuerui Subject: [PATCH v6 2/7] opcodes/loongarch: remove unused code Date: Thu, 29 Jun 2023 14:10:24 +0800 Message-Id: <20230629061029.29773-3-i.swmail@xen0n.name> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230629061029.29773-1-i.swmail@xen0n.name> References: <20230629061029.29773-1-i.swmail@xen0n.name> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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, 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: 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: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770016278901247974?= X-GMAIL-MSGID: =?utf-8?q?1770016278901247974?= From: WANG Xuerui Remove some unused declarations and code. include/ChangeLog: * opcode/loongarch.h: Remove unused declarations. opcodes/ChangeLog: * loongarch-dis.c (loongarch_parse_dis_options): Remove. (my_print_address_func): Likewise. (loongarch_disassemble_one): Likewise. Signed-off-by: WANG Xuerui --- 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 60812fb4b1f..e9632ad3361 100644 --- a/include/opcode/loongarch.h +++ b/include/opcode/loongarch.h @@ -176,11 +176,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 3a08da14763..116b6667128 100644 --- a/opcodes/loongarch-dis.c +++ b/opcodes/loongarch-dis.c @@ -322,38 +322,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); -}