mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-03-13 05:41:11 +00:00
use bswap
This commit is contained in:
parent
9871500bc2
commit
3be62d5577
2
i2pd
2
i2pd
@ -1 +1 @@
|
||||
Subproject commit abf0f5ac8780c9cb0088e4ccefcd0d0274e63965
|
||||
Subproject commit 4448884a3ebf822ecca7b39f2fe9777a79ae1863
|
10
src/util.h
10
src/util.h
@ -552,8 +552,18 @@ void RenameThread(const char* name);
|
||||
|
||||
inline uint32_t ByteReverse(uint32_t value)
|
||||
{
|
||||
#if 0
|
||||
// #if defined(__x86_64__)
|
||||
__asm__
|
||||
(
|
||||
"bswap %%eax"
|
||||
: "=a"(value) ::
|
||||
);
|
||||
return value;
|
||||
#else
|
||||
value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
|
||||
return (value<<16) | (value>>16);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Standard wrapper for do-something-forever thread functions.
|
||||
|
Loading…
x
Reference in New Issue
Block a user