On Feb 14, 2013, at 11:18 AM, David Woodhouse <[email protected]> wrote:

> On Thu, 2013-02-14 at 10:25 -0800, Andrew Fish wrote:
>> 
>> This issue is not an ANSI C memory model conformance issue. It is an
>> artifact of the set of C ABIs that UEFI supports.
>> For example the default alignment for UINT64 on gcc is 32-bit, while
>> in UEFI /Visual Studio it is 64-bit.  
> 
> Well yes, one does kind of hope that one's compiler will actually get
> the ABI correct. If you use GCC on x86_64 *without* explicitly asking it
> to use the Microsoft ABI, you'll also get all your function arguments in
> the wrong registers... which doesn't work very well either.

Well clang for x86_64 also pass the first six arguments in registers that are 
different than the four in the EFIABI, and does not allocate the spill area on 
the stack. 

We had to aadd a target to clang in the open source to get EFIABI support. So 
it is -ccc-host-triple x86_64-pc-win32-macho vs. -arch x86_64 for clang. So we 
don't depend on correct usage of EFIABI in the C code. 

Thanks,

Andrew

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to