compiler people: how likely is it that timing-safe C code is future-proof? as in, how likely is it that future compilers will e.g. take "uint8_t diff = 0; for (size_t i=0; i<len; i++) diff |= a[i]^b[i]; return diff != 0" and put a conditional bailout jump in the loop?
-
-
see https://bennthomsen.wordpress.com/arduino/peripherals/serial-communications/ …: USART_Receive() reads serial data by reading `UDR0`, which expands through several macros into a dereference of a volatile MMIO pointer. so the volatile read from an MMIO region mutates state and must therefore not be removed.
-
I completely agree, you cannot optimize out the reads. You could optimize away doing anything with the result of the read, however.
- 9 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.