[LLVMdev] Using LLVM to target the JVM
ccox at tripos.com
Tue Mar 1 09:27:01 PST 2005
The best overview for NestedVM appears to have disappeared off of the web,
so I've attached it.
>From the attached paper:
The MIPS R2000 ISA bears many similarities to the
Java Virtual Machine. Most of the instructions in the
original MIPS ISA operate only on 32-bit aligned memory
locations. This allows NestedVM to represent
memory as a Java int array indexed by page (the
top n bits of the address) and offset (the remaining bits)
without introducing additional overhead. MIPS's nonaligned
memory load instructions are only rarely emitted
by most compilers since they carry a performance
penalty on physical MIPS implementations.
Our choice of a paged representation for memory carries
only a small performance disadvantage:
Additionally, this representation lets us to take advantage
of the fact that on most JVM's, checking for
a NullPointerException carries no performance
penalty unless the exception is thrown (the host CPU's
MMU is generally used to detect this condition). This
allows us to lazily expand the MIPS memory space as
it is used. Additionally, we maintain two page arrays,
one which is used for read operations and another for
writes. Most of the time these page arrays will have
identical entries; however, we can simulate a portion
of the MIPS MMU functionality by setting the appropriate
entry in the write page table to null, thereby
write protecting the page while still allowing reads.
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Chris Lattner
Sent: Tuesday, March 01, 2005 11:14 AM
To: LLVM Developers Mailing List
Subject: RE: [LLVMdev] Using LLVM to target the JVM
On Tue, 1 Mar 2005, Curt Cox wrote:
> Mips2Java solves the same problem. The latest version of Mips2Java is
> called NestedVM and is part of the larger Vexi project. Much work has
> been done on NestedVM and it is quite impressive.
Interesting, do you know of any documentation that describes how this works?
Does it just map the memory image for the mips program onto a giant array of
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 148677 bytes
Desc: not available
More information about the llvm-dev