This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using CGEN Disassembler


"Stephen Done" <stephen.done@cw.com> writes:

> I don't run the box I am using, so installing a new version of binutils
> could be tricky.

You needn't install binutils in any official place in order to build
an m32r assembler that uses CGEN opcode tables.  I'm just talking
about configuring and building binutils, and possibly installing in a
directory where you have write permission, such as somewhere under
your homedir (via configure's --prefix=<DIR> option).  It sounds as
though you need more experience with the basics of configuring and
building GNU packages.  See the README and INSTALL files at the
toplevel dir of any GNU package.)

> Fundamental question:
>   What are the names of the cgen binaries ?

This is the target that generates opcode tables in opcodes/Makefile.in:

run-cgen:
	$(SHELL) $(srcdir)/cgen.sh opcodes $(srcdir) $(CGEN) \
	  $(CGENDIR) "$(CGENFLAGS)" $(arch) $(prefix) \
	  "$(options)" $(extrafiles)
	touch stamp-${prefix}

This is what it looks like at `make all-gas' time:

make[3]: Entering directory `/1/redback/tools-src/cygnus-unified/HOST-i686-pc-linux,TARGET-ppa/opcodes'
make run-cgen arch=ppa prefix=ppa options= extrafiles=
make[4]: Entering directory `/1/redback/tools-src/cygnus-unified/HOST-i686-pc-linux,TARGET-ppa/opcodes'
/bin/sh ../../src/opcodes/cgen.sh opcodes ../../src/opcodes `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi` \
  ../../src/opcodes/../cgen "-v" ppa ppa \
  "" 
Skipping slib/sort, already loaded.
Skipping slib/random, already loaded.
cgen -s ../../src/opcodes/../cgen/cgen-opc.scm -s ../../src/opcodes/../cgen -v -f  -m all -a ppa -H tmp-desc.h1 -C tmp-desc.c1 -O tmp-opc.h1 -P tmp-opc.c1 -L tmp-ibld.in1 -A tmp-asm.in1 -D tmp-dis.in1 
Loading cpu file ../../src/opcodes/../cgen/ppa.cpu ...
Including file simplify.inc ...
Processing cpu file ../../src/opcodes/../cgen/ppa.cpu ...
Analyzing instruction set ...
Done analysis.
Generating ppa desc.h ...
Generating ppa desc.c ...
Generating ppa-opc.h ...
Generating ppa-opc.c ...
Generating ppa-ibld.in ...
Generating ppa-asm.in ...
Generating ppa-dis.in ...
../../src/opcodes/ppa-desc.h is unchanged
../../src/opcodes/ppa-desc.c is unchanged
../../src/opcodes/ppa-opc.h is unchanged
../../src/opcodes/ppa-opc.c is unchanged
../../src/opcodes/ppa-ibld.c is unchanged
../../src/opcodes/ppa-asm.c is unchanged
../../src/opcodes/ppa-dis.c is unchanged
touch stamp-ppa

>   Hopefully they're already installed on the box, so I won't need to get
> anything updated.

All you need installed is guile.  The cgen implementation is provided
as scheme source code in the cgen/ subdir.

>   I assumed 'cgen', but that isn't present.

Each "application" has a cgen.sh script which serves as the
entry-point.  The cgen "applications" are those that generate
(dis)assembler opcode tables and insn simulator semantic hooks.
They reside in opcodes/cgen.sh and sim/common/cgen.sh

> Is there a docs page that explains what each binary does ?

Dunno.  If it's not in the cgen manual, you must rely on reading
the code: the cgen.sh scripts and the makefiles that invoke them.

> Maybe the new binutils has man pages for the binaries.

Probably not.

Greg


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]