public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] aarch64: correct CFI in rawmemchr (bug 31113)
@ 2023-12-05 10:40 Andreas Schwab
  2023-12-05 11:38 ` Szabolcs Nagy
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2023-12-05 10:40 UTC (permalink / raw)
  To: libc-alpha

The .cfi_return_column directive changes the return column for the whole
FDE range.  But the actual intent is to tell the unwinder that the value
in x30 (lr) now resides in x15 after the move, and that is expressed by
the .cfi_register directive.
---
 sysdeps/aarch64/rawmemchr.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/aarch64/rawmemchr.S b/sysdeps/aarch64/rawmemchr.S
index efc4b7007b..1fff094215 100644
--- a/sysdeps/aarch64/rawmemchr.S
+++ b/sysdeps/aarch64/rawmemchr.S
@@ -31,7 +31,7 @@ ENTRY (__rawmemchr)
 
 L(do_strlen):
 	mov	x15, x30
-	cfi_return_column (x15)
+	cfi_register (x30, x15)
 	mov	x14, x0
 	bl	__strlen
 	add	x0, x14, x0
-- 
2.43.0


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] aarch64: correct CFI in rawmemchr (bug 31113)
  2023-12-05 10:40 [PATCH] aarch64: correct CFI in rawmemchr (bug 31113) Andreas Schwab
@ 2023-12-05 11:38 ` Szabolcs Nagy
  0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2023-12-05 11:38 UTC (permalink / raw)
  To: Andreas Schwab, libc-alpha

The 12/05/2023 11:40, Andreas Schwab wrote:
> The .cfi_return_column directive changes the return column for the whole
> FDE range.  But the actual intent is to tell the unwinder that the value
> in x30 (lr) now resides in x15 after the move, and that is expressed by
> the .cfi_register directive.

this is ok to commit.

thanks.


> ---
>  sysdeps/aarch64/rawmemchr.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sysdeps/aarch64/rawmemchr.S b/sysdeps/aarch64/rawmemchr.S
> index efc4b7007b..1fff094215 100644
> --- a/sysdeps/aarch64/rawmemchr.S
> +++ b/sysdeps/aarch64/rawmemchr.S
> @@ -31,7 +31,7 @@ ENTRY (__rawmemchr)
>  
>  L(do_strlen):
>  	mov	x15, x30
> -	cfi_return_column (x15)
> +	cfi_register (x30, x15)
>  	mov	x14, x0
>  	bl	__strlen
>  	add	x0, x14, x0
> -- 
> 2.43.0
> 
> 
> -- 
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-05 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 10:40 [PATCH] aarch64: correct CFI in rawmemchr (bug 31113) Andreas Schwab
2023-12-05 11:38 ` Szabolcs Nagy

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).