]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
Update copyright for files modified in this year
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibMmx / X64 / ScanMem8.S
CommitLineData
b1ff428c 1#\r
2# ConvertAsm.py: Automatically generated from ScanMem8.asm\r
3#\r
4#------------------------------------------------------------------------------\r
5#\r
373ade0e 6# Copyright (c) 2006 - 2008, Intel Corporation\r
b1ff428c 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# ScanMem8.S\r
18#\r
19# Abstract:\r
20#\r
21# ScanMem8 function\r
22#\r
23# Notes:\r
24#\r
25# The following BaseMemoryLib instances contain the same copy of this file:\r
26#\r
27# BaseMemoryLibRepStr\r
28# BaseMemoryLibMmx\r
29# BaseMemoryLibSse2\r
30# BaseMemoryLibOptDxe\r
31# BaseMemoryLibOptPei\r
32#\r
33#------------------------------------------------------------------------------\r
34\r
35\r
36#------------------------------------------------------------------------------\r
37# CONST VOID *\r
38# EFIAPI\r
39# InternalMemScanMem8 (\r
40# IN CONST VOID *Buffer,\r
41# IN UINTN Length,\r
42# IN UINT8 Value\r
43# );\r
44#------------------------------------------------------------------------------\r
45.intel_syntax noprefix\r
46.globl ASM_PFX(InternalMemScanMem8)\r
47ASM_PFX(InternalMemScanMem8):\r
48 push rdi\r
49 mov rdi, rcx\r
50 mov rcx, rdx\r
51 mov rax, r8\r
52 repne scasb\r
53 lea rax, [rdi - 1]\r
54 cmovnz rax, rcx # set rax to 0 if not found\r
55 pop rdi\r
56 ret\r
57\r