diff options
Diffstat (limited to 'mpn/generic')
-rw-r--r-- | mpn/generic/toom43_mul.c | 12 | ||||
-rw-r--r-- | mpn/generic/toom44_mul.c | 8 | ||||
-rw-r--r-- | mpn/generic/toom4_sqr.c | 2 | ||||
-rw-r--r-- | mpn/generic/toom52_mul.c | 16 | ||||
-rw-r--r-- | mpn/generic/toom53_mul.c | 12 | ||||
-rw-r--r-- | mpn/generic/toom62_mul.c | 16 |
6 files changed, 33 insertions, 33 deletions
diff --git a/mpn/generic/toom43_mul.c b/mpn/generic/toom43_mul.c index 670049c39..6723e2996 100644 --- a/mpn/generic/toom43_mul.c +++ b/mpn/generic/toom43_mul.c @@ -101,7 +101,7 @@ mpn_toom43_mul (mp_ptr pp, #define b1d bsm1 /* Compute as2 and asm2. */ - flags = toom6_vm2_neg & mpn_toom_eval_dgr3_pm2 (as2, asm2, ap, n, s, a1a3); + flags = (enum toom6_flags) (toom6_vm2_neg & mpn_toom_eval_dgr3_pm2 (as2, asm2, ap, n, s, a1a3)); /* Compute bs2 and bsm2. */ b1d[n] = mpn_lshift (b1d, b1, n, 1); /* 2b1 */ @@ -115,7 +115,7 @@ mpn_toom43_mul (mp_ptr pp, if (mpn_cmp (b0b2, b1d, n+1) < 0) { mpn_add_n_sub_n (bs2, bsm2, b1d, b0b2, n+1); - flags ^= toom6_vm2_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm2_neg); } else { @@ -126,7 +126,7 @@ mpn_toom43_mul (mp_ptr pp, if (mpn_cmp (b0b2, b1d, n+1) < 0) { mpn_sub_n (bsm2, b1d, b0b2, n+1); - flags ^= toom6_vm2_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm2_neg); } else { @@ -135,7 +135,7 @@ mpn_toom43_mul (mp_ptr pp, #endif /* Compute as1 and asm1. */ - flags ^= toom6_vm1_neg & mpn_toom_eval_dgr3_pm1 (as1, asm1, ap, n, s, a0a2); + flags = (enum toom6_flags) (flags ^ toom6_vm1_neg & mpn_toom_eval_dgr3_pm1 (as1, asm1, ap, n, s, a0a2)); /* Compute bs1 and bsm1. */ bsm1[n] = mpn_add (bsm1, b0, n, b2, t); @@ -144,7 +144,7 @@ mpn_toom43_mul (mp_ptr pp, { cy = mpn_add_n_sub_n (bs1, bsm1, b1, bsm1, n); bs1[n] = cy >> 1; - flags ^= toom6_vm1_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm1_neg); } else { @@ -157,7 +157,7 @@ mpn_toom43_mul (mp_ptr pp, if (bsm1[n] == 0 && mpn_cmp (bsm1, b1, n) < 0) { mpn_sub_n (bsm1, b1, bsm1, n); - flags ^= toom6_vm1_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm1_neg); } else { diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c index 01a6053b7..05c43820d 100644 --- a/mpn/generic/toom44_mul.c +++ b/mpn/generic/toom44_mul.c @@ -148,10 +148,10 @@ mpn_toom44_mul (mp_ptr pp, gives roughly 32 n/3 + log term. */ /* Compute apx = a0 + 2 a1 + 4 a2 + 8 a3 and amx = a0 - 2 a1 + 4 a2 - 8 a3. */ - flags = toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (apx, amx, ap, n, s, tp); + flags = (enum toom7_flags) (toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (apx, amx, ap, n, s, tp)); /* Compute bpx = b0 + 2 b1 + 4 b2 + 8 b3 and bmx = b0 - 2 b1 + 4 b2 - 8 b3. */ - flags ^= toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (bpx, bmx, bp, n, t, tp); + flags = (enum toom7_flags) (flags ^ toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (bpx, bmx, bp, n, t, tp)); TOOM44_MUL_N_REC (v2, apx, bpx, n + 1, tp); /* v2, 2n+1 limbs */ TOOM44_MUL_N_REC (vm2, amx, bmx, n + 1, tp); /* vm2, 2n+1 limbs */ @@ -206,10 +206,10 @@ mpn_toom44_mul (mp_ptr pp, TOOM44_MUL_N_REC (vh, apx, bpx, n + 1, tp); /* vh, 2n+1 limbs */ /* Compute apx = a0 + a1 + a2 + a3 and amx = a0 - a1 + a2 - a3. */ - flags |= toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (apx, amx, ap, n, s, tp); + flags = (enum toom7_flags) (flags | toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (apx, amx, ap, n, s, tp)); /* Compute bpx = b0 + b1 + b2 + b3 bnd bmx = b0 - b1 + b2 - b3. */ - flags ^= toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (bpx, bmx, bp, n, t, tp); + flags = (enum toom7_flags) (flags ^ toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (bpx, bmx, bp, n, t, tp)); TOOM44_MUL_N_REC (vm1, amx, bmx, n + 1, tp); /* vm1, 2n+1 limbs */ /* Clobbers amx, bmx. */ diff --git a/mpn/generic/toom4_sqr.c b/mpn/generic/toom4_sqr.c index 4050c4580..cf0be2cfd 100644 --- a/mpn/generic/toom4_sqr.c +++ b/mpn/generic/toom4_sqr.c @@ -149,5 +149,5 @@ mpn_toom4_sqr (mp_ptr pp, TOOM4_SQR_REC (v0, a0, n, tp); TOOM4_SQR_REC (vinf, a3, s, tp); /* vinf, 2s limbs */ - mpn_toom_interpolate_7pts (pp, n, 0, vm2, vm1, v2, vh, 2*s, tp); + mpn_toom_interpolate_7pts (pp, n, (enum toom7_flags) 0, vm2, vm1, v2, vh, 2*s, tp); } diff --git a/mpn/generic/toom52_mul.c b/mpn/generic/toom52_mul.c index 21040fdbd..24c4fdd88 100644 --- a/mpn/generic/toom52_mul.c +++ b/mpn/generic/toom52_mul.c @@ -102,7 +102,7 @@ mpn_toom52_mul (mp_ptr pp, #define a1a3 asm1 /* Compute as2 and asm2. */ - flags = toom6_vm2_neg & mpn_toom_eval_pm2 (as2, asm2, 4, ap, n, s, a1a3); + flags = (enum toom6_flags) (toom6_vm2_neg & mpn_toom_eval_pm2 (as2, asm2, 4, ap, n, s, a1a3)); /* Compute bs1 and bsm1. */ if (t == n) @@ -113,7 +113,7 @@ mpn_toom52_mul (mp_ptr pp, if (mpn_cmp (b0, b1, n) < 0) { cy = mpn_add_n_sub_n (bs1, bsm1, b1, b0, n); - flags ^= toom6_vm1_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm1_neg); } else { @@ -125,7 +125,7 @@ mpn_toom52_mul (mp_ptr pp, if (mpn_cmp (b0, b1, n) < 0) { mpn_sub_n (bsm1, b1, b0, n); - flags ^= toom6_vm1_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm1_neg); } else { @@ -140,7 +140,7 @@ mpn_toom52_mul (mp_ptr pp, { mpn_sub_n (bsm1, b1, b0, t); MPN_ZERO (bsm1 + t, n - t); - flags ^= toom6_vm1_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm1_neg); } else { @@ -153,7 +153,7 @@ mpn_toom52_mul (mp_ptr pp, if (flags & toom6_vm1_neg ) { bsm2[n] = mpn_add (bsm2, bsm1, n, b1, t); - flags ^= toom6_vm2_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm2_neg); } else { @@ -163,7 +163,7 @@ mpn_toom52_mul (mp_ptr pp, if (mpn_cmp (bsm1, b1, n) < 0) { mpn_sub_n (bsm2, b1, bsm1, n); - flags ^= toom6_vm2_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm2_neg); } else { @@ -176,7 +176,7 @@ mpn_toom52_mul (mp_ptr pp, { mpn_sub_n (bsm2, b1, bsm1, t); MPN_ZERO (bsm2 + t, n - t); - flags ^= toom6_vm2_neg; + flags = (enum toom6_flags) (flags ^ toom6_vm2_neg); } else { @@ -186,7 +186,7 @@ mpn_toom52_mul (mp_ptr pp, } /* Compute as1 and asm1. */ - flags ^= toom6_vm1_neg & mpn_toom_eval_pm1 (as1, asm1, 4, ap, n, s, a0a2); + flags = (enum toom6_flags) (flags ^ toom6_vm1_neg & mpn_toom_eval_pm1 (as1, asm1, 4, ap, n, s, a0a2)); ASSERT (as1[n] <= 4); ASSERT (bs1[n] <= 1); diff --git a/mpn/generic/toom53_mul.c b/mpn/generic/toom53_mul.c index 8a0807a4c..d62a3dc7e 100644 --- a/mpn/generic/toom53_mul.c +++ b/mpn/generic/toom53_mul.c @@ -96,10 +96,10 @@ mpn_toom53_mul (mp_ptr pp, gp = pp; /* Compute as1 and asm1. */ - flags = toom7_w3_neg & mpn_toom_eval_pm1 (as1, asm1, 4, ap, n, s, gp); + flags = (enum toom7_flags) (toom7_w3_neg & mpn_toom_eval_pm1 (as1, asm1, 4, ap, n, s, gp)); /* Compute as2 and asm2. */ - flags |= toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 4, ap, n, s, gp); + flags = (enum toom7_flags) (flags | toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 4, ap, n, s, gp)); /* Compute ash = 16 a0 + 8 a1 + 4 a2 + 2 a3 + a4 = 2*(2*(2*(2*a0 + a1) + a2) + a3) + a4 */ @@ -134,7 +134,7 @@ mpn_toom53_mul (mp_ptr pp, { bs1[n] = mpn_add_n_sub_n (bs1, bsm1, b1, bs1, n) >> 1; bsm1[n] = 0; - flags ^= toom7_w3_neg; + flags = (enum toom7_flags) (flags ^ toom7_w3_neg); } else { @@ -147,7 +147,7 @@ mpn_toom53_mul (mp_ptr pp, { mpn_sub_n (bsm1, b1, bs1, n); bsm1[n] = 0; - flags ^= toom7_w3_neg; + flags = (enum toom7_flags) (flags ^ toom7_w3_neg); } else { @@ -178,7 +178,7 @@ mpn_toom53_mul (mp_ptr pp, if (mpn_cmp (bs2, gp, n+1) < 0) { ASSERT_NOCARRY (mpn_add_n_sub_n (bs2, bsm2, gp, bs2, n+1)); - flags ^= toom7_w1_neg; + flags = (enum toom7_flags) (flags ^ toom7_w1_neg); } else { @@ -188,7 +188,7 @@ mpn_toom53_mul (mp_ptr pp, if (mpn_cmp (bs2, gp, n+1) < 0) { ASSERT_NOCARRY (mpn_sub_n (bsm2, gp, bs2, n+1)); - flags ^= toom7_w1_neg; + flags = (enum toom7_flags) (flags ^ toom7_w1_neg); } else { diff --git a/mpn/generic/toom62_mul.c b/mpn/generic/toom62_mul.c index c01cfba2c..04664e08b 100644 --- a/mpn/generic/toom62_mul.c +++ b/mpn/generic/toom62_mul.c @@ -97,10 +97,10 @@ mpn_toom62_mul (mp_ptr pp, gp = pp; /* Compute as1 and asm1. */ - aflags = toom7_w3_neg & mpn_toom_eval_pm1 (as1, asm1, 5, ap, n, s, gp); + aflags = (enum toom7_flags) (toom7_w3_neg & mpn_toom_eval_pm1 (as1, asm1, 5, ap, n, s, gp)); /* Compute as2 and asm2. */ - aflags |= toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 5, ap, n, s, gp); + aflags = (enum toom7_flags) (aflags | toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 5, ap, n, s, gp)); /* Compute ash = 32 a0 + 16 a1 + 8 a2 + 4 a3 + 2 a4 + a5 = 2*(2*(2*(2*(2*a0 + a1) + a2) + a3) + a4) + a5 */ @@ -157,7 +157,7 @@ mpn_toom62_mul (mp_ptr pp, else { mpn_sub_n (bsm1, b0, b1, n); - bflags = 0; + bflags = (enum toom7_flags) 0; } #endif } @@ -173,7 +173,7 @@ mpn_toom62_mul (mp_ptr pp, else { mpn_sub (bsm1, b0, n, b1, t); - bflags = 0; + bflags = (enum toom7_flags) 0; } } @@ -183,7 +183,7 @@ mpn_toom62_mul (mp_ptr pp, if (bflags & toom7_w3_neg) { bsm2[n] = mpn_add (bsm2, bsm1, n, b1, t); - bflags |= toom7_w1_neg; + bflags = (enum toom7_flags) (bflags | toom7_w1_neg); } else { @@ -194,7 +194,7 @@ mpn_toom62_mul (mp_ptr pp, { ASSERT_NOCARRY (mpn_sub_n (bsm2, b1, bsm1, t)); MPN_ZERO (bsm2 + t, n + 1 - t); - bflags |= toom7_w1_neg; + bflags = (enum toom7_flags) (bflags | toom7_w1_neg); } else { @@ -207,7 +207,7 @@ mpn_toom62_mul (mp_ptr pp, if (mpn_cmp (bsm1, b1, n) < 0) { ASSERT_NOCARRY (mpn_sub_n (bsm2, b1, bsm1, n)); - bflags |= toom7_w1_neg; + bflags = (enum toom7_flags) (bflags | toom7_w1_neg); } else { @@ -293,7 +293,7 @@ mpn_toom62_mul (mp_ptr pp, if (s > t) mpn_mul (vinf, a5, s, b1, t); else mpn_mul (vinf, b1, t, a5, s); - mpn_toom_interpolate_7pts (pp, n, aflags ^ bflags, + mpn_toom_interpolate_7pts (pp, n, (enum toom7_flags) (aflags ^ bflags), vm2, vm1, v2, vh, s + t, scratch_out); TMP_FREE; |