2 # Alpha 21064 __mpn_rshift --
4 # Copyright (C) 1994, 1995 Free Software Foundation, Inc.
6 # This file is part of the GNU MP Library.
8 # The GNU MP Library is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU Library General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or (at your
11 # option) any later version.
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 Library General Public
16 # License for more details.
18 # You should have received a copy of the GNU Library 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,
30 # This code runs at 4.8 cycles/limb on the 21064. With infinite unrolling,
31 # it would take 4 cycles/limb. It should be possible to get down to 3
32 # cycles/limb since both ldq and stq can be paired with the other used
33 # instructions. But there are many restrictions in the 21064 pipeline that
34 # makes it hard, if not impossible, to get down to 3 cycles/limb:
36 # 1. ldq has a 3 cycle delay, srl and sll have a 2 cycle delay.
37 # 2. Only aligned instruction pairs can be paired.
38 # 3. The store buffer or silo might not be able to deal with the bandwidth.
50 ldq $4,0($17) # load first limb
54 and $18,4-1,$20 # number of limbs in first loop
55 sll $4,$7,$0 # compute function result