aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ns32k.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/config/tc-ns32k.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/config/tc-ns32k.h')
-rw-r--r--gas/config/tc-ns32k.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/gas/config/tc-ns32k.h b/gas/config/tc-ns32k.h
index a53ef97..d905f66 100644
--- a/gas/config/tc-ns32k.h
+++ b/gas/config/tc-ns32k.h
@@ -91,14 +91,16 @@ extern const struct relax_type md_relax_table[];
struct \
{ \
fragS * opcode_fragP; \
+ bit_fixS * fx_bit_fixP; \
unsigned int opcode_offset; \
unsigned int bsr : 1; \
+ unsigned int fx_im_disp : 2; \
}
/* Accessor macros for things which may move around.
See comments in write.h. */
-#define fix_im_disp(X) (X)->fx_im_disp
-#define fix_bit_fixP(X) (X)->fx_bit_fixP
+#define fix_im_disp(X) (X)->tc_fix_data.fx_im_disp
+#define fix_bit_fixP(X) (X)->tc_fix_data.fx_bit_fixP
#define fix_opcode_frag(X) (X)->tc_fix_data.opcode_fragP
#define fix_opcode_offset(X) (X)->tc_fix_data.opcode_offset
#define fix_bsr(X) (X)->tc_fix_data.bsr
@@ -108,16 +110,20 @@ extern const struct relax_type md_relax_table[];
{ \
fix_opcode_frag(X) = NULL; \
fix_opcode_offset(X) = 0; \
+ fix_bit_fixP(X) = NULL; \
fix_bsr(X) = 0; \
+ fix_im_disp(X) = 0; \
} \
while (0)
#define TC_FIX_DATA_PRINT(FILE, FIX) \
do \
{ \
- fprintf ((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d\n", \
- (unsigned long) fix_opcode_frag (FIX), \
- fix_opcode_offset (FIX), \
- fix_bsr (FIX)); \
+ fprintf ((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d, " \
+ "im_disp=%d\n", \
+ (unsigned long) fix_opcode_frag (FIX), \
+ fix_opcode_offset (FIX), \
+ fix_bsr (FIX), \
+ fix_im_disp (FIX)); \
} \
while (0)