From 72de6c07abae83d052007c6ce568a7abe876891f Mon Sep 17 00:00:00 2001 From: rahnds Date: Thu, 1 May 1997 22:30:07 +0000 Subject: [PATCH] Back out half of my changes to this file. The way that I had done the sign extension was incorrect, but did happen to work on the archs tested. Changed back to the correct method. This was after some conversation with Ian Lance Taylor. --- gnu/usr.bin/binutils/gas/config/tc-ppc.c | 9 ++++----- 1 file 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; -- 2.20.1