diff options
author | Guo Mang <mang.guo@intel.com> | 2017-08-02 09:54:47 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-09-05 19:45:08 +0800 |
commit | 6c128c65b5ec0e5b8b5a0ccb165f3afd29e485f8 (patch) | |
tree | 444372d92a0ae8991fe4d15eb3937df43690dfda /StdLib/LibC/Main/bswap64.c | |
parent | b207c6434d7a5a4502975d322312e07017e8a8cb (diff) | |
download | edk2-platforms-6c128c65b5ec0e5b8b5a0ccb165f3afd29e485f8.tar.xz |
Remove core packages since we can get them from edk2 repository
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'StdLib/LibC/Main/bswap64.c')
-rw-r--r-- | StdLib/LibC/Main/bswap64.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/StdLib/LibC/Main/bswap64.c b/StdLib/LibC/Main/bswap64.c deleted file mode 100644 index 29e6916ea6..0000000000 --- a/StdLib/LibC/Main/bswap64.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $NetBSD: bswap64.c,v 1.1 2005/12/20 19:28:51 christos Exp $ */
-
-/*
- * Written by Manuel Bouyer <bouyer@NetBSD.org>.
- * Public domain.
- */
-
-//#include <sys/cdefs.h>
-//#if defined(LIBC_SCCS) && !defined(lint)
-//__RCSID("$NetBSD: bswap64.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
-//#endif /* LIBC_SCCS and not lint */
-
-//#include <sys/types.h>
-//#include <machine/bswap.h>
-
-#undef bswap64
-
-UINT64
-bswap64(UINT64 x)
-{
-#ifndef _LP64
- /*
- * Assume we have wide enough registers to do it without touching
- * memory.
- */
- return ( (x << 56) & 0xff00000000000000UL ) |
- ( (x << 40) & 0x00ff000000000000UL ) |
- ( (x << 24) & 0x0000ff0000000000UL ) |
- ( (x << 8) & 0x000000ff00000000UL ) |
- ( (x >> 8) & 0x00000000ff000000UL ) |
- ( (x >> 24) & 0x0000000000ff0000UL ) |
- ( (x >> 40) & 0x000000000000ff00UL ) |
- ( (x >> 56) & 0x00000000000000ffUL );
-#else
- /*
- * Split the operation in two 32bit steps.
- */
- u_int32_t tl, th;
-
- th = bswap32((u_int32_t)(x & 0x00000000ffffffffULL));
- tl = bswap32((u_int32_t)((x >> 32) & 0x00000000ffffffffULL));
- return ((u_int64_t)th << 32) | tl;
-#endif
-}
|