This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Byte swapping support


Jürg Billeter <juerg.billeter@codethink.co.uk> writes:
>
> I don't. The idea is to reverse scalar storage order for the whole
> userspace process and then add byte swapping to the Linux kernel when
> accessing userspace memory. This keeps userspace memory consistent
> with regards to endianness, which should lead to high compatibility
> with big-endian applications. Userspace memory access from the kernel
> always uses a small set of helper functions, which should make it
> easier to insert byte swapping at appropriate places.

I expect you'll find that it isn't that easy. There are a lot of opaque
copies that copy whole structures.

You'll need a whole compat layer, similar to 32<->64bit compat layers,
but actually doing more work because it has to handle all fields larger
than one byte, not just fields which differ in size.

-Andi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]