dnl Contributed to the GNU project by Torbjorn Granlund.
dnl Copyright 2000-2005 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C Itanium: 2
C Itanium 2: 1
C Thiscode is scheduled deeply since the plain shift instructions shrand shl
C have a latency of 4 (on Itanium) or 3 (on Itanium 2). Poor scheduling of
C these instructions cause a 10 cycle replay trap on Itanium.
C The ld8 scheduling should probably be decreased to make the function smaller.
C Good lfetch will make sure we never stall anyway.
C We should actually issue the first ld8 at cycle 0, and the first BSH/FSH pair
C at cycle 2. Judicious use of predicates could allow us to issue more ld8's
C in the prologue.
C INPUT PARAMETERS
define(`rp', `r32')
define(`up', `r33')
define(`n', `r34')
define(`cnt',`r35')
ASM_START()
PROLOGUE(func)
.prologue
.save ar.lc, r2
.body ifdef(`HAVE_ABI_32',
` addp4 rp = 0, rp C M I
addp4 up = 0, up C M I
sxt4 n = n C M I nop.m 0 nop.m 0
zxt4 cnt = cnt C I ;; ')
{.mmi; cmp.lt p14, p15 = 4, n C M I and r14 = 3, n C M I mov.i r2 = ar.lc C I0
}{.mmi; add r15 = -1, n C M I sub tnc = 64, cnt C M I add r16 = -5, n ;;
}{.mmi; cmp.eq p6, p0 = 1, r14 C M I cmp.eq p7, p0 = 2, r14 C M I shr.u n = r16, 2 C I0
}{.mmi; cmp.eq p8, p0 = 3, r14 C M I ifdef(`OPERATION_lshift',
` shladd up = r15, 3, up C M I
shladd rp = r15, 3, rp') C M I ;;
}{.mmi; add r11 = POFF, up C M I
ld8 r10 = [up], UPD C M01 mov.i ar.lc = n C I0
}{.bbb;
(p6) br.dptk .Lb01
(p7) br.dptk .Lb10
(p8) br.dptk .Lb11 ;; }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.