[BACK]Return to mul_1.s CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / gmp-2.0.2 / mpn / m88k / mc88110

Annotation of OpenXM/src/kan96xx/gmp-2.0.2/mpn/m88k/mc88110/mul_1.s, Revision 1.1.1.1

1.1       maekawa     1: ; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and
                      2: ; store the product in a second limb vector.
                      3:
                      4: ; Copyright (C) 1992, 1994, 1995 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 Library General Public License as published by
                     10: ; the Free Software Foundation; either version 2 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 Library General Public
                     16: ; License for more details.
                     17:
                     18: ; You should have received a copy of the GNU Library 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      r2
                     26: ; s1_ptr       r3
                     27: ; size         r4
                     28: ; s2_limb      r5
                     29:
                     30:        text
                     31:        align   16
                     32:        global  ___mpn_mul_1
                     33: ___mpn_mul_1:
                     34:        ; Make S1_PTR and RES_PTR point at the end of their blocks
                     35:        ; and negate SIZE.
                     36:        lda      r3,r3[r4]
                     37:        lda      r8,r2[r4]              ; RES_PTR in r8 since r2 is retval
                     38:        subu     r4,r0,r4
                     39:
                     40:        addu.co  r2,r0,r0               ; r2 = cy = 0
                     41:
                     42:        ld       r6,r3[r4]
                     43:        addu     r4,r4,1
                     44:        mulu.d   r10,r6,r5
                     45:        bcnd.n   eq0,r4,Lend
                     46:         subu    r8,r8,8
                     47:
                     48: Loop:  ld       r6,r3[r4]
                     49:        addu.cio r9,r11,r2
                     50:        or       r2,r10,r0              ; could be avoided if unrolled
                     51:        addu     r4,r4,1
                     52:        mulu.d   r10,r6,r5
                     53:        bcnd.n   ne0,r4,Loop
                     54:         st      r9,r8[r4]
                     55:
                     56: Lend:  addu.cio r9,r11,r2
                     57:        st       r9,r8,4
                     58:        jmp.n    r1
                     59:         addu.ci r2,r10,r0

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