webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions
generic.c File Reference
#include <openssl/bn.h>
#include <assert.h>
#include "internal.h"

Macros

#define mul_add(r, a, w, c)
 
#define mul(r, a, w, c)
 
#define sqr(r0, r1, a)
 
#define mul_add_c(a, b, c0, c1, c2)
 
#define mul_add_c2(a, b, c0, c1, c2)
 
#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_mul_add_words (BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
 
BN_ULONG bn_mul_words (BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
 
void bn_sqr_words (BN_ULONG *r, const BN_ULONG *a, int n)
 
BN_ULONG bn_add_words (BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)
 
BN_ULONG bn_sub_words (BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)
 
void bn_mul_comba8 (BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
 
void bn_mul_comba4 (BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
 
void bn_sqr_comba8 (BN_ULONG *r, const BN_ULONG *a)
 
void bn_sqr_comba4 (BN_ULONG *r, const BN_ULONG *a)
 

Macro Definition Documentation

◆ mul

#define mul (   r,
  a,
  w,
 
)
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: TestObj.idl:46
int c
Definition: cpp_unittests.cpp:275
Definition: TestObj.idl:46
int ret
Definition: test_unit_dft.c:69
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
GLfloat GLfloat GLfloat GLfloat w
Definition: gl2.h:519
GLboolean r
Definition: gl2ext.h:306

◆ mul_add

#define mul_add (   r,
  a,
  w,
 
)
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: TestObj.idl:46
int c
Definition: cpp_unittests.cpp:275
Definition: TestObj.idl:46
int ret
Definition: test_unit_dft.c:69
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
GLfloat GLfloat GLfloat GLfloat w
Definition: gl2.h:519
GLboolean r
Definition: gl2ext.h:306

◆ 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)
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306

◆ 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)
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306

◆ sqr

#define sqr (   r0,
  r1,
  a 
)
Value:
do { \
BN_ULONG tmp = (a); \
BN_UMULT_LOHI(r0, r1, tmp, tmp); \
} while (0)
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306

◆ 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)
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
for i
Definition: complexityMeasures.m:24

◆ sqr_add_c2

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

Function Documentation

◆ bn_add_words()

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

◆ bn_mul_add_words()

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

◆ bn_mul_comba4()

void bn_mul_comba4 ( BN_ULONG *  r,
BN_ULONG *  a,
BN_ULONG *  b 
)

◆ bn_mul_comba8()

void bn_mul_comba8 ( BN_ULONG *  r,
BN_ULONG *  a,
BN_ULONG *  b 
)

◆ bn_mul_words()

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

◆ bn_sqr_comba4()

void bn_sqr_comba4 ( BN_ULONG *  r,
const BN_ULONG *  a 
)

◆ bn_sqr_comba8()

void bn_sqr_comba8 ( BN_ULONG *  r,
const BN_ULONG *  a 
)

◆ bn_sqr_words()

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

◆ bn_sub_words()

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