lshift.s 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ;! HP-PA __mpn_lshift --
  2. ;! Copyright (C) 1992, 1994 Free Software Foundation, Inc.
  3. ;! This file is part of the GNU MP Library.
  4. ;! The GNU MP Library is free software; you can redistribute it and/or modify
  5. ;! it under the terms of the GNU Lesser General Public License as published by
  6. ;! the Free Software Foundation; either version 2.1 of the License, or (at your
  7. ;! option) any later version.
  8. ;! The GNU MP Library is distributed in the hope that it will be useful, but
  9. ;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. ;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
  11. ;! License for more details.
  12. ;! You should have received a copy of the GNU Lesser General Public License
  13. ;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
  14. ;! <http://www.gnu.org/licenses/>.
  15. ;! INPUT PARAMETERS
  16. ;! res_ptr gr26
  17. ;! s_ptr gr25
  18. ;! size gr24
  19. ;! cnt gr23
  20. .text
  21. .export __mpn_lshift
  22. __mpn_lshift:
  23. .proc
  24. .callinfo frame=64,no_calls
  25. .entry
  26. sh2add %r24,%r25,%r25
  27. sh2add %r24,%r26,%r26
  28. ldws,mb -4(%r25),%r22
  29. subi 32,%r23,%r1
  30. mtsar %r1
  31. addib,= -1,%r24,L$0004
  32. vshd %r0,%r22,%r28 ;! compute carry out limb
  33. ldws,mb -4(%r25),%r29
  34. addib,= -1,%r24,L$0002
  35. vshd %r22,%r29,%r20
  36. L$loop: ldws,mb -4(%r25),%r22
  37. stws,mb %r20,-4(%r26)
  38. addib,= -1,%r24,L$0003
  39. vshd %r29,%r22,%r20
  40. ldws,mb -4(%r25),%r29
  41. stws,mb %r20,-4(%r26)
  42. addib,<> -1,%r24,L$loop
  43. vshd %r22,%r29,%r20
  44. L$0002: stws,mb %r20,-4(%r26)
  45. vshd %r29,%r0,%r20
  46. bv 0(%r2)
  47. stw %r20,-4(%r26)
  48. L$0003: stws,mb %r20,-4(%r26)
  49. L$0004: vshd %r22,%r0,%r20
  50. bv 0(%r2)
  51. stw %r20,-4(%r26)
  52. .exit
  53. .procend