VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseLib/SwapBytes32.c@ 80721

最後變更 在這個檔案從80721是 80721,由 vboxsync 提交於 6 年 前

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 782 位元組
 
1/** @file
2 Math worker functions.
3
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9
10
11
12#include "BaseLibInternals.h"
13
14/**
15 Switches the endianess of a 32-bit integer.
16
17 This function swaps the bytes in a 32-bit unsigned value to switch the value
18 from little endian to big endian or vice versa. The byte swapped value is
19 returned.
20
21 @param Value A 32-bit unsigned value.
22
23 @return The byte swapped Value.
24
25**/
26UINT32
27EFIAPI
28SwapBytes32 (
29 IN UINT32 Value
30 )
31{
32 UINT32 LowerBytes;
33 UINT32 HigherBytes;
34
35 LowerBytes = (UINT32) SwapBytes16 ((UINT16) Value);
36 HigherBytes = (UINT32) SwapBytes16 ((UINT16) (Value >> 16));
37
38 return (LowerBytes << 16 | HigherBytes);
39}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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