On 2017/01/13 05:17PM, David Laight wrote:
From: Naveen N. Rao
quoted
Sent: 13 January 2017 17:10
Generate instructions to perform the endian conversion using registers,
rather than generating two memory accesses.
The "way easier and faster" comment was obviously for the author, not
the processor.
That rather depends on whether the processor has a store to load forwarder
that will satisfy the read from the store buffer.
I don't know about ppc, but at least some x86 will do that.
Interesting - good to know that.
However, I don't think powerpc does that and in-register swap is likely
faster regardless. Note also that gcc prefers this form at higher
optimization levels.
Thanks,
Naveen