[LLVMdev] Idea for Google Summer Code : C Compiler for EFI Byte Code implement in LLVM
Chris Lattner
clattner at apple.com
Fri Apr 2 10:17:12 PDT 2010
On Apr 2, 2010, at 9:28 AM, 琬菁楊 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.
> 2. no floating support in EFI C
> 3. no C++ support in EFI C
> 4. no assembly support in EFI C, all assembly must convert to C
Ok, all of this is easy except #1.
> I am wondering that does LLVM support model which structure layout is determined at run time??
No.
> 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.
-Chris
More information about the llvm-dev
mailing list