From 79472b45328232b083e897a511d4160a6dde0463 Mon Sep 17 00:00:00 2001 From: "Jose E. Marchesi" Date: Thu, 23 May 2019 19:04:36 +0200 Subject: opcodes: add support for eBPF This patch adds support for the Linux kernel eBPF architecture to the opcodes. The port is based on CGEN. opcodes/ChangeLog: 2019-05-23 Jose E. Marchesi * configure.ac (SHARED_DEPENDENCIES): Add case for bfd_bpf_arch. * configure: Regenerated. * Makefile.am: Add rules for the files generated from cpu/bpf.cpu and cpu/bpf.opc. (HFILES): Add bpf-desc.h and bpf-opc.h. (TARGET_LIBOPCODES_CFILES): Add bpf-asm.c, bpf-desc.c, bpf-dis.c, bpf-ibld.c and bpf-opc.c. (BPF_DEPS): Define. * Makefile.in: Regenerated. * disassemble.c (ARCH_bpf): Define. (disassembler): Add case for bfd_arch_bpf. (disassemble_init_for_target): Likewise. (enum epbf_isa_attr): Define. * disassemble.h: extern print_insn_bpf. * bpf-asm.c: Generated. * bpf-opc.h: Likewise. * bpf-opc.c: Likewise. * bpf-ibld.c: Likewise. * bpf-dis.c: Likewise. * bpf-desc.h: Likewise. * bpf-desc.c: Likewise. --- opcodes/Makefile.in | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'opcodes/Makefile.in') diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in index 3277ba954a3..ee8b31153fb 100644 --- a/opcodes/Makefile.in +++ b/opcodes/Makefile.in @@ -408,6 +408,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -448,6 +449,7 @@ BFD_H = ../bfd/bfd.h # Header files. HFILES = \ aarch64-asm.h aarch64-dis.h aarch64-opc.h aarch64-tbl.h \ + bpf-desc.h bpf-opc.h \ epiphany-desc.h epiphany-opc.h \ fr30-desc.h fr30-opc.h \ frv-desc.h frv-opc.h \ @@ -507,6 +509,11 @@ TARGET_LIBOPCODES_CFILES = \ d30v-dis.c \ d30v-opc.c \ dlx-dis.c \ + bpf-asm.c \ + bpf-desc.c \ + bpf-dis.c \ + bpf-ibld.c \ + bpf-opc.c \ epiphany-asm.c \ epiphany-desc.c \ epiphany-dis.c \ @@ -725,6 +732,8 @@ CGENDEPS = \ 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_MAINT_FALSE@BPF_DEPS = +@CGEN_MAINT_TRUE@BPF_DEPS = stamp-bpf @CGEN_MAINT_FALSE@EPIPHANY_DEPS = @CGEN_MAINT_TRUE@EPIPHANY_DEPS = stamp-epiphany @CGEN_MAINT_FALSE@FR30_DEPS = @@ -897,6 +906,11 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arm-dis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avr-dis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bfin-dis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf-asm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf-desc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf-dis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf-ibld.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf-opc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgen-asm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgen-bitset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgen-dis.Plo@am__quote@ @@ -1398,6 +1412,15 @@ run-cgen-all: # For now, require developers to configure with --enable-cgen-maint. +$(srcdir)/bpf-desc.h $(srcdir)/bpf-desc.c $(srcdir)/bpf-opc.h \ + $(srcdir)/bpf-opc.c $(srcdir)/bpf-ibld.c \ + $(srcdir)/bpf-asm.c $(srcdir)/bpf-dis.c: $(BPF_DEPS) + @true + +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)/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 \ -- cgit v1.2.1