aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index d8471bf..c1506e1 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -6739,8 +6739,8 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma low_bits;
bfd_vma high_bits;
- if (addend & 0x80000000u)
- sign_bits = 0xffffffffu;
+ if (addend & ((bfd_vma) 1 << 31))
+ sign_bits = ((bfd_vma) 1 << 32) - 1;
else
sign_bits = 0;
@@ -6859,8 +6859,8 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma low_bits;
bfd_vma high_bits;
- if (value & 0x80000000u)
- sign_bits = 0xffffffffu;
+ if (value & ((bfd_vma) 1 << 31))
+ sign_bits = ((bfd_vma) 1 << 32) - 1;
else
sign_bits = 0;