> Perhaps you need to update from that ancient gcc version ;-)
Still no GCC-4.5 here and on ia32, if your example no more calls the function "htonl" (which for GCC-4.4.5 is a library function written manually in assembler - I just checked the whole calling sequence by objdump), that is a very welcome improvement!
> Well, wouldn't that be just AND r0, 0xFF.
Unfortunately a register do not have an address to pass to a function, so you need to allocate some temporary space on the stack and copy your register there...