diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2013-06-12 23:11:57 +0000 |
---|---|---|
committer | Sandra Loosemore <sandra@codesourcery.com> | 2013-06-12 23:11:57 +0000 |
commit | 5d5755a724d32a703e7ff0fe3d6a864706d91fa3 (patch) | |
tree | 94d85fd8defd69fdaa968ccd2c7ae47a1c9843fc /gas/config/tc-nios2.c | |
parent | 0c8fe7cfe2690fb49f8aab4ba23ff1080fd8f113 (diff) | |
download | fsf-binutils-gdb-5d5755a724d32a703e7ff0fe3d6a864706d91fa3.zip fsf-binutils-gdb-5d5755a724d32a703e7ff0fe3d6a864706d91fa3.tar.gz fsf-binutils-gdb-5d5755a724d32a703e7ff0fe3d6a864706d91fa3.tar.bz2 |
2013-06-12 Sandra Loosemore <sandra@codesourcery.com>
gas/
* config/tc-nios2.c (md_apply_fix): Mask constant
BFD_RELOC_NIOS2_HIADJ16 value to 16 bits.
gas/testsuite/
* gas/nios2/movia.s: Add additional test case with negative
constant value.
* gas/nios2/movia.d: Likewise.
Diffstat (limited to 'gas/config/tc-nios2.c')
-rw-r--r-- | gas/config/tc-nios2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c index 6c91fbe..659bbbc 100644 --- a/gas/config/tc-nios2.c +++ b/gas/config/tc-nios2.c @@ -1258,7 +1258,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) fixup = fixup & 0xFFFF; break; case BFD_RELOC_NIOS2_HIADJ16: - fixup = ((fixup >> 16) & 0xFFFF) + ((fixup >> 15) & 0x01); + fixup = ((((fixup >> 16) & 0xFFFF) + ((fixup >> 15) & 0x01)) + & 0xFFFF); break; default: { |