From: Alan Modra Date: Mon, 9 May 2022 23:47:30 +0000 (+0930) Subject: opcodes: remove use of PTR X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d64336e6557a80893a441103b980d35e2b75c3a1;p=binutils-gdb.git opcodes: remove use of PTR The non-cgen parts of opcodes. * cr16-dis.c (print_arg): Replace PTR with void *. * crx-dis.c (print_arg): Likewise. * rl78-dis.c (print_insn_rl78_common): Don't use PTR cast. * rx-dis.c (print_insn_rx): Likewise. * visium-dis.c (print_insn_visium): Likewise. * z8k-dis.c (print_insn_z8k): Likewise. --- diff --git a/opcodes/cr16-dis.c b/opcodes/cr16-dis.c index 8536cf7036d..6bcba0a0bee 100644 --- a/opcodes/cr16-dis.c +++ b/opcodes/cr16-dis.c @@ -529,7 +529,7 @@ print_arg (argument *a, bfd_vma memaddr, struct disassemble_info *info) int sign_flag = 0; int relative = 0; bfd_vma number; - PTR stream = info->stream; + void *stream = info->stream; fprintf_ftype func = info->fprintf_func; switch (a->type) diff --git a/opcodes/crx-dis.c b/opcodes/crx-dis.c index a932d23d613..e27a9386daa 100644 --- a/opcodes/crx-dis.c +++ b/opcodes/crx-dis.c @@ -487,7 +487,7 @@ print_arg (argument *a, bfd_vma memaddr, struct disassemble_info *info) bfd_vma number; int op_index = 0; char string[200]; - PTR stream = info->stream; + void *stream = info->stream; fprintf_ftype func = info->fprintf_func; switch (a->type) diff --git a/opcodes/rl78-dis.c b/opcodes/rl78-dis.c index 2d7ffb26eba..65e43397a05 100644 --- a/opcodes/rl78-dis.c +++ b/opcodes/rl78-dis.c @@ -110,7 +110,7 @@ print_insn_rl78_common (bfd_vma addr, disassemble_info * dis, RL78_Dis_Isa isa) #endif struct private priv; - dis->private_data = (PTR) &priv; + dis->private_data = &priv; rl78_data.pc = addr; rl78_data.dis = dis; diff --git a/opcodes/rx-dis.c b/opcodes/rx-dis.c index 74ae870a5ec..2ecedaf0361 100644 --- a/opcodes/rx-dis.c +++ b/opcodes/rx-dis.c @@ -221,7 +221,7 @@ print_insn_rx (bfd_vma addr, disassemble_info * dis) const char * s; struct private priv; - dis->private_data = (PTR) &priv; + dis->private_data = &priv; rx_data.pc = addr; rx_data.dis = dis; diff --git a/opcodes/visium-dis.c b/opcodes/visium-dis.c index 6bc45123f05..8537f5fc340 100644 --- a/opcodes/visium-dis.c +++ b/opcodes/visium-dis.c @@ -766,7 +766,7 @@ print_insn_visium (bfd_vma addr, disassemble_info *info) /* Stuff copied from m68k-dis.c. */ struct private priv; bfd_byte *buffer = priv.the_buffer; - info->private_data = (PTR) & priv; + info->private_data = &priv; priv.max_fetched = priv.the_buffer; priv.insn_start = addr; if (setjmp (priv.bailout) != 0) diff --git a/opcodes/z8k-dis.c b/opcodes/z8k-dis.c index 3629ed311ce..c4463e99c66 100644 --- a/opcodes/z8k-dis.c +++ b/opcodes/z8k-dis.c @@ -147,7 +147,7 @@ print_insn_z8k (bfd_vma addr, disassemble_info *info, int is_segmented) { instr_data_s instr_data; - info->private_data = (PTR) &instr_data; + info->private_data = &instr_data; instr_data.max_fetched = 0; instr_data.insn_start = addr; if (OPCODES_SIGSETJMP (instr_data.bailout) != 0)