[BACK]Return to addmul_1.asm CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpn / pa32 / hppa1_1

Annotation of OpenXM_contrib/gmp/mpn/pa32/hppa1_1/addmul_1.asm, Revision 1.1

1.1     ! ohara       1: dnl  HP-PA 1.1 mpn_addmul_1 -- Multiply a limb vector with a limb and add the
        !             2: dnl  result to a second limb vector.
        !             3:
        !             4: dnl  Copyright 1992, 1993, 1994, 2000, 2001, 2002 Free Software Foundation,
        !             5: dnl  Inc.
        !             6:
        !             7: dnl  This file is part of the GNU MP Library.
        !             8:
        !             9: dnl  The GNU MP Library is free software; you can redistribute it and/or modify
        !            10: dnl  it under the terms of the GNU Lesser General Public License as published
        !            11: dnl  by the Free Software Foundation; either version 2.1 of the License, or (at
        !            12: dnl  your option) any later version.
        !            13:
        !            14: dnl  The GNU MP Library is distributed in the hope that it will be useful, but
        !            15: dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
        !            16: dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
        !            17: dnl  License for more details.
        !            18:
        !            19: dnl  You should have received a copy of the GNU Lesser General Public License
        !            20: dnl  along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
        !            21: dnl  the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
        !            22: dnl  MA 02111-1307, USA.
        !            23:
        !            24: include(`../config.m4')
        !            25:
        !            26: C INPUT PARAMETERS
        !            27: C res_ptr      r26
        !            28: C s1_ptr       r25
        !            29: C size         r24
        !            30: C s2_limb      r23
        !            31:
        !            32: C This runs at 11 cycles/limb on a PA7000.  With the used instructions, it can
        !            33: C not become faster due to data cache contention after a store.  On the PA7100
        !            34: C it runs at 10 cycles/limb.
        !            35:
        !            36: C There are some ideas described in mul_1.asm that applies to this code too.
        !            37:
        !            38: ASM_START()
        !            39: PROLOGUE(mpn_addmul_1)
        !            40: C      .callinfo       frame=64,no_calls
        !            41:
        !            42:        ldo             64(%r30),%r30
        !            43:        fldws,ma        4(%r25),%fr5
        !            44:        stw             %r23,-16(%r30)          C move s2_limb ...
        !            45:        addib,=         -1,%r24,L(just_one_limb)
        !            46:         fldws          -16(%r30),%fr4          C ... into fr4
        !            47:        add             %r0,%r0,%r0             C clear carry
        !            48:        xmpyu           %fr4,%fr5,%fr6
        !            49:        fldws,ma        4(%r25),%fr7
        !            50:        fstds           %fr6,-16(%r30)
        !            51:        xmpyu           %fr4,%fr7,%fr8
        !            52:        ldw             -12(%r30),%r19          C least significant limb in product
        !            53:        ldw             -16(%r30),%r28
        !            54:
        !            55:        fstds           %fr8,-16(%r30)
        !            56:        addib,=         -1,%r24,L(end)
        !            57:         ldw            -12(%r30),%r1
        !            58:
        !            59: C Main loop
        !            60:        .label  L(loop)
        !            61:        ldws            0(%r26),%r29
        !            62:        fldws,ma        4(%r25),%fr5
        !            63:        add             %r29,%r19,%r19
        !            64:        stws,ma         %r19,4(%r26)
        !            65:        addc            %r28,%r1,%r19
        !            66:        xmpyu           %fr4,%fr5,%fr6
        !            67:        ldw             -16(%r30),%r28
        !            68:        fstds           %fr6,-16(%r30)
        !            69:        addc            %r0,%r28,%r28
        !            70:        addib,<>        -1,%r24,L(loop)
        !            71:         ldw            -12(%r30),%r1
        !            72:
        !            73:        .label  L(end)
        !            74:        ldw             0(%r26),%r29
        !            75:        add             %r29,%r19,%r19
        !            76:        stws,ma         %r19,4(%r26)
        !            77:        addc            %r28,%r1,%r19
        !            78:        ldw             -16(%r30),%r28
        !            79:        ldws            0(%r26),%r29
        !            80:        addc            %r0,%r28,%r28
        !            81:        add             %r29,%r19,%r19
        !            82:        stws,ma         %r19,4(%r26)
        !            83:        addc            %r0,%r28,%r28
        !            84:        bv              0(%r2)
        !            85:         ldo            -64(%r30),%r30
        !            86:
        !            87:        .label  L(just_one_limb)
        !            88:        xmpyu           %fr4,%fr5,%fr6
        !            89:        ldw             0(%r26),%r29
        !            90:        fstds           %fr6,-16(%r30)
        !            91:        ldw             -12(%r30),%r1
        !            92:        ldw             -16(%r30),%r28
        !            93:        add             %r29,%r1,%r19
        !            94:        stw             %r19,0(%r26)
        !            95:        addc            %r0,%r28,%r28
        !            96:        bv              0(%r2)
        !            97:         ldo            -64(%r30),%r30
        !            98: EPILOGUE()

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