Tizen 2.1 base
[external/gmp.git] / mpn / alpha / ev6 / nails / README
1 Copyright 2002, 2005 Free Software Foundation, Inc.
2
3 This file is part of the GNU MP Library.
4
5 The GNU MP Library is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Lesser General Public License as published by the
7 Free Software Foundation; either version 3 of the License, or (at your
8 option) any later version.
9
10 The GNU MP Library is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
13 for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
17
18
19
20
21
22 This directory contains assembly code for nails-enabled 21264.  The code is not
23 very well optimized.
24
25 For addmul_N, as N grows larger, we could make multiple loads together, then do
26 about 3.3 i/c.  10 cycles after the last load, we can increase to 4 i/c.  This
27 would surely allow addmul_4 to run at 2 c/l, but the same should be possible
28 also for addmul_3 and perhaps even addmul_2.
29
30
31                 current         fair            best
32 Routine         c/l  unroll     c/l  unroll     c/l  i/c
33 mul_1           3.25            2.75            2.75 3.273
34 addmul_1        4.0     4       3.5     4 14    3.25 3.385
35 addmul_2        4.0     1       2.5     2 10    2.25 3.333
36 addmul_3        3.0     1       2.33    2 14    2    3.333
37 addmul_4        2.5     1       2.125   2 17    2    3.135
38
39 addmul_5                        2       1 10
40 addmul_6                        2       1 12
41 addmul_7                        2       1 14
42
43 (The "best" column doesn't account for bookkeeping instructions and
44 thereby assumes infinite unrolling.)
45
46 Basecase usages:
47
48 1        addmul_1
49 2        addmul_2
50 3        addmul_3
51 4        addmul_4
52 5        addmul_3 + addmul_2    2.3998
53 6        addmul_4 + addmul_2
54 7        addmul_4 + addmul_3