summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-02-10 12:05:12 +0000
committerNick Clifton <nickc@redhat.com>2006-02-10 12:05:12 +0000
commita79387507bb0de3869250a259be1b9c2194dbe01 (patch)
tree15a68c19a5188b445a4c292aa9b2fdd2950e43f7 /cpu
parentdd1b78dfc867d52f4c8a123f05a61b6b91ad393a (diff)
downloadbinutils-redhat-a79387507bb0de3869250a259be1b9c2194dbe01.tar.gz
Fix %hi() operator for 64-bit hosts.
Diffstat (limited to 'cpu')
-rw-r--r--cpu/ChangeLog4
-rw-r--r--cpu/iq2000.opc2
2 files changed, 6 insertions, 0 deletions
diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index 358e366ef0..baefa5cde9 100644
--- a/cpu/ChangeLog
+++ b/cpu/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-10 Nick Clifton <nickc@redhat.com>
+
+ * iq2000.opc (parse_hi16): Truncate shifted values to 16 bits.
+
2006-01-06 DJ Delorie <dj@redhat.com>
* m32c.cpu (mov.w:q): Fix mode.
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;