opcodes/loongarch: remove unused code
authorWANG Xuerui <git@xen0n.name>
Thu, 29 Jun 2023 16:34:59 +0000 (00:34 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Fri, 30 Jun 2023 02:17:58 +0000 (10:17 +0800)
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
opcodes/loongarch-dis.c

index 60812fb4b1f17a28aba3c764235d038452c5f7d0..e9632ad3361c46300b5cc84130d3db6516ccc704 100644 (file)
@@ -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];
index 3a08da1476300831f7f97b8205e11b5fb47e972a..116b66671287e73887121467b34b039d83973a39 100644 (file)
@@ -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);
-}