public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Raphael M Zinsly <rzinsly@linux.ibm.com>
To: Matheus Castanho <msc@linux.ibm.com>, libc-alpha@sourceware.org
Cc: murphyp@linux.ibm.com, tuliom@linux.ibm.com
Subject: Re: [PATCH v2] powerpc64[le]: Allocate extra stack frame on syscall.S
Date: Thu, 16 Dec 2021 14:57:21 -0300	[thread overview]
Message-ID: <e784912d-1e97-01b2-eab7-36139f0a01bc@linux.ibm.com> (raw)
In-Reply-To: <20211215143916.147403-1-msc@linux.ibm.com>

LGTM

Reviewed-by: Raphael M Zinsly <rzinsly@linux.ibm.com>

On 15/12/2021 11:39, Matheus Castanho wrote:
> v1 was not working properly on hosts without scv support, so some tests were
> failing in such systems. This is fixed now in this new version.
> 
> --8<--
> 
> The syscall function does not allocate the extra stack frame for scv like other
> assembly syscalls using DO_CALL_SCV. So after commit d120fb9941 changed the
> offset that is used to save LR, syscall ended up using an invalid offset,
> causing regressions on powerpc64. So make sure the extra stack frame is
> allocated in syscall.S as well to make it consistent with other uses of
> DO_CALL_SCV and avoid similar issues in the future.
> 
> Tested on powerpc, powerpc64, and powerpc64le (with and without scv)
> ---
>   sysdeps/unix/sysv/linux/powerpc/syscall.S | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S
> index a29652feaf..a5497c8370 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/syscall.S
> +++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S
> @@ -27,7 +27,11 @@ ENTRY (syscall)
>   	mr   r8,r9
>   #if defined(USE_PPC_SCV) && !IS_IN(rtld) && (defined(__PPC64__) || defined(__powerpc64__))
>   	CHECK_SCV_SUPPORT r9 0f
> +	stdu r1,-SCV_FRAME_SIZE(r1)
> +	cfi_adjust_cfa_offset(SCV_FRAME_SIZE)
>   	DO_CALL_SCV
> +	addi r1,r1,SCV_FRAME_SIZE
> +	cfi_adjust_cfa_offset(-SCV_FRAME_SIZE)
>   	RET_SCV
>   	b 1f
>   #endif
> 

-- 
Raphael Moreira Zinsly

      parent reply	other threads:[~2021-12-16 17:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 18:52 [PATCH] " Matheus Castanho
2021-12-15 14:39 ` [PATCH v2] " Matheus Castanho
2021-12-15 17:18   ` Paul E Murphy
2021-12-16 16:52     ` Matheus Castanho
2021-12-17 17:08       ` Paul E Murphy
2021-12-17 18:54         ` Matheus Castanho
2021-12-16 17:57   ` Raphael M Zinsly [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e784912d-1e97-01b2-eab7-36139f0a01bc@linux.ibm.com \
    --to=rzinsly@linux.ibm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=msc@linux.ibm.com \
    --cc=murphyp@linux.ibm.com \
    --cc=tuliom@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).