1 /** @file 2 Implementation of 64-bit swap bytes 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 /** 13 Switches the endianess of a 64-bit integer. 14 15 This function swaps the bytes in a 64-bit unsigned value to switch the value 16 from little endian to big endian or vice versa. The byte swapped value is 17 returned. 18 19 @param Operand A 64-bit unsigned value. 20 21 @return The byte swaped Operand. 22 23 **/ 24 UINT64 25 EFIAPI 26 InternalMathSwapBytes64 ( 27 IN UINT64 Operand 28 ) 29 { 30 _asm { 31 mov eax, dword ptr [Operand + 4] 32 mov edx, dword ptr [Operand + 0] 33 bswap eax 34 bswap edx 35 } 36 } 37 38