public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Greg McGary <greg@mcgary.org>
To: "Stephen Done" <stephen.done@cw.com>
Cc: <cgen@sources.redhat.com>
Subject: Re: Using CGEN Disassembler
Date: Tue, 06 Nov 2001 08:48:00 -0000	[thread overview]
Message-ID: <msoflwnm4z.fsf@mcgary.org> (raw)
In-Reply-To: <ICEBKEBHKLMIFEDLONLMCEJOCCAA.stephen.done@cw.com>

"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

WARNING: multiple messages have this Message-ID
From: Greg McGary <greg@mcgary.org>
To: "Stephen Done" <stephen.done@cw.com>
Cc: <cgen@sources.redhat.com>
Subject: Re: Using CGEN Disassembler
Date: Wed, 21 Nov 2001 08:07:00 -0000	[thread overview]
Message-ID: <msoflwnm4z.fsf@mcgary.org> (raw)
Message-ID: <20011121080700.htgY4VXZpd_UmOMhRsM9KoKzDnwdSrjYT4mi_EDctLA@z> (raw)
In-Reply-To: <ICEBKEBHKLMIFEDLONLMCEJOCCAA.stephen.done@cw.com>

"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

  reply	other threads:[~2001-11-21 16:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-25 12:26 Stephen Done
2001-10-29 10:37 ` Greg McGary
2001-11-04 19:57   ` Stephen Done
2001-11-06  8:48     ` Greg McGary [this message]
2001-11-21  8:07       ` Greg McGary
2001-11-21  7:24     ` Stephen Done
2001-11-21  6:57   ` Greg McGary
2001-11-05  4:10 ` Frank Ch. Eigler
2001-11-05 17:03   ` Stephen Done
2001-11-21  7:54     ` Stephen Done
2001-11-21  7:46   ` Frank Ch. Eigler
2001-11-06 11:07 ` Alan Lehotsky
2001-11-06 10:48   ` Stephen Done at home
2001-11-21 17:39     ` Stephen Done@home
2001-11-23  6:35   ` Alan Lehotsky
2001-11-21  6:45 ` Stephen Done

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=msoflwnm4z.fsf@mcgary.org \
    --to=greg@mcgary.org \
    --cc=cgen@sources.redhat.com \
    --cc=stephen.done@cw.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).