[BACK]Return to add_n.s CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpn / pa64

Annotation of OpenXM_contrib/gmp/mpn/pa64/add_n.s, Revision 1.1.1.1

1.1       maekawa     1: ; HP-PA 2.0 __gmpn_add_n -- Add two limb vectors of the same length > 0 and
                      2: ; store sum in a third limb vector.
                      3:
                      4: ; Copyright (C) 1997, 2000 Free Software Foundation, Inc.
                      5:
                      6: ; This file is part of the GNU MP Library.
                      7:
                      8: ; The GNU MP Library is free software; you can redistribute it and/or modify
                      9: ; it under the terms of the GNU Lesser General Public License as published by
                     10: ; the Free Software Foundation; either version 2.1 of the License, or (at your
                     11: ; option) any later version.
                     12:
                     13: ; The GNU MP Library is distributed in the hope that it will be useful, but
                     14: ; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     15: ; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
                     16: ; License for more details.
                     17:
                     18: ; You should have received a copy of the GNU Lesser General Public License
                     19: ; along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
                     20: ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
                     21: ; MA 02111-1307, USA.
                     22:
                     23:
                     24: ; INPUT PARAMETERS
                     25: ; res_ptr      gr26
                     26: ; s1_ptr       gr25
                     27: ; s2_ptr       gr24
                     28: ; size         gr23
                     29:
                     30: ; This runs at 2 cycles/limb on PA8000.
                     31:
                     32:        .level  2.0n
                     33:        .code
                     34:        .export __gmpn_add_n,entry
                     35: __gmpn_add_n
                     36:        .proc
                     37:        .callinfo frame=0,args_saved
                     38:        .entry
                     39:
                     40:        sub             %r0,%r23,%r22
                     41:        depw,z          %r22,30,3,%r28          ; r28 = 2 * (-n & 7)
                     42:        depw,z          %r22,28,3,%r22          ; r22 = 8 * (-n & 7)
                     43:        sub             %r25,%r22,%r25          ; offset s1_ptr
                     44:        sub             %r24,%r22,%r24          ; offset s2_ptr
                     45:        sub             %r26,%r22,%r26          ; offset res_ptr
                     46:        blr             %r28,%r0                ; branch into loop
                     47:        add             %r0,%r0,%r0             ; reset carry
                     48:
                     49: L$loop ldd             0(%r25),%r20
                     50:        ldd             0(%r24),%r31
                     51:        add,dc          %r20,%r31,%r20
                     52:        std             %r20,0(%r26)
                     53: L$7    ldd             8(%r25),%r21
                     54:        ldd             8(%r24),%r19
                     55:        add,dc          %r21,%r19,%r21
                     56:        std             %r21,8(%r26)
                     57: L$6    ldd             16(%r25),%r20
                     58:        ldd             16(%r24),%r31
                     59:        add,dc          %r20,%r31,%r20
                     60:        std             %r20,16(%r26)
                     61: L$5    ldd             24(%r25),%r21
                     62:        ldd             24(%r24),%r19
                     63:        add,dc          %r21,%r19,%r21
                     64:        std             %r21,24(%r26)
                     65: L$4    ldd             32(%r25),%r20
                     66:        ldd             32(%r24),%r31
                     67:        add,dc          %r20,%r31,%r20
                     68:        std             %r20,32(%r26)
                     69: L$3    ldd             40(%r25),%r21
                     70:        ldd             40(%r24),%r19
                     71:        add,dc          %r21,%r19,%r21
                     72:        std             %r21,40(%r26)
                     73: L$2    ldd             48(%r25),%r20
                     74:        ldd             48(%r24),%r31
                     75:        add,dc          %r20,%r31,%r20
                     76:        std             %r20,48(%r26)
                     77: L$1    ldd             56(%r25),%r21
                     78:        ldo             64(%r25),%r25
                     79:        ldd             56(%r24),%r19
                     80:        add,dc          %r21,%r19,%r21
                     81:        std             %r21,56(%r26)
                     82:        ldo             64(%r24),%r24
                     83:        addib,>         -8,%r23,L$loop
                     84:        ldo             64(%r26),%r26
                     85:
                     86:        add,dc          %r0,%r0,%r29
                     87:        bve             (%r2)
                     88:        .exit
                     89:        ldi             0,%r28
                     90:        .procend

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>