ms compiler

This commit is contained in:
John M. Schanck 2020-09-14 17:36:52 -04:00
parent 43498b628d
commit 601e78e0a1
3 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ void PQCLEAN_HQC128_CLEAN_repetition_code_encode(uint64_t *em, const uint64_t *m
pos_r = 0; pos_r = 0;
for (size_t i = 0; i < VEC_N1_SIZE_64; i++) { for (size_t i = 0; i < VEC_N1_SIZE_64; i++) {
for (size_t j = 0; j < 64 && pos_r < PARAM_N1N2; j++) { for (size_t j = 0; j < 64 && pos_r < PARAM_N1N2; j++) {
bit = -((m[i] >> j) & 1); bit = (uint64_t) (-(int64_t) ((m[i] >> j) & 1));
idx_r = (pos_r & 0x3f); idx_r = (pos_r & 0x3f);
em[(pos_r >> 6) + 0] ^= (bit & 0x7FFFFFFFUL) << idx_r; em[(pos_r >> 6) + 0] ^= (bit & 0x7FFFFFFFUL) << idx_r;
em[(pos_r >> 6) + 1] ^= (bit & 0x3FFFFFFFUL) >> ((63 - idx_r)); em[(pos_r >> 6) + 1] ^= (bit & 0x3FFFFFFFUL) >> ((63 - idx_r));

View File

@ -26,7 +26,7 @@ void PQCLEAN_HQC192_CLEAN_repetition_code_encode(uint64_t *em, const uint64_t *m
pos_r = 0; pos_r = 0;
for (size_t i = 0; i < VEC_N1_SIZE_64; i++) { for (size_t i = 0; i < VEC_N1_SIZE_64; i++) {
for (size_t j = 0; j < 64 && pos_r < PARAM_N1N2; j++) { for (size_t j = 0; j < 64 && pos_r < PARAM_N1N2; j++) {
bit = -((m[i] >> j) & 1); bit = (uint64_t) (-(int64_t) ((m[i] >> j) & 1));
idx_r = (pos_r & 0x3f); idx_r = (pos_r & 0x3f);
em[(pos_r >> 6) + 0] ^= (bit & 0x7FFFFFFFFFFFFFFUL) << idx_r; em[(pos_r >> 6) + 0] ^= (bit & 0x7FFFFFFFFFFFFFFUL) << idx_r;
em[(pos_r >> 6) + 1] ^= (bit & 0x3FFFFFFFFFFFFFFUL) >> ((63 - idx_r)); em[(pos_r >> 6) + 1] ^= (bit & 0x3FFFFFFFFFFFFFFUL) >> ((63 - idx_r));

View File

@ -24,7 +24,7 @@ void PQCLEAN_HQC256_CLEAN_repetition_code_encode(uint64_t *em, const uint64_t *m
pos_r = 0; pos_r = 0;
for (size_t i = 0; i < VEC_N1_SIZE_64; i++) { for (size_t i = 0; i < VEC_N1_SIZE_64; i++) {
for (size_t j = 0; j < 64 && pos_r < PARAM_N1N2; j++) { for (size_t j = 0; j < 64 && pos_r < PARAM_N1N2; j++) {
bit = -((m[i] >> j) & 1); bit = (uint64_t) (-(int64_t) ((m[i] >> j) & 1));
idx_r = (pos_r & 0x3f); idx_r = (pos_r & 0x3f);
idx2 = 41 - idx_r; idx2 = 41 - idx_r;
idx2 &= (uint64_t) (-((int64_t)idx2) >> 63); idx2 &= (uint64_t) (-((int64_t)idx2) >> 63);