Kaffe VM Modifications

Brian Briggman bbriggma at spd.dsccc.com
Tue Nov 10 11:51:13 PST 1998

I am trying to compare the performance of a 
theoretical "Sun" JVM that can only perform 
operations on 32-bit values versus the 
performance of a theoretical new JVM that can 
truly perform operations on 8-bit operands, 
without having to convert all bytes to 32-bit 
values before performing operations on them.  

My original intention was to add a byte-size
stack to the theoretical Sun JVM and to add a
few simple byte level instructions (bload,
badd, bstore, etc...) to the instructions
currently supported in the Sun JVM.  I want
to use any of the 25 currently undefined
opcodes for my new instructions.  I plan on 
creating class files by hand that make use
of my new bytecodes, rather than trying to 
modify Pizza to make use of them for me (at
least at first).  I do realize that I will
have to run Kaffe interpreted.

I want to use Kaffe so that I can modify the
source to add my new instructions, but after
looking through the source, I'm not exactly 
sure where to start making changes.  From what
I can tell, Kaffe defines the current defined
bytecodes in:
Once I have made my changes to bytecode.h, I
looking at adding the functions definitions to:
	kaffe/kaffevm/intrp/machine.c and .h
Does is sound like I'm on the right track for 
allowing Kaffe to interpret my new bytecodes?
Does anyone have any suggestions for ways I
can measure how long Kaffe takes to execute
both my original bytecode fragment(converting
all bytes to 32-bit values) and my modified
bytecode fragment(that uses my new bytecodes)?

This is for a project I'm doing for a Computer
Architecture class, and I need to add new
"instructions" (bytecodes in this case) to
an existing architecture. (Rather than simply
allowing the bytes to be treated as 16 or 32
bit values, or letting JIT to convert them
down to bytes for me.)

Thanks in advance,

Brian Briggman
bbriggma at spd.dsccc.com

More information about the kaffe mailing list