aboutsummaryrefslogtreecommitdiff
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
commit8536c657ffc11014c02aa7811eda04ce8b05dd6b (patch)
tree21d618cc9a7e647de96477fe33ab350599d5e220
parentb6637a13d5e6b6587d20431819800bd030c77c47 (diff)
downloadgdb-8536c657ffc11014c02aa7811eda04ce8b05dd6b.zip
gdb-8536c657ffc11014c02aa7811eda04ce8b05dd6b.tar.gz
gdb-8536c657ffc11014c02aa7811eda04ce8b05dd6b.tar.bz2
Fix %hi() operator for 64-bit hosts.
-rw-r--r--cpu/ChangeLog4
-rw-r--r--cpu/iq2000.opc2
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/iq2000-asm.c2
4 files changed, 12 insertions, 0 deletions
diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index 358e366..baefa5c 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 63ef076..5287506 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;
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 51bbb1c..9de01b6 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-10 Nick Clifton <nickc@redhat.com>
+
+ * iq2000-asm.c: Regenerate.
+
2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
* m68k-dis.c (print_insn_m68k): Use bfd_m68k_mach_to_features.
diff --git a/opcodes/iq2000-asm.c b/opcodes/iq2000-asm.c
index caab54f..0ec59ce 100644
--- a/opcodes/iq2000-asm.c
+++ b/opcodes/iq2000-asm.c
@@ -213,6 +213,7 @@ parse_hi16 (CGEN_CPU_DESC cd,
1 to the resultant %hi value. */
if (value & 0x8000)
value += 0x10000;
+ value &= 0xffff;
value >>= 16;
}
*valuep = value;
@@ -239,6 +240,7 @@ parse_hi16 (CGEN_CPU_DESC cd,
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
value >>= 16;
+ value &= 0xffff;
*valuep = value;
return errmsg;