NameDateSize

..13-May-201340

addmul_1.asmH A D13-May-20132.2 KiB

gmp-mparam.hH A D13-May-20135.2 KiB

mul_1.asmH A D13-May-20131.9 KiB

READMEH A D13-May-2013899

submul_1.asmH A D13-May-20132.2 KiB

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