linux-user broken for targets with TARGET_ABI32 (i.e. qemu-sparc32plus)
Bug #824716 reported by
Matthias Braun
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I just debugged a problem I had with linux-user for qemu-sparc32plus. Turns out that sparc32plus is defined as a 64bit target with TARGET_ABI32 set. This correctly leads to abi_ulong (and others) being defined as uint32_t. However most of the code (in syscall.c) uses tswapl for these values, which swaps the endianess of a target long (which is 64bit). This doesn't match the uin32_t abi_ulongs and fails!
So it appears to me like one would need to define something like an aswapl which swaps abi_ulongs and replace most of the tswapls there...
To post a comment you must log in.
Bugfix as sent to qemu-devel mailinglist on 2011/08/15