From: WANG Xuerui <i.swmail@xen0n.name>
To: binutils@sourceware.org
Cc: Chenghua Xu <xuchenghua@loongson.cn>,
Zhensong Liu <liuzhensong@loongson.cn>,
Xi Ruoyao <xry111@xry111.site>, WANG Xuerui <git@xen0n.name>
Subject: [PATCH 1/2] opcodes/loongarch: Remove unused code
Date: Tue, 19 Jul 2022 11:03:44 +0800 [thread overview]
Message-ID: <20220719030345.1125329-1-i.swmail@xen0n.name> (raw)
From: WANG Xuerui <git@xen0n.name>
include/ChangeLog
* opcode/loongarch.h (loongarch_parse_dis_options): Remove
unused declarations.
(loongarch_disassemble_one): Likewise.
opcodes/ChangeLog
* loongarch-dis.c (loongarch_parse_dis_options): Remove
unused code.
(my_print_address_func): Likewise.
(loongarch_disassemble_one): Likewise.
Signed-off-by: WANG Xuerui <git@xen0n.name>
---
include/ChangeLog | 6 ++++++
include/opcode/loongarch.h | 5 -----
opcodes/ChangeLog | 7 +++++++
opcodes/loongarch-dis.c | 35 -----------------------------------
4 files changed, 13 insertions(+), 40 deletions(-)
diff --git a/include/ChangeLog b/include/ChangeLog
index f8f7747640e..40cb717906c 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2022-07-19 WANG Xuerui <git@xen0n.name>
+
+ * opcode/loongarch.h (loongarch_parse_dis_options): Remove
+ unused declarations.
+ (loongarch_disassemble_one): Likewise.
+
2022-07-08 Nick Clifton <nickc@redhat.com>
* 2.39 branch created.
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/ChangeLog b/opcodes/ChangeLog
index 3889a80f427..0ad9b5a53f8 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,10 @@
+2022-07-19 WANG Xuerui <git@xen0n.name>
+
+ * loongarch-dis.c (loongarch_parse_dis_options): Remove
+ unused code.
+ (my_print_address_func): Likewise.
+ (loongarch_disassemble_one): Likewise.
+
2022-07-18 Claudiu Zissulescu <claziss@synopsys.com>
* disassemble.c (disassemble_init_for_target): Set
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.35.1
next reply other threads:[~2022-07-19 3:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 3:03 WANG Xuerui [this message]
2022-07-19 3:03 ` [PATCH 2/2] opcodes/loongarch: Implement style support in the disassembler WANG Xuerui
2022-08-01 7:07 ` [PATCH 1/2] opcodes/loongarch: Remove unused code WANG Xuerui
2022-08-02 7:02 ` liuzhensong
2022-08-02 7:11 ` WANG Xuerui
2022-08-02 7:33 ` liuzhensong
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=20220719030345.1125329-1-i.swmail@xen0n.name \
--to=i.swmail@xen0n.name \
--cc=binutils@sourceware.org \
--cc=git@xen0n.name \
--cc=liuzhensong@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).