summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Library
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-24 09:35:36 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-24 09:35:36 +0000
commit808bfde224c53624eb95c339c939e1b9a0582a0d (patch)
tree45cbc69bdd50bda0903924690a0a934b3e01004f /EdkCompatibilityPkg/Foundation/Library
parent4bd97476a9dd75ca02b228394530bc97a0f2de22 (diff)
downloadedk2-platforms-808bfde224c53624eb95c339c939e1b9a0582a0d.tar.xz
Update memcpy.c and memset.c to support both /Ox and /Os of MSFT IPF toolchain. Without this change, MSFT /Ox will report "can't define intrinsic" error.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4630 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/CompilerStub/memcpy.c12
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/CompilerStub/memset.c11
2 files changed, 23 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/CompilerStub/memcpy.c b/EdkCompatibilityPkg/Foundation/Library/CompilerStub/memcpy.c
index 300724a132..69c45e1583 100644
--- a/EdkCompatibilityPkg/Foundation/Library/CompilerStub/memcpy.c
+++ b/EdkCompatibilityPkg/Foundation/Library/CompilerStub/memcpy.c
@@ -33,6 +33,17 @@ memcpy (
IN const VOID *Src,
IN UINTN Count
)
+;
+
+#ifdef _MSC_EXTENSIONS
+#pragma intrinsic(memcpy)
+#else
+ VOID *
+memcpy (
+ OUT VOID *Dest,
+ IN const VOID *Src,
+ IN UINTN Count
+ )
{
volatile UINT8 *Ptr;
const UINT8 *Source;
@@ -43,4 +54,5 @@ memcpy (
return Dest;
}
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Library/CompilerStub/memset.c b/EdkCompatibilityPkg/Foundation/Library/CompilerStub/memset.c
index 0f0f40db97..a51ea10a98 100644
--- a/EdkCompatibilityPkg/Foundation/Library/CompilerStub/memset.c
+++ b/EdkCompatibilityPkg/Foundation/Library/CompilerStub/memset.c
@@ -26,7 +26,17 @@ Abstract:
--*/
#include "Tiano.h"
+VOID *
+memset (
+ OUT VOID *Dest,
+ IN UINTN Char,
+ IN UINTN Count
+ )
+;
+#ifdef _MSC_EXTENSIONS
+#pragma intrinsic(memset)
+#else
VOID *
memset (
OUT VOID *Dest,
@@ -42,4 +52,5 @@ memset (
return Dest;
}
+#endif