Byte swapping support

2017-09-12 Thread Jürg Billeter
Hi, To support applications that assume big-endian memory layout on little- endian systems, I'm considering adding support for reversing the storage order to GCC. In contrast to the existing scalar storage order support for structs, the goal is to reverse the storage order for all memory operation

Re: Byte swapping support

2017-09-13 Thread Jürg Billeter
On Tue, 2017-09-12 at 21:46 +0200, Eric Botcazou wrote: > > In contrast to the existing scalar storage order support for structs, the > > goal is to reverse the storage order for all memory operations to achieve > > maximum compatibility with the behavior on big-endian systems, as far as > > observ

Re: Byte swapping support

2017-09-13 Thread Jürg Billeter
On Tue, 2017-09-12 at 08:52 -0700, H.J. Lu wrote: > Can you use __attribute__ ((scalar_storage_order)) in GCC 7? To support existing large code bases, the goal is to reverse storage order for all scalars, not just (selected) structs/unions. Also need to support taking the address of a scalar field

Re: Byte swapping support

2017-09-13 Thread Jürg Billeter
On Wed, 2017-09-13 at 13:08 +, paul.kon...@dell.com wrote: > > On Sep 13, 2017, at 5:51 AM, Jürg Billeter > > wrote: > > To support existing large code bases, the goal is to reverse storage > > order for all scalars, not just (selected) structs/unions. Also need t