qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]