From 0dfdb5234a22308c5d1e732652eeee7fa6f608c7 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 10 May 2022 08:52:07 +0930 Subject: [PATCH] opcodes cgen: remove use of PTR MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Note that opcodes is regenerated with cgen commit d1dd5fcc38e reverted, due to failure of bpf to compile with that patch applied. .../opcodes/bpf-opc.c:57:11: error: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709486335’ to ‘4294902015’ [-Werror=overflow] 57 | 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } plus other similar errors. cpu/ * mep.opc (print_tpreg, print_spreg): Delete unnecessary forward declarations. Replace PTR with void *. * mt.opc (print_dollarhex, print_pcrel): Delete forward decls. opcodes/ * bpf-desc.c, * bpf-dis.c, * cris-desc.c, * epiphany-desc.c, * epiphany-dis.c, * fr30-desc.c, * fr30-dis.c, * frv-desc.c, * frv-dis.c, * ip2k-desc.c, * ip2k-dis.c, * iq2000-desc.c, * iq2000-dis.c, * lm32-desc.c, * lm32-dis.c, * m32c-desc.c, * m32c-dis.c, * m32r-desc.c, * m32r-dis.c, * mep-desc.c, * mep-dis.c, * mt-desc.c, * mt-dis.c, * or1k-desc.c, * or1k-dis.c, * xc16x-desc.c, * xc16x-dis.c, * xstormy16-desc.c, * xstormy16-dis.c: Regenerate. --- cpu/mep.opc | 7 +- cpu/mt.opc | 3 - opcodes/bpf-desc.c | 34 +- opcodes/bpf-dis.c | 2 +- opcodes/cris-desc.c | 124 ++++---- opcodes/epiphany-desc.c | 244 +++++++-------- opcodes/epiphany-dis.c | 2 +- opcodes/fr30-desc.c | 120 +++---- opcodes/fr30-dis.c | 2 +- opcodes/frv-desc.c | 250 +++++++-------- opcodes/frv-dis.c | 2 +- opcodes/ip2k-desc.c | 28 +- opcodes/ip2k-dis.c | 2 +- opcodes/iq2000-desc.c | 86 ++--- opcodes/iq2000-dis.c | 2 +- opcodes/lm32-desc.c | 42 +-- opcodes/lm32-dis.c | 2 +- opcodes/m32c-desc.c | 660 +++++++++++++++++++-------------------- opcodes/m32c-dis.c | 2 +- opcodes/m32r-desc.c | 64 ++-- opcodes/m32r-dis.c | 2 +- opcodes/mep-desc.c | 406 ++++++++++++------------ opcodes/mep-dis.c | 9 +- opcodes/mt-desc.c | 114 +++---- opcodes/mt-dis.c | 5 +- opcodes/or1k-desc.c | 106 +++---- opcodes/or1k-dis.c | 2 +- opcodes/xc16x-desc.c | 162 +++++----- opcodes/xc16x-dis.c | 2 +- opcodes/xstormy16-desc.c | 96 +++--- opcodes/xstormy16-dis.c | 2 +- 31 files changed, 1286 insertions(+), 1298 deletions(-) diff --git a/cpu/mep.opc b/cpu/mep.opc index 278b4454c33..75ae8308599 100644 --- a/cpu/mep.opc +++ b/cpu/mep.opc @@ -869,11 +869,8 @@ mep_cgen_expand_macros_and_parse_operand (CGEN_CPU_DESC cd, int opindex, #define CGEN_VALIDATE_INSN_SUPPORTED -static void print_tpreg (CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int); -static void print_spreg (CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int); - static void -print_tpreg (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, PTR dis_info, +print_tpreg (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, void *dis_info, CGEN_KEYWORD *table ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED, unsigned int flags ATTRIBUTE_UNUSED) { @@ -883,7 +880,7 @@ print_tpreg (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, PTR dis_info, } static void -print_spreg (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, PTR dis_info, +print_spreg (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, void *dis_info, CGEN_KEYWORD *table ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED, unsigned int flags ATTRIBUTE_UNUSED) { diff --git a/cpu/mt.opc b/cpu/mt.opc index d988cc25e90..cf159b39471 100644 --- a/cpu/mt.opc +++ b/cpu/mt.opc @@ -434,9 +434,6 @@ parse_type (CGEN_CPU_DESC cd, } /* -- dis.c */ -static void print_dollarhex (CGEN_CPU_DESC, PTR, long, unsigned, bfd_vma, int); -static void print_pcrel (CGEN_CPU_DESC, PTR, long, unsigned, bfd_vma, int); - static void print_dollarhex (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, void * dis_info, diff --git a/opcodes/bpf-desc.c b/opcodes/bpf-desc.c index 891ea2d503c..29ee2cb7aac 100644 --- a/opcodes/bpf-desc.c +++ b/opcodes/bpf-desc.c @@ -175,7 +175,7 @@ const CGEN_HW_ENTRY bpf_cgen_hw_table[] = { "h-uint", HW_H_UINT, CGEN_ASM_NONE, 0, { 0, { { { (1<