]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / SwapBytes64.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; CpuId.Asm
9 ;
10 ; Abstract:
11 ;
12 ; AsmCpuid function
13 ;
14 ; Notes:
15 ;
16 ;------------------------------------------------------------------------------
17
18 SECTION .text
19
20 ;------------------------------------------------------------------------------
21 ; UINT64
22 ; EFIAPI
23 ; InternalMathSwapBytes64 (
24 ; IN UINT64 Operand
25 ; );
26 ;------------------------------------------------------------------------------
27 global ASM_PFX(InternalMathSwapBytes64)
28 ASM_PFX(InternalMathSwapBytes64):
29 mov eax, [esp + 8] ; eax <- upper 32 bits
30 mov edx, [esp + 4] ; edx <- lower 32 bits
31 bswap eax
32 bswap edx
33 ret
34