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