mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-26 13:52:02 +00:00
Replace ___constant_swab32() with gcc's __builtin_bswap32
http://www.bitcoin.org/smf/index.php?topic=1925.msg34827#msg34827 Credit: lfm
This commit is contained in:
parent
8504cf4803
commit
a296799358
8
miner.h
8
miner.h
@ -22,15 +22,9 @@
|
|||||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
|
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ___constant_swab32(x) ((uint32_t)( \
|
|
||||||
(((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
|
|
||||||
(((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
|
|
||||||
(((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
|
|
||||||
(((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24)))
|
|
||||||
|
|
||||||
static inline uint32_t swab32(uint32_t v)
|
static inline uint32_t swab32(uint32_t v)
|
||||||
{
|
{
|
||||||
return ___constant_swab32(v);
|
return __builtin_bswap32(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern bool opt_debug;
|
extern bool opt_debug;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user