On 28/7/23 21:23, Helge Deller wrote:
Commit 7f4f0d9ea870 ("linux-user/arm: Implement __kernel_cmpxchg with host
atomics") switched to use qatomic_cmpxchg() to swap a word with the memory
content, but missed to endianess-swap the oldval and newval values when
emulating an armeb CPU, which expects
On 7/28/23 22:57, Richard Henderson wrote:
On 7/28/23 13:51, Richard Henderson wrote:
On 7/28/23 12:23, Helge Deller wrote:
+ /* endianess-swap if emulating armeb */
+ oldval = tswap64(oldval);
+ newval = tswap64(newval);
Oh btw, it's not about arm vs armeb, but guest vs host.
This a
On 7/28/23 12:23, Helge Deller wrote:
Commit 7f4f0d9ea870 ("linux-user/arm: Implement __kernel_cmpxchg with host
atomics") switched to use qatomic_cmpxchg() to swap a word with the memory
content, but missed to endianess-swap the oldval and newval values when
emulating an armeb CPU, which expects
On 7/28/23 13:51, Richard Henderson wrote:
On 7/28/23 12:23, Helge Deller wrote:
+ /* endianess-swap if emulating armeb */
+ oldval = tswap64(oldval);
+ newval = tswap64(newval);
Oh btw, it's not about arm vs armeb, but guest vs host.
This also fixes armel on big-endian hosts.
Anywa
On 7/28/23 12:23, Helge Deller wrote:
+/* endianess-swap if emulating armeb */
+oldval = tswap64(oldval);
+newval = tswap64(newval);
Oh btw, it's not about arm vs armeb, but guest vs host.
This also fixes armel on big-endian hosts.
r~
Commit 7f4f0d9ea870 ("linux-user/arm: Implement __kernel_cmpxchg with host
atomics") switched to use qatomic_cmpxchg() to swap a word with the memory
content, but missed to endianess-swap the oldval and newval values when
emulating an armeb CPU, which expects words to be stored in big endian in
the