VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap32.c@ 58466

Last change on this file since 58466 was 48674, checked in by vboxsync, 11 years ago

EFI: Export newly imported tinaocore UEFI sources to OSE.

  • Property svn:eol-style set to native
File size: 560 bytes
Line 
1/* $NetBSD: bswap32.c,v 1.1 2005/12/20 19:28:51 christos Exp $ */
2
3/*
4 * Written by Manuel Bouyer <[email protected]>.
5 * Public domain.
6 */
7
8//#include <sys/cdefs.h>
9//#if defined(LIBC_SCCS) && !defined(lint)
10//__RCSID("$NetBSD: bswap32.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
11//#endif /* LIBC_SCCS and not lint */
12
13//#include <sys/types.h>
14//#include <machine/bswap.h>
15
16#undef bswap32
17
18UINT32
19bswap32(UINT32 x)
20{
21 return ((x << 24) & 0xff000000 ) |
22 ((x << 8) & 0x00ff0000 ) |
23 ((x >> 8) & 0x0000ff00 ) |
24 ((x >> 24) & 0x000000ff );
25}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette