[LLVMdev] Idea for Google Summer Code : C Compiler for EFI Byte Code implement in LLVM

Renato Golin rengolin at systemcall.org
Mon Mar 15 08:50:01 PDT 2010


On 10 March 2010 16:57, 琬菁楊 <ching1119.cs96 at g2.nctu.edu.tw> wrote:
> I think the main issue is that EFI C dialect is not ANSI-C compliant: the
> size of pointer is determined at the run-time and therefore the layout of
> the structure is not static. Does LLVM support this model?

Hi Ching,

The LLVM IR doesn't care about the size of your pointers, and this is
why you have the 'datalayout' explicit on the object file. I don't
know, however, if you can omit the layout definition and leave it for
run time.

If LLVM doesn't allow omitting the layout, it should, as we now have
an use case that needs it. If it does, it should be just a matter of
converting the current IR into EFI bytecode and creating intrinsics to
deal with the run-time variables. You could even benefit from having
different languages (LLVM supports) into EFI bytecode...


> And I am wondering whether this kind of idea is valuable to the LLVM
> community? or are there any other related ideas is more valuable?

I think that an open source compiler to EFI byte code is not only
desirable, but necessary.


cheers,
--renato

http://systemcall.org/

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm




More information about the llvm-dev mailing list