• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#------------------------------------------------------------------------------
2#
3# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
5#
6# This program and the accompanying materials
7# are licensed and made available under the terms and conditions of the BSD License
8# which accompanies this distribution.  The full text of the license may be found at
9# http://opensource.org/licenses/bsd-license.php
10#
11# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13#
14#------------------------------------------------------------------------------
15
16
17  .text
18  .syntax unified
19  .align 2
20  GCC_ASM_EXPORT (memset)
21  GCC_ASM_EXPORT (__aeabi_memset)
22
23# VOID
24# EFIAPI
25# __aeabi_memset (
26#  IN  VOID    *Destination,
27#  IN  UINT32  Size
28#  IN  UINT32  Character,
29#  );
30ASM_PFX(__aeabi_memset):
31  subs  ip, r1, #0
32  bxeq  lr
33  mov   r1, r2
34  b     L10
35
36# VOID
37# EFIAPI
38# memset (
39#  IN  VOID    *Destination,
40#  IN  UINT32  Character,
41#  IN  UINT32  Size
42#  );
43ASM_PFX(memset):
44  subs ip, r2, #0
45  bxeq lr
46  @ args = 0, pretend = 0, frame = 0
47  @ frame_needed = 1, uses_anonymous_args = 0
48L10:
49  strb  r1, [r0], #1
50  subs  ip, ip, #1
51  @ While size is not 0
52  bne  L10
53  bx   lr
54