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

Annotation of OpenXM_contrib/gmp/mpn/pa64/umul_ppmm.asm, Revision 1.1.1.1

1.1       ohara       1: dnl  Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
                      2:
                      3: dnl  This file is part of the GNU MP Library.
                      4:
                      5: dnl  The GNU MP Library is free software; you can redistribute it and/or modify
                      6: dnl  it under the terms of the GNU Lesser General Public License as published by
                      7: dnl  the Free Software Foundation; either version 2.1 of the License, or (at your
                      8: dnl  option) any later version.
                      9:
                     10: dnl  The GNU MP Library is distributed in the hope that it will be useful, but
                     11: dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     12: dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
                     13: dnl  License for more details.
                     14:
                     15: dnl  You should have received a copy of the GNU Lesser General Public License
                     16: dnl  along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
                     17: dnl  the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
                     18: dnl  MA 02111-1307, USA.
                     19:
                     20:
                     21: dnl  Optimizations:
                     22: dnl  * Avoid skip instructions
                     23: dnl  * Put carry-generating and carry-consuming insns consecutively
                     24: dnl  * Don't allocate any stack, "home" positions for parameteters could be
                     25: dnl    used.
                     26:
                     27: include(`../config.m4')
                     28:
                     29: define(`p0',`%r28')
                     30: define(`p1',`%r29')
                     31: define(`t32',`%r19')
                     32: define(`t0',`%r20')
                     33: define(`t1',`%r21')
                     34: define(`x',`%r22')
                     35: define(`m0',`%r23')
                     36: define(`m1',`%r24')
                     37:
                     38: ifdef(`HAVE_ABI_2_0w',
                     39: `      .level  2.0W
                     40: ',`    .level  2.0N
                     41: ')
                     42: PROLOGUE(mpn_umul_ppmm)
                     43:        ldo             128(%r30),%r30
                     44: ifdef(`HAVE_ABI_2_0w',
                     45: `      std             %r26,-64(%r30)
                     46:        std             %r25,-56(%r30)
                     47:        copy            %r24,%r31
                     48: ',`
                     49:        depd            %r25,31,32,%r26
                     50:        std             %r26,-64(%r30)
                     51:        depd            %r23,31,32,%r24
                     52:        std             %r24,-56(%r30)
                     53:        ldw             -180(%r30),%r31
                     54: ')
                     55:
                     56:        fldd            -64(%r30),%fr4
                     57:        fldd            -56(%r30),%fr5
                     58:
                     59:        xmpyu           %fr5R,%fr4R,%fr6
                     60:        fstd            %fr6,-128(%r30)
                     61:        xmpyu           %fr5R,%fr4L,%fr7
                     62:        fstd            %fr7,-120(%r30)
                     63:        xmpyu           %fr5L,%fr4R,%fr8
                     64:        fstd            %fr8,-112(%r30)
                     65:        xmpyu           %fr5L,%fr4L,%fr9
                     66:        fstd            %fr9,-104(%r30)
                     67:
                     68:        depdi,z         1,31,1,t32              C t32 = 2^32
                     69:
                     70:        ldd             -128(%r30),p0           C lo = low 64 bit of product
                     71:        ldd             -120(%r30),m0           C m0 = mid0 64 bit of product
                     72:        ldd             -112(%r30),m1           C m1 = mid1 64 bit of product
                     73:        ldd             -104(%r30),p1           C hi = high 64 bit of product
                     74:
                     75:        add,l,*nuv      m0,m1,x                 C x = m1+m0
                     76:         add,l          t32,p1,p1               C propagate carry to mid of p1
                     77:        depd,z          x,31,32,t0              C lo32(m1+m0)
                     78:        add             t0,p0,p0
                     79:        extrd,u         x,31,32,t1              C hi32(m1+m0)
                     80:        add,dc          t1,p1,p1
                     81:
                     82:        std             p0,0(%r31)              C store low half of product
                     83: ifdef(`HAVE_ABI_2_0w',
                     84: `      copy            p1,%r28                 C return val in %r28
                     85: ',`    extrd,u         p1,31,32,%r28           C return val in %r28,%r29
                     86: ')
                     87:        bve             (%r2)
                     88:        ldo             -128(%r30),%r30
                     89: EPILOGUE(mpn_umul_ppmm)
                     90:

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