From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 32A32395B41B for ; Thu, 8 Dec 2022 00:46:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 32A32395B41B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52a.google.com with SMTP id e13so129707edj.7 for ; Wed, 07 Dec 2022 16:46:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YCWx/+EOoqFdb1+/ho66nmKrWuMHEylS4eVuSV2M8KE=; b=qIuyyztN4Z/45JqzuI/wUbzVd3A/yOVu1UJ4Kf/J7gU26VKcAcYk0TJkfI3ZUT+6Bt QobGq1wBqEPs/OPcPzJP/MCEXaCo24GXJZe1qdJfspVWTIi4r4bNpsLXgxtgIZukoaKb SqOppXq7SCy2PFcbtR5Ra6Zha8Zx8vNeBIe9XUjohOoS/NT6KxZrE5gqPkEgVZMLuAu6 SmyCEWRGe6SAn6dhTFclNZQ7E3GpSGPyRXVSnHSl4Cuz3RY4MS/quT1efazYz14iJeH6 cKNtvd/6Kkwv6xBze1V1R2ZM9jQ65uP7Hq58lJp9kbFBt1svG7OITAuxn3u3BN8uPrhI 1TAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YCWx/+EOoqFdb1+/ho66nmKrWuMHEylS4eVuSV2M8KE=; b=6otO5zmCmIkKpaG7yPMBZ51bvh4VjL5E86rrMEPrY5S98GvZVYReOOH/WU12yrj6Ko M0Led8E+ELixtuYV+94HWm0OQD1VJkPcIH+5x9MWB+wCMs1unDHbXa44eu9yDUoIEnum YZXIe0DjtOu/cEAn0JUYo5LKrTqPo8Vcg49vispWRF/JPlvAAmTnrL9eVjDxkYVec/aj fk4QzvVm21BwQu1Ok+G9fQKGn9I2wOHS3t3muNG52CoFAoMoabuKzkPq9GDT07PIovtL Skkq/Mtvz0XGupGBSk57jHXZWIulQdqUlh705ZOn2yf6WMsqfaEVdrwYjcb/boI4Chu6 hggA== X-Gm-Message-State: ANoB5pk6U8dGifoWyv6+tRO87MeSiGOoLvEGhvctbqUDfbb+6gNOcP1Q +SLCVc+egopfKmHWxjOaW3t6Q2XcZQkL2KmctW08i5An X-Google-Smtp-Source: AA0mqf7Krixws2OuYpKllFPYOJIPJd1QSJ+rTjW10mSEcckiZXonox2hnmRilWRDjT+eN+WQ9ZJ1vEYmGW7JqSlmDjQ= X-Received: by 2002:a05:6402:3711:b0:461:b6a9:c5cb with SMTP id ek17-20020a056402371100b00461b6a9c5cbmr69386018edb.148.1670460413018; Wed, 07 Dec 2022 16:46:53 -0800 (PST) MIME-Version: 1.0 References: <20221207085236.1424424-1-goldstein.w.n@gmail.com> In-Reply-To: From: Noah Goldstein Date: Wed, 7 Dec 2022 16:46:41 -0800 Message-ID: Subject: Re: [PATCH v1 01/27] x86/fpu: Create helper file for common data macros To: "H.J. Lu" Cc: libc-alpha@sourceware.org, andrey.kolesov@intel.com, carlos@systemhalted.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 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 List-Id: On Wed, Dec 7, 2022 at 4:22 PM H.J. Lu wrote: > > On Wed, Dec 7, 2022 at 4:13 PM Noah Goldstein wrote: > > > > On Wed, Dec 7, 2022 at 3:53 PM H.J. Lu wrote: > > > > > > On Wed, Dec 7, 2022 at 12:52 AM Noah Goldstein wrote: > > > > > > > > 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 > > > > -- > > > > 2.34.1 > > > > > > > > > > Please use .h files in fpu directory. > > > > Are .S files globbed somewhere or something? > > > > It uses assembler macros so its convenient for the > > extension to match. > > Use new macros or rename files before commit. Okay. > > -- > H.J.