public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>,
	Nick Clifton <nickc@redhat.com>,  Alan Modra <amodra@gmail.com>
Subject: Re: how to know host endianness in binutils
Date: Thu, 21 Dec 2023 07:11:25 -0800	[thread overview]
Message-ID: <CAMe9rOoaKz_kJ+RAQRvs7VkPZyuCevtKKssM5580jvNXQpUbaw@mail.gmail.com> (raw)
In-Reply-To: <d4fe56ce-d6b8-4003-a2ff-f899562440fa@suse.com>

On Thu, Dec 21, 2023 at 6:31 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> Hello,
>
> looking around, I can't seem to be able to find any standardized way of
> knowing host endianness in binutils (in gas/ in particular). As was
> pointed out to me, the new cpu_flags_from_attr() in config/tc-i386.c
> won't work as is on big-endian hosts, yet I would really, really like
> to avoid needing to enumerate all of the dozens of bitfields in that
> function (converting one kind of bitfield to another). That's not the
> least because this set constantly grows.
>
> I can see config/tc-bpf.c checking WORDS_BIGENDIAN, but I couldn't
> convince myself (from looking at the generated config.h) that one can
> really rely on that.
>
> Jan

WORDS_BIGENDIAN is generated by AC_C_BIGENDIAN.  It
should be correct.

-- 
H.J.

  reply	other threads:[~2023-12-21 15:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 14:30 Jan Beulich
2023-12-21 15:11 ` H.J. Lu [this message]
2024-01-02 11:29 ` Nick Clifton
2024-01-09 16:19 ` Michael Matz

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=CAMe9rOoaKz_kJ+RAQRvs7VkPZyuCevtKKssM5580jvNXQpUbaw@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=nickc@redhat.com \
    /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).