From patchwork Wed Sep 22 00:50:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 45263 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 097F43858405 for ; Wed, 22 Sep 2021 00:51:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 097F43858405 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632271865; bh=m2S0i5McK/8/VavAMUaXy3QjTxu3ZYnBjNEK0BD6ZdY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=sp1r4tYGbJYYSCAvvWXjv0ym9MRgtwuj95tSBN9RNuFXPn0RUBE/kSuyOIw5qf4FZ cRuHAYIBfGEkzGtpTqWVTD4o5xfdt4Hw1DuiHviijVts9u39K+2ajmbvBjWMHRNIs2 LuIll6IvuEblbjrWrIbwW1UWL2ZO+skyW002linQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by sourceware.org (Postfix) with ESMTPS id 739D53858D39 for ; Wed, 22 Sep 2021 00:50:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 739D53858D39 Received: by mail-io1-xd32.google.com with SMTP id e82so1015835iof.5 for ; Tue, 21 Sep 2021 17:50:43 -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:mime-version :content-transfer-encoding; bh=m2S0i5McK/8/VavAMUaXy3QjTxu3ZYnBjNEK0BD6ZdY=; b=T9HzI3lYjEhdOkYxWhY+Ra/JUZKhtZ1YABDt/Y95Kq+U0Uyf5VuNVrGsX9VY9nuq1F gV6+kHFJxPAW6uHPGNtPD3I4donMN/51VDVTo35ywNRd/rbg90VDVANqVnifjN7YlFay ZJdfoia7kkHbuyNxXJ67YPAwq+5GCCvxNXgH636aq/wdZdKgAykMS3d7iqcDF3NLzyNs uCkdUXo9f4TPIV4+ogs9iwx51aTVJEqvb5nSbmuZdn1z7aF2G1BAA02d5UkPSx+VCmGK QQ3885zYmH0glBxUAbVeZPGrcngTnezRZ8rMb6A52lNwLG5zDLeCpSNloZKDJfxN750e 9g2g== X-Gm-Message-State: AOAM533M0yddFrdsxwrh8T6KVpqE4FQR++lv/HsNFXdaV9Xu7D2F9diH 7QBa0KIwjSEkwWxJ3lL9EJ2VW7eOd1Q= X-Google-Smtp-Source: ABdhPJwC27er5ZcE0Vycl3bhSakpIOK9xeqJaop7Xpy3imPffllTLTYYSdbYkM8SZdWLu1WtsmzU/A== X-Received: by 2002:a6b:2b97:: with SMTP id r145mr2191191ior.193.1632271842699; Tue, 21 Sep 2021 17:50:42 -0700 (PDT) Received: from localhost.localdomain (node-17-161.flex.volo.net. [76.191.17.161]) by smtp.googlemail.com with ESMTPSA id o8sm243882ill.81.2021.09.21.17.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 17:50:42 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v1 1/2] x86: Modify ENTRY in sysdep.h so that p2align can be specified Date: Tue, 21 Sep 2021 19:50:18 -0500 Message-Id: <20210922005018.1542107-1-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.25.1 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+patchwork=sourceware.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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h index cac1d762fb..8d4f4b9fd2 100644 --- a/sysdeps/x86/sysdep.h +++ b/sysdeps/x86/sysdep.h @@ -78,15 +78,19 @@ 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(12); \ + .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; \