From: Mark Wooding Date: Tue, 4 Apr 2006 16:17:45 +0000 (+0100) Subject: Fix various assumptions about mpw sizes. X-Git-Tag: 2.1.1~23^2~1 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb/commitdiff_plain/c29970a7717261e63ffaabb3c67381f13c5dbca5?hp=c29970a7717261e63ffaabb3c67381f13c5dbca5 Fix various assumptions about mpw sizes. * configure, mptypes: New configure switches force mpw type to either sane but small (16/32 bits) or cussid (19/38 bits). This found a bunch of exciting bugs... * gfreduce, mpreduce: If MPW_BITS is not a power of two, modular reduction of a `negative' unsigned value does the wrong thing. * mpx_lsl and friends: Shifting ops weren't masking high-order bits correctly when writing the output. Apply MPW(). * mpx_usubnlsl: More failure to elide high-order junk bits. * mptypes, mpx_udiv, mpx_bits, mp_odd: The binary search is neato, but starts in the wrong place if MPW_BITS is not a power of two. Have mptypes compute MPW_P2 as the largest power of two less than MPW_BITS. ---