adding a new ISA
Christian Thalinger
christian.thalinger at oracle.com
Mon Dec 17 12:12:15 PST 2012
On Dec 14, 2012, at 2:08 PM, "Venkatachalam, Vasanth" <Vasanth.Venkatachalam at amd.com> wrote:
> Apologies for the cross-posting, but I thought this would get a wider audience on hotspot-dev...
>
> Modifying the JVM to support a new ISA (such as the GPU) would require extensive changes.
> I was wondering what people's thoughts were on the following:
>
>
> 1) What guidelines do people use for deciding which components of the JVM to start modifying or writing code for? It seems like a good guideline would be to start with the changes that are the most straightforward, such as register definitions or the assembler. Do people have other ideas?
Since we knew for some time now that new architectures will be coming to the JVM I decided to go ahead a do something I wanted to do for a long time.
Current HotSpot AD files don't describe the ISA at all. So the Assembler for an architecture has to be written by hand. I always wanted to have some sort of AD file that describes the ISA as well and which can be used to generate various things: Assembler, format printing methods for existing AD files (format %{ %} directive; PrintOptoAssembly), and disassembler (possibly).
Since our only open-source RISC architecture right now is SPARC I started to write such a new AD file for SPARC as a first step and example others can build on. The work is almost done; it's just a lot of testing.
I tried to design the ISA description to be simple and readable. The goal was that you can take an instruction set manual and "copy" the contents into a file.
Here is an example of an instruction description (SPARC register add):
add(rs1, rs2, rd) { fmt { "ADD" rs1 "," rs2 "," rd } enc { 0b10 | rd:5 | 0b000000 | rs1:5 | 0b0 | 0b00000000 | rs2:5 } }
fmt will be used to generate format printing methods. enc is the bit encoding of the instruction. Operands are defined in a separate section.
There are only a couple of instructions left to be converted on SPARC so I should have something soon for review.
-- Chris
P.S.: It would be great if the ARM64 port from RedHat could already use that tool. Let me know if/how I can help.
>
> 2) How do people incrementally test components that depend upon the rest of the software which isn't in place yet? For example, if you update the register allocator and nothing else, how would you test this change without having the rest of the JVM in place?
>
> Vasanth
>
> --
> Vasanth Venkatachalam
> AMD Runtimes
> (512)602-6177
>
More information about the hotspot-dev
mailing list