]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/LibC/Main/bswap16.c
StdLib/LibC: avoid LTO code for compiler intrinsics
[mirror_edk2.git] / StdLib / LibC / Main / bswap16.c
CommitLineData
2aa62f2b 1/* $NetBSD: bswap16.c,v 1.1 2005/12/20 19:28:51 christos Exp $ */\r
2\r
3/*\r
4 * Written by Manuel Bouyer <bouyer@NetBSD.org>.\r
5 * Public domain.\r
6 */\r
7\r
8//#include <sys/cdefs.h>\r
9//#if defined(LIBC_SCCS) && !defined(lint)\r
10//__RCSID("$NetBSD: bswap16.c,v 1.1 2005/12/20 19:28:51 christos Exp $");\r
11//#endif /* LIBC_SCCS and not lint */\r
12\r
13//#include <sys/types.h>\r
14//#include <machine/bswap.h>\r
15\r
16#undef bswap16\r
17\r
18UINT16\r
19bswap16(UINT16 x)\r
20{\r
21 return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);\r
22}\r