Skip to content

Commit b0d20a0

Browse files
avarcr-marcstevens
authored andcommitted
README: Document the macros you can set to override CPU detection
1 parent ca94024 commit b0d20a0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎README.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,22 @@ modifying the code yourself.
124124
- SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_H
125125

126126
Includes a custom trailer in ubc_check.H.
127+
128+
This code will try to auto-detect certain things based on
129+
CPU/platform. Unless you're running on some really obscure CPU or
130+
porting to a new platform you should not need to tweak this. If you do
131+
please open an issue at
132+
https://github.com/cr-marcstevens/sha1collisiondetection
133+
134+
- SHA1DC_FORCE_LITTLEENDIAN / SHA1DC_FORCE_BIGENDIAN
135+
136+
Override the check for processor endianenss and force either
137+
Little-Endian or Big-Endian.
138+
139+
- SHA1DC_FORCE_UNALIGNED_ACCESS
140+
141+
Permit unaligned access. This will fail on e.g. SPARC processors, so
142+
it's only permitted on a whitelist of processors. If your CPU isn't
143+
detected as allowing this, and allows unaligned access, setting this
144+
may improve performance (or make it worse, if the kernel has to
145+
catch and emulate such access on its own).

0 commit comments

Comments
(0)