Annotation of OpenXM_contrib/gmp/mpn/ia64/submul_1.c, Revision 1.1
1.1 ! ohara 1: /* IA-64 mpn_submul_1 -- Multiply a limb vector with a limb and subtract
! 2: the result from a second limb vector.
! 3:
! 4: Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
! 5:
! 6: This file is part of the GNU MP Library.
! 7:
! 8: The GNU MP Library is free software; you can redistribute it and/or modify
! 9: it under the terms of the GNU Lesser General Public License as published
! 10: by the Free Software Foundation; either version 2.1 of the License, or (at
! 11: your option) any later version.
! 12:
! 13: The GNU MP Library is distributed in the hope that it will be useful, but
! 14: WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! 15: or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
! 16: License for more details.
! 17:
! 18: You should have received a copy of the GNU Lesser General Public License
! 19: along with the GNU MP Library; see the file COPYING.LIB. If not, write to
! 20: the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
! 21: MA 02111-1307, USA.
! 22:
! 23: This code runs at about 9 cycles/limb on the Itanium. That's far from the peak
! 24: execution speed of the Itanium pipeline. With well-tuned assembly code we
! 25: should be able to get to around 3 cycles/limb. See README. */
! 26:
! 27:
! 28: #include "gmp.h"
! 29: #include "gmp-impl.h"
! 30:
! 31: mp_limb_t
! 32: mpn_submul_1 (mp_ptr rp, mp_srcptr s1p, mp_size_t n, mp_limb_t s2d)
! 33: {
! 34: mp_ptr tp;
! 35: mp_limb_t cy;
! 36: TMP_DECL (marker);
! 37:
! 38: TMP_MARK (marker);
! 39: tp = TMP_ALLOC_LIMBS (n);
! 40: cy = mpn_mul_1 (tp, s1p, n, s2d);
! 41: cy += mpn_sub_n (rp, rp, tp, n);
! 42: TMP_FREE (marker);
! 43: return cy;
! 44: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>