-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It is better if these minor issues are fixed before adding different shishua targets, as fixing them afterwards will be more difficult. Portability: - Use `stdint.h` and the real type names - `__uint64_t` is NOT predefined by the compiler, and just happened to be defined in the included headers - Fallback `__uint128_t` emulated routines for lehmer128 and wyrand - Supports 32-bit and non-GCC targets - char as an integer type is banned. - Use `size_t` for indexing. Using `uint64_t` is pointless on 32-bit since it is impossible for an array to be larger than 4 GB. It just means extra `adc` instructions. - Similarly, don't use `char` for indexing - it doesn't save any space and it slows things down on non-x86 targets. Yes, compilers will still emit `and` instructions in a loop that will never overflow. Bugfixes: - Initialized some arrays that were left uninitialized, causing unpredictable seeds in prng.c - The only `inline` is `static inline`. Minor improvements: - Swap `STEPS` and `ROUNDS` in shishua.h to match shishua-half.h
- Loading branch information
1 parent
aa01940
commit 5bd346c
Showing
11 changed files
with
168 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.