aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-06-06 17:01:35 +0000
committerNick Clifton <nickc@redhat.com>2001-06-06 17:01:35 +0000
commit879db8be1ae5db44e4c72d7126a11154c65d8427 (patch)
treebbccc13f5ad5316c84a3d92564e937268d8f18c0 /opcodes
parent8849f47dd926d34632dc6b2a16e99114f36ffa2a (diff)
downloadgdb-879db8be1ae5db44e4c72d7126a11154c65d8427.zip
gdb-879db8be1ae5db44e4c72d7126a11154c65d8427.tar.gz
gdb-879db8be1ae5db44e4c72d7126a11154c65d8427.tar.bz2
Remove warnings building z8k port.
Fix ld -r behaviour
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog7
-rw-r--r--opcodes/z8k-dis.c37
2 files changed, 10 insertions, 34 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index cb09a71..2e7e09e 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,10 @@
+2001-06-06 Christian Groessler <cpg@aladdin.de>
+
+ * z8k-dis.c: Fix formatting.
+ (unpack_instr): Remove unused cases in switch statement. Add
+ safety abort() in default case.
+ (unparse_instr): Add safety abort() in default case.
+
2001-06-06 Peter Jakubek <pjak@snafu.de>
* opcodes/m68k-dis.c (print_insn_m68k): Fix typo.
diff --git a/opcodes/z8k-dis.c b/opcodes/z8k-dis.c
index 77c2495..99e2578 100644
--- a/opcodes/z8k-dis.c
+++ b/opcodes/z8k-dis.c
@@ -142,7 +142,7 @@ int z8k_lookup_instr PARAMS ((unsigned char *, disassemble_info *));
static void output_instr
PARAMS ((instr_data_s *, unsigned long, disassemble_info *));
static void unpack_instr PARAMS ((instr_data_s *, int, disassemble_info *));
-static void unparse_instr PARAMS ((instr_data_s *,int));
+static void unparse_instr PARAMS ((instr_data_s *, int));
static int
print_insn_z8k (addr, info, is_segmented)
@@ -334,15 +334,6 @@ unpack_instr (instr_data, is_segmented, info)
switch (datum_class)
{
- case CLASS_X:
- instr_data->address = instr_nibl;
- break;
- case CLASS_BA:
- instr_data->displacement = instr_nibl;
- break;
- case CLASS_BX:
- instr_data->arg_reg[datum_value] = instr_nibl;
- break;
case CLASS_DISP:
switch (datum_value)
{
@@ -412,12 +403,6 @@ unpack_instr (instr_data, is_segmented, info)
case CLASS_CC:
instr_data->cond_code = instr_nibl;
break;
-#if 0
- case CLASS_CTRL:
- instr_data->ctrl_code = instr_nibl;
- break;
-#endif
- case CLASS_DA:
case CLASS_ADDRESS:
if (is_segmented)
{
@@ -465,38 +450,21 @@ unpack_instr (instr_data, is_segmented, info)
case CLASS_BIT:
instr_data->ctrl_code = instr_nibl & 0x7;
break;
- case CLASS_IR:
- instr_data->arg_reg[datum_value] = instr_nibl;
- break;
case CLASS_FLAGS:
instr_data->flags = instr_nibl;
break;
case CLASS_REG:
instr_data->arg_reg[datum_value] = instr_nibl;
break;
- case CLASS_REG_BYTE:
- instr_data->arg_reg[datum_value] = instr_nibl;
- break;
- case CLASS_REG_WORD:
- instr_data->arg_reg[datum_value] = instr_nibl;
- break;
- case CLASS_REG_QUAD:
- instr_data->arg_reg[datum_value] = instr_nibl;
- break;
- case CLASS_REG_LONG:
- instr_data->arg_reg[datum_value] = instr_nibl;
- break;
case CLASS_REGN0:
instr_data->arg_reg[datum_value] = instr_nibl;
break;
- case CLASS_PR:
- instr_data->arg_reg[datum_value] = instr_nibl;
- break;
case CLASS_DISP8:
instr_data->displacement = instr_data->insn_start + 2 + (signed char)instr_byte * 2;
nibl_count += 1;
break;
default:
+ abort ();
break;
}
@@ -605,6 +573,7 @@ unparse_instr (instr_data,is_segmented)
strcat (out_str, tmp_str);
break;
default:
+ abort ();
break;
}
}