diff options
author | Paul Selkirk <paul@psgd.org> | 2018-12-05 14:40:16 -0500 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2018-12-05 14:40:16 -0500 |
commit | a89dcb22ca549ae17742a8ee3c08f2d7fd606771 (patch) | |
tree | f34d6dd56068d54542a75df5ec16dc878b722574 /libraries | |
parent | b333546b2fdb752388a1454969d23f6bf96c41bf (diff) |
Tell libtfm that the ARM is little-endian, so it can optimize fp_read_unsigned_bin().
This enables some overflow-detection code, which fixes CT-01-009.
It also saves 484us/call, which adds up to 6.3ms/RSA signature.
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/libtfm/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/libtfm/Makefile b/libraries/libtfm/Makefile index b50421c..359729b 100644 --- a/libraries/libtfm/Makefile +++ b/libraries/libtfm/Makefile @@ -38,7 +38,7 @@ STM32_LIBTFM_CFLAGS_OPTIMIZATION := -O3 -funroll-loops -fomit-frame-pointer endif CFLAGS := $(subst ${STM32_CFLAGS_OPTIMIZATION},${STM32_LIBTFM_CFLAGS_OPTIMIZATION},${CFLAGS}) -CFLAGS += -DTFM_ARM -Dasm=__asm__ -Wa,-mimplicit-it=thumb +CFLAGS += -DTFM_ARM -DENDIAN_LITTLE -Dasm=__asm__ -Wa,-mimplicit-it=thumb CFLAGS += -I${LIBTFM_SRC}/tomsfastmath/src/headers CFLAGS += -DFP_MAX_SIZE="(${BITS}*2+(8*DIGIT_BIT))" CFLAGS += -Wall -W -Wshadow -Wno-uninitialized |