| @@ -205,7 +205,9 @@ API_NS(scalar_set_unsigned) ( | |||||
| unsigned int i = 0; | unsigned int i = 0; | ||||
| for (; i<sizeof(uint64_t)/sizeof(decaf_word_t); i++) { | for (; i<sizeof(uint64_t)/sizeof(decaf_word_t); i++) { | ||||
| out->limb[i] = w; | out->limb[i] = w; | ||||
| w >>= (sizeof(uint64_t) > sizeof(decaf_word_t)) ? 8*sizeof(decaf_word_t) : 0; | |||||
| #if DECAF_WORD_BITS < 64 | |||||
| w >>= 8*sizeof(decaf_word_t); | |||||
| #endif | |||||
| } | } | ||||
| } | } | ||||
| @@ -205,7 +205,9 @@ API_NS(scalar_set_unsigned) ( | |||||
| unsigned int i = 0; | unsigned int i = 0; | ||||
| for (; i<sizeof(uint64_t)/sizeof(decaf_word_t); i++) { | for (; i<sizeof(uint64_t)/sizeof(decaf_word_t); i++) { | ||||
| out->limb[i] = w; | out->limb[i] = w; | ||||
| w >>= (sizeof(uint64_t) > sizeof(decaf_word_t)) ? 8*sizeof(decaf_word_t) : 0; | |||||
| #if DECAF_WORD_BITS < 64 | |||||
| w >>= 8*sizeof(decaf_word_t); | |||||
| #endif | |||||
| } | } | ||||
| } | } | ||||
| @@ -194,7 +194,9 @@ API_NS(scalar_set_unsigned) ( | |||||
| unsigned int i = 0; | unsigned int i = 0; | ||||
| for (; i<sizeof(uint64_t)/sizeof(decaf_word_t); i++) { | for (; i<sizeof(uint64_t)/sizeof(decaf_word_t); i++) { | ||||
| out->limb[i] = w; | out->limb[i] = w; | ||||
| w >>= (sizeof(uint64_t) > sizeof(decaf_word_t)) ? 8*sizeof(decaf_word_t) : 0; | |||||
| #if DECAF_WORD_BITS < 64 | |||||
| w >>= 8*sizeof(decaf_word_t); | |||||
| #endif | |||||
| } | } | ||||
| } | } | ||||
| @@ -45,6 +45,7 @@ static void get_cpu_entropy(uint8_t *entropy, size_t len) { | |||||
| #else | #else | ||||
| __asm__("cpuid" : "=a"(a), "=b"(b), "=c"(c), "=d"(d) : "0"(1)); | __asm__("cpuid" : "=a"(a), "=b"(b), "=c"(c), "=d"(d) : "0"(1)); | ||||
| #endif | #endif | ||||
| (void)a; (void)b; (void)d; | |||||
| have_rdrand = (c>>30)&1; | have_rdrand = (c>>30)&1; | ||||
| tested = 1; | tested = 1; | ||||
| } | } | ||||