History log of /openbsd-current/lib/libcrypto/bn/arch/i386/bn_arch.h
Revision Date Author Comments
# 1.9 16-Feb-2023 jsing

Rename bn_umul_hilo() to bn_mulw().

This keeps the naming consistent with the other bignum primitives that have
been recently introduced. Also, use 1/0 intead of h/l (e.g. a1 instead of
ah), as this keeps consistency with other primitives and allows for naming
that works with double word, triple word and quadruple word inputs/outputs.

Discussed with tb@


# 1.8 31-Jan-2023 jsing

Provide inline assembly versions of bn_umul_hilo() for aarch64/amd64/i386.

ok tb@


# 1.7 28-Jan-2023 jsing

Provide bn_div_rem_words() and make use of it.

Provide a function that divides a double word (h:l) by d, returning the
quotient q and the remainder r, such that q * d + r is equal to the
numerator. Call this from the three places that currently implement this
themselves.

This is implemented with some slight indirection, which allows for per
architecture implementations, replacing the define/macro tangle, which
messes with variables that are not passed to it.

Also remove a duplicate of bn_div_words() for the BN_ULLONG && BN_DIV2W
case - this is already handled.

ok tb@


# 1.6 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.5 23-Jan-2023 jsing

Move bn_sqr_words from bn_asm.c to bn_sqr.c.

This is wrapped with #ifndef HAVE_BN_SQR_WORDS, which is then defined for
architectures that provide their own assembly versions.


# 1.4 23-Jan-2023 jsing

Move bn_div_words from bn_asm.c to bn_div.c.

This is wrapped with #ifndef HAVE_BN_DIV_WORDS, which are defined for
architectures that provide their own assembly versions.


# 1.3 23-Jan-2023 jsing

Move bn_add_words() and bn_sub_words from bn_asm.c to bn_add.c.

These are wrapped with #ifndef HAVE_BN_ADD_WORDS/HAVE_BN_SUB_WORDS, which
are defined for architectures that provide their own assembly versions.


# 1.2 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.1 20-Jan-2023 jsing

Provide a per machine bn_arch.h.

This will provide a location for machine specific defines, prototypes and
inline functions.

ok tb@


# 1.8 31-Jan-2023 jsing

Provide inline assembly versions of bn_umul_hilo() for aarch64/amd64/i386.

ok tb@


# 1.7 28-Jan-2023 jsing

Provide bn_div_rem_words() and make use of it.

Provide a function that divides a double word (h:l) by d, returning the
quotient q and the remainder r, such that q * d + r is equal to the
numerator. Call this from the three places that currently implement this
themselves.

This is implemented with some slight indirection, which allows for per
architecture implementations, replacing the define/macro tangle, which
messes with variables that are not passed to it.

Also remove a duplicate of bn_div_words() for the BN_ULLONG && BN_DIV2W
case - this is already handled.

ok tb@


# 1.6 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.5 23-Jan-2023 jsing

Move bn_sqr_words from bn_asm.c to bn_sqr.c.

This is wrapped with #ifndef HAVE_BN_SQR_WORDS, which is then defined for
architectures that provide their own assembly versions.


# 1.4 23-Jan-2023 jsing

Move bn_div_words from bn_asm.c to bn_div.c.

This is wrapped with #ifndef HAVE_BN_DIV_WORDS, which are defined for
architectures that provide their own assembly versions.


# 1.3 23-Jan-2023 jsing

Move bn_add_words() and bn_sub_words from bn_asm.c to bn_add.c.

These are wrapped with #ifndef HAVE_BN_ADD_WORDS/HAVE_BN_SUB_WORDS, which
are defined for architectures that provide their own assembly versions.


# 1.2 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.1 20-Jan-2023 jsing

Provide a per machine bn_arch.h.

This will provide a location for machine specific defines, prototypes and
inline functions.

ok tb@


# 1.7 28-Jan-2023 jsing

Provide bn_div_rem_words() and make use of it.

Provide a function that divides a double word (h:l) by d, returning the
quotient q and the remainder r, such that q * d + r is equal to the
numerator. Call this from the three places that currently implement this
themselves.

This is implemented with some slight indirection, which allows for per
architecture implementations, replacing the define/macro tangle, which
messes with variables that are not passed to it.

Also remove a duplicate of bn_div_words() for the BN_ULLONG && BN_DIV2W
case - this is already handled.

ok tb@


# 1.6 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.5 23-Jan-2023 jsing

Move bn_sqr_words from bn_asm.c to bn_sqr.c.

This is wrapped with #ifndef HAVE_BN_SQR_WORDS, which is then defined for
architectures that provide their own assembly versions.


# 1.4 23-Jan-2023 jsing

Move bn_div_words from bn_asm.c to bn_div.c.

This is wrapped with #ifndef HAVE_BN_DIV_WORDS, which are defined for
architectures that provide their own assembly versions.


# 1.3 23-Jan-2023 jsing

Move bn_add_words() and bn_sub_words from bn_asm.c to bn_add.c.

These are wrapped with #ifndef HAVE_BN_ADD_WORDS/HAVE_BN_SUB_WORDS, which
are defined for architectures that provide their own assembly versions.


# 1.2 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.1 20-Jan-2023 jsing

Provide a per machine bn_arch.h.

This will provide a location for machine specific defines, prototypes and
inline functions.

ok tb@


# 1.6 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.5 23-Jan-2023 jsing

Move bn_sqr_words from bn_asm.c to bn_sqr.c.

This is wrapped with #ifndef HAVE_BN_SQR_WORDS, which is then defined for
architectures that provide their own assembly versions.


# 1.4 23-Jan-2023 jsing

Move bn_div_words from bn_asm.c to bn_div.c.

This is wrapped with #ifndef HAVE_BN_DIV_WORDS, which are defined for
architectures that provide their own assembly versions.


# 1.3 23-Jan-2023 jsing

Move bn_add_words() and bn_sub_words from bn_asm.c to bn_add.c.

These are wrapped with #ifndef HAVE_BN_ADD_WORDS/HAVE_BN_SUB_WORDS, which
are defined for architectures that provide their own assembly versions.


# 1.2 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.1 20-Jan-2023 jsing

Provide a per machine bn_arch.h.

This will provide a location for machine specific defines, prototypes and
inline functions.

ok tb@


# 1.2 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.1 20-Jan-2023 jsing

Provide a per machine bn_arch.h.

This will provide a location for machine specific defines, prototypes and
inline functions.

ok tb@