178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
"bswap %%eax\n\t"
"bswap %%edx\n\t"
"xchgl %%eax, %%edx"
: "=A"(i)
: "0"(i)
);
#else
i = (uint64_t)of_bswap32_nonconst(i & 0xFFFFFFFF) << 32 |
of_bswap32_nonconst(i >> 32);
#endif
return i;
}
#ifdef __GNUC__
# define of_bswap16(i) \
(__builtin_constant_p(i) ? of_bswap16_const(i) : of_bswap16_nonconst(i))
|
|
|
|
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
"bswap %%eax\n\t"
"bswap %%edx\n\t"
"xchgl %%eax, %%edx"
: "=A"(i)
: "0"(i)
);
#else
i = (uint64_t)of_bswap32_nonconst((uint32_t)(i & 0xFFFFFFFF)) << 32 |
of_bswap32_nonconst((uint32_t)(i >> 32));
#endif
return i;
}
#ifdef __GNUC__
# define of_bswap16(i) \
(__builtin_constant_p(i) ? of_bswap16_const(i) : of_bswap16_nonconst(i))
|