From 5bc113360ccc33797a3f882e02824a5c426da175 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 16 Apr 2019 15:47:02 +0930 Subject: 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. --- gas/write.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'gas/write.c') diff --git a/gas/write.c b/gas/write.c index 91767fb..050fbe8 100644 --- a/gas/write.c +++ b/gas/write.c @@ -174,9 +174,7 @@ fix_new_internal (fragS *frag, /* Which frag? */ fixP->fx_dot_frag = dot_frag; fixP->fx_pcrel = pcrel; fixP->fx_r_type = r_type; - fixP->fx_im_disp = 0; fixP->fx_pcrel_adjust = 0; - fixP->fx_bit_fixP = 0; fixP->fx_addnumber = 0; fixP->fx_tcbit = 0; fixP->fx_tcbit2 = 0; @@ -1093,7 +1091,7 @@ fixup_segment (fixS *fixP, segT this_segment) symbol_mark_used_in_reloc (fixP->fx_subsy); } - if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && fixP->fx_size != 0) + if (!fixP->fx_no_overflow && fixP->fx_size != 0) { if (fixP->fx_size < sizeof (valueT)) { @@ -1131,7 +1129,7 @@ fixup_segment (fixS *fixP, segT this_segment) (long) add_number, (long) (fragP->fr_address + fixP->fx_where)); #endif - } /* Not a bit fix. */ + } #ifdef TC_VALIDATE_FIX skip: ATTRIBUTE_UNUSED_LABEL @@ -3142,14 +3140,6 @@ print_fixup (fixS *fixp) fprintf (stderr, " pcrel"); if (fixp->fx_pcrel_adjust) fprintf (stderr, " pcrel_adjust=%d", fixp->fx_pcrel_adjust); - if (fixp->fx_im_disp) - { -#ifdef TC_NS32K - fprintf (stderr, " im_disp=%d", fixp->fx_im_disp); -#else - fprintf (stderr, " im_disp"); -#endif - } if (fixp->fx_tcbit) fprintf (stderr, " tcbit"); if (fixp->fx_done) -- cgit v1.1