Another note (from the archives): vendors used mixed builds for VS2003/VS2005 on 32-bit in order to use __fastcall for internal function calls and then EFIABI for all the various UEFI calls.
Tim -----Original Message----- From: Jordan Justen [mailto:jljus...@gmail.com] Sent: Tuesday, November 04, 2014 2:33 PM To: Andrew J. Fish Cc: Paolo Bonzini; edk2-devel@lists.sourceforge.net Subject: Re: [edk2] Enable optimization for gcc x64 builds On Tue, Nov 4, 2014 at 9:28 AM, Andrew Fish <af...@apple.com> wrote: > So my 1st question is why do you need to mix calling conventions, and > depend on EFIAPI for interoperability. Why not just change the ABI on > all functions? GCC 4.4 doesn't support the command line option to change everything over. So, EFIAPI was the only option then. > Problems with the mixed calling convention: > 1) All assembly routines must be marked as EFIAPI, or the C code will > generate the wrong calling convention. Not an issue in the MdePkg, but > potentially an issue in other packages. I don't see this as a problem. I think this is the rules that we have set up for EDK II. It just so happens that the GCC4X toolchains are the only ones that use EFIAPI, and thus are the only ones that allow us to keep our codebase clean with regards to EFIAPI. For GCC >= 4.5, I actually think we should convert *RELEASE* builds over to using the ms-abi all the time to generate smaller code. I think we should leave DEBUG builds as mixed to help clean up EFIAPI issues. -Jordan ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel