summaryrefslogtreecommitdiff
path: root/bfd/elf32-epiphany.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-10-06 08:08:25 +1030
committerAlan Modra <amodra@gmail.com>2016-10-06 09:36:33 +1030
commit616ec3583b7b6ba0a4e581c426b700b0664a3027 (patch)
tree544e86a910e39c353eaba3cd2ca40595a8278147 /bfd/elf32-epiphany.c
parentf389f6fef76d7cf8e8beb7061edff2155c284898 (diff)
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/elf32-epiphany.c')
-rw-r--r--bfd/elf32-epiphany.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf32-epiphany.c b/bfd/elf32-epiphany.c
index 420dc8bb07..6b798b17a5 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);