public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "Ying Huang" <ying.huang@oss.cipunited.com>
Cc: <libc-alpha@sourceware.org>,  <yunqiang.su@oss.cipunited.com>
Subject: Re: [PATCH v2] MIPS: Sync elf.h from binutils
Date: Tue, 16 May 2023 08:53:18 +0200	[thread overview]
Message-ID: <87v8gs6a3l.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20230516061449.192954-1-ying.huang@oss.cipunited.com> (Ying Huang's message of "Tue, 16 May 2023 14:15:09 +0800")

* Ying Huang:

> +#define EF_MIPS_MACH		0x00FF0000 /* Machine variant if we know it.  This field was invented at Cygnus,
> +					      but it is hoped that other vendors will adopt it.  If some standard
> +					      is developed, this code should be changed to follow it. */
> +#define E_MIPS_MACH_3900	0x00810000 /* Cygnus is choosing values between 80 and 9F;
> +					      00 - 7F should be left for a future standard;
> +					      the rest are open. */

Surely after around 25 years, these comments can be more precise?

> +/* Object attribute tags.  */
> +enum
> +{
> +  /* 0-3 are generic.  */
> +
> +  /* Floating-point ABI used by this object file.  */
> +  Tag_GNU_MIPS_ABI_FP = 4,
> +
> +  /* MSA ABI used by this object file.  */
> +  Tag_GNU_MIPS_ABI_MSA = 8,
> +};
> +
> +/* Object attribute values.  */
> +enum
> +{
> +  /* Values defined for Tag_GNU_MIPS_ABI_MSA.  */
> +
> +  /* Not tagged or not using any ABIs affected by the differences.  */
> +  Val_GNU_MIPS_ABI_MSA_ANY = 0,
> +
> +  /* Using 128-bit MSA.  */
> +  Val_GNU_MIPS_ABI_MSA_128 = 1,
> +};

Any reason for using enum constants here, and not #define?  I understand
there is other MIPS precedent, but why continue in this direction?

Thanks,
Florian


  reply	other threads:[~2023-05-16  6:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16  6:15 Ying Huang
2023-05-16  6:53 ` Florian Weimer [this message]
2023-05-19 11:21   ` Maciej W. Rozycki
2023-05-19 12:43     ` Gabriel Ravier
2023-05-16  9:12 Ying Huang
2023-06-01  9:17 ` [PATCH " Ying Huang
2023-06-01  9:21   ` Florian Weimer
2023-06-01  9:40     ` Ying Huang
2023-06-01 10:32       ` Florian Weimer
2023-06-01 10:46         ` 黄莺
2023-06-28  1:43         ` Ying Huang

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=87v8gs6a3l.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=ying.huang@oss.cipunited.com \
    --cc=yunqiang.su@oss.cipunited.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).