Re: [RFC PATCH 14/25] qemu/bswap: Introduce load/store for aligned pointer

2021-05-19 Thread Stefan Hajnoczi
On Wed, May 19, 2021 at 07:56:51AM +0200, Philippe Mathieu-Daudé wrote: > On 5/18/21 10:15 PM, Peter Maydell wrote: > > On Tue, 18 May 2021 at 19:38, Philippe Mathieu-Daudé > > wrote: > >> > >> When the pointer alignment is known to be safe, we can > >> directly swap the data in place, without ha

Re: [RFC PATCH 14/25] qemu/bswap: Introduce load/store for aligned pointer

2021-05-18 Thread Philippe Mathieu-Daudé
On 5/18/21 10:15 PM, Peter Maydell wrote: > On Tue, 18 May 2021 at 19:38, Philippe Mathieu-Daudé > wrote: >> >> When the pointer alignment is known to be safe, we can >> directly swap the data in place, without having to rely >> on the compiler builtin code. >> >> Load/store methods expecting ali

Re: [RFC PATCH 14/25] qemu/bswap: Introduce load/store for aligned pointer

2021-05-18 Thread Peter Maydell
On Tue, 18 May 2021 at 19:38, Philippe Mathieu-Daudé wrote: > > When the pointer alignment is known to be safe, we can > directly swap the data in place, without having to rely > on the compiler builtin code. > > Load/store methods expecting aligned pointer use the 'a' > infix. For example to read

[RFC PATCH 14/25] qemu/bswap: Introduce load/store for aligned pointer

2021-05-18 Thread Philippe Mathieu-Daudé
When the pointer alignment is known to be safe, we can directly swap the data in place, without having to rely on the compiler builtin code. Load/store methods expecting aligned pointer use the 'a' infix. For example to read a 16-bit unsigned value stored in little endianess at an unaligned pointe