llsr.S 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #------------------------------------------------------------------------------
  2. #
  3. # Copyright (c) 2013, ARM. All rights reserved.<BR>
  4. #
  5. # This program and the accompanying materials
  6. # are licensed and made available under the terms and conditions of the BSD License
  7. # which accompanies this distribution. The full text of the license may be found at
  8. # http://opensource.org/licenses/bsd-license.php
  9. #
  10. # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  12. #
  13. #------------------------------------------------------------------------------
  14. #include "edk2asm.h"
  15. .text
  16. .align 2
  17. GCC_ASM_EXPORT(__aeabi_llsr)
  18. #
  19. #VOID
  20. #EFIAPI
  21. #__aeabi_llsr (
  22. # IN VOID *Destination,
  23. # IN VOID *Source,
  24. # IN UINT32 Size
  25. # );
  26. #
  27. ASM_PFX(__aeabi_llsr):
  28. subs r3,r2,#0x20
  29. bpl 1f
  30. rsb r3,r2,#0x20
  31. lsr r0,r0,r2
  32. orr r0,r0,r1,lsl r3
  33. lsr r1,r1,r2
  34. bx lr
  35. 1:
  36. lsr r0,r1,r3
  37. mov r1,#0
  38. bx lr
  39. #if defined(__ELF__) && defined(__linux__)
  40. .section .note.GNU-stack,"",%progbits
  41. #endif