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

Annotation of OpenXM_contrib/gmp/mpn/vax/addmul_1.s, Revision 1.1.1.3

1.1.1.2   maekawa     1: # VAX __gmpn_addmul_1 -- Multiply a limb vector with a limb and add
1.1       maekawa     2: # the result to a second limb vector.
                      3:
1.1.1.3 ! ohara       4: # Copyright 1992, 1994, 1996, 2000 Free Software Foundation, Inc.
1.1       maekawa     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
1.1.1.2   maekawa     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
1.1       maekawa    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
1.1.1.2   maekawa    15: # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
1.1       maekawa    16: # License for more details.
                     17:
1.1.1.2   maekawa    18: # You should have received a copy of the GNU Lesser General Public License
1.1       maekawa    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      (sp + 4)
                     26: # s1_ptr       (sp + 8)
                     27: # size         (sp + 12)
                     28: # s2_limb      (sp + 16)
                     29:
                     30: .text
                     31:        .align 1
1.1.1.2   maekawa    32: .globl ___gmpn_addmul_1
                     33: ___gmpn_addmul_1:
1.1       maekawa    34:        .word   0xfc0
                     35:        movl    12(ap),r4
                     36:        movl    8(ap),r8
                     37:        movl    4(ap),r9
                     38:        movl    16(ap),r6
                     39:        jlss    s2_big
                     40:
                     41:        clrl    r3
                     42:        incl    r4
                     43:        ashl    $-1,r4,r7
                     44:        jlbc    r4,L1
                     45:        clrl    r11
                     46:
                     47: # Loop for S2_LIMB < 0x80000000
                     48: Loop1: movl    (r8)+,r1
                     49:        jlss    L1n0
                     50:        emul    r1,r6,$0,r2
                     51:        addl2   r11,r2
                     52:        adwc    $0,r3
                     53:        addl2   r2,(r9)+
                     54:        adwc    $0,r3
                     55: L1:    movl    (r8)+,r1
                     56:        jlss    L1n1
                     57: L1p1:  emul    r1,r6,$0,r10
                     58:        addl2   r3,r10
                     59:        adwc    $0,r11
                     60:        addl2   r10,(r9)+
                     61:        adwc    $0,r11
                     62:
1.1.1.2   maekawa    63:        sobgtr  r7,Loop1
1.1       maekawa    64:        movl    r11,r0
                     65:        ret
                     66:
                     67: L1n0:  emul    r1,r6,$0,r2
                     68:        addl2   r11,r2
                     69:        adwc    r6,r3
                     70:        addl2   r2,(r9)+
                     71:        adwc    $0,r3
                     72:        movl    (r8)+,r1
                     73:        jgeq    L1p1
                     74: L1n1:  emul    r1,r6,$0,r10
                     75:        addl2   r3,r10
                     76:        adwc    r6,r11
                     77:        addl2   r10,(r9)+
                     78:        adwc    $0,r11
                     79:
1.1.1.2   maekawa    80:        sobgtr  r7,Loop1
1.1       maekawa    81:        movl    r11,r0
                     82:        ret
                     83:
                     84:
                     85: s2_big:        clrl    r3
                     86:        incl    r4
                     87:        ashl    $-1,r4,r7
                     88:        jlbc    r4,L2
                     89:        clrl    r11
                     90:
                     91: # Loop for S2_LIMB >= 0x80000000
                     92: Loop2: movl    (r8)+,r1
                     93:        jlss    L2n0
                     94:        emul    r1,r6,$0,r2
                     95:        addl2   r11,r2
                     96:        adwc    r1,r3
                     97:        addl2   r2,(r9)+
                     98:        adwc    $0,r3
                     99: L2:    movl    (r8)+,r1
                    100:        jlss    L2n1
                    101: L2p1:  emul    r1,r6,$0,r10
                    102:        addl2   r3,r10
                    103:        adwc    r1,r11
                    104:        addl2   r10,(r9)+
                    105:        adwc    $0,r11
                    106:
1.1.1.2   maekawa   107:        sobgtr  r7,Loop2
1.1       maekawa   108:        movl    r11,r0
                    109:        ret
                    110:
                    111: L2n0:  emul    r1,r6,$0,r2
                    112:        addl2   r11,r2
                    113:        adwc    r6,r3
                    114:        addl2   r2,(r9)+
                    115:        adwc    r1,r3
                    116:        movl    (r8)+,r1
                    117:        jgeq    L2p1
                    118: L2n1:  emul    r1,r6,$0,r10
                    119:        addl2   r3,r10
                    120:        adwc    r6,r11
                    121:        addl2   r10,(r9)+
                    122:        adwc    r1,r11
                    123:
1.1.1.2   maekawa   124:        sobgtr  r7,Loop2
1.1       maekawa   125:        movl    r11,r0
                    126:        ret

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