lshrdi3.S 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005
  2. Free Software Foundation, Inc.
  3. This file is free software; you can redistribute it and/or modify it
  4. under the terms of the GNU General Public License as published by the
  5. Free Software Foundation; either version 2, or (at your option) any
  6. later version.
  7. In addition to the permissions in the GNU General Public License, the
  8. Free Software Foundation gives you unlimited permission to link the
  9. compiled version of this file into combinations with other programs,
  10. and to distribute those combinations without any restriction coming
  11. from the use of this file. (The General Public License restrictions
  12. do apply in other respects; for example, they cover modification of
  13. the file, and distribution when not linked into a combine
  14. executable.)
  15. This file is distributed in the hope that it will be useful, but
  16. WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. General Public License for more details.
  19. You should have received a copy of the GNU General Public License
  20. along with this program; see the file COPYING. If not, write to
  21. the Free Software Foundation, 51 Franklin Street, Fifth Floor,
  22. Boston, MA 02110-1301, USA. */
  23. #include <linux/linkage.h>
  24. #ifdef __ARMEB__
  25. #define al r1
  26. #define ah r0
  27. #else
  28. #define al r0
  29. #define ah r1
  30. #endif
  31. ENTRY(__lshrdi3)
  32. ENTRY(__aeabi_llsr)
  33. subs r3, r2, #32
  34. rsb ip, r2, #32
  35. movmi al, al, lsr r2
  36. movpl al, ah, lsr r3
  37. ARM( orrmi al, al, ah, lsl ip )
  38. THUMB( lslmi r3, ah, ip )
  39. THUMB( orrmi al, al, r3 )
  40. mov ah, ah, lsr r2
  41. mov pc, lr
  42. ENDPROC(__lshrdi3)
  43. ENDPROC(__aeabi_llsr)