[PATCH 2/2] gas/write: extend fx_pcrel_adjust to 16 bits
Dmitry Selyutin
ghostmansd@gmail.com
Wed May 11 17:59:24 GMT 2022
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gas/write.h b/gas/write.h
index 501bdd828f..e31a0f5955 100644
--- a/gas/write.h
+++ b/gas/write.h
@@ -73,10 +73,10 @@ struct fix
unsigned fx_tcbit2 : 1;
/* Spare bits. */
- unsigned fx_unused : 10;
+ unsigned fx_unused : 2;
/* pc-relative offset adjust (only used by some CPU specific code) */
- int fx_pcrel_adjust : 8;
+ int fx_pcrel_adjust : 16;
/* How many bytes are involved? */
unsigned fx_size : 8;
--
2.36.0
More information about the Binutils
mailing list