summaryrefslogtreecommitdiff
path: root/cpu/iq2000.opc
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/iq2000.opc')
-rw-r--r--cpu/iq2000.opc2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpu/iq2000.opc b/cpu/iq2000.opc
index 63ef0768dd..528750688f 100644
--- a/cpu/iq2000.opc
+++ b/cpu/iq2000.opc
@@ -218,6 +218,7 @@ parse_hi16 (CGEN_CPU_DESC cd,
if (value & 0x8000)
value += 0x10000;
value >>= 16;
+ value &= 0xffff;
}
*valuep = value;
@@ -243,6 +244,7 @@ parse_hi16 (CGEN_CPU_DESC cd,
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
value >>= 16;
+ value &= 0xffff;
*valuep = value;
return errmsg;