ScanMem8.S revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
2N/A#
2N/A# ConvertAsm.py: Automatically generated from ScanMem8.asm
2N/A#
2N/A#------------------------------------------------------------------------------
2N/A#
2N/A# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
2N/A# This program and the accompanying materials
2N/A# are licensed and made available under the terms and conditions of the BSD License
2N/A# which accompanies this distribution. The full text of the license may be found at
2N/A# http://opensource.org/licenses/bsd-license.php.
2N/A#
2N/A# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
2N/A# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
2N/A#
2N/A# Module Name:
2N/A#
2N/A# ScanMem8.S
2N/A#
2N/A# Abstract:
2N/A#
2N/A# ScanMem8 function
2N/A#
2N/A# Notes:
2N/A#
2N/A# The following BaseMemoryLib instances contain the same copy of this file:
2N/A#
2N/A# BaseMemoryLibRepStr
2N/A# BaseMemoryLibMmx
2N/A# BaseMemoryLibSse2
2N/A# BaseMemoryLibOptDxe
2N/A# BaseMemoryLibOptPei
2N/A#
2N/A#------------------------------------------------------------------------------
2N/A
2N/A
2N/A#------------------------------------------------------------------------------
2N/A# CONST VOID *
2N/A# EFIAPI
2N/A# InternalMemScanMem8 (
2N/A# IN CONST VOID *Buffer,
2N/A# IN UINTN Length,
2N/A# IN UINT8 Value
2N/A# );
2N/A#------------------------------------------------------------------------------
2N/AASM_GLOBAL ASM_PFX(InternalMemScanMem8)
2N/AASM_PFX(InternalMemScanMem8):
2N/A pushq %rdi
2N/A movq %rcx, %rdi
2N/A movq %rdx, %rcx
2N/A movq %r8, %rax
2N/A repne scasb
2N/A leaq -1(%rdi), %rax
2N/A cmovnz %rcx, %rax # set rax to 0 if not found
2N/A popq %rdi
2N/A ret
2N/A
2N/A