[BACK]Return to mul_1.s CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpn / sh / sh2

Annotation of OpenXM_contrib/gmp/mpn/sh/sh2/mul_1.s, Revision 1.1.1.1

1.1       maekawa     1: ! SH2 __mpn_mul_1 -- Multiply a limb vector with a limb and store
                      2: ! the result in a second limb vector.
                      3:
                      4: ! Copyright (C) 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      r4
                     26: ! s1_ptr       r5
                     27: ! size         r6
                     28: ! s2_limb      r7
                     29:
                     30:        .text
                     31:        .align 1
                     32:        .global ___mpn_mul_1
                     33: ___mpn_mul_1:
                     34:        mov     #0,r2           ! cy_limb = 0
                     35:        mov     #0,r0           ! Keep r0 = 0 for entire loop
                     36:        clrt
                     37:
                     38: Loop:  mov.l   @r5+,r3
                     39:        dmulu.l r3,r7
                     40:        sts     macl,r1
                     41:        addc    r2,r1
                     42:        sts     mach,r2
                     43:        addc    r0,r2           ! propagate carry to cy_limb (dt clobbers T)
                     44:        dt      r6
                     45:        mov.l   r1,@r4
                     46:        bf.s    Loop
                     47:        add     #4,r4
                     48:
                     49:        rts
                     50:        mov     r2,r0

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