From patchwork Wed Sep 22 05:16:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 1531039 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ukTSoUS5; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HDmkv4tJcz9sSn for ; Wed, 22 Sep 2021 15:17:27 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3388385841A for ; Wed, 22 Sep 2021 05:17:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3388385841A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632287843; bh=6QpsJoKDYuh9hheLwOTHNkeH9yiq3HFECUDmXO3z81g=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ukTSoUS5OxpZOm6zvIuNg4uX9NpVsxuAcDHuBCL+GI6KfWln3DWjI2ZyaHzbbDqcB rPVs0DF66FDlGMrFYvKkgC5tH4swJfrFfnz9I11W5MnPABLE6kHzNrYidyiz8wgG41 8RND0i3hxBGG/Av3j/diJdUpPJPQcc3MRXg8W36w= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id AFE343858D39 for ; Wed, 22 Sep 2021 05:17:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AFE343858D39 Received: by mail-il1-x135.google.com with SMTP id v16so1456033ilg.3 for ; Tue, 21 Sep 2021 22:17:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6QpsJoKDYuh9hheLwOTHNkeH9yiq3HFECUDmXO3z81g=; b=Ao8hP7U5TdawXp+HcEj52NE0FcuYn5MUpdf9Mwhkv8FXv0Qrcx4bU8FQAC7t+AV7gU 6+l017fz/k1epQo1aNFwWuv1aSMy+/OBnntHOgSdSMeA7dpkAYuG0wOyxfKnvz/600Qd Sw98Lrc0aT6Hoo0l6vC2IEMb6ohrwDcx7gH2BqZz4QlkBOI1LlJGbbscoCoFN1/bNq0g lQU7xsm1N/SehibFgc7WglngapvTGlJi1Dm78Aw2mnPmgDBnt3IfdndptSXtFZ3rG5Z+ jJ7ozZ16I7QD01nadrmAQTcsII1B8T6830fgemz/fhlWvHREa2KoXBMpVRVnXM8lk7iP 6UyQ== X-Gm-Message-State: AOAM5339zf18RxjcMCe+nf79mfzBsRsyrroZVNIfE5u/1i0sDniT5tWU xEtHfBJLb50wxIs+BoaL05ZxeQaBKpk= X-Google-Smtp-Source: ABdhPJzzMnKUqFkzTbZoOgF3vN1eZEJc7P+DMsjFRQ7dBBDKslAn8QOtcuxpcdr03jTAy56uf341vw== X-Received: by 2002:a05:6e02:1b8e:: with SMTP id h14mr10192539ili.18.1632287824952; Tue, 21 Sep 2021 22:17:04 -0700 (PDT) Received: from localhost.localdomain (node-17-161.flex.volo.net. [76.191.17.161]) by smtp.googlemail.com with ESMTPSA id x13sm518943ilu.86.2021.09.21.22.17.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 22:17:04 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v2 1/2] x86: Modify ENTRY in sysdep.h so that p2align can be specified Date: Wed, 22 Sep 2021 00:16:57 -0500 Message-Id: <20210922051657.1655745-1-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210922005018.1542107-1-goldstein.w.n@gmail.com> References: <20210922005018.1542107-1-goldstein.w.n@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Noah Goldstein via Libc-alpha From: Noah Goldstein Reply-To: Noah Goldstein Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" No bug. This change adds a new macro ENTRY_P2ALIGN which takes a second argument, log2 of the desired function alignment. The old ENTRY(name) macro is just ENTRY_P2ALIGN(name, 4) so this doesn't affect any existing functionality. --- sysdeps/x86/sysdep.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h index cac1d762fb..937180c1bd 100644 --- a/sysdeps/x86/sysdep.h +++ b/sysdeps/x86/sysdep.h @@ -78,15 +78,18 @@ enum cf_protection_level #define ASM_SIZE_DIRECTIVE(name) .size name,.-name; /* Define an entry point visible from C. */ -#define ENTRY(name) \ +#define ENTRY_P2ALIGN(name, alignment) \ .globl C_SYMBOL_NAME(name); \ .type C_SYMBOL_NAME(name),@function; \ - .align ALIGNARG(4); \ + .align ALIGNARG(alignment); \ C_LABEL(name) \ cfi_startproc; \ _CET_ENDBR; \ CALL_MCOUNT +/* Common entry 16 byte aligns. */ +#define ENTRY(name) ENTRY_P2ALIGN (name, 4) + #undef END #define END(name) \ cfi_endproc; \