Annotation of OpenXM_contrib/gmp/mpn/ia64/add_n.asm, Revision 1.1
1.1 ! ohara 1: dnl IA-64 mpn_add_n -- Add two limb vectors of the same length > 0 and store
! 2: dnl sum in a third limb vector.
! 3:
! 4: dnl Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
! 5:
! 6: dnl This file is part of the GNU MP Library.
! 7:
! 8: dnl The GNU MP Library is free software; you can redistribute it and/or modify
! 9: dnl it under the terms of the GNU Lesser General Public License as published
! 10: dnl by the Free Software Foundation; either version 2.1 of the License, or (at
! 11: dnl your option) any later version.
! 12:
! 13: dnl The GNU MP Library is distributed in the hope that it will be useful, but
! 14: dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! 15: dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
! 16: dnl License for more details.
! 17:
! 18: dnl You should have received a copy of the GNU Lesser General Public License
! 19: dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to
! 20: dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
! 21: dnl MA 02111-1307, USA.
! 22:
! 23: include(`../config.m4')
! 24:
! 25: C INPUT PARAMETERS
! 26: C rp = r32
! 27: C up = r33
! 28: C vp = r34
! 29: C n = r35
! 30:
! 31: C cycles/limb
! 32: C Itanium: 6
! 33: C Itanium 2: ?
! 34:
! 35:
! 36: ASM_START()
! 37: PROLOGUE(mpn_add_n)
! 38: .prologue
! 39: ifdef(`HAVE_ABI_32',
! 40: ` addp4 r32 = 0, r32
! 41: addp4 r33 = 0, r33
! 42: addp4 r34 = 0, r34
! 43: sxt4 r35 = r35
! 44: ;;
! 45: ')
! 46: { .mib; cmp.eq p6, p7 = 1, r35
! 47: add r35 = -2, r35
! 48: nop.b 0
! 49: } { .mib; cmp.ne p8, p9 = r0, r0
! 50: .save ar.lc, r2
! 51: mov r2 = ar.lc
! 52: .body
! 53: nop.b 0 ;;
! 54: } { .mib; ld8 r16 = [r33], 8
! 55: mov ar.lc = r35
! 56: nop.b 0
! 57: } { .mib; ld8 r17 = [r34], 8
! 58: nop.i 0
! 59: (p6) br.dptk .Lend ;;
! 60: }
! 61: .align 32
! 62: .Loop:
! 63: .pred.rel "mutex",p8,p9
! 64: { .mii; mov r20 = r16
! 65: (p8) add r19 = r16, r17, 1
! 66: (p9) add r19 = r16, r17 ;;
! 67: } { .mfi; ld8 r16 = [r33], 8
! 68: nop.f 0
! 69: (p8) cmp.leu p6, p7 = r19, r20
! 70: } { .mfi; ld8 r17 = [r34], 8
! 71: nop.f 0
! 72: (p9) cmp.ltu p6, p7 = r19, r20
! 73: } { .mbb; st8 [r32] = r19, 8
! 74: nop.b 0
! 75: br.cloop.dptk .Loopm ;;
! 76: }
! 77: .pred.rel "mutex",p6,p7
! 78: { .mfi; (p6) add r19 = r16, r17, 1
! 79: nop.f 0
! 80: (p7) add r19 = r16, r17 ;;
! 81: } { .mii; st8 [r32] = r19
! 82: (p6) cmp.leu p8, p9 = r19, r16
! 83: (p7) cmp.ltu p8, p9 = r19, r16 ;;
! 84: }
! 85: .pred.rel "mutex",p8,p9
! 86: { .mfi; (p8) mov r8 = 1
! 87: nop.f 0
! 88: (p9) mov r8 = 0
! 89: }
! 90: mov ar.lc = r2
! 91: br.ret.sptk.many b0
! 92: .Loopm:
! 93: .pred.rel "mutex",p6,p7
! 94: { .mii; mov r20 = r16
! 95: (p6) add r19 = r16, r17, 1
! 96: (p7) add r19 = r16, r17 ;;
! 97: } { .mfi; ld8 r16 = [r33], 8
! 98: nop.f 0
! 99: (p6) cmp.leu p8, p9 = r19, r20
! 100: } { .mfi; ld8 r17 = [r34], 8
! 101: nop.f 0
! 102: (p7) cmp.ltu p8, p9 = r19, r20
! 103: } { .mbb; st8 [r32] = r19, 8
! 104: nop.b 0
! 105: br.cloop.dptk .Loop ;;
! 106: }
! 107: .Lend:
! 108: .pred.rel "mutex",p8,p9
! 109: { .mfi; (p8) add r19 = r16, r17, 1
! 110: nop.f 0
! 111: (p9) add r19 = r16, r17 ;;
! 112: } { .mii; st8 [r32] = r19
! 113: (p8) cmp.leu p6, p7 = r19, r16
! 114: (p9) cmp.ltu p6, p7 = r19, r16 ;;
! 115: }
! 116: .pred.rel "mutex",p6,p7
! 117: { .mfi; (p6) mov r8 = 1
! 118: nop.f 0
! 119: (p7) mov r8 = 0
! 120: }
! 121: mov ar.lc = r2
! 122: br.ret.sptk.many b0
! 123: EPILOGUE(mpn_add_n)
! 124: ASM_END()
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>