_ashldi3.S 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #ifdef __ARMEB__
  24. #define al r1
  25. #define ah r0
  26. #else
  27. #define al r0
  28. #define ah r1
  29. #endif
  30. .globl __ashldi3
  31. __ashldi3:
  32. subs r3, r2, #32
  33. rsb ip, r2, #32
  34. movmi ah, ah, lsl r2
  35. movpl ah, al, lsl r3
  36. orrmi ah, ah, al, lsr ip
  37. mov al, al, lsl r2
  38. mov pc, lr