From patchwork Wed Jun 28 11:50:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WANG Xuerui X-Patchwork-Id: 113815 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8860641vqr; Wed, 28 Jun 2023 04:51:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HTdp1/4IExokJuOqlwlOq/TkpYIJ78Sf21CLvjnMbpQngrKV76gi4SLuOv+Gs9JCOaIYG X-Received: by 2002:a17:907:75d9:b0:991:d2a8:6588 with SMTP id jl25-20020a17090775d900b00991d2a86588mr6655478ejc.51.1687953107826; Wed, 28 Jun 2023 04:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687953107; cv=none; d=google.com; s=arc-20160816; b=pk7yUmf4/x4n49Joumq8bAGqiMK3cjeJSpyKgA5YlI9fG6YDpAHsqSVvK0zdJn1cQ3 vBL22rffc997dXX9AyoHg6P7YjEXRPkqZeSOgt1YOI1amO6BoluyVkkec+4qurOmtlv1 IQxnfbI7XNKX+xBZgqK0/EcqZE6SuFiwfcjSgHA+Cj8YAdNzqUA18BiPoR6GN31p3aBv +/J0WBD4AxzQETLjXrGWpKSBNHFuoH1VtXK8020wiVJRcUrssMubQVAUTg6uxNCd7lr0 VOR37sIcFeaj+xIrX9mzbihwy4PA0w2xeJlrBytOwjByE4mDECaXoYcSqnxWZ5hi5xd/ n2Sg== 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=bGpxTK74YwxEVdC6H5kgJn2yFcbYkzoLQPMwWc305wc=; fh=F52lMKP/ag7PTpjpGsg79bnedhkoffS1BBUct4g/1x0=; b=J5n0YHpD6LYvdrse6l+9holw+xT11u4NQElNOSGVQWYf8W/0aNoldyC9uUSluJa2Yj bl+ssJ43CWooSEgj9neaBj7ToshKUrNbM0fxGB1PQVbuXS8JRlQTsMDljkHU6TXDqMLS 9gIO4Sl3aaMYGPuBE6Tf52u+dksLxdnVpI6uMnRv5ourW4ekqArVLrcRHt+l3sX6GVUj rHxftvp+Pp3s+OMxFECWU9tVMHDI4V5jl3rai0wyWhGoD+sC4IJu4n00iyBqyISdyEn7 2mUavEap6D5/yNjjW6dsHfSdIv1UE//BF5LT7s0Q55aICjI/rTgEpsFOfvvZASc+rHLj NfVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=qhBtADX2; 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 k13-20020a17090646cd00b009878e5b1217si5763939ejs.912.2023.06.28.04.51.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 04:51:47 -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=qhBtADX2; 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 A22E13857341 for ; Wed, 28 Jun 2023 11:51:37 +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 093F83858C31 for ; Wed, 28 Jun 2023 11:51:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 093F83858C31 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=1687953084; bh=0AbjyV5w7xX+Iw8pZ3qQaGvDHCp9y96xf9RXZzUXpoQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qhBtADX2Dbaw8n/DykDJG78HyfXlJ1FsaXDakqw1SF0AI+z5/9OOKk9RriGhBLQ6D CUqe0gzzxJZxfRiv2kQglwa8nRtFuaAzCaQWX9c858/u7g81MzNyb15SVbMGXce2PH aN6MNaFDuZ+12W05vIMGrY6ExOfUbCNuKliwgx8I= 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 1A3DA60112; Wed, 28 Jun 2023 19:51:24 +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 v5 2/6] opcodes/loongarch: remove unused code Date: Wed, 28 Jun 2023 19:50:59 +0800 Message-Id: <20230628115103.3440262-3-i.swmail@xen0n.name> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230628115103.3440262-1-i.swmail@xen0n.name> References: <20230628115103.3440262-1-i.swmail@xen0n.name> MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 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?1769947117937402696?= X-GMAIL-MSGID: =?utf-8?q?1769947117937402696?= 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 802e757ab04..5d9e214b6a7 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 d747bc59c50..085d0ab2d75 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); -}