Skip to content

Commit

Permalink
README: Document the macros you can set to override CPU detection
Browse files Browse the repository at this point in the history
  • Loading branch information
avar authored and cr-marcstevens committed May 20, 2017
1 parent ca94024 commit b0d20a0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,22 @@ modifying the code yourself.
- SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_H

Includes a custom trailer in ubc_check.H.

This code will try to auto-detect certain things based on
CPU/platform. Unless you're running on some really obscure CPU or
porting to a new platform you should not need to tweak this. If you do
please open an issue at
https://github.com/cr-marcstevens/sha1collisiondetection

- SHA1DC_FORCE_LITTLEENDIAN / SHA1DC_FORCE_BIGENDIAN

Override the check for processor endianenss and force either
Little-Endian or Big-Endian.

- SHA1DC_FORCE_UNALIGNED_ACCESS

Permit unaligned access. This will fail on e.g. SPARC processors, so
it's only permitted on a whitelist of processors. If your CPU isn't
detected as allowing this, and allows unaligned access, setting this
may improve performance (or make it worse, if the kernel has to
catch and emulate such access on its own).

0 comments on commit b0d20a0

Please sign in to comment.