From: WANG Xuerui <i.swmail@xen0n.name>
To: binutils@sourceware.org
Cc: Chenghua Xu <xuchenghua@loongson.cn>,
Zhensong Liu <liuzhensong@loongson.cn>,
Qinggang Meng <mengqinggang@loongson.cn>,
Lulu Cheng <chenglulu@loongson.cn>,
Fangrui Song <maskray@google.com>, Xi Ruoyao <xry111@xry111.site>,
WANG Xuerui <git@xen0n.name>
Subject: [PATCH v6 2/7] opcodes/loongarch: remove unused code
Date: Thu, 29 Jun 2023 14:10:24 +0800 [thread overview]
Message-ID: <20230629061029.29773-3-i.swmail@xen0n.name> (raw)
In-Reply-To: <20230629061029.29773-1-i.swmail@xen0n.name>
From: WANG Xuerui <git@xen0n.name>
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 <git@xen0n.name>
---
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);
-}
--
2.40.0
next prev parent reply other threads:[~2023-06-29 6:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 6:10 [PATCH v6 0/7] LoongArch: disassembler improvements & deprecate old register aliases WANG Xuerui
2023-06-29 6:10 ` [PATCH v6 1/7] LoongArch: support disassembling certain pseudo-instructions WANG Xuerui
2023-06-29 6:10 ` WANG Xuerui [this message]
2023-06-29 6:10 ` [PATCH v6 3/7] opcodes/loongarch: implement style support in the disassembler WANG Xuerui
2023-06-29 6:10 ` [PATCH v6 4/7] opcodes/loongarch: style disassembled address offsets as such WANG Xuerui
2023-06-29 6:10 ` [PATCH v6 5/7] opcodes/loongarch: do not print hex notation for signed immediates WANG Xuerui
2023-06-29 6:10 ` [PATCH v6 6/7] opcodes/loongarch: print unrecognized insn words with the .word directive WANG Xuerui
2023-06-29 6:10 ` [PATCH v6 7/7] LoongArch: Deprecate $v[01], $fv[01] and $x names per spec WANG Xuerui
2023-06-29 13:10 ` [PATCH v6 0/7] LoongArch: disassembler improvements & deprecate old register aliases mengqinggang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230629061029.29773-3-i.swmail@xen0n.name \
--to=i.swmail@xen0n.name \
--cc=binutils@sourceware.org \
--cc=chenglulu@loongson.cn \
--cc=git@xen0n.name \
--cc=liuzhensong@loongson.cn \
--cc=maskray@google.com \
--cc=mengqinggang@loongson.cn \
--cc=xry111@xry111.site \
--cc=xuchenghua@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).