This repository was archived by the owner on Feb 17, 2025. It is now read-only.
Commit ed16200 1 parent 1a175a3 commit ed16200 Copy full SHA for ed16200
File tree 2 files changed +5
-3
lines changed
include/nil/crypto3/detail
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ namespace nil {
109
109
}
110
110
111
111
static inline word_type rotr (word_type x, std::size_t n) {
112
- #if defined( BOOST_ARCH_X86)
112
+ #if BOOST_ARCH_X86
113
113
asm (" rorl %1,%0" : " +r" (x) : " c" (static_cast <uint8_t >(n)));
114
114
return x;
115
115
#else
@@ -123,7 +123,7 @@ namespace nil {
123
123
}
124
124
125
125
static inline word_type rotl (word_type x, std::size_t n) {
126
- #if defined( BOOST_ARCH_X86)
126
+ #if BOOST_ARCH_X86
127
127
asm (" roll %1,%0" : " +r" (x) : " c" (static_cast <uint8_t >(n)));
128
128
return x;
129
129
#else
Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ namespace nil {
62
62
*/
63
63
inline void reverse_byte (byte_type &b) {
64
64
65
+ #ifdef BOOST_ARCH_CURRENT_WORD_BITS
65
66
#if (BOOST_ARCH_CURRENT_WORD_BITS == 32)
66
67
b = unbounded_shr<16 >(((b * 0x0802LU & 0x22110LU) | (b * 0x8020LU & 0x88440LU)) * 0x10101LU);
67
68
#elif (BOOST_ARCH_CURRENT_WORD_BITS == 64)
68
69
b = (b * 0x0202020202ULL & 0x010884422010ULL ) % 1023 ;
69
- #else
70
+ #endif
71
+ #else
70
72
#error "BOOST_ARCH_CURRENT_WORD_BITS not set"
71
73
#endif
72
74
}
You can’t perform that action at this time.
0 commit comments