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: 1713061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.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=pYlpG6O8; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NRrf42vWtz23ns for ; Wed, 7 Dec 2022 19:53:00 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C7E8E392B15E for ; Wed, 7 Dec 2022 08:52:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7E8E392B15E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670403177; 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=pYlpG6O8zFsZ7OWAkq/AumRskBXLmj1vVFpZagFq8o3ah1CYz+/GUd32pBRRPmPkP ApGYpM3bWoX76xr+rJX78QyXQHywm7BAst9NcWA6gTcVYND+jGcjeuDBU13JE/avVh kVaZ4iO4IvUxG3ER8+YmZ7cDoMG6hcmN4vzoaVgY= 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+incoming=patchwork.ozlabs.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