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