Check-in [edd0e8d3da]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:add tcl upstream changes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: edd0e8d3da7c19f017ca41ad696b4164a9ad5913
User & Date: chw 2019-11-08 05:38:46
Context
2019-11-08
09:22
add selected open62541 upstream changes in topcua subdir check-in: e9e95211a0 user: chw tags: trunk
05:38
add tcl upstream changes check-in: edd0e8d3da user: chw tags: trunk
2019-11-07
17:40
make ffidl compile/link on freebsd 12.1 check-in: dce7402899 user: chw tags: trunk
Changes

Changes to jni/tcl/libtommath/bn_mp_mul.c.

     8      8   {
     9      9      mp_err err;
    10     10      int min_len = MP_MIN(a->used, b->used),
    11     11          max_len = MP_MAX(a->used, b->used),
    12     12          digs = a->used + b->used + 1;
    13     13      mp_sign neg = (a->sign == b->sign) ? MP_ZPOS : MP_NEG;
    14     14   
    15         -   if (MP_HAS(S_MP_BALANCE_MUL) &&
           15  +   if (a == b) {
           16  +       return mp_sqr(a,c);
           17  +   } else if (MP_HAS(S_MP_BALANCE_MUL) &&
    16     18          /* Check sizes. The smaller one needs to be larger than the Karatsuba cut-off.
    17     19           * The bigger one needs to be at least about one MP_KARATSUBA_MUL_CUTOFF bigger
    18     20           * to make some sense, but it depends on architecture, OS, position of the
    19     21           * stars... so YMMV.
    20     22           * Using it to cut the input into slices small enough for fast_s_mp_mul_digs
    21     23           * was actually slower on the author's machine, but YMMV.
    22     24           */