aboutsummaryrefslogtreecommitdiff
path: root/gas/write.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-04-16 15:47:02 +0930
committerAlan Modra <amodra@gmail.com>2019-04-16 17:39:28 +0930
commit5bc113360ccc33797a3f882e02824a5c426da175 (patch)
tree601325a80476ae04c4e93d1a61c3e3359694b9f8 /gas/write.h
parent90bd3c903fe76a8a3a5ced98c76e4366c5a0948f (diff)
downloadgdb-5bc113360ccc33797a3f882e02824a5c426da175.zip
gdb-5bc113360ccc33797a3f882e02824a5c426da175.tar.gz
gdb-5bc113360ccc33797a3f882e02824a5c426da175.tar.bz2
Move fixup fx_bit_fixP and fx_im_disp fields to TC_FIX_TYPE
These are only used by dlx and ns32k. * write.h: Don't include bit_fix.h. (struct fix): Rearrange some fields. Delete fx_im_disp and fx_bit_fixP. Use bitfields for fx_size and fx_pcrel_adjust. * write.c (fix_new_internal): Don't init fx_im_disp and fx_bit_fixP. (fixup_segment): Don't exclude overflow checks on fx_bit_fixP. (print_fixup): Don't print im_disp. * config/tc-cris.c (md_apply_fix): Remove tests of fx_bit_fixP and fx_im_disp. * config/tc-dlx.c (md_apply_fix): Remove wrong debug code. Set fx_no_overflow when fx_bit_fixP. * config/tc-dlx.h: Include bit_fix.h. (TC_FIX_TYPE, tc_fix_data, TC_INIT_FIX_DATA): Define. * config/tc-ns32k.c (fix_new_ns32k, fix_new_ns32k_exp): Set fx_no_overflow when bit_fixP. * config/tc-ns32k.h (TC_FIX_TYPE): Add fx_bit_fixP and fx_im_disp. (fix_im_disp, fix_bit_fixP): Adjust to suit. (TC_INIT_FIX_DATA, TC_FIX_DATA_PRINT): Likewise.
Diffstat (limited to 'gas/write.h')
-rw-r--r--gas/write.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/gas/write.h b/gas/write.h
index a69ec3c..96ad791 100644
--- a/gas/write.h
+++ b/gas/write.h
@@ -40,28 +40,21 @@
#define FAKE_LABEL_CHAR '\001'
#endif
-#include "bit_fix.h"
-
/*
* FixSs may be built up in any order.
*/
struct fix
{
+ /* Next fixS in linked list, or NULL. */
+ struct fix *fx_next;
+
/* These small fields are grouped together for compactness of
this structure, and efficiency of access on some architectures. */
/* Is this a pc-relative relocation? */
unsigned fx_pcrel : 1;
- /* Is this value an immediate displacement? */
- /* Only used on ns32k; merge it into TC_FIX_TYPE sometime. */
- unsigned fx_im_disp : 2;
-
- /* Some bits for the CPU specific code. */
- unsigned fx_tcbit : 1;
- unsigned fx_tcbit2 : 1;
-
/* Has this relocation already been applied? */
unsigned fx_done : 1;
@@ -75,11 +68,20 @@ struct fix
/* The value is signed when checking for overflow. */
unsigned fx_signed : 1;
+ /* Some bits for the CPU specific code. */
+ unsigned fx_tcbit : 1;
+ unsigned fx_tcbit2 : 1;
+
+ /* Spare bits. */
+ unsigned fx_unused : 10;
+
/* pc-relative offset adjust (only used by some CPU specific code) */
- signed char fx_pcrel_adjust;
+ int fx_pcrel_adjust : 8;
/* How many bytes are involved? */
- unsigned char fx_size;
+ unsigned fx_size : 8;
+
+ bfd_reloc_code_real_type fx_r_type;
/* Which frag does this fix apply to? */
fragS *fx_frag;
@@ -102,14 +104,6 @@ struct fix
/* The frag fx_dot_value is based on. */
fragS *fx_dot_frag;
- /* Next fixS in linked list, or NULL. */
- struct fix *fx_next;
-
- /* If NULL, no bitfix's to do. */
- bit_fixS *fx_bit_fixP;
-
- bfd_reloc_code_real_type fx_r_type;
-
/* This field is sort of misnamed. It appears to be a sort of random
scratch field, for use by the back ends. The main gas code doesn't
do anything but initialize it to zero. The use of it does need to