[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/6] linux-user: Provide safe_syscall for aarch6
Re: [Qemu-devel] [PATCH 4/6] linux-user: Provide safe_syscall for aarch64
Mon, 13 Jun 2016 23:40:58 +0100
On 13 June 2016 at 23:38, Richard Henderson <address@hidden> wrote:
> On 06/13/2016 03:28 PM, Peter Maydell wrote:
>> glibc's syscall() takes the system parameter as an int and
>> does a sign-extending move into x0 with an uxtw.
>> safe_syscall() takes a long, so it's already 64 bits.
> Well, uxtw is a zero-extending move. So...
Yeah 'sign-extending' was a thinko. But the point is
that for syscall() the input is 32 bits and the
value it feeds to the kernel is 64 bits, hence the
extension. For safe_syscall() the input is 64 bits
and the value fed to the kernel is also 64 bits,
so the most 'natural' thing is just to move a
64 bit value (saves the reader looking up whether
mov wX, wY clears the high half or not, if nothing else).
Re: [Qemu-devel] [PATCH 0/6] linux-user: safe_syscall updates, Peter Maydell, 2016/06/13
- Re: [Qemu-devel] [PATCH 3/6] linux-user: Provide safe_syscall for arm, (continued)