Mike –

However, as compilers do require intrinsic functions in order to support basic 
C/C++ operators, and as the ArmPkg has already implemented this sort of 
function for support of ARM tool chains, and as it regularly causes compile 
failures for reasons obscure even to engineers well versed in the art, I think 
it is time to revisit that decision. Raise your hand if you have done a search 
on u

Even a partial solution will be better than no solutions because the net result 
is fewer hard-to-understand linker errors than before. If you miss one 
function, the net result is no worse than today.

Tim

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

Reply via email to