aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-nios2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-nios2.c')
-rw-r--r--gas/config/tc-nios2.c3
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:
{