Help for JIT

Patrick Tullmann tullmann at cs.utah.edu
Wed Aug 15 01:03:25 PDT 2001


> I'm looking into the JIT compiler of Kaffe. In the
> file "icode.c"( in kaffe/kaffevm/jit/icode.c ) there

You should look in the jit3/ directory for the most recent version of
the JIT code.  Though I believe the code in jit/ still works.

The other critical file to look at is kaffevm/kaffe.def.  That defines
the java bytecodes in terms of the macros you've already discovered.

The "sequence" struct is for generating machine instructions.  It
contains data and a function for emitting the platform's instructions.

> The things to which these get defined do not seem to be function
> names though( example spill_Rxx, fspill_Rxx etc )!

Look at the define_insn() macro in kaffevm/jit*/funcs.c.  This is what
converts the define_insn() macros in the config/* directories into
functions that the engine can invoke.  I'm not sure what the point of
this macro is, it just defines a fixed function signature.

Note that this macro is different from the define_insn() used to
define the bytecodes (see the XXX in jit/funcs.c).  (One is two arg,
one is single-arg).

> Would appreciate if someone could help..

Hope this helps.

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann at cs.utah.edu
  "You can't have everything.  Where would you put it?" -- S. Wright


More information about the kaffe mailing list