diff options
Diffstat (limited to 'gas/config/tc-m88k.c')
-rw-r--r-- | gas/config/tc-m88k.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c index 2178be3..5c8d602 100644 --- a/gas/config/tc-m88k.c +++ b/gas/config/tc-m88k.c @@ -1442,7 +1442,16 @@ long md_pcrel_from (fixp) fixS *fixp; { - return fixp->fx_frag->fr_address + fixp->fx_where + 4; + switch (fixp->fx_r_type) + { + case RELOC_PC16: + return fixp->fx_frag->fr_address + fixp->fx_where - 2; + case RELOC_PC26: + return fixp->fx_frag->fr_address + fixp->fx_where; + default: + abort (); + } + /*NOTREACHED*/ } #endif /* M88KCOFF */ |