1 #------------------------------------------------------------------------------
3 # Copyright (c) 2006, Intel Corporation
4 # All rights reserved. This program and the accompanying materials
5 # are licensed and made available under the terms and conditions of the BSD License
6 # which accompanies this distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 #------------------------------------------------------------------------------
25 #------------------------------------------------------------------------------
28 # InternalMemCopyMem (
29 # OUT VOID *DestinationBuffer,
30 # IN CONST VOID *SourceBuffer,
33 #------------------------------------------------------------------------------
34 .global _InternalMemCopyMem;
40 lea -1(%r8,%rsi,1),%r9
45 jae LCopyBackward # Copy backward if overlapped
51 movd %mm0, %r10 # (Save mm0 in r10)
59 movd %r10, %mm0 #(Restore mm0)
63 lea -1(%r8,%rdi,1),%rdi
64 std # set direction flag
68 movsb # Copy bytes backward