/freebsd/sys/powerpc/fpu/ |
H A D | fpu_arith.h | 46 * We hold the notion of a `carry register', which may or may not be a 47 * machine carry bit or register. On the SPARC, it is just the machine's 48 * carry bit. 50 * In the worst case, you can compute the carry from x+y as 64 * add with carry: r = x + y + c 65 * add (ignoring current carry) and set carry: c'r = x + y + 0 66 * add with carry and set carry: c'r = x + y + c 67 * The macros use `C' for `use carry' and `S' for `set carry'. 68 * Note that the state of the carry is undefined after ADDC and SUBC, 69 * so if all you have for these is `add with carry and set carry', [all …]
|
/freebsd/crypto/openssl/crypto/bn/asm/ |
H A D | ppc64-mont.pl | 120 $carry="r0"; 277 li $carry,0 574 add $t0,$t0,$carry ; can not overflow 579 srdi $carry,$t0,16 580 add $t1,$t1,$carry 581 srdi $carry,$t1,16 588 add $t2,$t2,$carry 591 srdi $carry,$t2,16 595 add $t3,$t3,$carry 596 srdi $carry,$t3,16 [all …]
|
H A D | x86-mont.pl | 311 $carry="ebp"; 314 &lea ($carry,&DWP(1,$num)); 318 &and ($carry,1); # see if num is even 321 &or ($carry,"edx"); 329 &mov ($carry,"edx"); 331 &add ($carry,"eax"); 336 &mov (&DWP($frame-4,"esp",$j,4),$carry); # tp[j]= 339 &mov ($carry,"edx"); 342 &add ("eax",$carry); 362 &mov ($carry,"edx"); [all …]
|
H A D | ppc-mont.pl | 362 my ($carry,$zero) = ($rp,"r0"); 378 # | topmost carry | 445 li $carry,0 446 addic $tp,$sp,$SIZE_T*7 # &t[-1], clear carry bit 454 addze $carry,$carry # modulo-scheduled 485 # question is when does it carry? Is there alternative 487 # observe that condition for carry is quite simple: 488 # $acc0 being non-zero. So that carry can be calculated 498 adde $acc3,$acc4,$carry 499 addze $carry,$zero [all …]
|
H A D | armv8-mont.pl | 133 // question is when does it carry? Is there alternative 135 // observe that condition for carry is quite simple: 136 // $lo0 being non-zero. So that carry can be calculated 590 subs $aptr,sp,#0 // clear carry flag 615 sbcs w10,w10,wzr // result is carry flag 647 sub x17,$bptr,$aptr // preserves carry 671 my ($cnt,$carry,$topmost)=("x27","x28","x30"); 672 my ($tp,$ap_end,$na0)=($bp,$np,$carry); 916 //adc $carry,xzr,xzr // moved below 943 adc $carry,xzr,xzr // carry bit, modulo-scheduled [all …]
|
H A D | x86_64-mont5.pl | 1608 my ($shift,$carry)=($a0,$a1); 1614 xor $carry,$carry 1620 mov $carry,24($tptr) # t[7] 1635 neg $carry # mov $carry,cf 1644 sbb $carry,$carry # mov cf,$carry 1652 neg $carry # mov $carry,cf 1660 sbb $carry,$carry # mov cf,$carry 1674 neg $carry # mov $carry,cf 1683 sbb $carry,$carry # mov cf,$carry 1691 neg $carry # mov $carry,cf [all …]
|
/freebsd/sys/contrib/libsodium/src/libsodium/include/sodium/private/ |
H A D | ed25519_ref10_fe_51.h | 246 uint128_t r0, r1, r2, r3, r4, carry; in fe25519_mul() local 300 carry = r0 >> 51; in fe25519_mul() 301 r1 += carry; in fe25519_mul() 303 carry = r1 >> 51; in fe25519_mul() 304 r2 += carry; in fe25519_mul() 306 carry = r2 >> 51; in fe25519_mul() 307 r3 += carry; in fe25519_mul() 309 carry = r3 >> 51; in fe25519_mul() 310 r4 += carry; in fe25519_mul() 312 carry = r4 >> 51; in fe25519_mul() [all …]
|
/freebsd/contrib/gdtoa/ |
H A D | sum.c | 42 ULong carry, *xc, *xa, *xb, *xe, y; local 52 carry = 0; 59 y = (*xa & 0xffff) + (*xb & 0xffff) + carry; 60 carry = (y & 0x10000) >> 16; 61 z = (*xa++ >> 16) + (*xb++ >> 16) + carry; 62 carry = (z & 0x10000) >> 16; 68 y = (*xa & 0xffff) + carry; 69 carry = (y & 0x10000) >> 16; 70 z = (*xa++ >> 16) + carry; 71 carry = (z & 0x10000) >> 16; [all …]
|
H A D | dmisc.c | 111 ULLong borrow, carry, y, ys; local 113 ULong borrow, carry, y, ys; local 137 carry = 0; 140 ys = *sx++ * (ULLong)q + carry; 141 carry = ys >> 32; 148 ys = (si & 0xffff) * q + carry; 150 carry = zs >> 16; 157 ys = *sx++ * q + carry; 158 carry = ys >> 16; 176 carry = 0; [all …]
|
H A D | misc.c | 168 ULLong carry, y; local 170 ULong carry, *x, y; local 180 carry = a; 183 y = *x * (ULLong)m + carry; 184 carry = y >> 32; 189 y = (xi & 0xffff) * m + carry; 191 carry = z >> 16; 194 y = *x * m + carry; 195 carry = y >> 16; 201 if (carry) { [all …]
|
/freebsd/crypto/openssl/crypto/bn/ |
H A D | bn_nist.c | 19 /* pre-computed tables are "carry-less" values of modulus*(i+1) */ 37 * "carry-full" */ 355 int carry; in BN_nist_mod_192() local 436 carry = (int)(acc >> 32); in BN_nist_mod_192() 443 carry = (int)bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP); in BN_nist_mod_192() 445 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP); in BN_nist_mod_192() 447 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP); in BN_nist_mod_192() 450 if (carry > 0) in BN_nist_mod_192() 451 carry = in BN_nist_mod_192() 452 (int)bn_sub_words(r_d, r_d, _nist_p_192[carry - 1], in BN_nist_mod_192() [all …]
|
H A D | bn_mod.c | 58 BN_ULONG carry, temp, mask, *rp, *tp = storage; in bn_mod_add_fixed_top() local 75 for (i = 0, ai = 0, bi = 0, carry = 0; i < mtop;) { in bn_mod_add_fixed_top() 77 temp = ((ap[ai] & mask) + carry) & BN_MASK2; in bn_mod_add_fixed_top() 78 carry = (temp < carry); in bn_mod_add_fixed_top() 82 carry += (tp[i] < temp); in bn_mod_add_fixed_top() 89 carry -= bn_sub_words(rp, tp, m->d, mtop); in bn_mod_add_fixed_top() 91 rp[i] = (carry & tp[i]) | (~carry & rp[i]); in bn_mod_add_fixed_top() 141 BN_ULONG borrow, carry, ta, tb, mask, *rp; in bn_mod_sub_fixed_top() local 166 for (i = 0, mask = 0 - borrow, carry = 0; i < mtop; i++) { in bn_mod_sub_fixed_top() 167 ta = ((ap[i] & mask) + carry) & BN_MASK2; in bn_mod_sub_fixed_top() [all …]
|
/freebsd/contrib/bearssl/src/symcipher/ |
H A D | aes_ct_ctrcbc.c | 74 uint32_t q[8], carry; in br_aes_ct_ctrcbc_ctr() local 86 carry = ~(iv3 | -iv3) >> 31; in br_aes_ct_ctrcbc_ctr() 87 iv2 += carry; in br_aes_ct_ctrcbc_ctr() 88 carry &= -(~(iv2 | -iv2) >> 31); in br_aes_ct_ctrcbc_ctr() 89 iv1 += carry; in br_aes_ct_ctrcbc_ctr() 90 carry &= -(~(iv1 | -iv1) >> 31); in br_aes_ct_ctrcbc_ctr() 91 iv0 += carry; in br_aes_ct_ctrcbc_ctr() 98 carry = ~(iv3 | -iv3) >> 31; in br_aes_ct_ctrcbc_ctr() 99 iv2 += carry; in br_aes_ct_ctrcbc_ctr() 100 carry &= -(~(iv2 | -iv2) >> 31); in br_aes_ct_ctrcbc_ctr() [all …]
|
H A D | aes_ct64_ctrcbc.c | 85 uint32_t carry; in br_aes_ct64_ctrcbc_ctr() local 92 carry = ~(iv3 | -iv3) >> 31; in br_aes_ct64_ctrcbc_ctr() 93 iv2 += carry; in br_aes_ct64_ctrcbc_ctr() 94 carry &= -(~(iv2 | -iv2) >> 31); in br_aes_ct64_ctrcbc_ctr() 95 iv1 += carry; in br_aes_ct64_ctrcbc_ctr() 96 carry &= -(~(iv1 | -iv1) >> 31); in br_aes_ct64_ctrcbc_ctr() 97 iv0 += carry; in br_aes_ct64_ctrcbc_ctr() 219 uint32_t w[8], carry; in br_aes_ct64_ctrcbc_encrypt() local 230 carry = ~(iv3 | -iv3) >> 31; in br_aes_ct64_ctrcbc_encrypt() 231 iv2 += carry; in br_aes_ct64_ctrcbc_encrypt() [all …]
|
H A D | aes_small_ctrcbc.c | 65 uint32_t carry; in br_aes_small_ctrcbc_ctr() local 76 carry = (~(cc0 | -cc0)) >> 31; in br_aes_small_ctrcbc_ctr() 77 cc1 += carry; in br_aes_small_ctrcbc_ctr() 78 carry &= (~(cc1 | -cc1)) >> 31; in br_aes_small_ctrcbc_ctr() 79 cc2 += carry; in br_aes_small_ctrcbc_ctr() 80 carry &= (~(cc2 | -cc2)) >> 31; in br_aes_small_ctrcbc_ctr() 81 cc3 += carry; in br_aes_small_ctrcbc_ctr()
|
H A D | aes_big_ctrcbc.c | 65 uint32_t carry; in br_aes_big_ctrcbc_ctr() local 76 carry = (~(cc0 | -cc0)) >> 31; in br_aes_big_ctrcbc_ctr() 77 cc1 += carry; in br_aes_big_ctrcbc_ctr() 78 carry &= (~(cc1 | -cc1)) >> 31; in br_aes_big_ctrcbc_ctr() 79 cc2 += carry; in br_aes_big_ctrcbc_ctr() 80 carry &= (~(cc2 | -cc2)) >> 31; in br_aes_big_ctrcbc_ctr() 81 cc3 += carry; in br_aes_big_ctrcbc_ctr()
|
/freebsd/crypto/libecc/src/nn/ |
H A D | nn_add.c | 36 * in "out" and returning the carry in 'carry' parameter on success. This 61 word_t *carry) in _nn_cnd_add() argument 68 MUST_HAVE((carry != NULL), ret, err); in _nn_cnd_add() 80 /* Perform addition one word at a time, propagating the carry. */ in _nn_cnd_add() 86 /* There is at most one carry going out. */ in _nn_cnd_add() 90 (*carry) = _carry; in _nn_cnd_add() 98 * in "out", including the potential carry overflowing past the maximal 112 * For finer carry propagation and length control the internal "_nn_cnd_add" 121 word_t carry; in nn_cnd_add() local 124 ret = _nn_cnd_add(cnd, out, in1, in2, &carry); EG(ret, err); in nn_cnd_add() [all …]
|
H A D | nn_mul_redc1.c | 127 word_t prod_high, prod_low, carry, acc, m; in _nn_mul_redc1() local 176 carry = WORD(0); in _nn_mul_redc1() 179 prod_low = (word_t)(prod_low + carry); in _nn_mul_redc1() 180 prod_high = (word_t)(prod_high + (prod_low < carry)); in _nn_mul_redc1() 182 carry = (word_t)(prod_high + (out->val[j] < prod_low)); in _nn_mul_redc1() 185 out->val[j] = (word_t)(out->val[j] + carry); in _nn_mul_redc1() 186 carry = (word_t)(out->val[j] < carry); in _nn_mul_redc1() 188 out->val[j] = (word_t)(out->val[j] + carry); in _nn_mul_redc1() 189 acc = (word_t)(out->val[j] < carry); in _nn_mul_redc1() 194 carry = (word_t)(prod_high + (prod_low < out->val[0])); in _nn_mul_redc1() [all …]
|
H A D | nn_mul.c | 47 word_t carry, prod_high, prod_low; in _nn_mul_low() local 57 carry = 0; in _nn_mul_low() 79 * And add previous carry. in _nn_mul_low() 81 prod_low = (word_t)(prod_low + carry); in _nn_mul_low() 82 prod_high = (word_t)(prod_high + (prod_low < carry)); in _nn_mul_low() 89 carry = (word_t)(prod_high + (out->val[pos] < prod_low)); in _nn_mul_low() 97 out->val[pos + 1] = (word_t)(out->val[pos + 1] + carry); in _nn_mul_low()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/ |
H A D | int_div_impl.inc | 29 fixuint_t carry = 0; 32 n = (n << 1) | carry; 34 // carry = 0; 35 // if (r >= d) r -= d, carry = 1; 37 carry = s & 1; 40 n = (n << 1) | carry; 58 fixuint_t carry = 0; 61 n = (n << 1) | carry; 63 // carry = 0; 64 // if (r >= d) r -= d, carry = 1; [all …]
|
/freebsd/tests/sys/devrandom/ |
H A D | uint128_test.c | 120 .descr = "0xff -> 0x100 (byte carry)", in ATF_TC_BODY() 125 .descr = "2^32 - 1 -> 2^32 (word carry)", in ATF_TC_BODY() 130 .descr = "2^64 - 1 -> 2^64 (u128t_word0 carry)", in ATF_TC_BODY() 135 .descr = "2^96 - 1 -> 2^96 (word carry)", in ATF_TC_BODY() 171 .descr = "1 + (2^32 - 1) -> 2^32 (word carry)", in ATF_TC_BODY() 177 .descr = "1 + (2^64 - 1) -> 2^64 (u128t_word0 carry)", in ATF_TC_BODY() 191 .descr = "Carry ~2^96", in ATF_TC_BODY() 233 .descr = "0xff -> 0x100 (byte carry)", in ATF_TC_BODY() 238 .descr = "2^32 - 1 -> 2^32 (word carry)", in ATF_TC_BODY() 243 .descr = "2^64 - 1 -> 2^64 (u128t_word0 carry)", in ATF_TC_BODY() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/CSKY/ |
H A D | CSKYInstrInfo16Instr.td | 162 def CMPLEI16 : CSKYPseudo<(outs CARRY:$ca), (ins mGPR:$rx, uimm5:$imm5), 191 (outs sGPR:$rz), (ins CARRY:$ca), "mvcv16\t$rz", []> { 292 (outs CARRY:$ca), (ins), "setc16", []> { 303 (outs CARRY:$ca), (ins), "clrc16", []> { 320 def BTSTI16 : I16_Z_5<0b110, (outs CARRY:$ca), (ins mGPR:$rz, uimm5:$imm5), 323 def TST16 : CSKY16Inst<AddrModeNone, (outs CARRY:$ca), (ins sGPR:$rx, sGPR:$ry), 335 def TSTNBZ16 : CSKY16Inst<AddrModeNone, (outs CARRY:$ca), (ins sGPR:$rx), 421 (ins CARRY:$cond, sGPR:$src1, sGPR:$src2), 423 [(set sGPR:$dst, (select CARRY:$cond, sGPR:$src1, sGPR:$src2))]>; 439 (ins CARRY:$ca, br_symbol_16bit:$src1), "jbt16\t$src1">; [all …]
|
/freebsd/crypto/openssl/providers/implementations/kdfs/ |
H A D | krb5kdf.c | 262 * block[l % N] += s[l] (with carry) 263 * finally add carry if any 268 unsigned int tmp, gcd, remainder, lcm, carry; in n_fold() local 291 /* last to first to be able to bring carry forward */ in n_fold() 292 carry = 0; in n_fold() 311 /* add with carry to any value placed by previous passes */ in n_fold() 312 tmp += carry + block[b]; in n_fold() 314 /* save any carry that may be left */ in n_fold() 315 carry = tmp >> 8; in n_fold() 318 /* if any carry is left at the end, add it through the number */ in n_fold() [all …]
|
/freebsd/contrib/wpa/src/crypto/ |
H A D | fips_prf_internal.c | 23 u32 carry; in fips186_2_prf() local 53 carry = 1; in fips186_2_prf() 55 carry += xkey[k] + xpos[k]; in fips186_2_prf() 56 xkey[k] = carry & 0xff; in fips186_2_prf() 57 carry >>= 8; in fips186_2_prf()
|
/freebsd/crypto/openssl/crypto/ec/curve448/ |
H A D | f_generic.c | 104 dword_t carry = 0; in gf_strong_reduce() local 123 * back in p. will carry back off the top for 2^255. in gf_strong_reduce() 131 carry = in gf_strong_reduce() 132 carry + a->limb[LIMBPERM(i)] + in gf_strong_reduce() 134 a->limb[LIMBPERM(i)] = carry & LIMB_MASK(LIMBPERM(i)); in gf_strong_reduce() 135 carry >>= LIMB_PLACE_VALUE(LIMBPERM(i)); in gf_strong_reduce() 138 assert(carry < 2 && ((word_t)carry + scarry_0) == 0); in gf_strong_reduce()
|