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

Annotation of OpenXM_contrib/gmp/mpn/pa64/rshift.asm, Revision 1.1

1.1     ! ohara       1: dnl  HP-PA 2.0 mpn_rshift -- Right shift.
        !             2:
        !             3: dnl  Copyright 1997, 2000, 2002 Free Software Foundation, Inc.
        !             4:
        !             5: dnl  This file is part of the GNU MP Library.
        !             6:
        !             7: dnl  The GNU MP Library is free software; you can redistribute it and/or modify
        !             8: dnl  it under the terms of the GNU Lesser General Public License as published by
        !             9: dnl  the Free Software Foundation; either version 2.1 of the License, or (at your
        !            10: dnl  option) any later version.
        !            11:
        !            12: dnl  The GNU MP Library is distributed in the hope that it will be useful, but
        !            13: dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
        !            14: dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
        !            15: dnl  License for more details.
        !            16:
        !            17: dnl  You should have received a copy of the GNU Lesser General Public License
        !            18: dnl  along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
        !            19: dnl  the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
        !            20: dnl  MA 02111-1307, USA.
        !            21:
        !            22:
        !            23: dnl  This runs at 1.5 cycles/limb on PA8000 and 1.0 cycles/limb on PA8500.
        !            24:
        !            25: include(`../config.m4')
        !            26:
        !            27: dnl  INPUT PARAMETERS
        !            28: define(`rp',`%r26')
        !            29: define(`up',`%r25')
        !            30: define(`n',`%r24')
        !            31: define(`cnt',`%r23')
        !            32:
        !            33: ifdef(`HAVE_ABI_2_0w',
        !            34: `       .level  2.0W
        !            35: ',`     .level  2.0N
        !            36: ')
        !            37: PROLOGUE(mpn_rshift)
        !            38:        mtsar           cnt
        !            39:        ldd             0(up), %r21
        !            40:        addib,=         -1, n, L(end)
        !            41:        shrpd           %r21, %r0, %sar, %r29   C compute carry out limb
        !            42:        depw,z          n, 31, 3, %r28          C r28 = (size & 7)
        !            43:        sub             %r0, n, %r22
        !            44:        depw,z          %r22, 28, 3, %r22       C r22 = 8 * (-size & 7)
        !            45:        sub             up, %r22, up            C offset up
        !            46:        blr             %r28, %r0               C branch into jump table
        !            47:        sub             rp, %r22, rp            C offset rp
        !            48:        b               L(0)
        !            49:        nop
        !            50:        b               L(1)
        !            51:        copy            %r21, %r20
        !            52:        b               L(2)
        !            53:        nop
        !            54:        b               L(3)
        !            55:        copy            %r21, %r20
        !            56:        b               L(4)
        !            57:        nop
        !            58:        b               L(5)
        !            59:        copy            %r21, %r20
        !            60:        b               L(6)
        !            61:        nop
        !            62:        b               L(7)
        !            63:        copy            %r21, %r20
        !            64:
        !            65: L(loop)
        !            66: L(0)   ldd             8(up), %r20
        !            67:        shrpd           %r20, %r21, %sar, %r21
        !            68:        std             %r21, 0(rp)
        !            69: L(7)   ldd             16(up), %r21
        !            70:        shrpd           %r21, %r20, %sar, %r20
        !            71:        std             %r20, 8(rp)
        !            72: L(6)   ldd             24(up), %r20
        !            73:        shrpd           %r20, %r21, %sar, %r21
        !            74:        std             %r21, 16(rp)
        !            75: L(5)   ldd             32(up), %r21
        !            76:        shrpd           %r21, %r20, %sar, %r20
        !            77:        std             %r20, 24(rp)
        !            78: L(4)   ldd             40(up), %r20
        !            79:        shrpd           %r20, %r21, %sar, %r21
        !            80:        std             %r21, 32(rp)
        !            81: L(3)   ldd             48(up), %r21
        !            82:        shrpd           %r21, %r20, %sar, %r20
        !            83:        std             %r20, 40(rp)
        !            84: L(2)   ldd             56(up), %r20
        !            85:        shrpd           %r20, %r21, %sar, %r21
        !            86:        std             %r21, 48(rp)
        !            87: L(1)   ldd             64(up), %r21
        !            88:        ldo             64(up), up
        !            89:        shrpd           %r21, %r20, %sar, %r20
        !            90:        std             %r20, 56(rp)
        !            91:        addib,>         -8, n, L(loop)
        !            92:        ldo             64(rp), rp
        !            93:
        !            94: L(end) shrpd           %r0, %r21, %sar, %r21
        !            95:        std             %r21, 0(rp)
        !            96:        bve             (%r2)
        !            97: ifdef(`HAVE_ABI_2_0w',
        !            98: `      copy            %r29,%r28
        !            99: ',`    extrd,u         %r29, 31, 32, %r28
        !           100: ')
        !           101: EPILOGUE(mpn_rshift)

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