Mike described the situation quite clearly.
Normal UEFI code should use the MDE package functions, from BaseLib. Code
using StdLib will automatically get the CRT as needed.
If there is sufficient demand, I can create a separate CRT library that just
contains the routines in StdLib/LibC/CRT.
For reasons that Mike explained, I am hesitant to provide anything like the ARM
intrinsics library because it could cause people to assume that the library
provided more complete support than it actually does.
Daryl McDaniel
From: Kinney, Michael D [mailto:michael.d.kin...@intel.com]
Sent: Wednesday, August 20, 2014 12:30 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] [StdLib] Patch for review: Add VC++ helper function for
64-bit right shift
Thomas,
A design decision was made early in the EDK II project to not depend on any
compiler intrinsic functions. The reasons include:
1) Linking against OS specific C libs has risks because it can potentially
introduce OS specific sys calls.
2) Linking against OS specific C libs can potentially produce larger
firmware images.
3) Different compilers and each compiler release can choose to
add/remove/modify intrinsic functions the compiler generates to meet that
specific compiler’s requirements.
4) Not all intrinsic functions generated by all compilers are fully
documented.
When the AppPkg and support for C lib was added, there was a new requirement to
support building exiting C application sources “as is”. This meant that some
intrinsic functions could not be avoided, so the minimum set of intrinsic
functions were added to the C lib support and the C lib maintainer has to
handle the issues listed above. As a result, the compiler compatibility of the
AppPkg may not be the same as the rest of the EDK II packages.
I may be a good idea to move the just the intrinsic functions into their own
lib instances in the AppPkg, so they are available for linking against firmware
modules to work around porting issues until the intrinsic functions are
replaced with MdePkg lib calls.
Best regards,
Mike
From: Thomas Rognon [mailto:tcrog...@gmail.com]
Sent: Wednesday, August 20, 2014 11:34 AM
To: edk2-devel
Subject: Re: [edk2] [StdLib] Patch for review: Add VC++ helper function for
64-bit right shift
UefiCpuPkg/Library/CompilerIntrinsicsLib would be awesome. I feel like I'm
always battling the compiler with math and memory intrinsics. I hope this
happens.
On Wed, Aug 20, 2014 at 1:06 PM, Tim Lewis
<tim.le...@insyde.com<mailto:tim.le...@insyde.com>> wrote:
Daryl –
Do we want to create the equivalent of the ArmPkg/Library/CompilerIntrinsicsLib
for x86 so that these sorts of math-helpers can be used across the whole build?
Perhaps UefiCpuPkg/Library/CompilerIntrinsicsLib?
Tim
From: Mcdaniel, Daryl
[mailto:daryl.mcdan...@intel.com<mailto:daryl.mcdan...@intel.com>]
Sent: Wednesday, August 20, 2014 10:56 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: [edk2] [StdLib] Patch for review: Add VC++ helper function for 64-bit
right shift
Jaben, Erik, or Lee (or anyone else ☺),
Please review the attached patch. llshr.c is a new file, LibC.inf was modified.
StdLib: Add a runtime helper function for VC++ 64-bit right shift on Ia32
target architectures.
Add new file StdLib/LibC/CRT/Ia32/llshr.c
Add references to the new file to StdLib/LibC/LibC.inf
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel
<daryl.mcdan...@intel.com<mailto:daryl.mcdan...@intel.com>>
Reviewed-by:
Daryl McDaniel
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel