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

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

1.1       maekawa     1: dnl PowerPC-32 mpn_rshift -- Shift a number right.
                      2:
1.1.1.2 ! ohara       3: dnl Copyright 1995, 2000, 2002 Free Software Foundation, Inc.
1.1       maekawa     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:
1.1.1.2 ! ohara      22: include(`../config.m4')
        !            23:
        !            24:
        !            25: C      cycles/limb
        !            26: C 604e:    5.0
        !            27: C 750:     4.0
        !            28:
1.1       maekawa    29:
                     30: dnl INPUT PARAMETERS
                     31: dnl res_ptr    r3
                     32: dnl s1_ptr     r4
                     33: dnl size       r5
                     34: dnl cnt                r6
                     35:
                     36: ASM_START()
                     37: PROLOGUE(mpn_rshift)
                     38:        mtctr   r5              C copy size into CTR
                     39:        addi    r7,r3,-4        C move adjusted res_ptr to free return reg
                     40:        subfic  r8,r6,32
                     41:        lwz     r11,0(r4)       C load first s1 limb
                     42:        slw     r3,r11,r8       C compute function return value
1.1.1.2 ! ohara      43:        bdz     L(end1)
1.1       maekawa    44:
1.1.1.2 ! ohara      45: L(oop):        lwzu    r10,4(r4)
1.1       maekawa    46:        srw     r9,r11,r6
                     47:        slw     r12,r10,r8
                     48:        or      r9,r9,r12
                     49:        stwu    r9,4(r7)
1.1.1.2 ! ohara      50:        bdz     L(end2)
1.1       maekawa    51:        lwzu    r11,4(r4)
                     52:        srw     r9,r10,r6
                     53:        slw     r12,r11,r8
                     54:        or      r9,r9,r12
                     55:        stwu    r9,4(r7)
1.1.1.2 ! ohara      56:        bdnz    L(oop)
1.1       maekawa    57:
1.1.1.2 ! ohara      58: L(end1):
        !            59:        srw     r0,r11,r6
1.1       maekawa    60:        stw     r0,4(r7)
                     61:        blr
                     62:
1.1.1.2 ! ohara      63: L(end2):
        !            64:        srw     r0,r10,r6
1.1       maekawa    65:        stw     r0,4(r7)
                     66:        blr
                     67: EPILOGUE(mpn_rshift)

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