If you look as the assembly dump of loader.elf you will see save saving rbp
and restoring it is usually the first and last thing function do.

It marks the begining of a frame.

On Mon, Aug 29, 2016 at 12:29 PM, Nadav Har'El <n...@scylladb.com> wrote:

> Not saving and restoring the rbp register causes tst-syscall to crash in
> the debug build.
>
> Refs #791.
>
> Signed-off-by: Nadav Har'El <n...@scylladb.com>
> ---
>  arch/x64/entry.S | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/x64/entry.S b/arch/x64/entry.S
> index 0526aa7..c2417b8 100644
> --- a/arch/x64/entry.S
> +++ b/arch/x64/entry.S
> @@ -188,6 +188,7 @@ syscall_entry:
>         pushq %r13
>         pushq %r14
>         pushq %r15
> +       pushq %rbp
>
>          # stack contains a signal_frame
>          .cfi_signal_frame
> @@ -234,6 +235,7 @@ syscall_entry:
>         popq %r9
>         # in Linux user and kernel return value are in rax so we have
> nothing to do for return values
>
> +       popq %rbp
>         popq %r15
>         popq %r14
>         popq %r13
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups
> "OSv Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osv-dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to