diff options
author | Jason Eckhardt <jle@rice.edu> | 2003-05-12 03:08:02 +0000 |
---|---|---|
committer | Jason Eckhardt <jle@rice.edu> | 2003-05-12 03:08:02 +0000 |
commit | a48c6a54fc5989c07dcb5b75fec5a50391f5a11e (patch) | |
tree | 232cd20b38b514d595c887362c1de99dd2550abf /bfd/elf32-i860.c | |
parent | d68c07bb74ee7dc480e3cd9aadba7d0bf46781db (diff) | |
download | gdb-a48c6a54fc5989c07dcb5b75fec5a50391f5a11e.zip gdb-a48c6a54fc5989c07dcb5b75fec5a50391f5a11e.tar.gz gdb-a48c6a54fc5989c07dcb5b75fec5a50391f5a11e.tar.bz2 |
2003-05-11 Jason Eckhardt <jle@rice.edu>
* bfd/elf32-i860.c (elf32_i860_relocate_highadj): Properly
adjust upper bits.
(elf32_i860_relocate_splitn): Obtain upper 5 bits from the
proper place.
(elf32_i860_relocate_pc16): Obtain upper 5 bits from the
proper place.
Diffstat (limited to 'bfd/elf32-i860.c')
-rw-r--r-- | bfd/elf32-i860.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c index d24a29d..7a132c6 100644 --- a/bfd/elf32-i860.c +++ b/bfd/elf32-i860.c @@ -718,7 +718,7 @@ elf32_i860_relocate_splitn (input_bfd, rello, contents, value) value += rello->r_addend; /* Separate the fields and insert. */ - value = (((value & 0xf8) << 5) | (value & 0x7ff)) & howto->dst_mask; + value = (((value & 0xf800) << 5) | (value & 0x7ff)) & howto->dst_mask; insn = (insn & ~howto->dst_mask) | value; bfd_put_32 (input_bfd, insn, contents + rello->r_offset); @@ -750,7 +750,7 @@ elf32_i860_relocate_pc16 (input_bfd, input_section, rello, contents, value) value += rello->r_addend; /* Separate the fields and insert. */ - value = (((value & 0xf8) << 5) | (value & 0x7ff)) & howto->dst_mask; + value = (((value & 0xf800) << 5) | (value & 0x7ff)) & howto->dst_mask; insn = (insn & ~howto->dst_mask) | value; bfd_put_32 (input_bfd, insn, contents + rello->r_offset); @@ -802,8 +802,8 @@ elf32_i860_relocate_highadj (input_bfd, rel, contents, value) insn = bfd_get_32 (input_bfd, contents + rel->r_offset); - value += ((rel->r_addend & 0x8000) << 1); value += rel->r_addend; + value += (value & 0x8000) << 1; value = ((value >> 16) & 0xffff); insn = (insn & 0xffff0000) | value; |