Skip to content

Commit

Permalink
Add comment explainin structure of UMAAL assembly
Browse files Browse the repository at this point in the history
Signed-off-by: Hanno Becker <[email protected]>
  • Loading branch information
Hanno Becker committed Apr 17, 2022
1 parent d46d96c commit 6dff41c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions library/bn_mul.h
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,12 @@
mbedtls_mpi_uint tmp_a1, tmp_b1; \
asm volatile (

/* - Make sure loop is 4-byte aligned to avoid stalls
* upon repeated non-word aligned instructions in
* some microarchitectures.
* - Don't use ldm with post-increment or back-to-back
* loads with post-increment and same address register
* to avoid stalls on some microarchitectures. */
#define MULADDC_X2_CORE \
".p2align 2 \n\t" \
"ldr.w %[a0], [%[in]], #+8 \n\t" \
Expand Down

0 comments on commit 6dff41c

Please sign in to comment.