Macros | Functions
generic.c File Reference
#include <openssl/bn.h>
#include <assert.h>
#include "internal.h"
Include dependency graph for generic.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define mul(r, a, w, c)
 
#define mul_add(r, a, w, c)
 
#define mul_add_c(a, b, c0, c1, c2)
 
#define mul_add_c2(a, b, c0, c1, c2)
 
#define sqr(r0, r1, a)
 
#define sqr_add_c(a, i, c0, c1, c2)
 
#define sqr_add_c2(a, i, j, c0, c1, c2)   mul_add_c2((a)[i], (a)[j], c0, c1, c2)
 

Functions

BN_ULONG bn_add_words (BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, size_t n)
 
BN_ULONG bn_mul_add_words (BN_ULONG *rp, const BN_ULONG *ap, size_t num, BN_ULONG w)
 
void bn_mul_comba4 (BN_ULONG r[8], const BN_ULONG a[4], const BN_ULONG b[4])
 
void bn_mul_comba8 (BN_ULONG r[16], const BN_ULONG a[8], const BN_ULONG b[8])
 
BN_ULONG bn_mul_words (BN_ULONG *rp, const BN_ULONG *ap, size_t num, BN_ULONG w)
 
void bn_sqr_comba4 (BN_ULONG r[8], const BN_ULONG a[4])
 
void bn_sqr_comba8 (BN_ULONG r[16], const BN_ULONG a[8])
 
void bn_sqr_words (BN_ULONG *r, const BN_ULONG *a, size_t n)
 
BN_ULONG bn_sub_words (BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, size_t n)
 

Macro Definition Documentation

◆ mul

#define mul (   r,
  a,
  w,
  c 
)
Value:
do { \
BN_ULONG high, low, ret, ta = (a); \
BN_UMULT_LOHI(low, high, w, ta); \
ret = low + (c); \
(c) = high; \
(c) += (ret < low) ? 1 : 0; \
(r) = ret; \
} while (0)

Definition at line 110 of file generic.c.

◆ mul_add

#define mul_add (   r,
  a,
  w,
  c 
)
Value:
do { \
BN_ULONG high, low, ret, tmp = (a); \
ret = (r); \
BN_UMULT_LOHI(low, high, w, tmp); \
ret += (c); \
(c) = (ret < (c)) ? 1 : 0; \
(c) += high; \
ret += low; \
(c) += (ret < low) ? 1 : 0; \
(r) = ret; \
} while (0)

Definition at line 97 of file generic.c.

◆ mul_add_c

#define mul_add_c (   a,
  b,
  c0,
  c1,
  c2 
)
Value:
do { \
BN_ULONG ta = (a), tb = (b); \
BN_ULONG lo, hi; \
BN_UMULT_LOHI(lo, hi, ta, tb); \
(c0) += lo; \
hi += ((c0) < lo) ? 1 : 0; \
(c1) += hi; \
(c2) += ((c1) < hi) ? 1 : 0; \
} while (0)

Definition at line 416 of file generic.c.

◆ mul_add_c2

#define mul_add_c2 (   a,
  b,
  c0,
  c1,
  c2 
)
Value:
do { \
BN_ULONG ta = (a), tb = (b); \
BN_ULONG lo, hi, tt; \
BN_UMULT_LOHI(lo, hi, ta, tb); \
(c0) += lo; \
tt = hi + (((c0) < lo) ? 1 : 0); \
(c1) += tt; \
(c2) += ((c1) < tt) ? 1 : 0; \
(c0) += lo; \
hi += (c0 < lo) ? 1 : 0; \
(c1) += hi; \
(c2) += ((c1) < hi) ? 1 : 0; \
} while (0)

Definition at line 427 of file generic.c.

◆ sqr

#define sqr (   r0,
  r1,
  a 
)
Value:
do { \
BN_ULONG tmp = (a); \
BN_UMULT_LOHI(r0, r1, tmp, tmp); \
} while (0)

Definition at line 120 of file generic.c.

◆ sqr_add_c

#define sqr_add_c (   a,
  i,
  c0,
  c1,
  c2 
)
Value:
do { \
BN_ULONG ta = (a)[i]; \
BN_ULONG lo, hi; \
BN_UMULT_LOHI(lo, hi, ta, ta); \
(c0) += lo; \
hi += (c0 < lo) ? 1 : 0; \
(c1) += hi; \
(c2) += ((c1) < hi) ? 1 : 0; \
} while (0)

Definition at line 442 of file generic.c.

◆ sqr_add_c2

#define sqr_add_c2 (   a,
  i,
  j,
  c0,
  c1,
  c2 
)    mul_add_c2((a)[i], (a)[j], c0, c1, c2)

Definition at line 453 of file generic.c.

Function Documentation

◆ bn_add_words()

BN_ULONG bn_add_words ( BN_ULONG *  r,
const BN_ULONG *  a,
const BN_ULONG *  b,
size_t  n 
)

Definition at line 245 of file generic.c.

◆ bn_mul_add_words()

BN_ULONG bn_mul_add_words ( BN_ULONG *  rp,
const BN_ULONG *  ap,
size_t  num,
BN_ULONG  w 
)

Definition at line 128 of file generic.c.

◆ bn_mul_comba4()

void bn_mul_comba4 ( BN_ULONG  r[8],
const BN_ULONG  a[4],
const BN_ULONG  b[4] 
)

Definition at line 559 of file generic.c.

◆ bn_mul_comba8()

void bn_mul_comba8 ( BN_ULONG  r[16],
const BN_ULONG  a[8],
const BN_ULONG  b[8] 
)

Definition at line 457 of file generic.c.

◆ bn_mul_words()

BN_ULONG bn_mul_words ( BN_ULONG *  rp,
const BN_ULONG *  ap,
size_t  num,
BN_ULONG  w 
)

Definition at line 156 of file generic.c.

◆ bn_sqr_comba4()

void bn_sqr_comba4 ( BN_ULONG  r[8],
const BN_ULONG  a[4] 
)

Definition at line 671 of file generic.c.

◆ bn_sqr_comba8()

void bn_sqr_comba8 ( BN_ULONG  r[16],
const BN_ULONG  a[8] 
)

Definition at line 597 of file generic.c.

◆ bn_sqr_words()

void bn_sqr_words ( BN_ULONG *  r,
const BN_ULONG *  a,
size_t  n 
)

Definition at line 182 of file generic.c.

◆ bn_sub_words()

BN_ULONG bn_sub_words ( BN_ULONG *  r,
const BN_ULONG *  a,
const BN_ULONG *  b,
size_t  n 
)

Definition at line 301 of file generic.c.

a
int a
Definition: abseil-cpp/absl/container/internal/hash_policy_traits_test.cc:88
c
void c(T a)
Definition: miscompile_with_no_unique_address_test.cc:40
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
absl::hash_internal::c1
static const uint32_t c1
Definition: abseil-cpp/absl/hash/internal/city.cc:58
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
fix_build_deps.r
r
Definition: fix_build_deps.py:491
autogen_x86imm.tmp
tmp
Definition: autogen_x86imm.py:12
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
absl::hash_internal::c2
static const uint32_t c2
Definition: abseil-cpp/absl/hash/internal/city.cc:59


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:13