diff options
author | Nick Clifton <nickc@redhat.com> | 2001-11-15 21:29:00 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-11-15 21:29:00 +0000 |
commit | 94f592af1baedbbe3957436c713fd58c02d55ef9 (patch) | |
tree | e0e9b543686a52f86aa0ab7d287cf60541e69b49 /gas/config/tc-a29k.c | |
parent | ad10f812bfdac2cc9e42875246c8fe0ae5224440 (diff) | |
download | gdb-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-a29k.c')
-rw-r--r-- | gas/config/tc-a29k.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gas/config/tc-a29k.c b/gas/config/tc-a29k.c index 14c0d82..3100d2b 100644 --- a/gas/config/tc-a29k.c +++ b/gas/config/tc-a29k.c @@ -782,26 +782,25 @@ md_number_to_chars (buf, val, n) } void -md_apply_fix (fixP, val) +md_apply_fix3 (fixP, valP, seg) fixS *fixP; - long val; + valueT * valP; + segT seg ATTRIBUTE_UNUSED; { + long val = * (long *) valP; char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; - fixP->fx_addnumber = val; /* Remember value for emit_reloc */ + fixP->fx_addnumber = val; /* Remember value for emit_reloc. */ know (fixP->fx_size == 4); know (fixP->fx_r_type < NO_RELOC); /* This is a hack. There should be a better way to handle this. */ if (fixP->fx_r_type == RELOC_WDISP30 && fixP->fx_addsy) - { - val += fixP->fx_where + fixP->fx_frag->fr_address; - } + val += fixP->fx_where + fixP->fx_frag->fr_address; switch (fixP->fx_r_type) { - case RELOC_32: buf[0] = val >> 24; buf[1] = val >> 16; @@ -863,12 +862,13 @@ md_apply_fix (fixP, val) else if (fixP->fx_pcrel) { long v = val >> 17; + if (v != 0 && v != -1) as_bad_where (fixP->fx_file, fixP->fx_line, "call/jmp target out of range"); } else - /* this case was supposed to be handled in machine_ip */ + /* This case was supposed to be handled in machine_ip. */ abort (); buf[1] = val >> 10; /* Holds bits 0003FFFC of address */ buf[3] = val >> 2; @@ -889,6 +889,9 @@ md_apply_fix (fixP, val) as_bad (_("bad relocation type: 0x%02x"), fixP->fx_r_type); break; } + + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + fixP->fx_done = 1; } #ifdef OBJ_COFF |