I\'d like to write a very small proof-of-concept JIT compiler for a toy language processor I\'ve written (purely academic), but I\'m having some trouble in the middle-altitu
Youmay want to have a look at libjit which provides exactly the infrastructure you're looking for:
The libjit library implements just-in-time compilation functionality. Unlike other JITs, this one is designed to be independent of any particular virtual machine bytecode format or language.
http://freshmeat.net/projects/libjit