Conversation
|
I have no idea what is the problem on ci with the amalgamed build. How do I run this myself? |
We cannot force clients to align their buffers.
sjaeckel
left a comment
There was a problem hiding this comment.
Basically LGTM, besides this one comment for now. I didn't look in further detail yet, but will do that tomorrow.
By merging #726 there was a merge conflict, which I've just resolved while rebasing this branch and therefore I've force-pushed.
| #define K sha512_x86_k | ||
| static const ulong64 sha512_x86_k[80] LTC_ALIGN(32) = { |
There was a problem hiding this comment.
| #define K sha512_x86_k | |
| static const ulong64 sha512_x86_k[80] LTC_ALIGN(32) = { | |
| #define K sha512_x86_k | |
| LTC_ALIGN_MSVC(32) | |
| static const ulong64 K[80] LTC_ALIGN(32) = { |
Please note that's two changes.
Regarding the LTC_ALIGN_MSVC() macro addition: or isn't that required because this feature is only enabled for newer MSVC versions, which already have support for attribute((aligned()))?
There was a problem hiding this comment.
I don't think newer MSVC versions have support for GCC-style __attribute__, they do have support for MSVC-style __declspec and C-standard style alignas.
I have put the same alignment specifiers into the generic portable version of the SHA-512 table. In hopes that the compiler will recognize the two constants are exactly the same and de-duplicate them.
SHA-512 accelerated by x86.