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

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

1.1     ! ohara       1: dnl  MIPS32 mpn_rshift -- Right shift.
        !             2:
        !             3: dnl  Copyright 1995, 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
        !             9: dnl  by the Free Software Foundation; either version 2.1 of the License, or (at
        !            10: dnl  your 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: include(`../config.m4')
        !            23:
        !            24: C INPUT PARAMETERS
        !            25: C res_ptr      $4
        !            26: C src_ptr      $5
        !            27: C size         $6
        !            28: C cnt          $7
        !            29:
        !            30: ASM_START()
        !            31: PROLOGUE(mpn_rshift)
        !            32:        lw      $10,0($5)       C load first limb
        !            33:        subu    $13,$0,$7
        !            34:        addiu   $6,$6,-1
        !            35:        and     $9,$6,4-1       C number of limbs in first loop
        !            36:        beq     $9,$0,.L0       C if multiple of 4 limbs, skip first loop
        !            37:         sll    $2,$10,$13      C compute function result
        !            38:
        !            39:        subu    $6,$6,$9
        !            40:
        !            41: .Loop0:        lw      $3,4($5)
        !            42:        addiu   $4,$4,4
        !            43:        addiu   $5,$5,4
        !            44:        addiu   $9,$9,-1
        !            45:        srl     $11,$10,$7
        !            46:        sll     $12,$3,$13
        !            47:        move    $10,$3
        !            48:        or      $8,$11,$12
        !            49:        bne     $9,$0,.Loop0
        !            50:         sw     $8,-4($4)
        !            51:
        !            52: .L0:   beq     $6,$0,.Lend
        !            53:         nop
        !            54:
        !            55: .Loop: lw      $3,4($5)
        !            56:        addiu   $4,$4,16
        !            57:        addiu   $6,$6,-4
        !            58:        srl     $11,$10,$7
        !            59:        sll     $12,$3,$13
        !            60:
        !            61:        lw      $10,8($5)
        !            62:        srl     $14,$3,$7
        !            63:        or      $8,$11,$12
        !            64:        sw      $8,-16($4)
        !            65:        sll     $9,$10,$13
        !            66:
        !            67:        lw      $3,12($5)
        !            68:        srl     $11,$10,$7
        !            69:        or      $8,$14,$9
        !            70:        sw      $8,-12($4)
        !            71:        sll     $12,$3,$13
        !            72:
        !            73:        lw      $10,16($5)
        !            74:        srl     $14,$3,$7
        !            75:        or      $8,$11,$12
        !            76:        sw      $8,-8($4)
        !            77:        sll     $9,$10,$13
        !            78:
        !            79:        addiu   $5,$5,16
        !            80:        or      $8,$14,$9
        !            81:        bgtz    $6,.Loop
        !            82:         sw     $8,-4($4)
        !            83:
        !            84: .Lend: srl     $8,$10,$7
        !            85:        j       $31
        !            86:        sw      $8,0($4)
        !            87: EPILOGUE(mpn_rshift)

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