CAVA Version 1.0


Everything related to CAVA is in this directory tree.  The substantial
source files for CAVA are in the 'master' subdirectory, but a bunch of
other files need minor editing (they are listed at end).  Each 'version'
of cava (a combination of gcc version and ISA) requires its own master 
directory master_<version>.

To add your own instructions, look at files `syntax.in' and `semantics.in'
in the master_<version>/arch directory.  I'm sorry there's no
documentation about them, you just have to infer from them and the python
files that crunch them (located in $CAVA/tools).  They are very fast,
though, so you can type 'make' in this directory debugging by
trial-and-error.  That's what I do too...

To build software, use a bash shell and set the following three 
environment variables:
CAVA=<this directory (the root of the cava tree)>
CAVABUILD=<the destination of the build (can be a subdirectory of $CAVA)>
PATH=$CAVA/bin:$CAVA/tools:$PATH (the path must contain the bin and tools
directory for the build to work properly).

To start a bash shell and set these variables automatically run:
./set_cava_env.sh [cava_version]

Once the environment is set, simply run "make" in this directory.

The ISA manual is auto-generated in $CAVA/master_<version>/doc.  That's what
is on my web page.  When you add new instructions, they will get
documented automatically too.

To run test programs, go to $CAVA/test/181.mcf/run and do following:
  caveat ../src/mcf ../data/test/input/inp.in
or go to $CAVA/test/176.gcc/run and do following:
  caveat ../src/cc1 ../data/test/input/cccp.i -o cccp.s
The files `ifreq.out' in the run directories will contain counts
of opcodes afterwards.


The system is not really general yet--some codes know about 24 bits of
instruction, etc.  And there is a really bad hack in the assembler
during "relaxation" that knows about opcodes too.  But it is mostly
general, and if you like you can help get it to be general the rest
of the way.

List of source tree files that needed modification (besides the 'cava'
directories):
gcc/src:
	config.sub
	gcc/config.gcc
binutils/src:
	bfd/Makefile.am
	bfd/config.bfd
	bfd/configure.in
	bfd/archures.c
	bfd/targets.c
	bfd/bfd-in2.h
	gas/configure.in
	ld/Makefile.am
	ld/configure.host
	ld/configure.tgt
	opcodes/configure.in
	opcodes/disassemble.c
	gdb/configure.tgt
	config.sub
glibc/src:
	configure.in
	shlib-versions		(Don't know why yet...)



How to Get GCC Sources:
	cd ~/cava/gcc
	CVSROOT=:pserver:anoncvs@subversions.gnu.org:/cvsroot/gcc
	export CVSROOT
	cvs -r -z 9 co -rgcc_3_0_3_release -d src gcc






