public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] aarch64: Allow aarch64-linux-muscl for heap trampolines [PR113971].
@ 2024-02-20 10:25 Iain Sandoe
  2024-02-20 13:06 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Iain Sandoe @ 2024-02-20 10:25 UTC (permalink / raw)
  To: gcc-patches

Tested on aarch64-linux-gnu, aarch64-darwin by me and on aarch64-linux-musl
by Sam James (thanks!).  OK for trunk?
thanks
Iain

--- 8< ---


This allows the same trampoline pattern to be used on all linux variants
rather than restricting it to linux gnu.

	PR target/113971.

libgcc/ChangeLog:

	* config/aarch64/heap-trampoline.c: Allow all linux variants.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
---
 libgcc/config/aarch64/heap-trampoline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgcc/config/aarch64/heap-trampoline.c b/libgcc/config/aarch64/heap-trampoline.c
index 9d5b19983b1..1e3460b1601 100644
--- a/libgcc/config/aarch64/heap-trampoline.c
+++ b/libgcc/config/aarch64/heap-trampoline.c
@@ -29,7 +29,7 @@ void *allocate_trampoline_page (void);
 void __gcc_nested_func_ptr_created (void *chain, void *func, void *dst);
 void __gcc_nested_func_ptr_deleted (void);
 
-#if defined(__gnu_linux__)
+#if defined(__linux__)
 static const uint32_t aarch64_trampoline_insns[] = {
   0xd503245f, /* hint    34 */
   0x580000b1, /* ldr     x17, .+20 */
@@ -82,7 +82,7 @@ allocate_trampoline_page (void)
 {
   void *page;
 
-#if defined(__gnu_linux__)
+#if defined(__linux__)
   page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC,
 	       MAP_ANON | MAP_PRIVATE, 0, 0);
 #elif __APPLE__
-- 
2.39.2 (Apple Git-143)


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

* Re: [PATCH] aarch64: Allow aarch64-linux-muscl for heap trampolines [PR113971].
  2024-02-20 10:25 [PATCH] aarch64: Allow aarch64-linux-muscl for heap trampolines [PR113971] Iain Sandoe
@ 2024-02-20 13:06 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2024-02-20 13:06 UTC (permalink / raw)
  To: iain; +Cc: gcc-patches

On Tue, Feb 20, 2024 at 11:27 AM Iain Sandoe <iains.gcc@gmail.com> wrote:
>
> Tested on aarch64-linux-gnu, aarch64-darwin by me and on aarch64-linux-musl
> by Sam James (thanks!).  OK for trunk?

OK

> thanks
> Iain
>
> --- 8< ---
>
>
> This allows the same trampoline pattern to be used on all linux variants
> rather than restricting it to linux gnu.
>
>         PR target/113971.
>
> libgcc/ChangeLog:
>
>         * config/aarch64/heap-trampoline.c: Allow all linux variants.
>
> Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
> ---
>  libgcc/config/aarch64/heap-trampoline.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libgcc/config/aarch64/heap-trampoline.c b/libgcc/config/aarch64/heap-trampoline.c
> index 9d5b19983b1..1e3460b1601 100644
> --- a/libgcc/config/aarch64/heap-trampoline.c
> +++ b/libgcc/config/aarch64/heap-trampoline.c
> @@ -29,7 +29,7 @@ void *allocate_trampoline_page (void);
>  void __gcc_nested_func_ptr_created (void *chain, void *func, void *dst);
>  void __gcc_nested_func_ptr_deleted (void);
>
> -#if defined(__gnu_linux__)
> +#if defined(__linux__)
>  static const uint32_t aarch64_trampoline_insns[] = {
>    0xd503245f, /* hint    34 */
>    0x580000b1, /* ldr     x17, .+20 */
> @@ -82,7 +82,7 @@ allocate_trampoline_page (void)
>  {
>    void *page;
>
> -#if defined(__gnu_linux__)
> +#if defined(__linux__)
>    page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC,
>                MAP_ANON | MAP_PRIVATE, 0, 0);
>  #elif __APPLE__
> --
> 2.39.2 (Apple Git-143)
>

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

end of thread, other threads:[~2024-02-20 13:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20 10:25 [PATCH] aarch64: Allow aarch64-linux-muscl for heap trampolines [PR113971] Iain Sandoe
2024-02-20 13:06 ` Richard Biener

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