dnl Copyright 2003, 2005, 2010, 2011 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 POWER3/PPC630 ?
C POWER4/PPC970 ?
C POWER5 2.25
C POWER6 9.75
C POWER7 2.15
C TODO
C * Try to reduce the number of needed live registers
C * Micro-optimise header code
C * Keep in synch with rshift.asm and lshiftc.asm
ASM_START()
PROLOGUE(mpn_lshift)
std r31, -8(r1)
std r30, -16(r1)
subfic tnc, cnt, 64
sldi r7, n, 3 C byte count corresponding to n add up, up, r7 C up = up + n add rp, rp, r7 C rp = rp + n
rldicl. r30, n, 0,62 C r30 = n & 3, set cr0
cmpdi cr6, r30, 2
addi r31, n, 3 C compute count...
ld r10, -8(up) C load 1st limb for b00...b11
srd retval, r10, tnc ifdef(`HAVE_ABI_mode32',
` rldicl r31, r31, 62,34', C ...branch count
` srdi r31, r31, 2') C ...for ctr
mtctr r31 C copy count into ctr
beq cr0, L(b00)
blt cr6, L(b01)
ld r11, -16(up) C load 2nd limb for b10 and b11
beq cr6, L(b10)
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.