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

Tristan Gingold gingold at adacore.com
Wed Mar 31 00:59:39 PDT 2010


On Mar 30, 2010, at 8:23 PM, Chris Lattner wrote:

> 
> On Mar 30, 2010, at 10:31 AM, 琬菁楊 wrote:
> 
>> What do you mean by "variable sized pointers"?  What does:
>> 
>> struct  S {void *X; };
>> 
>> return for sizeof(struct S); ?
>> 
>> I have surveyed the UEFI spec2.3.
>> In my opinion, if the EBC VM is running on 32-bit processor, return value is 4
>> if the EBC VM is running on 64-bit processor, return value is 8
>> 
>> If error out on any sizeof that include a pointer, does it means that no issue about pointer size determined at runtime??
> 
> Yes, if it is an error, it makes it much more feasible to implement.

But it is not an error, otherwise it would be hard to use malloc() like functions.





More information about the llvm-dev mailing list