Optimised code for encoding/decoding integers when the underlying architecture has the right endianness and allows unaligned accesses.

This commit is contained in:
Thomas Pornin 2017-03-18 18:07:36 +01:00
parent 5db2d48b12
commit 90bc9406c3
2 changed files with 115 additions and 5 deletions

View file

@ -189,4 +189,20 @@
#define BR_UMUL128 1
*/
/*
* When BR_LE_UNALIGNED is enabled, then the current architecture is
* assumed to use little-endian encoding for integers, and to tolerate
* unaligned accesses with no or minimal time penalty.
*
#define BR_LE_UNALIGNED 1
*/
/*
* When BR_BE_UNALIGNED is enabled, then the current architecture is
* assumed to use little-endian encoding for integers, and to tolerate
* unaligned accesses with no or minimal time penalty.
*
#define BR_BE_UNALIGNED 1
*/
#endif