[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/5] linux-user: Provide safe_syscall for aar
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/5] linux-user: Provide safe_syscall for aarch64 |
Date: |
Thu, 23 Jun 2016 13:06:23 +0100 |
On 22 June 2016 at 01:32, Richard Henderson <address@hidden> wrote:
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> linux-user/host/aarch64/hostdep.h | 23 +++++++++
> linux-user/host/aarch64/safe-syscall.inc.S | 75
> ++++++++++++++++++++++++++++++
> 2 files changed, 98 insertions(+)
> create mode 100644 linux-user/host/aarch64/safe-syscall.inc.S
> +safe_syscall_base:
> + .cfi_startproc
> + /* The syscall calling convention isn't the same as the
> + * C one:
> + * we enter with x0 == *signal_pending
> + * x1 == syscall number
> + * x2 ... x7, (stack) == syscall arguments
> + * and return the result in x0
> + * and the syscall instruction needs
> + * x8 == syscall number
> + * x0 ... x6 == syscall arguments
> + * and returns the result in x0
> + * Shuffle everything around appropriately.
> + */
> + mov x9, x0 /* signal_pending pointer */
> + mov x8, x1 /* syscall number */
> + mov x0, x2 /* syscall arguments */
> + mov x1, x3
> + mov x2, x4
> + mov x3, x5
> + mov x4, x6
> + mov x6, x7
> + ldr x7, [sp]
Comment says "x0 ... x6 == syscall arguments" but the code loads x7 too.
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- [Qemu-devel] [PATCH v2 0/5] linux-user: safe_syscall updates, Richard Henderson, 2016/06/21
- [Qemu-devel] [PATCH v2 3/5] linux-user: Provide safe_syscall for aarch64, Richard Henderson, 2016/06/21
- Re: [Qemu-devel] [PATCH v2 3/5] linux-user: Provide safe_syscall for aarch64,
Peter Maydell <=
- [Qemu-devel] [PATCH v2 4/5] linux-user: Provide safe_syscall for s390x, Richard Henderson, 2016/06/21
- [Qemu-devel] [PATCH v2 2/5] linux-user: Provide safe_syscall for arm, Richard Henderson, 2016/06/21
- [Qemu-devel] [PATCH v2 5/5] linux-user: Provide safe_syscall for ppc64, Richard Henderson, 2016/06/21
- [Qemu-devel] [PATCH v2 1/5] linux-user: Provide safe_syscall for i386, Richard Henderson, 2016/06/21
- Re: [Qemu-devel] [PATCH v2 0/5] linux-user: safe_syscall updates, Peter Maydell, 2016/06/23