summaryrefslogtreecommitdiff
path: root/opcodes/z8k-dis.c
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
commit11f109bc802ea53f9b7aedcddba783006c85eeaa (patch)
treeb61876acce7e3877b3907459a575d9eacdf69e95 /opcodes/z8k-dis.c
parentbcba8c112329c7a769e82eeb13bbef63808e5202 (diff)
downloadbinutils-redhat-11f109bc802ea53f9b7aedcddba783006c85eeaa.tar.gz
fix z8k assembly and disassembly
Diffstat (limited to 'opcodes/z8k-dis.c')
-rw-r--r--opcodes/z8k-dis.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/opcodes/z8k-dis.c b/opcodes/z8k-dis.c
index dcba775c27..091d9379dd 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: