public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Dmitry Selyutin <ghostmansd@gmail.com>
To: binutils@sourceware.org
Subject: [PATCH v2 2/2] gas/write: extend fx_pcrel_adjust to 16 bits
Date: Thu, 12 May 2022 10:32:12 +0300	[thread overview]
Message-ID: <20220512073212.64309-2-ghostmansd@gmail.com> (raw)
In-Reply-To: <20220512073212.64309-1-ghostmansd@gmail.com>

PowerPC code stores operand index into fx_pcrel_adjust field of fix
struct. Once count of PowerPC operands exceeds an 8-bit integer, the
code won't be able to store operand index anymore.
This patch extends the aforementioned field to 16 bits, exactly like
the ppc_opindex_t type; the missing 8 bits are taken from the fx_unused
field.
---
 gas/write.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gas/write.h b/gas/write.h
index 501bdd828f..5469dce445 100644
--- a/gas/write.h
+++ b/gas/write.h
@@ -52,6 +52,12 @@ struct fix
   /* These small fields are grouped together for compactness of
      this structure, and efficiency of access on some architectures.  */
 
+  /* pc-relative offset adjust (only used by some CPU specific code) */
+  int fx_pcrel_adjust : 16;
+
+  /* How many bytes are involved? */
+  unsigned fx_size : 8;
+
   /* Is this a pc-relative relocation?  */
   unsigned fx_pcrel : 1;
 
@@ -73,13 +79,7 @@ struct fix
   unsigned fx_tcbit2 : 1;
 
   /* Spare bits.  */
-  unsigned fx_unused : 10;
-
-  /* pc-relative offset adjust (only used by some CPU specific code) */
-  int fx_pcrel_adjust : 8;
-
-  /* How many bytes are involved? */
-  unsigned fx_size : 8;
+  unsigned fx_unused : 2;
 
   bfd_reloc_code_real_type fx_r_type;
 
-- 
2.36.0


  reply	other threads:[~2022-05-12  7:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 17:59 [PATCH 0/2] extend opindex and " Dmitry Selyutin
2022-05-12  7:32 ` [PATCH v2 1/2] ppc: extend opindex " Dmitry Selyutin
2022-05-12  7:32   ` Dmitry Selyutin [this message]
2022-05-17 11:20 ` [PATCH 0/2] extend opindex and fx_pcrel_adjust " Dmitry Selyutin
2022-05-24 21:09   ` Dmitry Selyutin
2022-05-25  2:41     ` Alan Modra
2022-05-25  4:11       ` Dmitry Selyutin
2022-05-25  4:32         ` Alan Modra
2022-05-25  4:35         ` Alan Modra

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=20220512073212.64309-2-ghostmansd@gmail.com \
    --to=ghostmansd@gmail.com \
    --cc=binutils@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).