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

Dale Johannesen dalej at apple.com
Fri Apr 2 10:56:32 PDT 2010


On Apr 2, 2010, at 10:17 AMPDT, Chris Lattner wrote:
>> Hello Chris,
>> 
>> I have survey the efi specification and ask some question to efi engineer.
>> Difference between EFI C and ANSI C is as following:
>> 1. void*
>>    In EFI C, the void* is 4-byte for 32-bit processor and 8-byte for 64-bit processor.
>>    And it can appears in any where like ANSI C.
>>    So the main problem is that struct layout like
>>    struct S{
>>        void* X;
>>    };
>>    is not static.
> 
>> If not, do I need to modify the parser in clang to support this feature??
> 
> No, please don't.  This is something we specifically do not want to support.  The issue is not the parser, the issue is that struct field offsets are no longer constant in this model.

LLVM may not be a good match for this project, but there's prior art elsewhere; have a look at ANDF.





More information about the llvm-dev mailing list