• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

esame/16-Jan-2021-1,102901

READMED29-Nov-2013899 3832

addmul_1.asmD21-Oct-20172.4 KiB9484

copyd.asmD21-Oct-20172.9 KiB146122

copyi.asmD21-Oct-20171.8 KiB7059

gmp-mparam.hD21-Oct-20175.8 KiB13991

logops_n.asmD21-Oct-20175.4 KiB296262

lshift.asmD21-Oct-20172.7 KiB145130

lshiftc.asmD21-Oct-20172.9 KiB157142

mul_1.asmD21-Oct-20172.2 KiB8676

rshift.asmD21-Oct-20172.5 KiB139124

submul_1.asmD21-Oct-20172.5 KiB9484

README

1All current (2001) S/390 and z/Architecture machines are single-issue,
2but some newer machines have a deep pipeline.  Software-pipelining is
3therefore beneficial.
4
5* mpn_add_n, mpn_sub_n: Use code along the lines below.  Two-way unrolling
6  would be adequate.
7
8  mp_limb_t
9  mpn_add_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n)
10  {
11    mp_limb_t a, b, r, cy;
12    mp_size_t i;
13    mp_limb_t mm = -1;
14
15    cy = 0;
16    up += n;
17    vp += n;
18    rp += n;
19    i = -n;
20    do
21      {
22          a = up[i];
23          b = vp[i];
24          r = a + b + cy;
25          rp[i] = r;
26          cy = (((a & b) | ((a | b) & (r ^ mm)))) >> 31;
27          i++;
28      }
29    while (i < 0);
30    return cy;
31  }
32
33* mpn_lshift, mpn_rshift: Use SLDL/SRDL, and two-way unrolling.
34
35* mpn_mul_1, mpn_addmul_1, mpn_submul_1: For machines with just signed
36  multiply (MR), use two loops, similar to the corresponding VAX or
37  POWER functions.  Handle carry like for mpn_add_n.
38