My personal idea is: user couldn’t point arbitrary compiler options if it’s
apparently disobey with UEFI calling convention limitation.
Your case is an example, but what if user try to use /Gr build option to force
fastcall for MS tool chain? How do we solve such case?
And your patch is only for IA32, I am not sure if X64/IA64 has the same issue
or not?
Anyway, it’s just my personal thought☺ Let’s see if others have input.
From: Ruslan Nikolaev [mailto:[email protected]]
Sent: Sunday, March 8, 2015 3:45 AM
To: [email protected]
Subject: [edk2] EFIAPI for x86
Hi
In case if default options for GCC are used, EFIAPI definition should be fine.
However, if mregparm is set to non zero value, it will be incorrect. Would be
nice to include the following fix:
diff -urN Edk.orig/MdePkg/Include/Ia32/ProcessorBind.h
Edk/MdePkg/Include/Ia32/ProcessorBind.h
--- Edk.orig/MdePkg/Include/Ia32/ProcessorBind.h 2014-12-26
01:37:49.072607460 -0800
+++ Edk/MdePkg/Include/Ia32/ProcessorBind.h 2014-12-26 01:20:32.752651041 -0800
@@ -255,7 +255,7 @@
///^M
/// GCC specific method for EFIAPI calling convention.^M
/// ^M
- #define EFIAPI __attribute__((cdecl)) ^M
+ #define EFIAPI __attribute__((cdecl, regparm(0))) ^M
#else^M
///^M
/// The default for a non Microsoft* or GCC compiler is to assume the EFI
ABI^M
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel