[LLVMdev] Re: LLVM to SUIF-MACH VM binary

John Cortes jcortes at cs.ucr.edu
Tue Jan 18 11:13:08 PST 2005



Chris Lattner wrote:
> On Tue, 18 Jan 2005, John Cortes wrote:
> 
>> Hi Chris,
> 
> 
> Hi!  I'm CC'ing the llvmdev list for the benefit of others.
> 
>> Since I see you're very involved in LLVM, I need a little guidance on 
>> getting from C to MACH-SUIF.
>>
>> I've been given the task of using LLVM to translate C code to another 
>> VM architecture known as MACH-SUIF.  For this architecture, i don't 
>> think there's an assembler (but there is a disassembler), so I'm going 
>> to have to generate a binary file output.
> 
> 
> Okay, that by itself shouldn't be a problem.  We do not currently 
> support emitting .o files directly, but it has been planned for quite 
> some time.
> 
> ...
> 
> If possible, it would be nice if you could make your .o file writing 
> code as target-independent as possible (potentially defining a new 
> TargetObjectFile interface for any hooks you need).  In particular, if 
> MACH-SUIF is an ELF-based system, it would be nice to be able to use the 
> ELF-specific routines to write X86-ELF or PPC-ELF files as well 
> (assuming the hooks were implemented).  Clearly you can choose to worry 
> about this or not at your discretion.

Thanks for all the information.

> 
> Can you say a little bit about MACH-SUIF?  With a brief google search, I 
> didn't turn up anything that described the architecture.  Is it a 
> RISC-like machine with 32-bit instruction words?
> 

It's another VM representation.  I haven't really gotten to know the nitty 
gritty of the language so I'm not too confortable with it, but these two links 
should decribe the project.  It's based on the work from SUIF.  More 
specifically, we are using MACHINE-SUIF as a backend to SUIF to generate code to 
an embedded processor.  We want to move away from using the SUIF frontend, but 
the backend works fine.  Essentially, for right now, I have to convert LLVM IR 
to SUIFvm IR.

http://www.eecs.harvard.edu/hube/software/nci/suifvm.html
http://www.eecs.harvard.edu/hube/software/nci/overview.html


> -Chris
> 

- John




More information about the llvm-dev mailing list