public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] opcodes/loongarch: Remove unused code
@ 2022-07-19  3:03 WANG Xuerui
  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
  0 siblings, 2 replies; 6+ messages in thread
From: WANG Xuerui @ 2022-07-19  3:03 UTC (permalink / raw)
  To: binutils; +Cc: Chenghua Xu, Zhensong Liu, Xi Ruoyao, WANG Xuerui

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-02  7:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19  3:03 [PATCH 1/2] opcodes/loongarch: Remove unused code WANG Xuerui
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

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).