public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Noah Goldstein <goldstein.w.n@gmail.com>
Cc: <libc-alpha@sourceware.org>
Subject: Re: [PATCH v1 2/2] x86_64: Add {u}int_fast defs ideal for x86_64
Date: Thu, 14 Apr 2022 22:24:20 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2204142221420.916201@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20220411010913.1061799-2-goldstein.w.n@gmail.com>

On Sun, 10 Apr 2022, Noah Goldstein via Libc-alpha wrote:

> {u}int_fast{16|32} should never use 64-bit types. 64-bit instructions
> often use more code size (REX prefix) and a variety of instructions are
> slower on many implementations (div, bswap, etc...).

Apart from the other issues discussed with this patch, installed headers 
should not be specific to either x86_64 or 32-bit x86; such headers, where 
architecture-specific, should go in an x86/ sysdeps directory and contain 
appropriate conditionals within the header, so a single set of installed 
headers works with a multilibbed compiler.

> +# include <sysdeps/generic/int-fast.h>

And an installed header can't do that sort of thing, because only a single 
version of any such header gets installed.  If you want to include a 
generic file it has to have a different name, with both being installed 
(cf. bits/mman-*.h, for example).

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2022-04-14 22:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  1:09 [PATCH v1 1/2] stdlib: Refactor {u}int_fast defs in stdint Noah Goldstein
2022-04-11  1:09 ` [PATCH v1 2/2] x86_64: Add {u}int_fast defs ideal for x86_64 Noah Goldstein
2022-04-11  2:15   ` Adam Sampson
2022-04-11  6:34     ` Florian Weimer
2022-04-14 22:24   ` Joseph Myers [this message]
2022-04-14 22:44     ` Noah Goldstein
2022-04-14 22:21 ` [PATCH v1 1/2] stdlib: Refactor {u}int_fast defs in stdint Joseph Myers

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=alpine.DEB.2.22.394.2204142221420.916201@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=goldstein.w.n@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).