From: Nick Clifton Date: Tue, 9 Oct 2001 17:25:58 +0000 (+0000) Subject: fix z8k assembly and disassembly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a5d2034ac06088a4c378d015b838e9eee1908fe1;p=binutils-gdb.git fix z8k assembly and disassembly --- diff --git a/gas/ChangeLog b/gas/ChangeLog index fea3a09437b..72217a0107d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2001-10-09 Christian Groessler + + * config/tc-z8k.c: Include opcodes/z8k-opc.h after bfd.h + since z8k-opc.h now uses the PARAMS macro. + 2001-10-09 Aldy Hernandez * config/tc-arm.c: Change MAVERIK to MAVERICK. diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c index 924ce9c119f..bf83b271956 100644 --- a/gas/config/tc-z8k.c +++ b/gas/config/tc-z8k.c @@ -24,11 +24,10 @@ #define DEFINE_TABLE #include -#include "opcodes/z8k-opc.h" - #include "as.h" #include "bfd.h" #include "safe-ctype.h" +#include "opcodes/z8k-opc.h" const char comment_chars[] = "!"; const char line_comment_chars[] = "#"; diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index d4bbe2e1c4b..bda4ed70e41 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2001-09-24 Christian Groessler + + * 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 * sh-opc.h: Fix encoding of least significant nibble of the diff --git a/opcodes/z8k-dis.c b/opcodes/z8k-dis.c index dcba775c270..091d9379ddd 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: