diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-05-01 22:30:08 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-05-01 22:30:08 +0000 |
commit | cf26606b2fb86ae321068e51808077bae31d13c3 (patch) | |
tree | dfdf4c237eff2137d364e9bb2834a043ee0b777a /gnu | |
parent | 99fe622cd1f484b14494b5c794da01c76f6d5ebf (diff) |
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.
Diffstat (limited to 'gnu')
-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; |