Re: Unclear explanation for some builtins

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21 April 2016 at 18:10, Eyal Rozenberg wrote:
>
> Hello,
>
> I was just reading this:
>
> https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
>
> and I believe the explanation regarding bswap32 and bswap64 is unclear.
> It refers to the explanation of bswap16, but in that case, swapping both
> halves and reversing the order of bytes constitutes the same action,
> while in 32-bit and 64-bit values that's not the case.

If you only look at the example you could think maybe it swaps both
halves, but "the order of the bytes reversed" seems perfectly clear
that it doesn't.

If 0xaabbccdd became 0xccddaabb then that would not reverse the order
of the bytes, so your interpretation doesn't match the documented
behaviour.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux