summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm')
-rw-r--r--src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm b/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm
new file mode 100644
index 00000000..f076be3d
--- /dev/null
+++ b/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm
@@ -0,0 +1,34 @@
+;------------------------------------------------------------------------------
+;
+; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+; SPDX-License-Identifier: BSD-2-Clause-Patent
+;
+; Module Name:
+;
+; CpuId.Asm
+;
+; Abstract:
+;
+; AsmCpuid function
+;
+; Notes:
+;
+;------------------------------------------------------------------------------
+
+ SECTION .text
+
+;------------------------------------------------------------------------------
+; UINT64
+; EFIAPI
+; InternalMathSwapBytes64 (
+; IN UINT64 Operand
+; );
+;------------------------------------------------------------------------------
+global ASM_PFX(InternalMathSwapBytes64)
+ASM_PFX(InternalMathSwapBytes64):
+ mov eax, [esp + 8] ; eax <- upper 32 bits
+ mov edx, [esp + 4] ; edx <- lower 32 bits
+ bswap eax
+ bswap edx
+ ret
+