From patchwork Wed Dec 7 08:52:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 61622 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 AB8AD392B152 for ; Wed, 7 Dec 2022 08:53:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB8AD392B152 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670403184; bh=4A+i70NWvBipKuME+2On+dY4GK1gi1EEFfzpx9Y5x84=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=MI2ERUcSxaF/GQ2Ft6554CqqK7y5u+GmfCuzlw6zr9vNexWiDpYSVroJ3dJWr2UYg U+4oCRxd27vDxk2V5i+EY6cwV0KQ/vXerCtGuBOlSRKj4Gbpynd3UTj7cIgp5/CQtJ G1ms7NbGVCH+Sj5jcGa7lvC1+X2BTyENzDYuqU6k= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id B2ED638518B0 for ; Wed, 7 Dec 2022 08:52:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2ED638518B0 Received: by mail-ej1-x633.google.com with SMTP id x22so12275825ejs.11 for ; Wed, 07 Dec 2022 00:52:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4A+i70NWvBipKuME+2On+dY4GK1gi1EEFfzpx9Y5x84=; b=smHzHVOrMqz9E0egOGh6O4Zj12tAdEUnuVcAWgfkLPKAq9p8xUmX4noH1gude8jM4n kQCV5U0sdGdjKsDBGkNq+f9HsOynMwMZ2h01bOG9ii+P+eqTQnRYyTEKCAJvKYuzaPTF oeF6vigoTArSOkbzE/7Zb8UldTl7kj+dLkCZEyaN75eGuLJQPjQfPvXaedRS02Ur+sv4 xH8ulbyqNUtUtAIQkd93W4uYUEtervKxECE0lSMZ0W4CT88i42P4DvrJRJ2ySGmh0fO7 F8Lqx8DHmwAee3qzEMXEJLJ+tt7VdunWJPgGHIc5Ey/dRvQdDbZIEShzOzsSynivJEzY C31w== X-Gm-Message-State: ANoB5pnCzWesGUxt9OH88XlchPStVqEYmzwOkm+tt0rnErZwz+vJwcVH aQrurqDTCIkv4psffoSB7He6ann3plA= X-Google-Smtp-Source: AA0mqf5yIgFXuZK/soZ6+avWCRAdY9bSoYcOrlRShqLw1Aze+vTQ1w49nVIFHSU9a+WuQXdaxpGzBg== X-Received: by 2002:a17:906:444b:b0:7ad:dd43:5d53 with SMTP id i11-20020a170906444b00b007addd435d53mr57605099ejp.376.1670403161195; Wed, 07 Dec 2022 00:52:41 -0800 (PST) Received: from noahgold-desk.lan (2603-8080-1301-76c6-feb7-1b9b-f2dd-08f7.res6.spectrum.com. [2603:8080:1301:76c6:feb7:1b9b:f2dd:8f7]) by smtp.gmail.com with ESMTPSA id k17-20020aa7c051000000b0046bd3b366f9sm1931767edo.32.2022.12.07.00.52.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 00:52:40 -0800 (PST) To: libc-alpha@sourceware.org Cc: goldstein.w.n@gmail.com, hjl.tools@gmail.com, andrey.kolesov@intel.com, carlos@systemhalted.org Subject: [PATCH v1 01/27] x86/fpu: Create helper file for common data macros Date: Wed, 7 Dec 2022 00:52:10 -0800 Message-Id: <20221207085236.1424424-1-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 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 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+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The macros are useful for creating .rodata definitions and checking that the offset is correct. --- .../x86_64/fpu/svml_common_data_macros.h.S | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sysdeps/x86_64/fpu/svml_common_data_macros.h.S diff --git a/sysdeps/x86_64/fpu/svml_common_data_macros.h.S b/sysdeps/x86_64/fpu/svml_common_data_macros.h.S new file mode 100644 index 0000000000..31bd66835d --- /dev/null +++ b/sysdeps/x86_64/fpu/svml_common_data_macros.h.S @@ -0,0 +1,50 @@ +/* Helper macros for creating rodata + Copyright (C) 2022 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + https://www.gnu.org/licenses/. */ + +#ifndef _SVML_COMMON_DATA_MACROS_H_S +#define _SVML_COMMON_DATA_MACROS_H_S 1 + + +.macro check_offset data_section offset + .if .-\data_section != \offset + .err + .endif +.endm + + +/* Only used in floating point functions at the moment. */ +.macro float_vectorN data_section N offset value + check_offset \data_section \offset + .rept \N + .long \value + .endr +.endm + +#define float_block(data_section, offset, ...) \ + check_offset data_section offset; \ + .long __VA_ARGS__ + + +#define float_vector16(data_section, offset, value) \ + float_vectorN data_section 4 offset value +#define float_vector32(data_section, offset, value) \ + float_vectorN data_section 8 offset value +#define float_vector64(data_section, offset, value) \ + float_vectorN data_section 16 offset value + +#endif