@thellier
It should be the reverse byte-order, just like it is for other types. If you tried that and if it doesn't work then you most likely simply got a typo in your shift / OR / AND orgy.
This should do:
#define ANTI_ENDIAN_64(a) \
(((a) << 56) | \
(((a)<<40) & 0x00FF000000000000ull) | \
(((a)<<24) & 0x0000FF0000000000ull) | \
(((a)<<8) & 0x000000FF00000000ull) | \
(((a)>>8) & 0x00000000FF000000ull) | \
(((a)>>24) & 0x0000000000FF0000ull) | \
(((a)>>40) & 0x000000000000FF00ull) | \
((a) >> 56))
Or use a union of double and 8 chars and simply swap char[x] and char[7-x] (x>=0, x<4).