ashrdi3.S 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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(__ashrdi3)
  32. ENTRY(__aeabi_lasr)
  33. subs r3, r2, #32
  34. rsb ip, r2, #32
  35. movmi al, al, lsr r2
  36. movpl al, ah, asr r3
  37. orrmi al, al, ah, lsl ip
  38. mov ah, ah, asr r2
  39. mov pc, lr