mirror of
https://github.com/kmackay/micro-ecc.git
synced 2026-09-12 12:10:06 +00:00
Merge pull request #46 from emargolis/master
#ifdef out unused functions when uECC_SQUARE_FUNC is disabled.
This commit is contained in:
@@ -1247,6 +1247,7 @@ static void vli_mult(uint32_t *result, const uint32_t *left, const uint32_t *rig
|
|||||||
#define asm_mult 1
|
#define asm_mult 1
|
||||||
#endif /* (uECC_WORDS == 8) */
|
#endif /* (uECC_WORDS == 8) */
|
||||||
|
|
||||||
|
#if uECC_SQUARE_FUNC
|
||||||
#if (uECC_WORDS == 5)
|
#if (uECC_WORDS == 5)
|
||||||
static void vli_square(uint32_t *result, const uint32_t *left) {
|
static void vli_square(uint32_t *result, const uint32_t *left) {
|
||||||
register uint32_t *r0 __asm__("r0") = result;
|
register uint32_t *r0 __asm__("r0") = result;
|
||||||
@@ -2030,6 +2031,7 @@ static void vli_square(uint32_t *result, const uint32_t *left) {
|
|||||||
}
|
}
|
||||||
#define asm_square 1
|
#define asm_square 1
|
||||||
#endif /* (uECC_WORDS == 8) */
|
#endif /* (uECC_WORDS == 8) */
|
||||||
|
#endif /* uECC_SQUARE_FUNC */
|
||||||
|
|
||||||
#endif /* (uECC_PLATFORM != uECC_arm_thumb) */
|
#endif /* (uECC_PLATFORM != uECC_arm_thumb) */
|
||||||
#endif /* (uECC_ASM == uECC_asm_fast) */
|
#endif /* (uECC_ASM == uECC_asm_fast) */
|
||||||
|
|||||||
@@ -623,7 +623,7 @@ static uECC_word_t vli_sub(uECC_word_t *result, const uECC_word_t *left, const u
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (!asm_mult || !asm_square || uECC_CURVE == uECC_secp256k1)
|
#if (!asm_mult || (uECC_SQUARE_FUNC && !asm_square) || uECC_CURVE == uECC_secp256k1)
|
||||||
static void muladd(uECC_word_t a,
|
static void muladd(uECC_word_t a,
|
||||||
uECC_word_t b,
|
uECC_word_t b,
|
||||||
uECC_word_t *r0,
|
uECC_word_t *r0,
|
||||||
|
|||||||
Reference in New Issue
Block a user