Gilles Peskine 3b63d09fea Make the main loop's logic clearer
The loop ends when there are no more bits to process, with one twist: when
that happens, we need to clear the window one last time. Since the window
does not start empty (E_limbs==0 is not supported), the loop always starts
with a non-empty window and some bits to process. So it's correct to move
the window clearing logic to the end of the loop. This lets us exit the loop
when the end of the exponent is reached.

It would be clearer not to do the final window clearing inside the loop, so
we wouldn't need to repeat the loop termination condition (end of exponent
reached) inside the loop. However, this requires duplicating the code to
clear the window. Empirically, this causes a significant code size increase,
even if the window clearing code is placed into a function.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-22 21:22:54 +00:00
..
2022-10-19 08:35:08 -04:00
2021-06-28 09:24:07 +01:00
2022-11-02 17:27:25 +00:00
2022-11-02 17:27:25 +00:00
2022-10-13 14:28:15 +01:00
2022-10-07 14:08:42 +01:00
2022-09-16 12:02:48 +02:00
2022-10-13 14:30:03 +01:00
2022-10-13 14:29:38 +01:00
2022-10-13 16:47:13 +01:00
2021-06-28 09:24:07 +01:00
2021-06-28 09:24:07 +01:00
2022-08-31 10:14:25 +01:00
2022-05-12 09:45:03 +01:00
2022-07-01 16:43:25 +01:00
2022-11-09 22:43:31 +08:00
2022-10-19 08:35:09 -04:00
2022-11-14 03:16:19 +00:00
2022-11-09 22:43:31 +08:00
2022-03-29 17:43:56 +02:00
2022-10-28 12:51:35 -04:00
2022-10-28 12:51:35 -04:00
2022-10-28 12:51:35 -04:00