]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S
Update to make end-of-line consistent for all source files in MdePkg. There are no...
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseMemoryLib / X64 / ScanMem16.S
CommitLineData
b341712e 1#\r
2# ConvertAsm.py: Automatically generated from ScanMem16.asm\r
3#\r
4#------------------------------------------------------------------------------\r
5#\r
6# Copyright (c) 2006, Intel Corporation\r
7# All rights reserved. This program and the accompanying materials\r
8# are licensed and made available under the terms and conditions of the BSD License\r
9# which accompanies this distribution. The full text of the license may be found at\r
10# http://opensource.org/licenses/bsd-license.php\r
11#\r
12# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14#\r
15# Module Name:\r
16#\r
17# ScanMem16.S\r
18#\r
19# Abstract:\r
20#\r
21# ScanMem16 function\r
22#\r
23# Notes:\r
24#\r
25# The following BaseMemoryLib instances share the same version of this file:\r
26#\r
27# BaseMemoryLibRepStr\r
28# BaseMemoryLibMmx\r
29# BaseMemoryLibSse2\r
30#\r
31#------------------------------------------------------------------------------\r
32\r
33#include <EdkIIGlueBase.h>\r
34#------------------------------------------------------------------------------\r
35# CONST VOID *\r
36# EFIAPI\r
37# InternalMemScanMem16 (\r
38# IN CONST VOID *Buffer,\r
39# IN UINTN Length,\r
40# IN UINT16 Value\r
41# );\r
42#------------------------------------------------------------------------------\r
43.intel_syntax\r
44.globl ASM_PFX(InternalMemScanMem16)\r
45ASM_PFX(InternalMemScanMem16):\r
46 push rdi\r
47 mov rdi, rcx\r
48 mov rax, r8\r
49 mov rcx, rdx\r
50 repne scasw\r
51 lea rax, [rdi - 2]\r
52 cmovnz rax, rcx\r
53 pop rdi\r
54 ret\r
55\r