summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S')
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S19
1 files changed, 9 insertions, 10 deletions
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
index 9420725d5e..56ff2ea9be 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasd
- lea rax, [rdi - 4]
- cmovnz rax, rcx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
+ repne scasl
+ leaq -4(%rdi), %rax
+ cmovnz %rcx, %rax
+ popq %rdi
ret