From patchwork Thu Jun 9 04:16:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 1641013 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=jFHZONxL; 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 (server2.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 (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LJW5T58qHz9s09 for ; Thu, 9 Jun 2022 14:17:17 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 661003834F0F for ; Thu, 9 Jun 2022 04:17:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 661003834F0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654748232; bh=lIrxltMACzljYbvTppdVyxPytzxSlKwDxXhgCu5z3uU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jFHZONxL04U6QIrJ73tOel6NGy/WaSO2hbxG9o1nwplYqc6S75EzvSDwjAiAAqK8+ D+Y++KFSg/kphHpFu+xK5RI82v20Vvmasil8WrwUwiH1I7zKSOPLLz+AaEfZK4r5f6 ou37maLLnShDGOcjNczAXwW3fbaVpMgG+86J0qEw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 3531A38356A4 for ; Thu, 9 Jun 2022 04:16:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3531A38356A4 Received: by mail-pf1-x42c.google.com with SMTP id z17so20039117pff.7 for ; Wed, 08 Jun 2022 21:16:57 -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=lIrxltMACzljYbvTppdVyxPytzxSlKwDxXhgCu5z3uU=; b=fGxrCsD6nUlYOfDF0sIW7bDK6Nkpu1AzFdIfJcnIHCnvuxVuqKSJOOz6GWW49QEfud VN6m+oV9s4KePIJqGe1tyiST62dV+ztT8t/0JPW2fkKMx7EG5lKzMpC0hfYxrAlc+qLM YVPD6JwvC+YRZPn8zlG3xzRjQL2qBcGWSZGjEM0XzK252eYqF71SB2OfaMrFNwjSYTSb 3ws171JVoifxiTCQyRXks+lSX8EG0dwFwDZgzzAKSearNNmJrWAP/e1tXAVsP5z2fdmt NN15KIQQfm3O+YldPcGKsuBwPd7G+Fw/8lHlVl6dBZ9ILRk3pgiX7hOS1ZSDC9WqPBDI QNCg== X-Gm-Message-State: AOAM531oCTFRdlsbarWrF0CWsGBfs4ZJHKYXH9wHTHnKoLMQDVmrQ+2t eSy/haFscpiFpgVcSsu6yy4JwcIKdBsbeQ== X-Google-Smtp-Source: ABdhPJwcTDCbyfjB/fyoPLYtGKnneeTu77CQYat8PiExs1lhEwXqbyclrpgBVvANRZDG4D6U/PnjhQ== X-Received: by 2002:a05:6a00:a19:b0:51e:48cc:3acf with SMTP id p25-20020a056a000a1900b0051e48cc3acfmr1511421pfh.68.1654748216111; Wed, 08 Jun 2022 21:16:56 -0700 (PDT) Received: from noah-tgl.. ([2600:1010:b04a:6ef:d217:ff37:61dd:fb1]) by smtp.gmail.com with ESMTPSA id d10-20020a170902e14a00b00166d8100b7bsm11833644pla.176.2022.06.08.21.16.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 21:16:55 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v1 1/3] x86: Align varshift table to 32-bytes Date: Wed, 8 Jun 2022 21:16:51 -0700 Message-Id: <20220609041653.2515397-1-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, 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: 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" This ensures the load will never split a cache line. --- sysdeps/x86_64/multiarch/varshift.c | 5 +++-- sysdeps/x86_64/multiarch/varshift.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/x86_64/multiarch/varshift.c b/sysdeps/x86_64/multiarch/varshift.c index c8210f0546..d27767520a 100644 --- a/sysdeps/x86_64/multiarch/varshift.c +++ b/sysdeps/x86_64/multiarch/varshift.c @@ -16,9 +16,10 @@ License along with the GNU C Library; if not, see . */ -#include "varshift.h" +#include -const int8_t ___m128i_shift_right[31] attribute_hidden = +const int8_t ___m128i_shift_right[31] attribute_hidden + __attribute__((aligned(32))) = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 diff --git a/sysdeps/x86_64/multiarch/varshift.h b/sysdeps/x86_64/multiarch/varshift.h index af30694488..ffd12d79e4 100644 --- a/sysdeps/x86_64/multiarch/varshift.h +++ b/sysdeps/x86_64/multiarch/varshift.h @@ -19,7 +19,8 @@ #include #include -extern const int8_t ___m128i_shift_right[31] attribute_hidden; +extern const int8_t ___m128i_shift_right[31] attribute_hidden + __attribute__ ((aligned (32))); static __inline__ __m128i __m128i_shift_right (__m128i value, unsigned long int offset)