aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ns32k.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-11-15 21:29:00 +0000
committerNick Clifton <nickc@redhat.com>2001-11-15 21:29:00 +0000
commit94f592af1baedbbe3957436c713fd58c02d55ef9 (patch)
treee0e9b543686a52f86aa0ab7d287cf60541e69b49 /gas/config/tc-ns32k.c
parentad10f812bfdac2cc9e42875246c8fe0ae5224440 (diff)
downloadgdb-94f592af1baedbbe3957436c713fd58c02d55ef9.zip
gdb-94f592af1baedbbe3957436c713fd58c02d55ef9.tar.gz
gdb-94f592af1baedbbe3957436c713fd58c02d55ef9.tar.bz2
Update all uses of md_apply_fix to use md_apply_fix3. Make it a void function.
Diffstat (limited to 'gas/config/tc-ns32k.c')
-rw-r--r--gas/config/tc-ns32k.c65
1 files changed, 28 insertions, 37 deletions
diff --git a/gas/config/tc-ns32k.c b/gas/config/tc-ns32k.c
index 3aa890d..1ef1ef1 100644
--- a/gas/config/tc-ns32k.c
+++ b/gas/config/tc-ns32k.c
@@ -1954,52 +1954,43 @@ md_fix_pcrel_adjust (fixP)
out separate functions for each kind of thing we could be fixing.
They all get called from here. */
-#ifdef BFD_ASSEMBLER
-int
-md_apply_fix (fixP, valp)
- fixS *fixP;
- valueT *valp;
-#else
void
-md_apply_fix (fixP, val)
+md_apply_fix3 (fixP, valP, seg)
fixS *fixP;
- long val;
-#endif
+ valueT * valP;
+ segT seg ATTRIBUTE_UNUSED;
{
-#ifdef BFD_ASSEMBLER
- long val = *valp;
-#endif
+ long val = * (long *) valP;
fragS *fragP = fixP->fx_frag;
-
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
if (fix_bit_fixP (fixP))
- { /* Bitfields to fix, sigh. */
- md_number_to_field (buf, val, fix_bit_fixP (fixP));
- }
- else
- switch (fix_im_disp (fixP))
- {
- case 0: /* Immediate field. */
- md_number_to_imm (buf, val, fixP->fx_size);
- break;
+ /* Bitfields to fix, sigh. */
+ md_number_to_field (buf, val, fix_bit_fixP (fixP));
- case 1: /* Displacement field. */
- /* Calculate offset */
- {
- md_number_to_disp (buf,
- (fixP->fx_pcrel ? val + md_fix_pcrel_adjust (fixP)
- : val), fixP->fx_size);
- }
- break;
+ else switch (fix_im_disp (fixP))
+ {
+ case 0:
+ /* Immediate field. */
+ md_number_to_imm (buf, val, fixP->fx_size);
+ break;
- case 2: /* Pointer in a data object. */
- md_number_to_chars (buf, val, fixP->fx_size);
- break;
- }
-#ifdef BSD_ASSEMBLER
- return 1;
-#endif
+ case 1:
+ /* Displacement field. */
+ /* Calculate offset */
+ md_number_to_disp (buf,
+ (fixP->fx_pcrel ? val + md_fix_pcrel_adjust (fixP)
+ : val), fixP->fx_size);
+ break;
+
+ case 2:
+ /* Pointer in a data object. */
+ md_number_to_chars (buf, val, fixP->fx_size);
+ break;
+ }
+
+ if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
+ fixP->fx_done = 1;
}
/* Convert a relaxed displacement to ditto in final output */