diff options
author | Christian Groessler <chris@groessler.org> | 2003-06-19 13:46:37 +0000 |
---|---|---|
committer | Christian Groessler <chris@groessler.org> | 2003-06-19 13:46:37 +0000 |
commit | 6ddfd88c7291a6dade160a8ff67d94b462ba5534 (patch) | |
tree | 4575f1e9720fe98a63a9ef2d046e8fbd08ecbcb9 /opcodes/z8k-dis.c | |
parent | f590b86e1ef869e4c85f17e86fdae5e1e10b2613 (diff) | |
download | gdb-6ddfd88c7291a6dade160a8ff67d94b462ba5534.zip gdb-6ddfd88c7291a6dade160a8ff67d94b462ba5534.tar.gz gdb-6ddfd88c7291a6dade160a8ff67d94b462ba5534.tar.bz2 |
* z8k-dis.c (instr_data_s): Change tabl_index from long to int.
(print_insn_z8k): Correctly check return value from
z8k_lookup_instr call.
(unparse_instr): Handle CLASS_IRO case.
* z8kgen.c: Fix function definitions. Fix formatting.
(opt): Add brk opcode alias for non-simulator breakpoint. Add
missing and fix existing in/out and sin/sout opcode definitions.
(args): "@ri", "@ro" - add CLASS_IRO register usage for in/out
opcodes.
(internal): Check p->flags for non-zero before dereferencing it.
(gas): Add CLASS_IRO line. Insert new OPC_xxx lines for the added
opcodes and renumber the remaining lines repectively.
(main): Remove "-d" command line switch.
* z8k-opc.h: Regenerate with new z8kgen.c.
Diffstat (limited to 'opcodes/z8k-dis.c')
-rw-r--r-- | opcodes/z8k-dis.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/opcodes/z8k-dis.c b/opcodes/z8k-dis.c index 69d1792..5d15ee8 100644 --- a/opcodes/z8k-dis.c +++ b/opcodes/z8k-dis.c @@ -1,5 +1,5 @@ /* Disassemble z8000 code. - Copyright 1992, 1993, 1998, 2000, 2001, 2002 + Copyright 1992, 1993, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -40,7 +40,7 @@ typedef struct bfd_vma insn_start; jmp_buf bailout; - long tabl_index; + int tabl_index; char instr_asmsrc[80]; unsigned long arg_reg[0x0f]; unsigned long immediate; @@ -169,7 +169,7 @@ print_insn_z8k (addr, info, is_segmented) info->display_endian = BFD_ENDIAN_BIG; instr_data.tabl_index = z8k_lookup_instr (instr_data.nibbles, info); - if (instr_data.tabl_index > 0) + if (instr_data.tabl_index >= 0) { unpack_instr (&instr_data, is_segmented, info); unparse_instr (&instr_data, is_segmented); @@ -581,6 +581,10 @@ unparse_instr (instr_data, is_segmented) sprintf (tmp_str, "@r%ld", instr_data->arg_reg[datum_value]); strcat (out_str, tmp_str); break; + case CLASS_IRO: + sprintf (tmp_str, "@r%ld", instr_data->arg_reg[datum_value]); + strcat (out_str, tmp_str); + break; case CLASS_FLAGS: sprintf (tmp_str, "0x%0lx", instr_data->flags); strcat (out_str, tmp_str); |