public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] opcodes/loongarch: remove unused code
@ 2023-06-30  2:29 liu & zhensong
  0 siblings, 0 replies; only message in thread
From: liu & zhensong @ 2023-06-30  2:29 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=22be1ca342fb4273fb1b9de2189612398ceff579

commit 22be1ca342fb4273fb1b9de2189612398ceff579
Author: WANG Xuerui <git@xen0n.name>
Date:   Fri Jun 30 00:34:59 2023 +0800

    opcodes/loongarch: remove unused code
    
    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>

Diff:
---
 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);
-}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-30  2:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-30  2:29 [binutils-gdb] opcodes/loongarch: remove unused code liu & zhensong

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