aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-10-09 17:25:58 +0000
committerNick Clifton <nickc@redhat.com>2001-10-09 17:25:58 +0000
commita5d2034ac06088a4c378d015b838e9eee1908fe1 (patch)
tree68f2b0746c6798bfdca3efe98a3859922c840620 /opcodes
parent90f9b791a14d076f5a2e683778a9114b2a6bdfb4 (diff)
downloadgdb-a5d2034ac06088a4c378d015b838e9eee1908fe1.zip
gdb-a5d2034ac06088a4c378d015b838e9eee1908fe1.tar.gz
gdb-a5d2034ac06088a4c378d015b838e9eee1908fe1.tar.bz2
fix z8k assembly and disassembly
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog6
-rw-r--r--opcodes/z8k-dis.c15
2 files changed, 13 insertions, 8 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index d4bbe2e..bda4ed7 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-24 Christian Groessler <cpg@aladdin.de>
+
+ * z8k-dis.c (unparse_intstr): Fixed formatting. Change
+ disassembly of indirect register memory accesses to be same
+ format the assembler accepts.
+
2001-10-09 Nick Clifton <nickc@cambridge.redhat.com>
* sh-opc.h: Fix encoding of least significant nibble of the
diff --git a/opcodes/z8k-dis.c b/opcodes/z8k-dis.c
index dcba775..091d937 100644
--- a/opcodes/z8k-dis.c
+++ b/opcodes/z8k-dis.c
@@ -540,7 +540,10 @@ unparse_instr (instr_data, is_segmented)
strcat (out_str, tmp_str);
break;
case CLASS_IR:
- sprintf (tmp_str, "@R%ld", instr_data->arg_reg[datum_value]);
+ if (is_segmented)
+ sprintf (tmp_str, "@rr%ld", instr_data->arg_reg[datum_value]);
+ else
+ sprintf (tmp_str, "@r%ld", instr_data->arg_reg[datum_value]);
strcat (out_str, tmp_str);
break;
case CLASS_FLAGS:
@@ -549,14 +552,10 @@ unparse_instr (instr_data, is_segmented)
break;
case CLASS_REG_BYTE:
if (instr_data->arg_reg[datum_value] >= 0x8)
- {
- sprintf (tmp_str, "rl%ld",
- instr_data->arg_reg[datum_value] - 0x8);
- }
+ sprintf (tmp_str, "rl%ld",
+ instr_data->arg_reg[datum_value] - 0x8);
else
- {
- sprintf (tmp_str, "rh%ld", instr_data->arg_reg[datum_value]);
- }
+ sprintf (tmp_str, "rh%ld", instr_data->arg_reg[datum_value]);
strcat (out_str, tmp_str);
break;
case CLASS_REG_WORD: