public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Dmitry Selyutin <dmitry.selyutin@3mdeb.com>
Cc: binutils@sourceware.org, lkcl@lkcl.net, ghostmansd@gmail.com
Subject: Re: Coding style on bitfields usage and pointers to structures
Date: Sat, 5 Feb 2022 17:21:46 +1030	[thread overview]
Message-ID: <Yf4egqUxyECbfQlb@squeak.grove.modra.org> (raw)
In-Reply-To: <3c2e65de-1daf-23eb-5e43-2f20d1fc91cf@3mdeb.com>

On Tue, Jan 18, 2022 at 08:45:47AM +0300, Dmitry Selyutin wrote:
> Our questions are:
> 1. Does the use of bitfields seems legit here? They simplify the reading,
> but I kinda get an impression that binutils tend to avoid bitfields,
> preferring macros.

Bitfields are fine.  C99 is allowed nowadays.  A lot of bfd and
opcodes is very old code from K&R days.

> 2. Would it be OK if we extend `powerpc_opcode` with a pointer to structure?

Sounds reasonable.

-- 
Alan Modra
Australia Development Lab, IBM

      parent reply	other threads:[~2022-02-05  6:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18  5:45 Dmitry Selyutin
2022-01-18  5:54 ` Dmitry Selyutin
2022-02-05  6:51 ` Alan Modra [this message]

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=Yf4egqUxyECbfQlb@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=dmitry.selyutin@3mdeb.com \
    --cc=ghostmansd@gmail.com \
    --cc=lkcl@lkcl.net \
    /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).