[BACK]Return to sub_n.asm CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpn / powerpc32

Annotation of OpenXM_contrib/gmp/mpn/powerpc32/sub_n.asm, Revision 1.1.1.2

1.1.1.2 ! ohara       1: dnl  PowerPC 750 mpn_sub_n -- subtract limb vectors.
1.1       maekawa     2:
1.1.1.2 ! ohara       3: dnl  Copyright 2002 Free Software Foundation, Inc.
        !             4: dnl
        !             5: dnl  This file is part of the GNU MP Library.
        !             6: dnl
        !             7: dnl  The GNU MP Library is free software; you can redistribute it and/or
        !             8: dnl  modify it under the terms of the GNU Lesser General Public License as
        !             9: dnl  published by the Free Software Foundation; either version 2.1 of the
        !            10: dnl  License, or (at your option) any later version.
        !            11: dnl
        !            12: dnl  The GNU MP Library is distributed in the hope that it will be useful,
        !            13: dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            14: dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
        !            15: dnl  Lesser General Public License for more details.
        !            16: dnl
        !            17: dnl  You should have received a copy of the GNU Lesser General Public
        !            18: dnl  License along with the GNU MP Library; see the file COPYING.LIB.  If
        !            19: dnl  not, write to the Free Software Foundation, Inc., 59 Temple Place -
        !            20: dnl  Suite 330, Boston, MA 02111-1307, USA.
1.1       maekawa    21:
1.1.1.2 ! ohara      22: include(`../config.m4')
1.1       maekawa    23:
                     24:
1.1.1.2 ! ohara      25: C       cycles/limb
        !            26: C 604e:     4.0
        !            27: C 750:      4.0
        !            28:
        !            29:
        !            30: C mp_limb_t mpn_sub_n (mp_ptr dst, mp_srcptr src1, mp_srcptr src2,
        !            31: C                      mp_size_t size);
        !            32: C
        !            33: C Same style as mpn_add_n.
1.1       maekawa    34:
                     35: ASM_START()
                     36: PROLOGUE(mpn_sub_n)
1.1.1.2 ! ohara      37:
        !            38:        C r3    wp
        !            39:        C r4    xp
        !            40:        C r5    yp
        !            41:        C r6    size
        !            42:
        !            43:        mtctr   r6              C size
        !            44:        lwz     r6, 0(r4)       C xp[0]
        !            45:
        !            46:        lwz     r7, 0(r5)       C yp[0]
        !            47:        sub     r4, r4, r3      C xp-wp
        !            48:
        !            49:        sub     r5, r5, r3      C yp-wp
        !            50:        addi    r4, r4, 4       C xp-wp-4
        !            51:
        !            52:        addi    r5, r5, 4       C yp-wp-4
        !            53:        subfc   r6, r7, r6
        !            54:
        !            55:        stw     r6, 0(r3)       C wp[0]
        !            56:        bdz     L(done)
        !            57:
        !            58:
        !            59: L(top):
        !            60:        C r3    wp, incrementing
        !            61:        C r4    xp-wp+4
        !            62:        C r5    yp-wp+4
        !            63:        C r6    scratch
        !            64:        C r7    scratch
        !            65:
        !            66:        lwzx    r6, r4,r3       C xp[i]
        !            67:
        !            68:        lwzx    r7, r5,r3       C yp[i]
        !            69:
        !            70:        C serialize
        !            71:        subfe   r6, r7, r6
        !            72:
        !            73:        stwu    r6, 4(r3)       C wp[i]
        !            74:        bdnz    L(top)
        !            75:
        !            76:
        !            77: L(done):
        !            78:        subfe   r3, r0, r0      C 0 or -1
        !            79:
        !            80:        subfic  r3, r3, 0       C 0 or 1
1.1       maekawa    81:        blr
1.1.1.2 ! ohara      82:
        !            83: EPILOGUE()

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