Home
last modified time | relevance | path

Searched +full:carry +full:- +full:less (Results 1 – 25 of 283) sorted by relevance

12345678910>>...12

/freebsd/crypto/openssl/crypto/bn/
H A Dbn_mod.c2 * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved.
16 * like BN_mod, but returns non-negative remainder (i.e., 0 <= r < |d| in BN_nnmod()
27 if (!r->neg) in BN_nnmod()
29 /* now -|d| < r < 0, so we have to set r := r + |d| */ in BN_nnmod()
30 return (d->neg ? BN_sub : BN_add) (r, r, d); in BN_nnmod()
42 * BN_mod_add variant that may be used if both a and b are non-negative and
43 * less than m. The original algorithm was
56 size_t i, ai, bi, mtop = m->top; in bn_mod_add_fixed_top()
58 BN_ULONG carry, temp, mask, *rp, *tp = storage; in bn_mod_add_fixed_top() local
72 ap = a->d != NULL ? a->d : tp; in bn_mod_add_fixed_top()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/
H A Dint_div_impl.inc1 //===-- int_div_impl.inc - Integer division ---------------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
15 // Adapted from Figure 3-40 of The PowerPC Compiler Writer's Guide
19 unsigned sr = (d ? clz(d) : N) - (n ? clz(n) : N);
20 // 0 <= sr <= N - 1 or sr is very large.
21 if (sr > N - 1) // n < d
23 if (sr == N - 1) // d == 1
26 // 1 <= sr <= N - 1. Shifts do not trigger UB.
[all …]
/freebsd/contrib/llvm-project/lldb/source/Plugins/Process/Utility/
H A DARMDefines.h1 //===-- ARMDefines.h --------------------------------------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
31 // ARM conditions // Meaning (integer) Meaning (floating-point)
38 0x2 // Carry set >, ==, or unordered C == 1
41 0x3 // Carry clear Less than C == 0
44 0x4 // Minus, negative Less than N == 1
55 0x9 // Unsigned lower or same Less than or equal C == 0 or Z ==
60 0xB // Less than Less than, or unordered N != V
65 0xD // Less than or equal <, ==, or unordered Z == 1 or N !=
[all …]
/freebsd/crypto/libecc/src/nn/
H A Dnn_add.c2 * Copyright (C) 2017 - This file is part of libecc project
7 * Jean-Pierre FLORI <jean-pierre.flori@ssi.gouv.fr>
23 * o out = in1 +/- in2 if cnd is not zero.
36 * in "out" and returning the carry in 'carry' parameter on success. This
38 * returns 0 on success, -1 on error.
61 word_t *carry) in _nn_cnd_add() argument
68 MUST_HAVE((carry != NULL), ret, err); in _nn_cnd_add()
73 loop_wlen = LOCAL_MAX(in1->wlen, in2->wlen); in _nn_cnd_add()
80 /* Perform addition one word at a time, propagating the carry. */ in _nn_cnd_add()
82 tmp = (word_t)(in1->val[i] + (in2->val[i] & mask)); in _nn_cnd_add()
[all …]
H A Dnn_mul_redc1.c2 * Copyright (C) 2017 - This file is part of libecc project
7 * Jean-Pierre FLORI <jean-pierre.flori@ssi.gouv.fr>
28 * - r = 2^p_rounded_bitlen mod (p), where
31 * - r_square = r^2 mod (p)
32 * - mpinv = -p^-1 mod (2^WORDSIZE).
37 * The function returns 0 on success, -1 on error. out parameters 'r',
71 /* _mpinv = 2^wlen - (modinv(prime, 2^wlen)) */ in nn_compute_redc1_coefs()
117 * and mpinv is -p^(-1) mod (2^WORDSIZE).
122 * The function returns 0 on success, -1 on error.
127 word_t prod_high, prod_low, carry, acc, m; in _nn_mul_redc1() local
[all …]
/freebsd/sys/contrib/openzfs/module/icp/asm-x86_64/modes/
H A Dgcm_pclmulqdq.S1 // SPDX-License-Identifier: CDDL-1.0
10 * or https://opensource.org/licenses/CDDL-1.0.
33 * Accelerated GHASH implementation with Intel PCLMULQDQ-NI
37 * PCLMULQDQ is used to accelerate the most time-consuming part of GHASH,
38 * carry-less multiplication. More information about PCLMULQDQ can be
40 * http://software.intel.com/en-us/articles/
41 * carry-less-multiplication-and-its-usage-for-computing-the-gcm-mode/
70 * 5. Added code to byte swap 16-byte input and output.
100 * Use this mask to byte-swap a 16-byte integer with the pshufb instruction
114 * Perform a carry-less multiplication (that is, use XOR instead of the
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DISDOpcodes.h1 //===-- llvm/CodeGen/ISDOpcodes.h - CodeGen opcodes -------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
20 /// ISD namespace - This namespace contains an enum which represents all of the
25 //===--------------------------------------------------------------------===//
26 /// ISD::NodeType enum - This enum defines the target-independent operators
29 /// Targets may also define target-dependent operator codes for SDNodes. For
31 /// Targets should aim to use target-independent operators to model their
32 /// instruction sets as much as possible, and only use target-dependent
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/Sparc/
H A DSparc.h1 //===-- Sparc.h - Top-level interface for Sparc representation --*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 // Sparc back-end.
12 //===----------------------------------------------------------------------===//
47 ICC_LE = 2, // Less or Equal
49 ICC_L = 3, // Less
51 ICC_LEU = 4, // Less or Equal Unsigned
52 ICC_CC = 13, // Carry Clear/Great or Equal Unsigned
53 ICC_CS = 5, // Carry Set/Less Unsigned
[all …]
/freebsd/contrib/bearssl/src/ec/
H A Dec_c25519_m62.c72 * A field element is encoded as five 64-bit integers, in basis 2^51.
73 * Limbs may be occasionally larger than 2^51, to save on carry
77 #define MASK51 (((uint64_t)1 << 51) - (uint64_t)1)
87 m = -(uint64_t)ctl; in f255_cswap()
96 * Addition with no carry propagation. Limbs double in size.
121 * We compute d = (2^255-19)*1024 + a - b. Since the limbs in f255_sub()
123 * more than 2^264, but much less than 2^265-19456. This in f255_sub()
128 * Initial carry is 19456, since we add 2^265-19456. Each in f255_sub()
129 * individual subtraction may yield a carry up to 513. in f255_sub()
131 w = a[0] - b[0] - 19456; in f255_sub()
[all …]
H A Dec_c25519_m31.c57 j -= k;
61 tmp[39 - k - j] |= (unsigned char)w;
74 * that right-shifting a signed negative integer copies the sign bit
75 * (arithmetic right-shift). This is "implementation-defined behaviour",
84 | ((-((uint32_t)(x) >> 31)) << (32 - (n))))
90 * Convert an integer from unsigned little-endian encoding to a sequence of
91 * 30-bit words in little-endian order. The final "partial" word is
102 while (len -- > 0) { in le8_to_le30()
111 acc = b >> (30 - acc_len); in le8_to_le30()
112 acc_len -= 22; in le8_to_le30()
[all …]
H A Dec_p256_m31.c29 * that right-shifting a signed negative integer copies the sign bit
30 * (arithmetic right-shift). This is "implementation-defined behaviour",
39 | ((-((uint32_t)(x) >> 31)) << (32 - (n))))
41 | ((-((uint64_t)(x) >> 63)) << (64 - (n))))
48 * Convert an integer from unsigned big-endian encoding to a sequence of
49 * 30-bit words in little-endian order. The final "partial" word is
60 while (len -- > 0) { in be8_to_le30()
69 acc = b >> (30 - acc_len); in be8_to_le30()
70 acc_len -= 22; in be8_to_le30()
77 * Convert an integer (30-bit words, little-endian) to unsigned
[all …]
/freebsd/contrib/llvm-project/clang/lib/Headers/
H A D__wmmintrin_pclmul.h1 /*===---- __wmmintrin_pclmul.h - PCMUL intrinsics ---------------------------===
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 *===-----------------------------------------------------------------------===
17 /// Multiplies two 64-bit integer values, which are selected from source
18 /// operands using the immediate-value operand. The multiplication is a
19 /// carry-less multiplication, and the 128-bit integer product is stored in
31 /// A 128-bit vector of [2 x i64] containing one of the source operands.
33 /// A 128-bit vector of [2 x i64] containing one of the source operands.
35 /// An immediate value specifying which 64-bit values to select from the
42 /// \returns The 128-bit integer vector containing the result of the carry-less
[all …]
/freebsd/crypto/openssl/crypto/ec/curve448/
H A Df_generic.c2 * Copyright 2017-2021 The OpenSSL Project Authors. All Rights Reserved.
3 * Copyright 2015-2016 Cryptography Research, Inc.
35 buffer |= ((dword_t) red->limb[LIMBPERM(j)]) << fill; in gf_serialize()
40 fill -= 8; in gf_serialize()
52 return 0 - (y->limb[0] & 1); in gf_hibit()
62 return 0 - (y->limb[0] & 1); in gf_lobit()
65 /* Deserialize from wire format; return -1 on success and 0 on failure. */
81 if (j == nbytes - 1) in gf_deserialize()
87 x->limb[LIMBPERM(i)] = (word_t) in gf_deserialize()
88 ((i < NLIMBS - 1) ? buffer & LIMB_MASK(LIMBPERM(i)) : buffer); in gf_deserialize()
[all …]
/freebsd/contrib/bc/src/
H A Dnum.c4 * SPDX-License-Identifier: BSD-2-Clause
6 * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
80 return (((ssize_t) n) ^ -((ssize_t) neg)) + neg; in bc_num_neg()
86 * @return -1 if the number is less than 0, 1 if greater, and 0 if equal.
91 return bc_num_neg((n)->len != 0, BC_NUM_NEG(n)); in bc_num_cmpZero()
102 return n->len ? n->len - BC_NUM_RDX_VAL(n) : 0; in bc_num_int()
117 if (req > n->cap) in bc_num_expand()
121 n->num = bc_vm_realloc(n->num, BC_NUM_SIZE(req)); in bc_num_expand()
122 n->cap = req; in bc_num_expand()
137 n->scale = scale; in bc_num_setToZero()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/Utils/
H A DARMBaseInfo.h1 //===-- ARMBaseInfo.h - Top level definitions for ARM ---*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 // the ARM target useful for the compiler back-end and the MC libraries.
14 //===----------------------------------------------------------------------===//
28 // The CondCodes constants map directly to the 4-bit encoding of the
30 enum CondCodes { // Meaning (integer) Meaning (floating-point)
33 HS, // Carry set >, ==, or unordered
34 LO, // Carry clear Less than
35 MI, // Minus, negative Less than
[all …]
/freebsd/contrib/bearssl/src/int/
H A Di31_montmul.c34 * d <- (d + xu*y + f*m) / 2^31 in br_i31_montymul()
35 * We have xu <= 2^31-1 and f <= 2^31-1. in br_i31_montymul()
36 * Thus, if d <= 2*m-1 on input, then: in br_i31_montymul()
37 * 2*m-1 + 2*(2^31-1)*m <= (2^32)*m-1 in br_i31_montymul()
38 * and the new d value is less than 2*m. in br_i31_montymul()
40 * We represent d over 31-bit words, with an extra word 'dh' in br_i31_montymul()
52 * The carry for each operation fits on 32 bits: in br_i31_montymul()
53 * d[v+1] <= 2^31-1 in br_i31_montymul()
54 * xu*y[v+1] <= (2^31-1)*(2^31-1) in br_i31_montymul()
55 * f*m[v+1] <= (2^31-1)*(2^31-1) in br_i31_montymul()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/M68k/MCTargetDesc/
H A DM68kAsmBackend.cpp1 //===-- M68kAsmBackend.cpp - M68k Assembler Backend -------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
65 Data[Fixup.getOffset() + i] = uint8_t(Value >> ((Size - i - 1) * 8)); in applyFixup()
79 /// required for simple alignment would be less than the minimum nop size.
83 /// \return - true on success, false on failure
89 /// cc—Carry clear GE—Greater than or equal
91 /// CS—Carry set GT—Greater than
92 /// LT—Less than
[all …]
/freebsd/sys/x86/include/
H A Dpsl.h1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
41 #define PSL_C 0x00000001 /* carry bit */
43 #define PSL_AF 0x00000010 /* bcd carry bit */
85 * causes one more or one less debugger trap, so allowing it is fairly
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A DAPInt.h1 //===-- llvm/ADT/APInt.h - For Arbitrary Precision Integer -----*- C++ -*--===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
13 //===----------------------------------------------------------------------===//
41 inline APInt operator-(APInt);
43 //===----------------------------------------------------------------------===//
45 //===----------------------------------------------------------------------===//
50 /// "unsigned", "unsigned long" or "uint64_t", but also allows non-byte-width
51 /// integer sizes and large integer value types such as 3-bits, 15-bits, or more
52 /// than 64-bits of precision. APInt provides a variety of arithmetic operators
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/M68k/
H A DM68kInstrInfo.h1 //===-- M68kInstrInfo.h - M68k Instruction Information ----------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
38 COND_LS = 3, // Less or Same
39 COND_CC = 4, // Carry Clear
40 COND_CS = 5, // Carry Set
48 COND_LT = 13, // Less Than
50 COND_LE = 15, // Less or Equal
/freebsd/contrib/bzip2/
H A DREADME5 ------------------------------------------------------------------
7 lossless, block-sorting data compression.
10 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
16 ------------------------------------------------------------------
19 PDF (manual.pdf) or html (manual.html). A plain-text version of the
23 HOW TO BUILD -- UNIX
26 bzip2 and bzip2recover. Six self-tests are run. If the self-tests
27 complete ok, carry on to installation:
41 make -n install or
42 make -n install PREFIX=/xxx/yyy respectively.
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/
H A DRISCVFeatures.td1 //===-- RISCVFeatures.td - RISC-V Features and Extensions --*- tablegen -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 //===----------------------------------------------------------------------===//
10 // RISC-V subtarget features and instruction predicates.
11 //===----------------------------------------------------------------------===//
13 // Subclass of SubtargetFeature to be used when the feature is also a RISC-V
16 // name - Name of the extension in lower case.
17 // major - Major version of extension.
18 // minor - Minor version of extension.
[all …]
/freebsd/crypto/openssl/crypto/asn1/
H A Da_int.c2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
27 neg = x->type & V_ASN1_NEG; in ASN1_INTEGER_cmp()
28 if (neg != (y->type & V_ASN1_NEG)) { in ASN1_INTEGER_cmp()
30 return -1; in ASN1_INTEGER_cmp()
38 return -ret; in ASN1_INTEGER_cmp()
43 /*-
56 * adding one to the result. This can be done less messily with a little trick.
58 * complement and 0 by the add one (due to carry) so just copy as many trailing
59 * zeros to the destination as there are in the source. The carry will add one
65 * is non-zero we pad with 0xff. The reason for this distinction is that 0x80
[all …]
/freebsd/sys/contrib/openzfs/module/icp/include/modes/
H A Dgcm_impl.h1 // SPDX-License-Identifier: CDDL-1.0
10 * or https://opensource.org/licenses/CDDL-1.0.
43 * @gcm_mul_f Perform carry-less multiplication
/freebsd/sys/contrib/edk2/Include/Library/
H A DBaseLib.h3 functions, file path functions, and CPU architecture-specific functions.
5 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
6 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
10 SPDX-License-Identifier: BSD-2-Clause-Patent
18 // Definitions for architecture-specific types
22 /// The IA-32 architecture context buffer used by SetJump() and LongJump().
54 UINT8 XmmBuffer[160]; ///< XMM6-XMM15.
132 /// The RISC-V architecture context buffer used by SetJump() and LongJump().
161 Returns the length of a Null-terminated Unicode string.
165 If String is not aligned on a 16-bit boundary, then ASSERT().
[all …]

12345678910>>...12