diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-21 23:36:36 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-21 23:42:26 +0200 |
commit | a89a14ef5da44684a16b204e7a70460cc8c4922a (patch) | |
tree | b23b4c6b155977909ef508fdae2f48d33d802813 /vendor/gmp-6.3.0/mpn/s390_32/README | |
parent | 1db63fcedab0b288820d66e100b1877b1a5a8851 (diff) |
Basic constant folding implementation
Diffstat (limited to 'vendor/gmp-6.3.0/mpn/s390_32/README')
-rw-r--r-- | vendor/gmp-6.3.0/mpn/s390_32/README | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/gmp-6.3.0/mpn/s390_32/README b/vendor/gmp-6.3.0/mpn/s390_32/README new file mode 100644 index 0000000..59519ba --- /dev/null +++ b/vendor/gmp-6.3.0/mpn/s390_32/README @@ -0,0 +1,37 @@ +All current (2001) S/390 and z/Architecture machines are single-issue, +but some newer machines have a deep pipeline. Software-pipelining is +therefore beneficial. + +* mpn_add_n, mpn_sub_n: Use code along the lines below. Two-way unrolling + would be adequate. + + mp_limb_t + mpn_add_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) + { + mp_limb_t a, b, r, cy; + mp_size_t i; + mp_limb_t mm = -1; + + cy = 0; + up += n; + vp += n; + rp += n; + i = -n; + do + { + a = up[i]; + b = vp[i]; + r = a + b + cy; + rp[i] = r; + cy = (((a & b) | ((a | b) & (r ^ mm)))) >> 31; + i++; + } + while (i < 0); + return cy; + } + +* mpn_lshift, mpn_rshift: Use SLDL/SRDL, and two-way unrolling. + +* mpn_mul_1, mpn_addmul_1, mpn_submul_1: For machines with just signed + multiply (MR), use two loops, similar to the corresponding VAX or + POWER functions. Handle carry like for mpn_add_n. |