diff options
author | Alan Modra <amodra@gmail.com> | 2016-10-06 08:08:25 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-10-06 09:36:33 +1030 |
commit | 616ec3583b7b6ba0a4e581c426b700b0664a3027 (patch) | |
tree | 544e86a910e39c353eaba3cd2ca40595a8278147 /bfd | |
parent | f389f6fef76d7cf8e8beb7061edff2155c284898 (diff) | |
download | binutils-616ec3583b7b6ba0a4e581c426b700b0664a3027.zip binutils-616ec3583b7b6ba0a4e581c426b700b0664a3027.tar.gz binutils-616ec3583b7b6ba0a4e581c426b700b0664a3027.tar.bz2 |
Don't use boolean OR in arithmetic expressions
bfd/
* elf32-epiphany.c (epiphany_final_link_relocate): Use bitwise
OR in arithmetic expression, not boolean OR.
opcodes/
* cr16-dis.c (print_insn_cr16): Don't use boolean OR in arithmetic.
* crx-dis.c (print_insn_crx): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-epiphany.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e54585a..7ba9597 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2016-10-06 Alan Modra <amodra@gmail.com> + + * elf32-epiphany.c (epiphany_final_link_relocate): Use bitwise + OR in arithmetic expression, not boolean OR. + 2016-09-30 Alan Modra <amodra@gmail.com> * Makefile.am (BFD_H_FILES): Add linker.c and simple.c. Sort diff --git a/bfd/elf32-epiphany.c b/bfd/elf32-epiphany.c index 420dc8b..6b798b1 100644 --- a/bfd/elf32-epiphany.c +++ b/bfd/elf32-epiphany.c @@ -420,9 +420,10 @@ epiphany_final_link_relocate (reloc_howto_type * howto, relocation += rel->r_addend; if ((unsigned int) relocation > 0x7ff) return bfd_reloc_outofrange; + /* Fall through. */ disp11: - relocation = ((relocation & 7) << 5) - || ((relocation & 0x7f8 ) << 13); + relocation = (((relocation & 7) << 5) + | ((relocation & 0x7f8 ) << 13)); return _bfd_relocate_contents (howto, input_bfd, relocation, contents + rel->r_offset); |