#if defined(__arm__)
#include <byteswap.h>
#ifndef CRYPTOPP_BYTESWAP_AVAILABLE
#define CRYPTOPP_BYTESWAP_AVAILABLE
#endif
#endif
Then later on, I deleted out all the other byteswap stuff. Particularly, there was a line like:
#ifdef (__GNUC__)
#define __asm__ (bswap ... )
That stuff is wrong, bswap is an x86 instruction and not found on ARM
Thanks! I used a different approach with the GCC builtins, such as
#if defined(__GNUC__)
return __builtin_bswap32(value);
and ditto for 64 bits. I'm getting a whopping 51 khash/s on a 400 MHz armv5, a Buffalo Linkstation Live
SVN revision 114 with the new sha256 implementation from crypto++ compiles without any source modifications on ARM, which is nice. However, it is a little slower at 46 khash/s maximum. The gcc builtin function does not improve things at all, suggesting that the cryptopp byteswap function is equally fast, and the difference is due to the overall implementation. (While on x86-64, this update has given me an 80% speedup.)