From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 035033857400 for ; Wed, 7 Dec 2022 23:53:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 035033857400 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-ot1-x333.google.com with SMTP id cn2-20020a056830658200b0066c74617e3dso12295810otb.2 for ; Wed, 07 Dec 2022 15:53:47 -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=IyRgs3N7XUVKLmGAJOg7vXtwovnbv/QLP9oMF5IYe6U=; b=kQYmQd0wZuSE2lXOP99tFTVfa08QAKq27FMEAOUrmjoPFzd/DW3Jd9oyMySrtZJcci wlNs8XZ6emZcYrPPxPjrkLOQrGZlwx+lZS+QGkdmr62aOm3qnvW60rsD870V5T8lGlj2 zhIQnj1IpFJo7beH0x7/0K7IVjXT2txf9bdYSrtf6Z4Lylgc/sW0ZZAqeqicpBJCTZEJ pL2nJohp1lZxNEjmmDRZI95gWshkZ78DvZZ0HGK06/EF7vs7GyYOm3AIYQUG5CoGA6BG kJNTbT8YshOUfXWssBdzCC2fMbMLEAnfgnV4Mwqmvz6MUFyDTuElCHA+gsstdCRmPWZg 10ew== 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=IyRgs3N7XUVKLmGAJOg7vXtwovnbv/QLP9oMF5IYe6U=; b=D2aeq+Z7vQbuMOOy1mCPq5/Mgkey+CI/bsTnwL3rxR2OxJtk45kTUwkKI3qhYf34RL CLAP9adLZIVR2emqjJKj4bIXbDdTSvob/duHirt1/yvGBwfUPuCv2V0RsNa+/AjQfbpD AAdUEaDR/MRoMKi/3LJGpukkEyOnPHqU+dbqjd/zZtfw2SBOEHvLRdlqrsybJ0bYzzGD Xn/TowiESpKYfsrXwJ8epZU3eZyfgQyjLL+5Kh/HptuVi0ZpkVZLwxMqL5+OLoG+5k/n 3yYs7FC3MXlvfrK5xzVkqDl10RqEc2i/159c0KtUSglbVaZ8gRp0SbEEIyTu73E81TKM 1ZyA== X-Gm-Message-State: ANoB5pkIi25w1ELOSw8zr30cAW2SF1IIg4yacrfYkAfEjqEHVie21cSW SQimBbr4h/7E9+nnk592RGcrOGYa/MKv1HyPoCk= X-Google-Smtp-Source: AA0mqf6PBCzy+kgfWRqoQ047w8YQD02Pnsj1uZB4/QRWFjzoVIY3D3+R4/mnfeDUM03nae3fkG+6LjL2UysDV4eQ/yE= X-Received: by 2002:a9d:12e5:0:b0:66e:b992:749f with SMTP id g92-20020a9d12e5000000b0066eb992749fmr7915299otg.52.1670457226187; Wed, 07 Dec 2022 15:53:46 -0800 (PST) MIME-Version: 1.0 References: <20221207085236.1424424-1-goldstein.w.n@gmail.com> In-Reply-To: <20221207085236.1424424-1-goldstein.w.n@gmail.com> From: "H.J. Lu" Date: Wed, 7 Dec 2022 15:53:09 -0800 Message-ID: Subject: Re: [PATCH v1 01/27] x86/fpu: Create helper file for common data macros To: Noah Goldstein Cc: libc-alpha@sourceware.org, andrey.kolesov@intel.com, carlos@systemhalted.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3023.6 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 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. -- H.J.