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

Annotation of OpenXM_contrib/gmp/mpn/alpha/cntlz.asm, Revision 1.1.1.2

1.1       maekawa     1: dnl  Alpha auxiliary for longlong.h's count_leading_zeros
                      2:
1.1.1.2 ! ohara       3: dnl  Copyright 1997, 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
1.1.1.2 ! ohara       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.
1.1       maekawa    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:
                     25: ASM_START()
1.1.1.2 ! ohara      26: EXTERN(__clz_tab)
        !            27: PROLOGUE(mpn_count_leading_zeros,gp)
        !            28:        cmpbge  r31,  r16, r1
        !            29:        LEA(r3,__clz_tab)
        !            30:        sra     r1,   1,   r1
        !            31:        xor     r1,   127, r1
        !            32:        srl     r16,  1,   r16
        !            33:        addq    r1,   r3,  r1
        !            34:        ldq_u   r0,   0(r1)
        !            35:        lda     r2,   64
        !            36:        extbl   r0,   r1,   r0
        !            37:        s8subl  r0,   8,    r0
        !            38:        srl     r16,  r0,   r16
        !            39:        addq    r16,  r3,   r16
        !            40:        ldq_u   r1,   0(r16)
        !            41:        extbl   r1,   r16,  r1
        !            42:        subq    r2,   r1,   r2
        !            43:        subq    r2,   r0,   r0
        !            44:        ret     r31,  (r26),1
        !            45: EPILOGUE(mpn_count_leading_zeros)
1.1       maekawa    46: ASM_END()

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