Re: how to extend SableVM instructions set with macro instructions

Etienne Gagnon <[email protected]> Sat, 28 May 2005 17:20:57 -0400
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
[email protected] wrote:
> I intend to add new instructions to JVM instructions set. I note that virtual
> instructions will represent a sequence of standard instructions (bytecode
> factorization technique). So I must bring some modifications to the source
> code.
> 
> Can you help me to identify files that are concerned by modifications and give
> me some indications to implement this extension?

If you only intend to add instructions, without changing anything else
in the "class file format" (such as constant pool, etc.), then you will
need to add the implementation of your new bytecode in
instructions.m4.c, and modify the related method preparation code in
prepare_method.c.  You will probably need to do minor modifications
elsewhere (e.g. constants.h).  The C compiler will help you find these.

Your bytecode implementation must work with the 3 sablevm engines
(switch, direct, and inlined).  A description of these engines can be
found in Chapter 2 of http://sablevm.org/people/egagnon/gagnon-phd.pdf

You can find many helpful tips and explanations in the doc/ directory.

If you need to modify the class file format, then you will need to play
within class_file_parser.m4.c and types.h.

Have fun!

Etienne

-- 
Etienne M. Gagnon, Ph.D.            http://www.info2.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/

_______________________________________________
SableVM-devel mailing list
[email protected]
http://sablevm.org/lists/control/listinfo/sablevm-devel
signature.asc (application/pgp-signature, 256 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCmODAjyrJi4rH84gRAsysAJ9FDNTSYn7N7HUTmaKPK4y8pbDIfACfdSzL
iaP3EvmbOpCp5yot6TjTRaY=
=U9xe
-----END PGP SIGNATURE-----