public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Noah Goldstein <goldstein.w.n@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: libc-alpha@sourceware.org, andrey.kolesov@intel.com,
	 carlos@systemhalted.org
Subject: Re: [PATCH v1 01/27] x86/fpu: Create helper file for common data macros
Date: Wed, 7 Dec 2022 16:13:19 -0800	[thread overview]
Message-ID: <CAFUsyf+QPD22dkDkksV3Gz5NXSJs9rQ+Prneet6v7EpyUDzfCQ@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOpXzPNCo1GQZ+sz0bOoUHgM3KSQO_7jSRwOaPgYEuaGAA@mail.gmail.com>

On Wed, Dec 7, 2022 at 3:53 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Wed, Dec 7, 2022 at 12:52 AM Noah Goldstein <goldstein.w.n@gmail.com> 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.
>
> --
> H.J.

  reply	other threads:[~2022-12-08  0:13 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07  8:52 Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 02/27] x86/fpu: Add file for common data used across svml_s_*_avx2.S files Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 03/27] x86/fpu: Add file for common data used across svml_s_*_avx512.S files Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 04/27] x86/fpu: Add file for common data used across svml_s_*_sse4.S files Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 05/27] x86/fpu: Build common data files for svml_s_*_{avx512,avx2,sse4}.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 06/27] x86/fpu: Update rodata usage in svml_s_tanhf_*_{avx2,sse4} Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 07/27] x86/fpu: Update rodata usage in svml_s_tanhf16_core_avx512.S Noah Goldstein
2022-12-16 17:05   ` H.J. Lu
2022-12-16 18:17     ` Noah Goldstein
2022-12-16 21:37       ` H.J. Lu
2022-12-16 21:51         ` Noah Goldstein
2022-12-16 22:01           ` H.J. Lu
2022-12-16 22:54             ` Sunil Pandey
2023-06-27 18:23             ` Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 08/27] x86/fpu: Update rodata usage in svml_s_atanhf16_core_avx512.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 09/27] x86/fpu: Update rodata usage in svml_s_atanhf4_core_sse4.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 10/27] x86/fpu: Update rodata usage in svml_s_atanhf8_core_avx2.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 11/27] x86/fpu: Optimize svml_s_atanf16_core_avx512.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 12/27] x86/fpu: Optimize svml_s_atanf4_core_sse4.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 13/27] x86/fpu: Optimize svml_s_atanf8_core_avx2.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 14/27] x86/fpu: Add common rodata file for svml_s_tanf_*_{avx512,avx2,sse4}.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 15/27] x86/fpu: Optimize svml_s_tanf16_core_avx512.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 16/27] x86/fpu: Optimize svml_s_tanf4_core_sse4.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 17/27] x86/fpu: Optimize svml_s_tanf8_core_avx2.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 18/27] x86/fpu: Optimize svml_s_log10f16_core_avx512.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 19/27] x86/fpu: Optimize svml_s_log10f4_core_sse4.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 20/27] x86/fpu: Optimize svml_s_log10f8_core_avx2.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 21/27] x86/fpu: Optimize svml_s_log2f16_core_avx512.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 22/27] x86/fpu: Optimize svml_s_log2f4_core_sse4.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 23/27] x86/fpu: Optimize svml_s_log2f8_core_avx2.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 24/27] x86/fpu: Optimize svml_s_logf16_core_avx512.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 25/27] x86/fpu: Optimize svml_s_logf4_core_sse4.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 26/27] x86/fpu: Optimize svml_s_logf8_core_avx2.S Noah Goldstein
2022-12-07  8:52 ` [PATCH v1 27/27] x86/fpu: Remove unused svml_s_logf_data.S file Noah Goldstein
2022-12-07 23:53 ` [PATCH v1 01/27] x86/fpu: Create helper file for common data macros H.J. Lu
2022-12-08  0:13   ` Noah Goldstein [this message]
2022-12-08  0:22     ` H.J. Lu
2022-12-08  0:46       ` Noah Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFUsyf+QPD22dkDkksV3Gz5NXSJs9rQ+Prneet6v7EpyUDzfCQ@mail.gmail.com \
    --to=goldstein.w.n@gmail.com \
    --cc=andrey.kolesov@intel.com \
    --cc=carlos@systemhalted.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).