From 3e8da526c8ce43297285b9e9b3fa30ddfe484efd Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Wed, 11 May 2022 17:12:24 +0000 Subject: [PATCH] gas/write: extend fx_pcrel_adjust to 16 bits 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 501bdd828fc..5469dce4452 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.30.2