diff options
author | Jeff Law <law@redhat.com> | 1996-10-29 20:07:13 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1996-10-29 20:07:13 +0000 |
commit | 2385d90a81bb8378de8c8dc9fa94a45b8f71b2a4 (patch) | |
tree | 2215e5db11f5559323941bf27cb2367630a7f578 /gas | |
parent | bc49fab8ea87645d9e5999cc61ff66df2f92ad59 (diff) | |
download | gdb-2385d90a81bb8378de8c8dc9fa94a45b8f71b2a4.zip gdb-2385d90a81bb8378de8c8dc9fa94a45b8f71b2a4.tar.gz gdb-2385d90a81bb8378de8c8dc9fa94a45b8f71b2a4.tar.bz2 |
* config/tc-v850.c (md_convert_frag): Make sure we insert the
fixup at the right address within the frag.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 3 | ||||
-rw-r--r-- | gas/config/tc-v850.c | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index b30a2bf..a66c562 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,6 +1,9 @@ start-sanitize-v850 Tue Oct 29 12:28:16 1996 Jeffrey A Law (law@cygnus.com) + * config/tc-v850.c (md_convert_frag): Make sure we insert the + fixup at the right address within the frag. + * config/tc-v850.c (md_convert_frag): Don't set fragP->fr_fix to an absolute value, instead increment it as needed. diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index fb238e4..10bf110 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -425,15 +425,13 @@ md_convert_frag (abfd, sec, fragP) subseg_change (sec, 0); if (fragP->fr_subtype == 0) { + fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, + fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int)fragP->fr_opcode); fragP->fr_var = 0; fragP->fr_fix += 2; - fix_new (fragP, 0, 2, fragP->fr_symbol, - fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int)fragP->fr_opcode); } else if (fragP->fr_subtype == 1) { - fragP->fr_var = 0; - fragP->fr_fix += 6; /* Reverse the condition of the first branch. */ fragP->fr_literal[0] &= 0xf7; /* Mask off all the displacement bits. */ @@ -446,8 +444,10 @@ md_convert_frag (abfd, sec, fragP) /* Now create the unconditional branch + fixup to the final target. */ md_number_to_chars (&fragP->fr_literal[2], 0x00000780, 4); - fix_new (fragP, 2, 4, fragP->fr_symbol, + fix_new (fragP, fragP->fr_fix + 2, 4, fragP->fr_symbol, fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int)fragP->fr_opcode + 1); + fragP->fr_var = 0; + fragP->fr_fix += 6; } else abort (); |