So this is a quick hack, however I was wondering if other platforms support a similar instruction that is similar to BSWAP
.
asm volatile ("movl %1,%%eax;\n"
"bswapl %%eax;\n"
"movl %%eax, %0;\n"
: "=r" (Dword)
: "r" (Dword)
: "%eax"
);