Jazelle [was: hardware for eToys]

Klaus D. Witzel klaus.witzel at cobss.com
Wed Nov 15 04:35:21 UTC 2006


Hi Jecel,

on Tue, 14 Nov 2006 20:49:09 +0100, you wrote:
> Klaus D. Witzel wrote:
>> nice find, perhaps they learned the eToys name from the OLPC project ;-)
>
> This is a rather obvious name - I remember two companies fighting over
> it back in the .com era.
>
>> Question to the VM guru: are there any opcodes in the instruction set of
>> ARM9 which allow a *fast* VM? A *small* VM is addressed by the thumb
>> thing, IIRC. But what about speed. And what VM technology, (direct)
>> threaded bytecode, or what does ARM9 support best.
>
> This chip has the Jazelle 1 technology,

Ah, I didn't associate Jazelle with ARM9. I thought that Jazelle was still  
for the lab guys.

> which is unfortunately hardwired
> for Java. The most common bytecodes get translated on the fly into a
> single ARM instruction (just like Thumb) while the more complex ones
> trap into a software implementation. An equivalent circuit for handling
> Squeak bytecodes would be fantastic.

Well, even the JVM is an Universal Turing machine ;-)

I have a Squeak compiler which emits the JVM's bytecodes (into regular  
class files). The run-time is hand-crafted as a very thin layer (currently  
around SmallIntegers, Characters and Floats and other basic material like  
ByteArray, OrderedCollection and BytesWriteStream [a companion of  
aByteArray>>writeStream] and analog to that String and CharsWriteStream,  
plus FileDirectory and the bit of refactoring done with Magnitude).

Just sufficient support for the compiler compiling itself :)

Now every JVM does dynamic dispatch if the correct opcodes are used (O.K.  
the bytecode verifier has to be convinced but that is only pro-forma and  
does not affect the run-time; recently Adrian Kuhn had the same idea how  
to do this; even GCJ knows how to do this :) No "Invokedynamic" is needed  
(except if that would automagically do boxing/unboxing, then I'd employ  
"Invokedynamic"). And only field access (instVar, classVar) needs the CAST  
opcode ;-) Well, I think that especially Jazelle can live without the CAST  
opcode :)

I would like to see this all running on Jazelle but lack the expertise for  
choosing the right platform for *not* producing an expensive failure. Can  
you help me with your expertise to choose a Jazelle platform, *that* would  
be fantastic.

/Klaus




More information about the Squeak-dev mailing list