From patchwork Tue Feb 20 10:25:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 86028 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 43E8B3858D3C for ; Tue, 20 Feb 2024 10:27:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id 942F83858D28 for ; Tue, 20 Feb 2024 10:25:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 942F83858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 942F83858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708424734; cv=none; b=SuiAMkwcbXm31Pvhs4LEyI3i5Qyeg4guC+HumtwVXiHTsopNDsB2XXterFMJU2Xcxmr4sbQpioj1R0dJSD11PA3qqvdTca5gmJDV6Lt/YUHei6bJD3Sw/Zda9OsdyzQN8o8oz2+mjwkmxqSxbSZnjB8Rdfm5mIHit4Pi/Qewk6I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708424734; c=relaxed/simple; bh=ayA9K3KewAzwD0ae34p76YKDJBL18ErygFTEU7lSCLU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=NxiSQ3iztzhaxLGjHT1S1gK5BJnvKhmdpdZ+2T70IXiwVzvIkERY3PH7wH37kKpyDL6hBazqAAhUlKRwySD0aYvE6GijODouNkSQYywLnTNI5/FtqXXpVJdfAxZdUeX1OBbebe5mDBc8HozhImQU7xXBPFmyF8tAJqmm8zn9mzM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2d247c31e1aso6126711fa.1 for ; Tue, 20 Feb 2024 02:25:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708424730; x=1709029530; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=rTggoLqdpv7HHj6nXJ0gfiOZeQIZvmOG946nE2+a2yA=; b=Vnz0pKdzTVKCVcvazjvZssAu6uG1f2SS6E9Ww3hjkUdSmv3jej9bjnsy+5aMx/KLgb 5ZtgPAYKwXAezMOzUm/Zb6IM2sgDcPhAwUVnZx49ut4qVbEvkkRusrOvUplueEzdRA08 /RUWWz80SXjr4eeyk9tYo8YPnPb5f/KWg/SKdwdMq/vMcdAng+oBTu6olzNqPWu8g2xj qlYpxT8ZU2ZeHkXWWIO9KoHfKkEwZUPJy0Q2BJ1pd/MAhP8abYenWARAAXM0oL6V1pup bIs5h/9MSGuglgC+EXRoZ0gNeL8E6KD3efP3+yG74NLb/U8QhlePyRqVIyOEdKb9o7qk Flag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708424730; x=1709029530; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rTggoLqdpv7HHj6nXJ0gfiOZeQIZvmOG946nE2+a2yA=; b=kffOxavZ5TwTybSkXvtIzX9CLs4a171EEp+e3h4Of3p65nhefEpkhoA9+siJ3zYibS HkXQ+by6DnvZBZjkPVJzeCkyHDcGSCG1KMjfnyLgflaB3PN6/pDUmUPWOSWP/GMCGWJ3 R5TmFmKdpjKDEJNZGbOAt/o+uPjL9g1PPDgt+bfWaJnwMwfuyYyRf89ogVKJBt4ZEpVA n3rIVI9mX8XmBQjTomWbOPgQtoxxBvgKPzNueG+X19Ep7t8CK9AiAIi7+JsJz/EF1g6y yWVCikuaH6fRiZwPkyxRysS4NhJ8ociWXXsCkdeUkGffiGm0WJYxmWdawH2QlnR95kZw w5jQ== X-Gm-Message-State: AOJu0Yw0b5rCXhsqDU7bPdH2dYoLxULgG0KglzYtrPxuD1bBPgpGQRTz trdG4KC/fldkmBCI++BvevOS4tdUep9lk3zkEbM4txJt1T+k9DWSQ0DwYfjG X-Google-Smtp-Source: AGHT+IGZKlR9A6y/luRzH4UTgOYQl12w940cLHh1cohEOE0cweJ4+MKKIMjs3VIxSmFTTVvOgcJRRw== X-Received: by 2002:a2e:9b51:0:b0:2d2:4054:32f3 with SMTP id o17-20020a2e9b51000000b002d2405432f3mr2421261ljj.7.1708424729447; Tue, 20 Feb 2024 02:25:29 -0800 (PST) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id n14-20020a5d420e000000b0033d282c7537sm10479414wrq.23.2024.02.20.02.25.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Feb 2024 02:25:29 -0800 (PST) From: Iain Sandoe X-Google-Original-From: Iain Sandoe To: gcc-patches@gcc.gnu.org Subject: [PATCH] aarch64: Allow aarch64-linux-muscl for heap trampolines [PR113971]. Date: Tue, 20 Feb 2024 10:25:28 +0000 Message-Id: <20240220102528.39983-1-iain@sandoe.co.uk> X-Mailer: git-send-email 2.39.2 (Apple Git-143) MIME-Version: 1.0 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: iain@sandoe.co.uk Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org 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 --- 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__