#
7334efa6 |
|
20-Jun-2016 |
Matthew Fernandez <matthew.fernandez@nicta.com.au> |
libutils: Rephrase FORCE_READ into something safer. This commit rephrases the `FORCE_READ` macro to avoid an unorthodox use of `volatile`. The change makes the read less malleable from the compiler's point of view. It also has the unintended side effect of slightly optimising this operation. On x86, an optimising compiler now generates a single load, rather than a load followed by a store to the (unused) local variable. On ARM, there is a similar improvement, but we also save two instructions for stack pointer manipulation depending on the context in which the macro is expanded.
|