public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] opcodes: cris: move desc & opc files from sim/
@ 2021-05-19  1:56 Mike Frysinger
  2021-05-19 14:52 ` Andrew Burgess
  2021-05-19 16:21 ` Mike Frysinger
  0 siblings, 2 replies; 21+ messages in thread
From: Mike Frysinger @ 2021-05-19  1:56 UTC (permalink / raw)
  To: gdb-patches

All other cgen ports keep their desc & opc files under opcodes/, so
move the cris files over too.  The cris-opc.c file is already here.
---
 opcodes/Makefile.am               | 14 +++++++++++++-
 opcodes/Makefile.in               | 15 ++++++++++++++-
 {sim/cris => opcodes}/cris-desc.c |  0
 {sim/cris => opcodes}/cris-desc.h |  0
 {sim/cris => opcodes}/cris-opc.h  |  0
 sim/cris/Makefile.in              | 16 ++++------------
 6 files changed, 31 insertions(+), 14 deletions(-)
 rename {sim/cris => opcodes}/cris-desc.c (100%)
 rename {sim/cris => opcodes}/cris-desc.h (100%)
 rename {sim/cris => opcodes}/cris-opc.h (100%)

diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 04980f36b113..2d6c6b8c1e93 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -60,6 +60,7 @@ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
 HFILES = \
 	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
 	bpf-desc.h bpf-opc.h \
+	cris-desc.h cris-opc.h \
 	epiphany-desc.h epiphany-opc.h \
 	fr30-desc.h fr30-opc.h \
 	frv-desc.h frv-opc.h \
@@ -108,6 +109,7 @@ TARGET_LIBOPCODES_CFILES = \
 	cgen-opc.c \
 	cr16-dis.c \
 	cr16-opc.c \
+	cris-desc.c \
 	cris-dis.c \
 	cris-opc.c \
 	crx-dis.c \
@@ -371,10 +373,11 @@ CGENDEPS = \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
 
 if CGEN_MAINT
 BPF_DEPS = stamp-bpf
+CRIS_DEPS = stamp-cris
 EPIPHANY_DEPS = stamp-epiphany
 FR30_DEPS = stamp-fr30
 FRV_DEPS = stamp-frv
@@ -390,6 +393,7 @@ XC16X_DEPS = stamp-xc16x
 XSTORMY16_DEPS = stamp-xstormy16
 else
 BPF_DEPS =
+CRIS_DEPS =
 EPIPHANY_DEPS =
 FR30_DEPS =
 FRV_DEPS =
@@ -431,6 +435,14 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
 	$(MAKE) run-cgen arch=bpf prefix=bpf \
 		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
 
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h \
+		$(srcdir)/cris-opc.c $(srcdir)/cris-dis.c: $(CRIS_DEPS)
+	@true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+	$(MAKE) run-cgen arch=cris prefix=cris \
+		archfile=$(CPUDIR)/cris.cpu
+
 $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
 		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
 		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index b2965ba70cd0..1a51190c1ab5 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -450,6 +450,7 @@ BFD_H = ../bfd/bfd.h
 HFILES = \
 	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
 	bpf-desc.h bpf-opc.h \
+	cris-desc.h cris-opc.h \
 	epiphany-desc.h epiphany-opc.h \
 	fr30-desc.h fr30-opc.h \
 	frv-desc.h frv-opc.h \
@@ -499,6 +500,7 @@ TARGET_LIBOPCODES_CFILES = \
 	cgen-opc.c \
 	cr16-dis.c \
 	cr16-opc.c \
+	cris-desc.c \
 	cris-dis.c \
 	cris-opc.c \
 	crx-dis.c \
@@ -729,9 +731,11 @@ CGENDEPS = \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
 @CGEN_MAINT_FALSE@BPF_DEPS = 
 @CGEN_MAINT_TRUE@BPF_DEPS = stamp-bpf
+@CGEN_MAINT_FALSE@CRIS_DEPS = 
+@CGEN_MAINT_TRUE@CRIS_DEPS = stamp-cris
 @CGEN_MAINT_FALSE@EPIPHANY_DEPS = 
 @CGEN_MAINT_TRUE@EPIPHANY_DEPS = stamp-epiphany
 @CGEN_MAINT_FALSE@FR30_DEPS = 
@@ -915,6 +919,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgen-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-opc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-desc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crx-dis.Plo@am__quote@
@@ -1417,6 +1422,14 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
 	$(MAKE) run-cgen arch=bpf prefix=bpf \
 		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
 
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h \
+		$(srcdir)/cris-opc.c $(srcdir)/cris-dis.c: $(CRIS_DEPS)
+	@true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+	$(MAKE) run-cgen arch=cris prefix=cris \
+		archfile=$(CPUDIR)/cris.cpu
+
 $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
 		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
 		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
diff --git a/sim/cris/cris-desc.c b/opcodes/cris-desc.c
similarity index 100%
rename from sim/cris/cris-desc.c
rename to opcodes/cris-desc.c
diff --git a/sim/cris/cris-desc.h b/opcodes/cris-desc.h
similarity index 100%
rename from sim/cris/cris-desc.h
rename to opcodes/cris-desc.h
diff --git a/sim/cris/cris-opc.h b/opcodes/cris-opc.h
similarity index 100%
rename from sim/cris/cris-opc.h
rename to opcodes/cris-opc.h
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 3dcdbb2da022..d5e8a88f3a8a 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -29,14 +29,13 @@ SIM_OBJS = \
 	sim-if.o arch.o \
 	$(CRISV10F_OBJS) \
 	$(CRISV32F_OBJS) \
-	traps.o \
-	cris-desc.o
+	traps.o
 
 # Extra headers included by sim-main.h.
 # FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS.
 SIM_EXTRA_DEPS = \
 	$(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \
-	arch.h cpuall.h cris-sim.h cris-desc.h engv10.h engv32.h
+	arch.h cpuall.h cris-sim.h engv10.h engv32.h
 
 SIM_EXTRA_CLEAN = cris-clean
 
@@ -97,7 +96,7 @@ cris-clean:
 	  rm -f mloopv$${v}f.c engv$${v}.h stamp-v$${v}fmloop; \
 	  rm -f stamp-v$${v}fcpu; \
 	done
-	-rm -f stamp-arch stamp-desc
+	-rm -f stamp-arch
 	-rm -f tmp-*
 
 # cgen support, enable with --enable-cgen-maint
@@ -106,7 +105,7 @@ CGEN_MAINT = ; @true
 @CGEN_MAINT@CGEN_MAINT =
 
 # Useful when making CGEN-generated files manually, without --enable-cgen-maint.
-stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu stamp-desc
+stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu
 
 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=crisv10,crisv32 \
@@ -135,10 +134,3 @@ stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/cr
 	mv decodev32.c.tmp $(srcdir)/decodev32.c
 	touch stamp-v32fcpu
 cpuv32.h cpuv32.c semcrisv32f-switch.c modelv32.c decodev32.c decodev32.h: $(CGEN_MAINT) stamp-v32fcpu
-
-stamp-desc: $(CGEN_READ_SCM) $(CGEN_DESC_SCM) $(CPU_DIR)/cris.cpu Makefile
-	$(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) \
-		archfile=$(CPU_DIR)/cris.cpu \
-		cpu=cris mach=all
-	touch stamp-desc
-cris-desc.c cris-desc.h cris-opc.h: $(CGEN_MAINT) stamp-desc
-- 
2.31.1


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

* Re: [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-19  1:56 [PATCH] opcodes: cris: move desc & opc files from sim/ Mike Frysinger
@ 2021-05-19 14:52 ` Andrew Burgess
  2021-05-19 16:21   ` Mike Frysinger
  2021-05-19 16:21 ` Mike Frysinger
  1 sibling, 1 reply; 21+ messages in thread
From: Andrew Burgess @ 2021-05-19 14:52 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: gdb-patches

* Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> [2021-05-18 21:56:35 -0400]:

> All other cgen ports keep their desc & opc files under opcodes/, so
> move the cris files over too.  The cris-opc.c file is already here.

My understanding is that opcodes/ is managed on the binutils list, so
you should probably send the patch to that list too - not that I
imagine they'll object.

Thanks,
Andrew



> ---
>  opcodes/Makefile.am               | 14 +++++++++++++-
>  opcodes/Makefile.in               | 15 ++++++++++++++-
>  {sim/cris => opcodes}/cris-desc.c |  0
>  {sim/cris => opcodes}/cris-desc.h |  0
>  {sim/cris => opcodes}/cris-opc.h  |  0
>  sim/cris/Makefile.in              | 16 ++++------------
>  6 files changed, 31 insertions(+), 14 deletions(-)
>  rename {sim/cris => opcodes}/cris-desc.c (100%)
>  rename {sim/cris => opcodes}/cris-desc.h (100%)
>  rename {sim/cris => opcodes}/cris-opc.h (100%)
> 
> diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
> index 04980f36b113..2d6c6b8c1e93 100644
> --- a/opcodes/Makefile.am
> +++ b/opcodes/Makefile.am
> @@ -60,6 +60,7 @@ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
>  HFILES = \
>  	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
>  	bpf-desc.h bpf-opc.h \
> +	cris-desc.h cris-opc.h \
>  	epiphany-desc.h epiphany-opc.h \
>  	fr30-desc.h fr30-opc.h \
>  	frv-desc.h frv-opc.h \
> @@ -108,6 +109,7 @@ TARGET_LIBOPCODES_CFILES = \
>  	cgen-opc.c \
>  	cr16-dis.c \
>  	cr16-opc.c \
> +	cris-desc.c \
>  	cris-dis.c \
>  	cris-opc.c \
>  	crx-dis.c \
> @@ -371,10 +373,11 @@ CGENDEPS = \
>  	$(CGENDIR)/opc-opinst.scm \
>  	cgen-asm.in cgen-dis.in cgen-ibld.in
>  
> -CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
> +CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
>  
>  if CGEN_MAINT
>  BPF_DEPS = stamp-bpf
> +CRIS_DEPS = stamp-cris
>  EPIPHANY_DEPS = stamp-epiphany
>  FR30_DEPS = stamp-fr30
>  FRV_DEPS = stamp-frv
> @@ -390,6 +393,7 @@ XC16X_DEPS = stamp-xc16x
>  XSTORMY16_DEPS = stamp-xstormy16
>  else
>  BPF_DEPS =
> +CRIS_DEPS =
>  EPIPHANY_DEPS =
>  FR30_DEPS =
>  FRV_DEPS =
> @@ -431,6 +435,14 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
>  	$(MAKE) run-cgen arch=bpf prefix=bpf \
>  		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
>  
> +$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h \
> +		$(srcdir)/cris-opc.c $(srcdir)/cris-dis.c: $(CRIS_DEPS)
> +	@true
> +
> +stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
> +	$(MAKE) run-cgen arch=cris prefix=cris \
> +		archfile=$(CPUDIR)/cris.cpu
> +
>  $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
>  		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
>  		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
> diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
> index b2965ba70cd0..1a51190c1ab5 100644
> --- a/opcodes/Makefile.in
> +++ b/opcodes/Makefile.in
> @@ -450,6 +450,7 @@ BFD_H = ../bfd/bfd.h
>  HFILES = \
>  	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
>  	bpf-desc.h bpf-opc.h \
> +	cris-desc.h cris-opc.h \
>  	epiphany-desc.h epiphany-opc.h \
>  	fr30-desc.h fr30-opc.h \
>  	frv-desc.h frv-opc.h \
> @@ -499,6 +500,7 @@ TARGET_LIBOPCODES_CFILES = \
>  	cgen-opc.c \
>  	cr16-dis.c \
>  	cr16-opc.c \
> +	cris-desc.c \
>  	cris-dis.c \
>  	cris-opc.c \
>  	crx-dis.c \
> @@ -729,9 +731,11 @@ CGENDEPS = \
>  	$(CGENDIR)/opc-opinst.scm \
>  	cgen-asm.in cgen-dis.in cgen-ibld.in
>  
> -CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
> +CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
>  @CGEN_MAINT_FALSE@BPF_DEPS = 
>  @CGEN_MAINT_TRUE@BPF_DEPS = stamp-bpf
> +@CGEN_MAINT_FALSE@CRIS_DEPS = 
> +@CGEN_MAINT_TRUE@CRIS_DEPS = stamp-cris
>  @CGEN_MAINT_FALSE@EPIPHANY_DEPS = 
>  @CGEN_MAINT_TRUE@EPIPHANY_DEPS = stamp-epiphany
>  @CGEN_MAINT_FALSE@FR30_DEPS = 
> @@ -915,6 +919,7 @@ distclean-compile:
>  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgen-opc.Plo@am__quote@
>  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-dis.Plo@am__quote@
>  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-opc.Plo@am__quote@
> +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-desc.Plo@am__quote@
>  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-dis.Plo@am__quote@
>  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-opc.Plo@am__quote@
>  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crx-dis.Plo@am__quote@
> @@ -1417,6 +1422,14 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
>  	$(MAKE) run-cgen arch=bpf prefix=bpf \
>  		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
>  
> +$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h \
> +		$(srcdir)/cris-opc.c $(srcdir)/cris-dis.c: $(CRIS_DEPS)
> +	@true
> +
> +stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
> +	$(MAKE) run-cgen arch=cris prefix=cris \
> +		archfile=$(CPUDIR)/cris.cpu
> +
>  $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
>  		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
>  		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
> diff --git a/sim/cris/cris-desc.c b/opcodes/cris-desc.c
> similarity index 100%
> rename from sim/cris/cris-desc.c
> rename to opcodes/cris-desc.c
> diff --git a/sim/cris/cris-desc.h b/opcodes/cris-desc.h
> similarity index 100%
> rename from sim/cris/cris-desc.h
> rename to opcodes/cris-desc.h
> diff --git a/sim/cris/cris-opc.h b/opcodes/cris-opc.h
> similarity index 100%
> rename from sim/cris/cris-opc.h
> rename to opcodes/cris-opc.h
> diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
> index 3dcdbb2da022..d5e8a88f3a8a 100644
> --- a/sim/cris/Makefile.in
> +++ b/sim/cris/Makefile.in
> @@ -29,14 +29,13 @@ SIM_OBJS = \
>  	sim-if.o arch.o \
>  	$(CRISV10F_OBJS) \
>  	$(CRISV32F_OBJS) \
> -	traps.o \
> -	cris-desc.o
> +	traps.o
>  
>  # Extra headers included by sim-main.h.
>  # FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS.
>  SIM_EXTRA_DEPS = \
>  	$(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \
> -	arch.h cpuall.h cris-sim.h cris-desc.h engv10.h engv32.h
> +	arch.h cpuall.h cris-sim.h engv10.h engv32.h
>  
>  SIM_EXTRA_CLEAN = cris-clean
>  
> @@ -97,7 +96,7 @@ cris-clean:
>  	  rm -f mloopv$${v}f.c engv$${v}.h stamp-v$${v}fmloop; \
>  	  rm -f stamp-v$${v}fcpu; \
>  	done
> -	-rm -f stamp-arch stamp-desc
> +	-rm -f stamp-arch
>  	-rm -f tmp-*
>  
>  # cgen support, enable with --enable-cgen-maint
> @@ -106,7 +105,7 @@ CGEN_MAINT = ; @true
>  @CGEN_MAINT@CGEN_MAINT =
>  
>  # Useful when making CGEN-generated files manually, without --enable-cgen-maint.
> -stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu stamp-desc
> +stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu
>  
>  stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/cris.cpu Makefile
>  	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=crisv10,crisv32 \
> @@ -135,10 +134,3 @@ stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/cr
>  	mv decodev32.c.tmp $(srcdir)/decodev32.c
>  	touch stamp-v32fcpu
>  cpuv32.h cpuv32.c semcrisv32f-switch.c modelv32.c decodev32.c decodev32.h: $(CGEN_MAINT) stamp-v32fcpu
> -
> -stamp-desc: $(CGEN_READ_SCM) $(CGEN_DESC_SCM) $(CPU_DIR)/cris.cpu Makefile
> -	$(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) \
> -		archfile=$(CPU_DIR)/cris.cpu \
> -		cpu=cris mach=all
> -	touch stamp-desc
> -cris-desc.c cris-desc.h cris-opc.h: $(CGEN_MAINT) stamp-desc
> -- 
> 2.31.1
> 

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

* [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-19  1:56 [PATCH] opcodes: cris: move desc & opc files from sim/ Mike Frysinger
  2021-05-19 14:52 ` Andrew Burgess
@ 2021-05-19 16:21 ` Mike Frysinger
  2021-05-19 21:26   ` Hans-Peter Nilsson
  2021-05-23  4:12   ` [PATCH v2] " Mike Frysinger
  1 sibling, 2 replies; 21+ messages in thread
From: Mike Frysinger @ 2021-05-19 16:21 UTC (permalink / raw)
  To: binutils; +Cc: gdb-patches

All other cgen ports keep their desc & opc files under opcodes/, so
move the cris files over too.  The cris-opc.c file is already here.
---
 opcodes/Makefile.am               | 14 +++++++++++++-
 opcodes/Makefile.in               | 15 ++++++++++++++-
 {sim/cris => opcodes}/cris-desc.c |  0
 {sim/cris => opcodes}/cris-desc.h |  0
 {sim/cris => opcodes}/cris-opc.h  |  0
 sim/cris/Makefile.in              | 16 ++++------------
 6 files changed, 31 insertions(+), 14 deletions(-)
 rename {sim/cris => opcodes}/cris-desc.c (100%)
 rename {sim/cris => opcodes}/cris-desc.h (100%)
 rename {sim/cris => opcodes}/cris-opc.h (100%)

diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 04980f36b113..2d6c6b8c1e93 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -60,6 +60,7 @@ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
 HFILES = \
 	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
 	bpf-desc.h bpf-opc.h \
+	cris-desc.h cris-opc.h \
 	epiphany-desc.h epiphany-opc.h \
 	fr30-desc.h fr30-opc.h \
 	frv-desc.h frv-opc.h \
@@ -108,6 +109,7 @@ TARGET_LIBOPCODES_CFILES = \
 	cgen-opc.c \
 	cr16-dis.c \
 	cr16-opc.c \
+	cris-desc.c \
 	cris-dis.c \
 	cris-opc.c \
 	crx-dis.c \
@@ -371,10 +373,11 @@ CGENDEPS = \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
 
 if CGEN_MAINT
 BPF_DEPS = stamp-bpf
+CRIS_DEPS = stamp-cris
 EPIPHANY_DEPS = stamp-epiphany
 FR30_DEPS = stamp-fr30
 FRV_DEPS = stamp-frv
@@ -390,6 +393,7 @@ XC16X_DEPS = stamp-xc16x
 XSTORMY16_DEPS = stamp-xstormy16
 else
 BPF_DEPS =
+CRIS_DEPS =
 EPIPHANY_DEPS =
 FR30_DEPS =
 FRV_DEPS =
@@ -431,6 +435,14 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
 	$(MAKE) run-cgen arch=bpf prefix=bpf \
 		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
 
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h \
+		$(srcdir)/cris-opc.c $(srcdir)/cris-dis.c: $(CRIS_DEPS)
+	@true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+	$(MAKE) run-cgen arch=cris prefix=cris \
+		archfile=$(CPUDIR)/cris.cpu
+
 $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
 		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
 		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index b2965ba70cd0..1a51190c1ab5 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -450,6 +450,7 @@ BFD_H = ../bfd/bfd.h
 HFILES = \
 	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
 	bpf-desc.h bpf-opc.h \
+	cris-desc.h cris-opc.h \
 	epiphany-desc.h epiphany-opc.h \
 	fr30-desc.h fr30-opc.h \
 	frv-desc.h frv-opc.h \
@@ -499,6 +500,7 @@ TARGET_LIBOPCODES_CFILES = \
 	cgen-opc.c \
 	cr16-dis.c \
 	cr16-opc.c \
+	cris-desc.c \
 	cris-dis.c \
 	cris-opc.c \
 	crx-dis.c \
@@ -729,9 +731,11 @@ CGENDEPS = \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
 @CGEN_MAINT_FALSE@BPF_DEPS = 
 @CGEN_MAINT_TRUE@BPF_DEPS = stamp-bpf
+@CGEN_MAINT_FALSE@CRIS_DEPS = 
+@CGEN_MAINT_TRUE@CRIS_DEPS = stamp-cris
 @CGEN_MAINT_FALSE@EPIPHANY_DEPS = 
 @CGEN_MAINT_TRUE@EPIPHANY_DEPS = stamp-epiphany
 @CGEN_MAINT_FALSE@FR30_DEPS = 
@@ -915,6 +919,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgen-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-opc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-desc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crx-dis.Plo@am__quote@
@@ -1417,6 +1422,14 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
 	$(MAKE) run-cgen arch=bpf prefix=bpf \
 		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
 
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h \
+		$(srcdir)/cris-opc.c $(srcdir)/cris-dis.c: $(CRIS_DEPS)
+	@true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+	$(MAKE) run-cgen arch=cris prefix=cris \
+		archfile=$(CPUDIR)/cris.cpu
+
 $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
 		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
 		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
diff --git a/sim/cris/cris-desc.c b/opcodes/cris-desc.c
similarity index 100%
rename from sim/cris/cris-desc.c
rename to opcodes/cris-desc.c
diff --git a/sim/cris/cris-desc.h b/opcodes/cris-desc.h
similarity index 100%
rename from sim/cris/cris-desc.h
rename to opcodes/cris-desc.h
diff --git a/sim/cris/cris-opc.h b/opcodes/cris-opc.h
similarity index 100%
rename from sim/cris/cris-opc.h
rename to opcodes/cris-opc.h
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 3dcdbb2da022..d5e8a88f3a8a 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -29,14 +29,13 @@ SIM_OBJS = \
 	sim-if.o arch.o \
 	$(CRISV10F_OBJS) \
 	$(CRISV32F_OBJS) \
-	traps.o \
-	cris-desc.o
+	traps.o
 
 # Extra headers included by sim-main.h.
 # FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS.
 SIM_EXTRA_DEPS = \
 	$(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \
-	arch.h cpuall.h cris-sim.h cris-desc.h engv10.h engv32.h
+	arch.h cpuall.h cris-sim.h engv10.h engv32.h
 
 SIM_EXTRA_CLEAN = cris-clean
 
@@ -97,7 +96,7 @@ cris-clean:
 	  rm -f mloopv$${v}f.c engv$${v}.h stamp-v$${v}fmloop; \
 	  rm -f stamp-v$${v}fcpu; \
 	done
-	-rm -f stamp-arch stamp-desc
+	-rm -f stamp-arch
 	-rm -f tmp-*
 
 # cgen support, enable with --enable-cgen-maint
@@ -106,7 +105,7 @@ CGEN_MAINT = ; @true
 @CGEN_MAINT@CGEN_MAINT =
 
 # Useful when making CGEN-generated files manually, without --enable-cgen-maint.
-stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu stamp-desc
+stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu
 
 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=crisv10,crisv32 \
@@ -135,10 +134,3 @@ stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/cr
 	mv decodev32.c.tmp $(srcdir)/decodev32.c
 	touch stamp-v32fcpu
 cpuv32.h cpuv32.c semcrisv32f-switch.c modelv32.c decodev32.c decodev32.h: $(CGEN_MAINT) stamp-v32fcpu
-
-stamp-desc: $(CGEN_READ_SCM) $(CGEN_DESC_SCM) $(CPU_DIR)/cris.cpu Makefile
-	$(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) \
-		archfile=$(CPU_DIR)/cris.cpu \
-		cpu=cris mach=all
-	touch stamp-desc
-cris-desc.c cris-desc.h cris-opc.h: $(CGEN_MAINT) stamp-desc
-- 
2.31.1


----- End forwarded message -----

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

* Re: [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-19 14:52 ` Andrew Burgess
@ 2021-05-19 16:21   ` Mike Frysinger
  0 siblings, 0 replies; 21+ messages in thread
From: Mike Frysinger @ 2021-05-19 16:21 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches

On 19 May 2021 15:52, Andrew Burgess wrote:
> * Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> [2021-05-18 21:56:35 -0400]:
> > All other cgen ports keep their desc & opc files under opcodes/, so
> > move the cris files over too.  The cris-opc.c file is already here.
> 
> My understanding is that opcodes/ is managed on the binutils list, so
> you should probably send the patch to that list too - not that I
> imagine they'll object.

err, of course, thanks
-mike

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

* Re: [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-19 16:21 ` Mike Frysinger
@ 2021-05-19 21:26   ` Hans-Peter Nilsson
  2021-05-19 21:32     ` Hans-Peter Nilsson
  2021-05-23  4:12   ` [PATCH v2] " Mike Frysinger
  1 sibling, 1 reply; 21+ messages in thread
From: Hans-Peter Nilsson @ 2021-05-19 21:26 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: binutils, gdb-patches

> From: Mike Frysinger via Binutils <binutils@sourceware.org>
> Date: Wed, 19 May 2021 18:21:07 +0200

> All other cgen ports keep their desc & opc files under opcodes/, so
> move the cris files over too.  The cris-opc.c file is already here.

Unline (most) other CGEN ports, the assembler and
disassembler isn't generated from the CGEN description.  But
that's not a reason to keep it different in this regard.

Ok with the appropriate opcodes/ChangeLog entry.  Thanks!

brgds, H-P

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

* Re: [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-19 21:26   ` Hans-Peter Nilsson
@ 2021-05-19 21:32     ` Hans-Peter Nilsson
  2021-05-19 23:38       ` Mike Frysinger
  0 siblings, 1 reply; 21+ messages in thread
From: Hans-Peter Nilsson @ 2021-05-19 21:32 UTC (permalink / raw)
  To: vapier; +Cc: binutils, gdb-patches

> From: Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.com>
> Date: Wed, 19 May 2021 23:26:26 +0200

> > From: Mike Frysinger via Binutils <binutils@sourceware.org>
> > Date: Wed, 19 May 2021 18:21:07 +0200
> 
> > All other cgen ports keep their desc & opc files under opcodes/, so
> > move the cris files over too.  The cris-opc.c file is already here.
> 
> Unline (most) other CGEN ports, the assembler and
> disassembler isn't generated from the CGEN description.  But
> that's not a reason to keep it different in this regard.
> 
> Ok with the appropriate opcodes/ChangeLog entry.  Thanks!

No, wait, NOT ok: cris-opc.c isn't CGEN-generated.  Please
fix so it isn't "regenerated".

brgds, H-P

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

* Re: [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-19 21:32     ` Hans-Peter Nilsson
@ 2021-05-19 23:38       ` Mike Frysinger
  2021-05-19 23:48         ` Hans-Peter Nilsson
  0 siblings, 1 reply; 21+ messages in thread
From: Mike Frysinger @ 2021-05-19 23:38 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: binutils, gdb-patches

On 19 May 2021 23:32, Hans-Peter Nilsson wrote:
> > From: Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.com>
> > Date: Wed, 19 May 2021 23:26:26 +0200
> 
> > > From: Mike Frysinger via Binutils <binutils@sourceware.org>
> > > Date: Wed, 19 May 2021 18:21:07 +0200
> > 
> > > All other cgen ports keep their desc & opc files under opcodes/, so
> > > move the cris files over too.  The cris-opc.c file is already here.
> > 
> > Unline (most) other CGEN ports, the assembler and
> > disassembler isn't generated from the CGEN description.  But
> > that's not a reason to keep it different in this regard.
> > 
> > Ok with the appropriate opcodes/ChangeLog entry.  Thanks!
> 
> No, wait, NOT ok: cris-opc.c isn't CGEN-generated.  Please
> fix so it isn't "regenerated".

you want me to delete the cris cgen rule entirely ?
-mike

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

* Re: [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-19 23:38       ` Mike Frysinger
@ 2021-05-19 23:48         ` Hans-Peter Nilsson
  2021-05-20  5:18           ` Mike Frysinger
  0 siblings, 1 reply; 21+ messages in thread
From: Hans-Peter Nilsson @ 2021-05-19 23:48 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: binutils, gdb-patches

> From: Mike Frysinger <vapier@gentoo.org>
> Date: Thu, 20 May 2021 01:38:58 +0200

> On 19 May 2021 23:32, Hans-Peter Nilsson wrote:
> > > From: Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.com>
> > > Date: Wed, 19 May 2021 23:26:26 +0200
> > 
> > > > From: Mike Frysinger via Binutils <binutils@sourceware.org>
> > > > Date: Wed, 19 May 2021 18:21:07 +0200
> > > 
> > > > All other cgen ports keep their desc & opc files under opcodes/, so
> > > > move the cris files over too.  The cris-opc.c file is already here.
> > > 
> > > Unline (most) other CGEN ports, the assembler and
> > > disassembler isn't generated from the CGEN description.  But
> > > that's not a reason to keep it different in this regard.
> > > 
> > > Ok with the appropriate opcodes/ChangeLog entry.  Thanks!
> > 
> > No, wait, NOT ok: cris-opc.c isn't CGEN-generated.  Please
> > fix so it isn't "regenerated".
> 
> you want me to delete the cris cgen rule entirely ?

"No" if you mean removing the regeneration rule for the
CGEN-generated CRIS files of course.

But, if you want to move the CRIS CGEN files to opcodes/,
there must be precautions to not overwrite the cris-opc.c
there.

brgds, H-P

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

* Re: [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-19 23:48         ` Hans-Peter Nilsson
@ 2021-05-20  5:18           ` Mike Frysinger
  2021-05-20 13:21             ` Hans-Peter Nilsson
  0 siblings, 1 reply; 21+ messages in thread
From: Mike Frysinger @ 2021-05-20  5:18 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: binutils, gdb-patches

On 20 May 2021 01:48, Hans-Peter Nilsson wrote:
> From: Mike Frysinger <vapier@gentoo.org>
> > On 19 May 2021 23:32, Hans-Peter Nilsson wrote:
> > > From: Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.com>
> > > > From: Mike Frysinger via Binutils <binutils@sourceware.org>
> > > > > All other cgen ports keep their desc & opc files under opcodes/, so
> > > > > move the cris files over too.  The cris-opc.c file is already here.
> > > > 
> > > > Unline (most) other CGEN ports, the assembler and
> > > > disassembler isn't generated from the CGEN description.  But
> > > > that's not a reason to keep it different in this regard.
> > > > 
> > > > Ok with the appropriate opcodes/ChangeLog entry.  Thanks!
> > > 
> > > No, wait, NOT ok: cris-opc.c isn't CGEN-generated.  Please
> > > fix so it isn't "regenerated".
> > 
> > you want me to delete the cris cgen rule entirely ?
> 
> "No" if you mean removing the regeneration rule for the
> CGEN-generated CRIS files of course.
> 
> But, if you want to move the CRIS CGEN files to opcodes/,
> there must be precautions to not overwrite the cris-opc.c
> there.

from what i can tell, the opcodes/ script has no support for only generating
a single file.  it wants to do them all.  so you want me to pull the desc
logic out of sim/common/cgen.sh and into opcodes/cgen.sh so that cris can run
that logic ?

it's hard to test as the cris cgen rules fail for me even now with syntax
errors in the scm files.
-mike

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

* Re: [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-20  5:18           ` Mike Frysinger
@ 2021-05-20 13:21             ` Hans-Peter Nilsson
  2021-05-23  3:55               ` Mike Frysinger
  0 siblings, 1 reply; 21+ messages in thread
From: Hans-Peter Nilsson @ 2021-05-20 13:21 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: binutils, gdb-patches

> From: Mike Frysinger <vapier@gentoo.org>
> Date: Thu, 20 May 2021 07:18:32 +0200

> On 20 May 2021 01:48, Hans-Peter Nilsson wrote:
> > From: Mike Frysinger <vapier@gentoo.org>
> > > On 19 May 2021 23:32, Hans-Peter Nilsson wrote:
> > > > From: Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.com>
> > > > > From: Mike Frysinger via Binutils <binutils@sourceware.org>
> > > > > > All other cgen ports keep their desc & opc files under opcodes/, so
> > > > > > move the cris files over too.  The cris-opc.c file is already here.
> > > > > 
> > > > > Unline (most) other CGEN ports, the assembler and
> > > > > disassembler isn't generated from the CGEN description.  But
> > > > > that's not a reason to keep it different in this regard.
> > > > > 
> > > > > Ok with the appropriate opcodes/ChangeLog entry.  Thanks!
> > > > 
> > > > No, wait, NOT ok: cris-opc.c isn't CGEN-generated.  Please
> > > > fix so it isn't "regenerated".
> > > 
> > > you want me to delete the cris cgen rule entirely ?
> > 
> > "No" if you mean removing the regeneration rule for the
> > CGEN-generated CRIS files of course.
> > 
> > But, if you want to move the CRIS CGEN files to opcodes/,
> > there must be precautions to not overwrite the cris-opc.c
> > there.
> 
> from what i can tell, the opcodes/ script has no support for only generating
> a single file.  it wants to do them all.  so you want me to pull the desc
> logic out of sim/common/cgen.sh and into opcodes/cgen.sh so that cris can run
> that logic ?

I want you to do something, if anything, that works for CRIS
sim *and* binutils.  If your suggestion is sane to you, then
perhaps yes, but as the CGEN files aren't used for CRIS
binutils, leaving things as they are in sim may be even
simpler.

> it's hard to test as the cris cgen rules fail for me even now with syntax
> errors in the scm files.

Badness.  CGEN as in using sim/common/cgen.sh?  Is there an
issue entered in bugzilla?  I guess someone has been naughty
and didn't test a CGEN change properly.

brgds, H-P

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

* Re: [PATCH] opcodes: cris: move desc & opc files from sim/
  2021-05-20 13:21             ` Hans-Peter Nilsson
@ 2021-05-23  3:55               ` Mike Frysinger
  0 siblings, 0 replies; 21+ messages in thread
From: Mike Frysinger @ 2021-05-23  3:55 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: binutils, gdb-patches

On 20 May 2021 15:21, Hans-Peter Nilsson wrote:
> From: Mike Frysinger <vapier@gentoo.org>
> > On 20 May 2021 01:48, Hans-Peter Nilsson wrote:
> > > From: Mike Frysinger <vapier@gentoo.org>
> > > > On 19 May 2021 23:32, Hans-Peter Nilsson wrote:
> > > > > From: Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.com>
> > > > > > From: Mike Frysinger via Binutils <binutils@sourceware.org>
> > > > > > > All other cgen ports keep their desc & opc files under opcodes/, so
> > > > > > > move the cris files over too.  The cris-opc.c file is already here.
> > > > > > 
> > > > > > Unline (most) other CGEN ports, the assembler and
> > > > > > disassembler isn't generated from the CGEN description.  But
> > > > > > that's not a reason to keep it different in this regard.
> > > > > > 
> > > > > > Ok with the appropriate opcodes/ChangeLog entry.  Thanks!
> > > > > 
> > > > > No, wait, NOT ok: cris-opc.c isn't CGEN-generated.  Please
> > > > > fix so it isn't "regenerated".
> > > > 
> > > > you want me to delete the cris cgen rule entirely ?
> > > 
> > > "No" if you mean removing the regeneration rule for the
> > > CGEN-generated CRIS files of course.
> > > 
> > > But, if you want to move the CRIS CGEN files to opcodes/,
> > > there must be precautions to not overwrite the cris-opc.c
> > > there.
> > 
> > from what i can tell, the opcodes/ script has no support for only generating
> > a single file.  it wants to do them all.  so you want me to pull the desc
> > logic out of sim/common/cgen.sh and into opcodes/cgen.sh so that cris can run
> > that logic ?
> 
> I want you to do something, if anything, that works for CRIS
> sim *and* binutils.  If your suggestion is sane to you, then
> perhaps yes, but as the CGEN files aren't used for CRIS
> binutils, leaving things as they are in sim may be even
> simpler.

the desc & opc files are tightly coupled with the BFD & opcodes APIs.
they break with changes i'm trying to make to sim.  they need to get
moved out.

> > it's hard to test as the cris cgen rules fail for me even now with syntax
> > errors in the scm files.
> 
> Badness.  CGEN as in using sim/common/cgen.sh?  Is there an
> issue entered in bugzilla?  I guess someone has been naughty
> and didn't test a CGEN change properly.

seems like it's the opposite.  cgen is stuck on guile-1.8 even though
distros have moved on to 2.0+.
-mike

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

* [PATCH v2] opcodes: cris: move desc & opc files from sim/
  2021-05-19 16:21 ` Mike Frysinger
  2021-05-19 21:26   ` Hans-Peter Nilsson
@ 2021-05-23  4:12   ` Mike Frysinger
  2021-05-23 20:52     ` Hans-Peter Nilsson
  2021-05-24  1:23     ` [PATCH v3] " Mike Frysinger
  1 sibling, 2 replies; 21+ messages in thread
From: Mike Frysinger @ 2021-05-23  4:12 UTC (permalink / raw)
  To: binutils, Hans-Peter Nilsson; +Cc: gdb-patches

All other cgen ports keep their desc & opc files under opcodes/, so
move the cris files over too.  The cris-opc.c file is already here.
---
 opcodes/Makefile.am               | 16 ++++++++++++++-
 opcodes/Makefile.in               | 17 +++++++++++++++-
 opcodes/cgen.sh                   | 34 +++++++++++++++++++++++++++++++
 {sim/cris => opcodes}/cris-desc.c |  0
 {sim/cris => opcodes}/cris-desc.h |  0
 {sim/cris => opcodes}/cris-opc.h  |  0
 sim/cris/Makefile.in              | 16 ++++-----------
 7 files changed, 69 insertions(+), 14 deletions(-)
 rename {sim/cris => opcodes}/cris-desc.c (100%)
 rename {sim/cris => opcodes}/cris-desc.h (100%)
 rename {sim/cris => opcodes}/cris-opc.h (100%)

diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 04980f36b113..30d86f012999 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -60,6 +60,7 @@ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
 HFILES = \
 	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
 	bpf-desc.h bpf-opc.h \
+	cris-desc.h cris-opc.h \
 	epiphany-desc.h epiphany-opc.h \
 	fr30-desc.h fr30-opc.h \
 	frv-desc.h frv-opc.h \
@@ -108,6 +109,7 @@ TARGET_LIBOPCODES_CFILES = \
 	cgen-opc.c \
 	cr16-dis.c \
 	cr16-opc.c \
+	cris-desc.c \
 	cris-dis.c \
 	cris-opc.c \
 	crx-dis.c \
@@ -371,10 +373,11 @@ CGENDEPS = \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
 
 if CGEN_MAINT
 BPF_DEPS = stamp-bpf
+CRIS_DEPS = stamp-cris
 EPIPHANY_DEPS = stamp-epiphany
 FR30_DEPS = stamp-fr30
 FRV_DEPS = stamp-frv
@@ -390,6 +393,7 @@ XC16X_DEPS = stamp-xc16x
 XSTORMY16_DEPS = stamp-xstormy16
 else
 BPF_DEPS =
+CRIS_DEPS =
 EPIPHANY_DEPS =
 FR30_DEPS =
 FRV_DEPS =
@@ -431,6 +435,16 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
 	$(MAKE) run-cgen arch=bpf prefix=bpf \
 		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
 
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h \
+		$(srcdir)/cris-opc.c $(srcdir)/cris-dis.c: $(CRIS_DEPS)
+	@true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+	$(SHELL) $(srcdir)/cgen.sh desc $(srcdir) $(CGEN) \
+	  $(CGENDIR) "$(CGENFLAGS)" cris cris $(CPUDIR)/cris.cpu /dev/null \
+	  "$(options)" "$(extrafiles)"
+	touch $@
+
 $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
 		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
 		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
diff --git a/opcodes/cgen.sh b/opcodes/cgen.sh
index bdcc56df687c..cf6a5f112a66 100644
--- a/opcodes/cgen.sh
+++ b/opcodes/cgen.sh
@@ -175,6 +175,40 @@ opcodes)
 	rm -f ${tmp}-asm.in1 ${tmp}-dis.in1
 	;;
 
+desc)
+	# For ports that only generate the desc module & opc header.
+	rm -f ${tmp}-desc.h1 ${tmp}-desc.h
+	rm -f ${tmp}-desc.c1 ${tmp}-desc.c
+	rm -f ${tmp}-opc.h1 ${tmp}-opc.h
+
+	${cgen} ${cgendir}/cgen-opc.scm \
+		-s ${cgendir} \
+		${cgenflags} \
+		-OPC ${opcfile} \
+		-f "${archflags}" \
+		-m all \
+		-a ${archfile} \
+		-i all \
+		-H ${tmp}-desc.h1 \
+		-C ${tmp}-desc.c1 \
+		-O ${tmp}-opc.h1
+
+	sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
+		-e "s/@prefix@/${prefix}/g" \
+		< ${tmp}-desc.h1 > ${tmp}-desc.h
+	${rootdir}/move-if-change ${tmp}-desc.h ${srcdir}/${arch}-desc.h
+	sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
+		-e "s/@prefix@/${prefix}/g" \
+		< ${tmp}-desc.c1 > ${tmp}-desc.c
+	${rootdir}/move-if-change ${tmp}-desc.c ${srcdir}/${arch}-desc.c
+	sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
+		-e "s/@prefix@/${prefix}/g" \
+		< ${tmp}-opc.h1 > ${tmp}-opc.h
+	${rootdir}/move-if-change ${tmp}-opc.h ${srcdir}/${arch}-opc.h
+
+	rm -f ${tmp}-desc.h1 ${tmp}-desc.c1 ${tmp}-opc.h1
+	;;
+
 *)
 	echo "$0: bad action: ${action}" >&2
 	exit 1
diff --git a/sim/cris/cris-desc.c b/opcodes/cris-desc.c
similarity index 100%
rename from sim/cris/cris-desc.c
rename to opcodes/cris-desc.c
diff --git a/sim/cris/cris-desc.h b/opcodes/cris-desc.h
similarity index 100%
rename from sim/cris/cris-desc.h
rename to opcodes/cris-desc.h
diff --git a/sim/cris/cris-opc.h b/opcodes/cris-opc.h
similarity index 100%
rename from sim/cris/cris-opc.h
rename to opcodes/cris-opc.h
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 3dcdbb2da022..d5e8a88f3a8a 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -29,14 +29,13 @@ SIM_OBJS = \
 	sim-if.o arch.o \
 	$(CRISV10F_OBJS) \
 	$(CRISV32F_OBJS) \
-	traps.o \
-	cris-desc.o
+	traps.o
 
 # Extra headers included by sim-main.h.
 # FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS.
 SIM_EXTRA_DEPS = \
 	$(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \
-	arch.h cpuall.h cris-sim.h cris-desc.h engv10.h engv32.h
+	arch.h cpuall.h cris-sim.h engv10.h engv32.h
 
 SIM_EXTRA_CLEAN = cris-clean
 
@@ -97,7 +96,7 @@ cris-clean:
 	  rm -f mloopv$${v}f.c engv$${v}.h stamp-v$${v}fmloop; \
 	  rm -f stamp-v$${v}fcpu; \
 	done
-	-rm -f stamp-arch stamp-desc
+	-rm -f stamp-arch
 	-rm -f tmp-*
 
 # cgen support, enable with --enable-cgen-maint
@@ -106,7 +105,7 @@ CGEN_MAINT = ; @true
 @CGEN_MAINT@CGEN_MAINT =
 
 # Useful when making CGEN-generated files manually, without --enable-cgen-maint.
-stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu stamp-desc
+stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu
 
 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=crisv10,crisv32 \
@@ -135,10 +134,3 @@ stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/cr
 	mv decodev32.c.tmp $(srcdir)/decodev32.c
 	touch stamp-v32fcpu
 cpuv32.h cpuv32.c semcrisv32f-switch.c modelv32.c decodev32.c decodev32.h: $(CGEN_MAINT) stamp-v32fcpu
-
-stamp-desc: $(CGEN_READ_SCM) $(CGEN_DESC_SCM) $(CPU_DIR)/cris.cpu Makefile
-	$(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) \
-		archfile=$(CPU_DIR)/cris.cpu \
-		cpu=cris mach=all
-	touch stamp-desc
-cris-desc.c cris-desc.h cris-opc.h: $(CGEN_MAINT) stamp-desc
-- 
2.31.1


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

* Re: [PATCH v2] opcodes: cris: move desc & opc files from sim/
  2021-05-23  4:12   ` [PATCH v2] " Mike Frysinger
@ 2021-05-23 20:52     ` Hans-Peter Nilsson
  2021-05-23 21:01       ` Hans-Peter Nilsson
  2021-05-24  1:23       ` Mike Frysinger
  2021-05-24  1:23     ` [PATCH v3] " Mike Frysinger
  1 sibling, 2 replies; 21+ messages in thread
From: Hans-Peter Nilsson @ 2021-05-23 20:52 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: binutils, gdb-patches

Three minor issues:

> From: Mike Frysinger <vapier@gentoo.org>
> Date: Sun, 23 May 2021 06:12:51 +0200

Missing ChangeLog entries.  Those are "still" kept for opcodes/.

> All other cgen ports keep their desc & opc files under opcodes/, so
> move the cris files over too.  The cris-opc.c file is already here.

The commit log is not updated since the first version:
cris-opc.c isn't just "already there", it's "not generated by CGEN".

> diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
> @@ -431,6 +435,16 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
>  	$(MAKE) run-cgen arch=bpf prefix=bpf \
>  		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
>  
> +$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h \
> +		$(srcdir)/cris-opc.c $(srcdir)/cris-dis.c: $(CRIS_DEPS)

This dependency isn't updated; cris-opc.c must not depend on
$(CRIS_DEPS) (stamp-cris in maintainer-mode).

Thanks for looking into and finding the CGEN guile-1.8 requirement.
(Is there a CGEN/scheme hacker listening?)

brgds, H-P

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

* Re: [PATCH v2] opcodes: cris: move desc & opc files from sim/
  2021-05-23 20:52     ` Hans-Peter Nilsson
@ 2021-05-23 21:01       ` Hans-Peter Nilsson
  2021-05-24  1:23       ` Mike Frysinger
  1 sibling, 0 replies; 21+ messages in thread
From: Hans-Peter Nilsson @ 2021-05-23 21:01 UTC (permalink / raw)
  To: vapier; +Cc: binutils, gdb-patches

> From: Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.com>
> Date: Sun, 23 May 2021 22:52:39 +0200

> This dependency isn't updated; cris-opc.c must not depend on
> $(CRIS_DEPS) (stamp-cris in maintainer-mode).

The same goes for cris-dis.c of course.  But you already
noticed that, I hope. :)

brgds, H-P


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

* Re: [PATCH v2] opcodes: cris: move desc & opc files from sim/
  2021-05-23 20:52     ` Hans-Peter Nilsson
  2021-05-23 21:01       ` Hans-Peter Nilsson
@ 2021-05-24  1:23       ` Mike Frysinger
  1 sibling, 0 replies; 21+ messages in thread
From: Mike Frysinger @ 2021-05-24  1:23 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: binutils, gdb-patches

On 23 May 2021 22:52, Hans-Peter Nilsson wrote:
> > From: Mike Frysinger <vapier@gentoo.org>
> > Date: Sun, 23 May 2021 06:12:51 +0200
> 
> Missing ChangeLog entries.  Those are "still" kept for opcodes/.

i don't waste time on these until i actually push the change

> > All other cgen ports keep their desc & opc files under opcodes/, so
> > move the cris files over too.  The cris-opc.c file is already here.
> 
> The commit log is not updated since the first version:
> cris-opc.c isn't just "already there", it's "not generated by CGEN".

not sure what you mean.  desc/opc files belong in the opcodes project.  i'm
explaining why this commit is only moving opc.h and not opc.c in this commit.

if you want me to write something else here, just lemme know what you want
it to say.

> > diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
> > @@ -431,6 +435,16 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
> >  	$(MAKE) run-cgen arch=bpf prefix=bpf \
> >  		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
> >  
> > +$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h \
> > +		$(srcdir)/cris-opc.c $(srcdir)/cris-dis.c: $(CRIS_DEPS)
> 
> This dependency isn't updated; cris-opc.c must not depend on
> $(CRIS_DEPS) (stamp-cris in maintainer-mode).

thanks, removed opc.c & dis.c
-mike

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

* [PATCH v3] opcodes: cris: move desc & opc files from sim/
  2021-05-23  4:12   ` [PATCH v2] " Mike Frysinger
  2021-05-23 20:52     ` Hans-Peter Nilsson
@ 2021-05-24  1:23     ` Mike Frysinger
  2021-05-24  1:43       ` Hans-Peter Nilsson
  2021-05-24  3:46       ` [PATCH v4] " Mike Frysinger
  1 sibling, 2 replies; 21+ messages in thread
From: Mike Frysinger @ 2021-05-24  1:23 UTC (permalink / raw)
  To: binutils, Hans-Peter Nilsson; +Cc: gdb-patches

All other cgen ports keep their desc & opc files under opcodes/, so
move the cris files over too.  The cris-opc.c file is already here.
---
 opcodes/Makefile.am               | 15 +++++++++++++-
 opcodes/Makefile.in               | 16 ++++++++++++++-
 opcodes/cgen.sh                   | 34 +++++++++++++++++++++++++++++++
 {sim/cris => opcodes}/cris-desc.c |  0
 {sim/cris => opcodes}/cris-desc.h |  0
 {sim/cris => opcodes}/cris-opc.h  |  0
 sim/cris/Makefile.in              | 16 ++++-----------
 7 files changed, 67 insertions(+), 14 deletions(-)
 rename {sim/cris => opcodes}/cris-desc.c (100%)
 rename {sim/cris => opcodes}/cris-desc.h (100%)
 rename {sim/cris => opcodes}/cris-opc.h (100%)

diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 04980f36b113..ddae8bd9052f 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -60,6 +60,7 @@ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
 HFILES = \
 	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
 	bpf-desc.h bpf-opc.h \
+	cris-desc.h cris-opc.h \
 	epiphany-desc.h epiphany-opc.h \
 	fr30-desc.h fr30-opc.h \
 	frv-desc.h frv-opc.h \
@@ -108,6 +109,7 @@ TARGET_LIBOPCODES_CFILES = \
 	cgen-opc.c \
 	cr16-dis.c \
 	cr16-opc.c \
+	cris-desc.c \
 	cris-dis.c \
 	cris-opc.c \
 	crx-dis.c \
@@ -371,10 +373,11 @@ CGENDEPS = \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
 
 if CGEN_MAINT
 BPF_DEPS = stamp-bpf
+CRIS_DEPS = stamp-cris
 EPIPHANY_DEPS = stamp-epiphany
 FR30_DEPS = stamp-fr30
 FRV_DEPS = stamp-frv
@@ -390,6 +393,7 @@ XC16X_DEPS = stamp-xc16x
 XSTORMY16_DEPS = stamp-xstormy16
 else
 BPF_DEPS =
+CRIS_DEPS =
 EPIPHANY_DEPS =
 FR30_DEPS =
 FRV_DEPS =
@@ -431,6 +435,15 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
 	$(MAKE) run-cgen arch=bpf prefix=bpf \
 		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
 
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h: $(CRIS_DEPS)
+	@true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+	$(SHELL) $(srcdir)/cgen.sh desc $(srcdir) $(CGEN) \
+	  $(CGENDIR) "$(CGENFLAGS)" cris cris $(CPUDIR)/cris.cpu /dev/null \
+	  "$(options)" "$(extrafiles)"
+	touch $@
+
 $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
 		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
 		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index b2965ba70cd0..23a52bcd69ac 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -450,6 +450,7 @@ BFD_H = ../bfd/bfd.h
 HFILES = \
 	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
 	bpf-desc.h bpf-opc.h \
+	cris-desc.h cris-opc.h \
 	epiphany-desc.h epiphany-opc.h \
 	fr30-desc.h fr30-opc.h \
 	frv-desc.h frv-opc.h \
@@ -499,6 +500,7 @@ TARGET_LIBOPCODES_CFILES = \
 	cgen-opc.c \
 	cr16-dis.c \
 	cr16-opc.c \
+	cris-desc.c \
 	cris-dis.c \
 	cris-opc.c \
 	crx-dis.c \
@@ -729,9 +731,11 @@ CGENDEPS = \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
 @CGEN_MAINT_FALSE@BPF_DEPS = 
 @CGEN_MAINT_TRUE@BPF_DEPS = stamp-bpf
+@CGEN_MAINT_FALSE@CRIS_DEPS = 
+@CGEN_MAINT_TRUE@CRIS_DEPS = stamp-cris
 @CGEN_MAINT_FALSE@EPIPHANY_DEPS = 
 @CGEN_MAINT_TRUE@EPIPHANY_DEPS = stamp-epiphany
 @CGEN_MAINT_FALSE@FR30_DEPS = 
@@ -915,6 +919,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgen-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-opc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-desc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crx-dis.Plo@am__quote@
@@ -1417,6 +1422,15 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
 	$(MAKE) run-cgen arch=bpf prefix=bpf \
 		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
 
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h: $(CRIS_DEPS)
+	@true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+	$(SHELL) $(srcdir)/cgen.sh desc $(srcdir) $(CGEN) \
+	  $(CGENDIR) "$(CGENFLAGS)" cris cris $(CPUDIR)/cris.cpu /dev/null \
+	  "$(options)" "$(extrafiles)"
+	touch $@
+
 $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
 		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
 		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
diff --git a/opcodes/cgen.sh b/opcodes/cgen.sh
index bdcc56df687c..cf6a5f112a66 100644
--- a/opcodes/cgen.sh
+++ b/opcodes/cgen.sh
@@ -175,6 +175,40 @@ opcodes)
 	rm -f ${tmp}-asm.in1 ${tmp}-dis.in1
 	;;
 
+desc)
+	# For ports that only generate the desc module & opc header.
+	rm -f ${tmp}-desc.h1 ${tmp}-desc.h
+	rm -f ${tmp}-desc.c1 ${tmp}-desc.c
+	rm -f ${tmp}-opc.h1 ${tmp}-opc.h
+
+	${cgen} ${cgendir}/cgen-opc.scm \
+		-s ${cgendir} \
+		${cgenflags} \
+		-OPC ${opcfile} \
+		-f "${archflags}" \
+		-m all \
+		-a ${archfile} \
+		-i all \
+		-H ${tmp}-desc.h1 \
+		-C ${tmp}-desc.c1 \
+		-O ${tmp}-opc.h1
+
+	sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
+		-e "s/@prefix@/${prefix}/g" \
+		< ${tmp}-desc.h1 > ${tmp}-desc.h
+	${rootdir}/move-if-change ${tmp}-desc.h ${srcdir}/${arch}-desc.h
+	sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
+		-e "s/@prefix@/${prefix}/g" \
+		< ${tmp}-desc.c1 > ${tmp}-desc.c
+	${rootdir}/move-if-change ${tmp}-desc.c ${srcdir}/${arch}-desc.c
+	sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
+		-e "s/@prefix@/${prefix}/g" \
+		< ${tmp}-opc.h1 > ${tmp}-opc.h
+	${rootdir}/move-if-change ${tmp}-opc.h ${srcdir}/${arch}-opc.h
+
+	rm -f ${tmp}-desc.h1 ${tmp}-desc.c1 ${tmp}-opc.h1
+	;;
+
 *)
 	echo "$0: bad action: ${action}" >&2
 	exit 1
diff --git a/sim/cris/cris-desc.c b/opcodes/cris-desc.c
similarity index 100%
rename from sim/cris/cris-desc.c
rename to opcodes/cris-desc.c
diff --git a/sim/cris/cris-desc.h b/opcodes/cris-desc.h
similarity index 100%
rename from sim/cris/cris-desc.h
rename to opcodes/cris-desc.h
diff --git a/sim/cris/cris-opc.h b/opcodes/cris-opc.h
similarity index 100%
rename from sim/cris/cris-opc.h
rename to opcodes/cris-opc.h
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 3dcdbb2da022..d5e8a88f3a8a 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -29,14 +29,13 @@ SIM_OBJS = \
 	sim-if.o arch.o \
 	$(CRISV10F_OBJS) \
 	$(CRISV32F_OBJS) \
-	traps.o \
-	cris-desc.o
+	traps.o
 
 # Extra headers included by sim-main.h.
 # FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS.
 SIM_EXTRA_DEPS = \
 	$(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \
-	arch.h cpuall.h cris-sim.h cris-desc.h engv10.h engv32.h
+	arch.h cpuall.h cris-sim.h engv10.h engv32.h
 
 SIM_EXTRA_CLEAN = cris-clean
 
@@ -97,7 +96,7 @@ cris-clean:
 	  rm -f mloopv$${v}f.c engv$${v}.h stamp-v$${v}fmloop; \
 	  rm -f stamp-v$${v}fcpu; \
 	done
-	-rm -f stamp-arch stamp-desc
+	-rm -f stamp-arch
 	-rm -f tmp-*
 
 # cgen support, enable with --enable-cgen-maint
@@ -106,7 +105,7 @@ CGEN_MAINT = ; @true
 @CGEN_MAINT@CGEN_MAINT =
 
 # Useful when making CGEN-generated files manually, without --enable-cgen-maint.
-stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu stamp-desc
+stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu
 
 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=crisv10,crisv32 \
@@ -135,10 +134,3 @@ stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/cr
 	mv decodev32.c.tmp $(srcdir)/decodev32.c
 	touch stamp-v32fcpu
 cpuv32.h cpuv32.c semcrisv32f-switch.c modelv32.c decodev32.c decodev32.h: $(CGEN_MAINT) stamp-v32fcpu
-
-stamp-desc: $(CGEN_READ_SCM) $(CGEN_DESC_SCM) $(CPU_DIR)/cris.cpu Makefile
-	$(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) \
-		archfile=$(CPU_DIR)/cris.cpu \
-		cpu=cris mach=all
-	touch stamp-desc
-cris-desc.c cris-desc.h cris-opc.h: $(CGEN_MAINT) stamp-desc
-- 
2.31.1


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

* Re: [PATCH v3] opcodes: cris: move desc & opc files from sim/
  2021-05-24  1:23     ` [PATCH v3] " Mike Frysinger
@ 2021-05-24  1:43       ` Hans-Peter Nilsson
  2021-05-24  3:48         ` Mike Frysinger
  2021-05-24  3:46       ` [PATCH v4] " Mike Frysinger
  1 sibling, 1 reply; 21+ messages in thread
From: Hans-Peter Nilsson @ 2021-05-24  1:43 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: binutils, gdb-patches

> From: Mike Frysinger <vapier@gentoo.org>
> Date: Mon, 24 May 2021 03:23:35 +0200

 From the other mail:
  > On 23 May 2021 22:52, Hans-Peter Nilsson wrote:

> > Missing ChangeLog entries.  Those are "still" kept for opcodes/.
> 
> i don't waste time on these until i actually push the change

They're usually subject to review too, not the least since
people tend to forget them in these cross-project events.

> > All other cgen ports keep their desc & opc files under opcodes/, so
> > move the cris files over too.  The cris-opc.c file is already here.
> 
> The commit log is not updated since the first version:
> cris-opc.c isn't just "already there", it's "not generated by CGEN".

> not sure what you mean.  desc/opc files belong in the opcodes project.  i'm
> explaining why this commit is only moving opc.h and not opc.c in this commit.

And since you're dealing with cgen-generated files, there's
a brief ambiguity (whether "already there" means an orphaned
generated file or what you explain) one that would be
resolved by, as I implied, replacing or appending your
"already there" with "not generated by CGEN".

> if you want me to write something else here, just lemme know what you want
> it to say.

See above: "The cris-opc.c file is already here and not
generated by CGEN".  This'd also explains the reason for the
cgen.sh tweak.

Ok with that, after a cris-elf testsuite run (gas, binutils,
ld, sim), thanks.

brgds, H-P

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

* [PATCH v4] opcodes: cris: move desc & opc files from sim/
  2021-05-24  1:23     ` [PATCH v3] " Mike Frysinger
  2021-05-24  1:43       ` Hans-Peter Nilsson
@ 2021-05-24  3:46       ` Mike Frysinger
  2021-05-24 13:24         ` Hans-Peter Nilsson
  1 sibling, 1 reply; 21+ messages in thread
From: Mike Frysinger @ 2021-05-24  3:46 UTC (permalink / raw)
  To: binutils, Hans-Peter Nilsson; +Cc: gdb-patches

All other cgen ports keep their generated desc & opc files under
opcodes/, so move the cris files over too.  The cris-opc.c file,
while not generated, is already here to complement.
---
 opcodes/Makefile.am               | 15 +++++++++++++-
 opcodes/Makefile.in               | 16 ++++++++++++++-
 opcodes/cgen.sh                   | 34 +++++++++++++++++++++++++++++++
 opcodes/configure                 |  2 +-
 opcodes/configure.ac              |  2 +-
 {sim/cris => opcodes}/cris-desc.c |  0
 {sim/cris => opcodes}/cris-desc.h |  0
 {sim/cris => opcodes}/cris-opc.h  |  0
 sim/cris/Makefile.in              | 16 ++++-----------
 9 files changed, 69 insertions(+), 16 deletions(-)
 rename {sim/cris => opcodes}/cris-desc.c (100%)
 rename {sim/cris => opcodes}/cris-desc.h (100%)
 rename {sim/cris => opcodes}/cris-opc.h (100%)

diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 04980f36b113..ddae8bd9052f 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -60,6 +60,7 @@ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
 HFILES = \
 	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
 	bpf-desc.h bpf-opc.h \
+	cris-desc.h cris-opc.h \
 	epiphany-desc.h epiphany-opc.h \
 	fr30-desc.h fr30-opc.h \
 	frv-desc.h frv-opc.h \
@@ -108,6 +109,7 @@ TARGET_LIBOPCODES_CFILES = \
 	cgen-opc.c \
 	cr16-dis.c \
 	cr16-opc.c \
+	cris-desc.c \
 	cris-dis.c \
 	cris-opc.c \
 	crx-dis.c \
@@ -371,10 +373,11 @@ CGENDEPS = \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
 
 if CGEN_MAINT
 BPF_DEPS = stamp-bpf
+CRIS_DEPS = stamp-cris
 EPIPHANY_DEPS = stamp-epiphany
 FR30_DEPS = stamp-fr30
 FRV_DEPS = stamp-frv
@@ -390,6 +393,7 @@ XC16X_DEPS = stamp-xc16x
 XSTORMY16_DEPS = stamp-xstormy16
 else
 BPF_DEPS =
+CRIS_DEPS =
 EPIPHANY_DEPS =
 FR30_DEPS =
 FRV_DEPS =
@@ -431,6 +435,15 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
 	$(MAKE) run-cgen arch=bpf prefix=bpf \
 		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
 
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h: $(CRIS_DEPS)
+	@true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+	$(SHELL) $(srcdir)/cgen.sh desc $(srcdir) $(CGEN) \
+	  $(CGENDIR) "$(CGENFLAGS)" cris cris $(CPUDIR)/cris.cpu /dev/null \
+	  "$(options)" "$(extrafiles)"
+	touch $@
+
 $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
 		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
 		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index b2965ba70cd0..23a52bcd69ac 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -450,6 +450,7 @@ BFD_H = ../bfd/bfd.h
 HFILES = \
 	aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \
 	bpf-desc.h bpf-opc.h \
+	cris-desc.h cris-opc.h \
 	epiphany-desc.h epiphany-opc.h \
 	fr30-desc.h fr30-opc.h \
 	frv-desc.h frv-opc.h \
@@ -499,6 +500,7 @@ TARGET_LIBOPCODES_CFILES = \
 	cgen-opc.c \
 	cr16-dis.c \
 	cr16-opc.c \
+	cris-desc.c \
 	cris-dis.c \
 	cris-opc.c \
 	crx-dis.c \
@@ -729,9 +731,11 @@ CGENDEPS = \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
-CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
+CGEN_CPUS = cris epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16
 @CGEN_MAINT_FALSE@BPF_DEPS = 
 @CGEN_MAINT_TRUE@BPF_DEPS = stamp-bpf
+@CGEN_MAINT_FALSE@CRIS_DEPS = 
+@CGEN_MAINT_TRUE@CRIS_DEPS = stamp-cris
 @CGEN_MAINT_FALSE@EPIPHANY_DEPS = 
 @CGEN_MAINT_TRUE@EPIPHANY_DEPS = stamp-epiphany
 @CGEN_MAINT_FALSE@FR30_DEPS = 
@@ -915,6 +919,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgen-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cr16-opc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-desc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-dis.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cris-opc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crx-dis.Plo@am__quote@
@@ -1417,6 +1422,15 @@ stamp-bpf: $(CGENDEPS) $(CPUDIR)/bpf.cpu $(CPUDIR)/bpf.opc
 	$(MAKE) run-cgen arch=bpf prefix=bpf \
 		archfile=$(CPUDIR)/bpf.cpu opcfile=$(CPUDIR)/bpf.opc
 
+$(srcdir)/cris-desc.h $(srcdir)/cris-desc.c $(srcdir)/cris-opc.h: $(CRIS_DEPS)
+	@true
+
+stamp-cris: $(CGENDEPS) $(CPUDIR)/cris.cpu
+	$(SHELL) $(srcdir)/cgen.sh desc $(srcdir) $(CGEN) \
+	  $(CGENDIR) "$(CGENFLAGS)" cris cris $(CPUDIR)/cris.cpu /dev/null \
+	  "$(options)" "$(extrafiles)"
+	touch $@
+
 $(srcdir)/epiphany-desc.h $(srcdir)/epiphany-desc.c $(srcdir)/epiphany-opc.h \
 		$(srcdir)/epiphany-opc.c $(srcdir)/epiphany-ibld.c \
 		$(srcdir)/epiphany-opinst.c $(srcdir)/epiphany-asm.c \
diff --git a/opcodes/cgen.sh b/opcodes/cgen.sh
index bdcc56df687c..cf6a5f112a66 100644
--- a/opcodes/cgen.sh
+++ b/opcodes/cgen.sh
@@ -175,6 +175,40 @@ opcodes)
 	rm -f ${tmp}-asm.in1 ${tmp}-dis.in1
 	;;
 
+desc)
+	# For ports that only generate the desc module & opc header.
+	rm -f ${tmp}-desc.h1 ${tmp}-desc.h
+	rm -f ${tmp}-desc.c1 ${tmp}-desc.c
+	rm -f ${tmp}-opc.h1 ${tmp}-opc.h
+
+	${cgen} ${cgendir}/cgen-opc.scm \
+		-s ${cgendir} \
+		${cgenflags} \
+		-OPC ${opcfile} \
+		-f "${archflags}" \
+		-m all \
+		-a ${archfile} \
+		-i all \
+		-H ${tmp}-desc.h1 \
+		-C ${tmp}-desc.c1 \
+		-O ${tmp}-opc.h1
+
+	sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
+		-e "s/@prefix@/${prefix}/g" \
+		< ${tmp}-desc.h1 > ${tmp}-desc.h
+	${rootdir}/move-if-change ${tmp}-desc.h ${srcdir}/${arch}-desc.h
+	sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
+		-e "s/@prefix@/${prefix}/g" \
+		< ${tmp}-desc.c1 > ${tmp}-desc.c
+	${rootdir}/move-if-change ${tmp}-desc.c ${srcdir}/${arch}-desc.c
+	sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
+		-e "s/@prefix@/${prefix}/g" \
+		< ${tmp}-opc.h1 > ${tmp}-opc.h
+	${rootdir}/move-if-change ${tmp}-opc.h ${srcdir}/${arch}-opc.h
+
+	rm -f ${tmp}-desc.h1 ${tmp}-desc.c1 ${tmp}-opc.h1
+	;;
+
 *)
 	echo "$0: bad action: ${action}" >&2
 	exit 1
diff --git a/opcodes/configure b/opcodes/configure
index 922a939125b3..470231ebc803 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -12216,7 +12216,7 @@ if test x${all_targets} = xfalse ; then
 	bfd_avr_arch)		ta="$ta avr-dis.lo" ;;
 	bfd_bfin_arch)		ta="$ta bfin-dis.lo" ;;
 	bfd_cr16_arch)		ta="$ta cr16-dis.lo cr16-opc.lo" ;;
-	bfd_cris_arch)		ta="$ta cris-dis.lo cris-opc.lo cgen-bitset.lo" ;;
+	bfd_cris_arch)		ta="$ta cris-desc.lo cris-dis.lo cris-opc.lo cgen-bitset.lo" ;;
 	bfd_crx_arch)		ta="$ta crx-dis.lo crx-opc.lo" ;;
 	bfd_csky_arch)		ta="$ta csky-dis.lo" ;;
 	bfd_d10v_arch)		ta="$ta d10v-dis.lo d10v-opc.lo" ;;
diff --git a/opcodes/configure.ac b/opcodes/configure.ac
index 911c9c6f0826..e564f0673341 100644
--- a/opcodes/configure.ac
+++ b/opcodes/configure.ac
@@ -277,7 +277,7 @@ if test x${all_targets} = xfalse ; then
 	bfd_avr_arch)		ta="$ta avr-dis.lo" ;;
 	bfd_bfin_arch)		ta="$ta bfin-dis.lo" ;;
 	bfd_cr16_arch)		ta="$ta cr16-dis.lo cr16-opc.lo" ;;
-	bfd_cris_arch)		ta="$ta cris-dis.lo cris-opc.lo cgen-bitset.lo" ;;
+	bfd_cris_arch)		ta="$ta cris-desc.lo cris-dis.lo cris-opc.lo cgen-bitset.lo" ;;
 	bfd_crx_arch)		ta="$ta crx-dis.lo crx-opc.lo" ;;
 	bfd_csky_arch)		ta="$ta csky-dis.lo" ;;
 	bfd_d10v_arch)		ta="$ta d10v-dis.lo d10v-opc.lo" ;;
diff --git a/sim/cris/cris-desc.c b/opcodes/cris-desc.c
similarity index 100%
rename from sim/cris/cris-desc.c
rename to opcodes/cris-desc.c
diff --git a/sim/cris/cris-desc.h b/opcodes/cris-desc.h
similarity index 100%
rename from sim/cris/cris-desc.h
rename to opcodes/cris-desc.h
diff --git a/sim/cris/cris-opc.h b/opcodes/cris-opc.h
similarity index 100%
rename from sim/cris/cris-opc.h
rename to opcodes/cris-opc.h
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 3dcdbb2da022..d5e8a88f3a8a 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -29,14 +29,13 @@ SIM_OBJS = \
 	sim-if.o arch.o \
 	$(CRISV10F_OBJS) \
 	$(CRISV32F_OBJS) \
-	traps.o \
-	cris-desc.o
+	traps.o
 
 # Extra headers included by sim-main.h.
 # FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS.
 SIM_EXTRA_DEPS = \
 	$(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \
-	arch.h cpuall.h cris-sim.h cris-desc.h engv10.h engv32.h
+	arch.h cpuall.h cris-sim.h engv10.h engv32.h
 
 SIM_EXTRA_CLEAN = cris-clean
 
@@ -97,7 +96,7 @@ cris-clean:
 	  rm -f mloopv$${v}f.c engv$${v}.h stamp-v$${v}fmloop; \
 	  rm -f stamp-v$${v}fcpu; \
 	done
-	-rm -f stamp-arch stamp-desc
+	-rm -f stamp-arch
 	-rm -f tmp-*
 
 # cgen support, enable with --enable-cgen-maint
@@ -106,7 +105,7 @@ CGEN_MAINT = ; @true
 @CGEN_MAINT@CGEN_MAINT =
 
 # Useful when making CGEN-generated files manually, without --enable-cgen-maint.
-stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu stamp-desc
+stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu
 
 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=crisv10,crisv32 \
@@ -135,10 +134,3 @@ stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/cr
 	mv decodev32.c.tmp $(srcdir)/decodev32.c
 	touch stamp-v32fcpu
 cpuv32.h cpuv32.c semcrisv32f-switch.c modelv32.c decodev32.c decodev32.h: $(CGEN_MAINT) stamp-v32fcpu
-
-stamp-desc: $(CGEN_READ_SCM) $(CGEN_DESC_SCM) $(CPU_DIR)/cris.cpu Makefile
-	$(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) \
-		archfile=$(CPU_DIR)/cris.cpu \
-		cpu=cris mach=all
-	touch stamp-desc
-cris-desc.c cris-desc.h cris-opc.h: $(CGEN_MAINT) stamp-desc
-- 
2.31.1


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

* Re: [PATCH v3] opcodes: cris: move desc & opc files from sim/
  2021-05-24  1:43       ` Hans-Peter Nilsson
@ 2021-05-24  3:48         ` Mike Frysinger
  0 siblings, 0 replies; 21+ messages in thread
From: Mike Frysinger @ 2021-05-24  3:48 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: binutils, gdb-patches

On 24 May 2021 03:43, Hans-Peter Nilsson wrote:
> Ok with that, after a cris-elf testsuite run (gas, binutils,
> ld, sim), thanks.

tests show no regressions for cris-elf with the v4
-mike

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

* Re: [PATCH v4] opcodes: cris: move desc & opc files from sim/
  2021-05-24  3:46       ` [PATCH v4] " Mike Frysinger
@ 2021-05-24 13:24         ` Hans-Peter Nilsson
  2021-05-25 10:13           ` Alan Modra
  0 siblings, 1 reply; 21+ messages in thread
From: Hans-Peter Nilsson @ 2021-05-24 13:24 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: binutils, gdb-patches

> From: Mike Frysinger via Binutils <binutils@sourceware.org>
> Date: Mon, 24 May 2021 05:46:41 +0200

> All other cgen ports keep their generated desc & opc files under
> opcodes/, so move the cris files over too.  The cris-opc.c file,
> while not generated, is already here to complement.
> ---
>  opcodes/Makefile.am               | 15 +++++++++++++-
>  opcodes/Makefile.in               | 16 ++++++++++++++-
>  opcodes/cgen.sh                   | 34 +++++++++++++++++++++++++++++++
>  opcodes/configure                 |  2 +-
>  opcodes/configure.ac              |  2 +-
>  {sim/cris => opcodes}/cris-desc.c |  0
>  {sim/cris => opcodes}/cris-desc.h |  0
>  {sim/cris => opcodes}/cris-opc.h  |  0
>  sim/cris/Makefile.in              | 16 ++++-----------
>  9 files changed, 69 insertions(+), 16 deletions(-)
>  rename {sim/cris => opcodes}/cris-desc.c (100%)
>  rename {sim/cris => opcodes}/cris-desc.h (100%)
>  rename {sim/cris => opcodes}/cris-opc.h (100%)

Ok with a ChangeLog entry, but I guess it's mostly "Moved
from..." and "New rule".  I don't think you need to post
that though.  Thanks.

brgds, H-P

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

* Re: [PATCH v4] opcodes: cris: move desc & opc files from sim/
  2021-05-24 13:24         ` Hans-Peter Nilsson
@ 2021-05-25 10:13           ` Alan Modra
  0 siblings, 0 replies; 21+ messages in thread
From: Alan Modra @ 2021-05-25 10:13 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: Mike Frysinger, binutils, gdb-patches

On Mon, May 24, 2021 at 03:24:18PM +0200, Hans-Peter Nilsson via Binutils wrote:
> Ok with a ChangeLog entry, but I guess it's mostly "Moved
> from..." and "New rule".  I don't think you need to post
> that though.  Thanks.

The files moved were a little out of date.  I've pushed a regen as
commit bc30a119f3e.

-- 
Alan Modra
Australia Development Lab, IBM

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

end of thread, other threads:[~2021-05-25 10:13 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19  1:56 [PATCH] opcodes: cris: move desc & opc files from sim/ Mike Frysinger
2021-05-19 14:52 ` Andrew Burgess
2021-05-19 16:21   ` Mike Frysinger
2021-05-19 16:21 ` Mike Frysinger
2021-05-19 21:26   ` Hans-Peter Nilsson
2021-05-19 21:32     ` Hans-Peter Nilsson
2021-05-19 23:38       ` Mike Frysinger
2021-05-19 23:48         ` Hans-Peter Nilsson
2021-05-20  5:18           ` Mike Frysinger
2021-05-20 13:21             ` Hans-Peter Nilsson
2021-05-23  3:55               ` Mike Frysinger
2021-05-23  4:12   ` [PATCH v2] " Mike Frysinger
2021-05-23 20:52     ` Hans-Peter Nilsson
2021-05-23 21:01       ` Hans-Peter Nilsson
2021-05-24  1:23       ` Mike Frysinger
2021-05-24  1:23     ` [PATCH v3] " Mike Frysinger
2021-05-24  1:43       ` Hans-Peter Nilsson
2021-05-24  3:48         ` Mike Frysinger
2021-05-24  3:46       ` [PATCH v4] " Mike Frysinger
2021-05-24 13:24         ` Hans-Peter Nilsson
2021-05-25 10:13           ` Alan Modra

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