diff options
Diffstat (limited to 'gnu/usr.bin/binutils/gas/config/tc-ppc.c')
-rw-r--r-- | gnu/usr.bin/binutils/gas/config/tc-ppc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gnu/usr.bin/binutils/gas/config/tc-ppc.c b/gnu/usr.bin/binutils/gas/config/tc-ppc.c index 485da742473..b8de66a6131 100644 --- a/gnu/usr.bin/binutils/gas/config/tc-ppc.c +++ b/gnu/usr.bin/binutils/gas/config/tc-ppc.c @@ -1773,12 +1773,11 @@ md_assemble (str) case BFD_RELOC_LO16: if (operand->flags & PPC_OPERAND_SIGNED) { - /* sign extend */ - signed short i; - i = ex.X_add_number; - ex.X_add_number = (int) i; + ex.X_add_number = (((ex.X_add_number & 0xffff) + ^ 0x8000) + - 0x8000); } else { - ex.X_add_number &= 0xffff; + ex.X_add_number &= 0xffff; } break; |