a crash of the assembler with some malformed source input.
Long segmented addresses are now correctly relocated.
Finally it updates my email address in the MAINTAINERS file.
+2002-04-24 Christian Groessler <chris@groessler.org>
+
+ * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
+ addresses are 23bit with a special layout, not plain 32bit
+ values. Prevent relocation of immediate values.
+
2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
* elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
break;
case R_IMM32:
- bfd_put_32 (in_abfd,
- /* 0x80000000 indicates a long segmented address. */
- bfd_coff_reloc16_get_value (reloc, link_info, input_section) | 0x80000000,
- data + *dst_ptr);
+ /* If no flags are set, assume immediate value. */
+ if (! (*reloc->sym_ptr_ptr)->section->flags)
+ {
+ bfd_put_32 (in_abfd,
+ bfd_coff_reloc16_get_value (reloc, link_info,
+ input_section),
+ data + *dst_ptr);
+ }
+ else
+ {
+ bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
+ input_section);
+ /* Adresses are 23 bit, and the layout of those in a 32-bit
+ value is as follows:
+ 1AAAAAAA xxxxxxxx AAAAAAAA AAAAAAAA
+ (A - address bits, x - ignore). */
+ dst = (dst & 0xffff) | ((dst & 0xff0000) << 8) | 0x80000000;
+ bfd_put_32 (in_abfd, dst, data + *dst_ptr);
+ }
(*dst_ptr) += 4;
(*src_ptr) += 4;
break;
+2002-04-24 Christian Groessler <chris@groessler.org>
+
+ * MAINTAINERS: Changed my email address.
+
2002-04-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* arparse.y: Fix syntax warning.
SH Alexandre Oliva <aoliva@redhat.com>
SPARC Jakub Jelinek <jakub@redhat.com>
TIC54X Timothy Wall <twall@alum.mit.edu>
- z8k Christian Groessler <cpg@aladdin.de>
+ z8k Christian Groessler <chris@groessler.org>
+
--------- CGEN Maintainers -------------
+2002-04-24 Christian Groessler <chris@groessler.org>
+
+ * config/tc-z8k.c (build_bytes): Add support for new cases:
+ CLASS_IGNORE and ARG_NIM4.
+ (md_assemble): Prevent destruction of input_line_pointer if
+ get_operands returns failure.
+
2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
* config/tc-mips.c (macro_build): Do _not_ allow MIPS-3D
/* tc-z8k.c -- Assemble code for the Zilog Z800n
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
case CLASS_FLAGS:
*output_ptr++ = the_flags;
break;
+ case CLASS_IGNORE:
case CLASS_BIT:
*output_ptr++ = c & 0xf;
break;
nib = 0;
switch (c & ARG_MASK)
{
+ case ARG_NIM4:
+ imm_operand->X_add_number = -imm_operand->X_add_number;
+ /* Drop through. */
case ARG_IMM4:
output_ptr = apply_fix (output_ptr, R_IMM4L, imm_operand, 1);
break;
if (opcode->opcode == 250)
{
- /* Was really a pseudo op. */
-
pseudo_typeS *p;
char oc;
-
char *old = input_line_pointer;
*op_end = c;
+ /* Was really a pseudo op. */
+
input_line_pointer = op_end;
oc = *old;
}
else
{
- input_line_pointer = get_operands (opcode, op_end, operand);
+ char *new_input_line_pointer;
+
+ new_input_line_pointer = get_operands (opcode, op_end, operand);
+ if (new_input_line_pointer)
+ input_line_pointer = new_input_line_pointer;
prev_opcode = opcode;
opcode = get_specific (opcode, operand);
\f
CONST char *md_shortopts = "z:";
-struct option md_longopts[] = {
- {NULL, no_argument, NULL, 0}
-};
+struct option md_longopts[] =
+ {
+ {NULL, no_argument, NULL, 0}
+ };
size_t md_longopts_size = sizeof (md_longopts);
{
return ((size + (1 << section_alignment[(int) seg]) - 1)
& (-1 << section_alignment[(int) seg]));
-
}
void
+2002-04-24 Christian Groessler <chris@groessler.org>
+
+ * z8k-dis.c (print_insn_z8k): Set disassemble_info to 2
+ bytes_per_chunk, 6 bytes_per_line for nicer display of the hex
+ codes.
+ (z8k_lookup_instr): CLASS_IGNORE case added.
+ (output_instr): Don't print hex codes, they are already
+ printed.
+ (unpack_instr): ARG_NIM4 case added. ARG_NIM8 case
+ fixed. Support CLASS_BIT_1OR2 and CLASS_IGNORE cases.
+ (unparse_instr): Fix base and indexed addressing disassembly:
+ The index is inside the brackets.
+ * z8kgen.c (gas): Add ARG_NIM4 and CLASS_IGNORE defines.
+ (opt): Fix shift left/right arithmetic/logical byte defines:
+ The high byte of the immediate word is ignored by the
+ processor.
+ Fix n parameter of ldm opcodes: The opcode contains (n-1).
+ (args): Fix "n" entry.
+ (toks): Add "nim4" and "iiii" entries.
+ * z8k-opc.h: Regenerated with new z8kgen.c.
+
2002-04-24 Nick Clifton <nickc@cambridge.redhat.com>
* po/id.po: New Indonesian translation.
/* Disassemble z8000 code.
- Copyright 1992, 1993, 1998, 2000, 2001
+ Copyright 1992, 1993, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
-This file is part of GNU Binutils.
+ This file is part of GNU Binutils.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
#include "sysdep.h"
#include "dis-asm.h"
\f
#include <setjmp.h>
\f
-typedef struct {
+typedef struct
+{
/* These are all indexed by nibble number (i.e only every other entry
of bytes is used, and every 4th entry of words). */
unsigned char nibbles[24];
unsigned long ctrl_code;
unsigned long flags;
unsigned long interrupts;
-} instr_data_s;
+}
+instr_data_s;
static int fetch_data PARAMS ((struct disassemble_info *, int));
return 1;
}
-static char *codes[16] = {
- "f",
- "lt",
- "le",
- "ule",
- "ov/pe",
- "mi",
- "eq",
- "c/ult",
- "t",
- "ge",
- "gt",
- "ugt",
- "nov/po",
- "pl",
- "ne",
- "nc/uge"
-};
-
-static char *ctrl_names[8] = {
- "<invld>",
- "flags",
- "fcw",
- "refresh",
- "psapseg",
- "psapoff",
- "nspseg",
- "nspoff"
-};
+static char *codes[16] =
+ {
+ "f",
+ "lt",
+ "le",
+ "ule",
+ "ov/pe",
+ "mi",
+ "eq",
+ "c/ult",
+ "t",
+ "ge",
+ "gt",
+ "ugt",
+ "nov/po",
+ "pl",
+ "ne",
+ "nc/uge"
+ };
+
+static char *ctrl_names[8] =
+ {
+ "<invld>",
+ "flags",
+ "fcw",
+ "refresh",
+ "psapseg",
+ "psapoff",
+ "nspseg",
+ "nspoff"
+ };
static int seg_length;
static int print_insn_z8k PARAMS ((bfd_vma, disassemble_info *, int));
/* Error return. */
return -1;
+ info->bytes_per_chunk = 2;
+ info->bytes_per_line = 6;
+ info->display_endian = BFD_ENDIAN_BIG;
+
instr_data.tabl_index = z8k_lookup_instr (instr_data.nibbles, info);
if (instr_data.tabl_index > 0)
{
if (datum_value != instr_nibl)
nibl_matched = 0;
break;
+ case CLASS_IGNORE:
+ break;
case CLASS_00II:
if (!((~instr_nibl) & 0x4))
nibl_matched = 0;
break;
}
}
+
if (nibl_matched)
- {
- return tabl_index;
- }
+ return tabl_index;
tabl_index++;
}
unsigned long addr ATTRIBUTE_UNUSED;
disassemble_info *info;
{
- int loop, loop_limit;
- char tmp_str[20];
+ int num_bytes;
char out_str[100];
- strcpy (out_str, "\t");
-
- loop_limit = (z8k_table[instr_data->tabl_index].length + seg_length) * 2;
- FETCH_DATA (info, loop_limit);
- for (loop = 0; loop < loop_limit; loop++)
- {
- sprintf (tmp_str, "%x", instr_data->nibbles[loop]);
- strcat (out_str, tmp_str);
- }
+ out_str[0] = 0;
- while (loop++ < 8)
- {
- strcat (out_str, " ");
- }
+ num_bytes = (z8k_table[instr_data->tabl_index].length + seg_length) * 2;
+ FETCH_DATA (info, num_bytes);
strcat (out_str, instr_data->instr_asmsrc);
nibl_count = 0;
loop = 0;
seg_length = 0;
+
while (z8k_table[instr_data->tabl_index].byte_info[loop] != 0)
{
FETCH_DATA (info, nibl_count + 4 - (nibl_count % 4));
break;
case ARG_DISP12:
if (instr_word & 0x800)
- {
- /* neg. 12 bit displacement */
- instr_data->displacement = instr_data->insn_start + 2
- - (signed short) ((instr_word & 0xfff) | 0xf000) * 2;
- }
+ /* Negative 12 bit displacement. */
+ instr_data->displacement = instr_data->insn_start + 2
+ - (signed short) ((instr_word & 0xfff) | 0xf000) * 2;
else
- {
- instr_data->displacement = instr_data->insn_start + 2
- - (instr_word & 0x0fff) * 2;
- }
+ instr_data->displacement = instr_data->insn_start + 2
+ - (instr_word & 0x0fff) * 2;
+
nibl_count += 2;
break;
default:
case ARG_IMM4:
instr_data->immediate = instr_nibl;
break;
+ case ARG_NIM4:
+ instr_data->immediate = (- instr_nibl) & 0xf;
+ break;
case ARG_NIM8:
- instr_data->immediate = (-instr_byte);
+ instr_data->immediate = (- instr_byte) & 0xff;
nibl_count += 1;
break;
case ARG_IMM8:
case CLASS_00II:
instr_data->interrupts = instr_nibl & 0x3;
break;
+ case CLASS_IGNORE:
case CLASS_BIT:
instr_data->ctrl_code = instr_nibl & 0x7;
break;
instr_data->insn_start + 2 + (signed char) instr_byte * 2;
nibl_count += 1;
break;
+ case CLASS_BIT_1OR2:
+ instr_data->immediate = ((instr_nibl >> 1) & 0x1) + 1;
+ nibl_count += 1;
+ break;
default:
abort ();
break;
int loop, loop_limit;
char out_str[80], tmp_str[25];
- sprintf (out_str, "\t%s\t", z8k_table[instr_data->tabl_index].name);
+ sprintf (out_str, "%s\t", z8k_table[instr_data->tabl_index].name);
loop_limit = z8k_table[instr_data->tabl_index].noperands;
for (loop = 0; loop < loop_limit; loop++)
switch (datum_class)
{
case CLASS_X:
- sprintf (tmp_str, "0x%0lx(R%ld)", instr_data->address,
- instr_data->arg_reg[datum_value]);
+ sprintf (tmp_str, "0x%0lx(r%ld)", instr_data->address,
+ instr_data->arg_reg[datum_value]);
strcat (out_str, tmp_str);
break;
case CLASS_BA:
- sprintf (tmp_str, "r%ld(#%lx)", instr_data->arg_reg[datum_value],
- instr_data->immediate);
+ if (is_segmented)
+ sprintf (tmp_str, "rr%ld(#%lx)", instr_data->arg_reg[datum_value],
+ instr_data->immediate);
+ else
+ sprintf (tmp_str, "r%ld(#%lx)", instr_data->arg_reg[datum_value],
+ instr_data->immediate);
strcat (out_str, tmp_str);
break;
case CLASS_BX:
- sprintf (tmp_str, "r%ld(R%ld)", instr_data->arg_reg[datum_value],
- instr_data->arg_reg[ARG_RX]);
+ if (is_segmented)
+ sprintf (tmp_str, "rr%ld(r%ld)", instr_data->arg_reg[datum_value],
+ instr_data->arg_reg[ARG_RX]);
+ else
+ sprintf (tmp_str, "r%ld(r%ld)", instr_data->arg_reg[datum_value],
+ instr_data->arg_reg[ARG_RX]);
strcat (out_str, tmp_str);
break;
case CLASS_DISP:
#define ARG_IMM2 0x0a
#define ARG_IMM1OR2 0x0b
#define ARG_DISP12 0x0b
+#define ARG_NIM4 0x0c
#define ARG_DISP8 0x0c
#define ARG_IMM4M1 0x0d
#define CLASS_MASK 0x1fff0
#define CLASS_IMM 0x60
#define CLASS_CC 0x70
#define CLASS_CTRL 0x80
+#define CLASS_IGNORE 0x90
#define CLASS_ADDRESS 0xd0
#define CLASS_0CCC 0xe0
#define CLASS_1CCC 0xf0
{CLASS_BIT+7,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,215},
-/* 0001 1100 ddN0 1001 0000 ssss 0000 nminus1 *** ldm @rd,rs,n */
+/* 0001 1100 ddN0 1001 0000 ssss 0000 imm4m1 *** ldm @rd,rs,n */
{
#ifdef NICENAMES
"ldm @rd,rs,n",16,11,
0x00,
#endif
-"ldm",OPC_ldm,0,{CLASS_IR+(ARG_RD),CLASS_REG_WORD+(ARG_RS),CLASS_IMM + (ARG_IMMN),},
- {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMMNMINUS1),0,},3,4,216},
+"ldm",OPC_ldm,0,{CLASS_IR+(ARG_RD),CLASS_REG_WORD+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
+ {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),0,},3,4,216},
-/* 0101 1100 ddN0 1001 0000 ssss 0000 nminus1 address_dst *** ldm address_dst(rd),rs,n */
+/* 0101 1100 ddN0 1001 0000 ssss 0000 imm4m1 address_dst *** ldm address_dst(rd),rs,n */
{
#ifdef NICENAMES
"ldm address_dst(rd),rs,n",16,15,
0x00,
#endif
-"ldm",OPC_ldm,0,{CLASS_X+(ARG_RD),CLASS_REG_WORD+(ARG_RS),CLASS_IMM + (ARG_IMMN),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMMNMINUS1),CLASS_ADDRESS+(ARG_DST),},3,6,217},
+"ldm",OPC_ldm,0,{CLASS_X+(ARG_RD),CLASS_REG_WORD+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),},3,6,217},
-/* 0101 1100 0000 1001 0000 ssss 0000 nminus1 address_dst *** ldm address_dst,rs,n */
+/* 0101 1100 0000 1001 0000 ssss 0000 imm4m1 address_dst *** ldm address_dst,rs,n */
{
#ifdef NICENAMES
"ldm address_dst,rs,n",16,14,
0x00,
#endif
-"ldm",OPC_ldm,0,{CLASS_DA+(ARG_DST),CLASS_REG_WORD+(ARG_RS),CLASS_IMM + (ARG_IMMN),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMMNMINUS1),CLASS_ADDRESS+(ARG_DST),},3,6,218},
+"ldm",OPC_ldm,0,{CLASS_DA+(ARG_DST),CLASS_REG_WORD+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),},3,6,218},
-/* 0001 1100 ssN0 0001 0000 dddd 0000 nminus1 *** ldm rd,@rs,n */
+/* 0001 1100 ssN0 0001 0000 dddd 0000 imm4m1 *** ldm rd,@rs,n */
{
#ifdef NICENAMES
"ldm rd,@rs,n",16,11,
0x00,
#endif
-"ldm",OPC_ldm,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_IMM + (ARG_IMMN),},
- {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMMNMINUS1),0,},3,4,219},
+"ldm",OPC_ldm,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
+ {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),0,},3,4,219},
-/* 0101 1100 ssN0 0001 0000 dddd 0000 nminus1 address_src *** ldm rd,address_src(rs),n */
+/* 0101 1100 ssN0 0001 0000 dddd 0000 imm4m1 address_src *** ldm rd,address_src(rs),n */
{
#ifdef NICENAMES
"ldm rd,address_src(rs),n",16,15,
0x00,
#endif
-"ldm",OPC_ldm,0,{CLASS_REG_WORD+(ARG_RD),CLASS_X+(ARG_RS),CLASS_IMM + (ARG_IMMN),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMMNMINUS1),CLASS_ADDRESS+(ARG_SRC),},3,6,220},
+"ldm",OPC_ldm,0,{CLASS_REG_WORD+(ARG_RD),CLASS_X+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_SRC),},3,6,220},
-/* 0101 1100 0000 0001 0000 dddd 0000 nminus1 address_src *** ldm rd,address_src,n */
+/* 0101 1100 0000 0001 0000 dddd 0000 imm4m1 address_src *** ldm rd,address_src,n */
{
#ifdef NICENAMES
"ldm rd,address_src,n",16,14,
0x00,
#endif
-"ldm",OPC_ldm,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DA+(ARG_SRC),CLASS_IMM + (ARG_IMMN),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMMNMINUS1),CLASS_ADDRESS+(ARG_SRC),},3,6,221},
+"ldm",OPC_ldm,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DA+(ARG_SRC),CLASS_IMM + (ARG_IMM4M1),},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_SRC),},3,6,221},
/* 0011 1001 ssN0 0000 *** ldps @rs */
{CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,346},
-/* 1011 0010 dddd 1001 0000 0000 imm8 *** slab rbd,imm8 */
+/* 1011 0010 dddd 1001 iiii iiii 0000 imm4 *** slab rbd,imm4 */
{
#ifdef NICENAMES
-"slab rbd,imm8",8,13,
+"slab rbd,imm4",8,13,
0x3c,
#endif
-"slab",OPC_slab,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,347},
+"slab",OPC_slab,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),0,},2,4,347},
/* 1011 0011 dddd 1101 0000 0000 imm8 *** slal rrd,imm8 */
{CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,349},
-/* 1011 0010 dddd 0001 0000 0000 imm8 *** sllb rbd,imm8 */
+/* 1011 0010 dddd 0001 iiii iiii 0000 imm4 *** sllb rbd,imm4 */
{
#ifdef NICENAMES
-"sllb rbd,imm8",8,13,
+"sllb rbd,imm4",8,13,
0x38,
#endif
-"sllb",OPC_sllb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,350},
+"sllb",OPC_sllb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),0,},2,4,350},
/* 1011 0011 dddd 0101 0000 0000 imm8 *** slll rrd,imm8 */
{CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,358},
-/* 1011 0010 dddd 1001 0000 0000 nim8 *** srab rbd,imm8 */
+/* 1011 0010 dddd 1001 iiii iiii 1111 nim4 *** srab rbd,imm4 */
{
#ifdef NICENAMES
-"srab rbd,imm8",8,13,
+"srab rbd,imm4",8,13,
0x3c,
#endif
-"srab",OPC_srab,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_NIM8),0,0,},2,4,359},
+"srab",OPC_srab,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM4),0,},2,4,359},
/* 1011 0011 dddd 1101 1111 1111 nim8 *** sral rrd,imm8 */
{CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,361},
-/* 1011 0010 dddd 0001 0000 0000 nim8 *** srlb rbd,imm8 */
+/* 1011 0010 dddd 0001 iiii iiii 1111 nim4 *** srlb rbd,imm4 */
{
#ifdef NICENAMES
-"srlb rbd,imm8",8,13,
+"srlb rbd,imm4",8,13,
0x3c,
#endif
-"srlb",OPC_srlb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_NIM8),0,0,},2,4,362},
+"srlb",OPC_srlb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM4),0,},2,4,362},
/* 1011 0011 dddd 0101 1111 1111 nim8 *** srll rrd,imm8 */
-/*
- Copyright 2001 Free Software Foundation, Inc.
+/* Copyright 2001, 2002 Free Software Foundation, Inc.
- This file is part of GNU Binutils.
+ This file is part of GNU Binutils.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
-/* This program generates z8k-opc.h */
+/* This program generates z8k-opc.h. */
#include <stdio.h>
#include "sysdep.h"
"------", 5, 16, "1011 1101 dddd imm4", "ldk rd,imm4", 0,
- "------", 11, 16, "0001 1100 ddN0 1001 0000 ssss 0000 nminus1", "ldm @rd,rs,n", 0,
- "------", 15, 16, "0101 1100 ddN0 1001 0000 ssss 0000 nminus1 address_dst", "ldm address_dst(rd),rs,n", 0,
- "------", 14, 16, "0101 1100 0000 1001 0000 ssss 0000 nminus1 address_dst", "ldm address_dst,rs,n", 0,
- "------", 11, 16, "0001 1100 ssN0 0001 0000 dddd 0000 nminus1", "ldm rd,@rs,n", 0,
- "------", 15, 16, "0101 1100 ssN0 0001 0000 dddd 0000 nminus1 address_src", "ldm rd,address_src(rs),n", 0,
- "------", 14, 16, "0101 1100 0000 0001 0000 dddd 0000 nminus1 address_src", "ldm rd,address_src,n", 0,
+ "------", 11, 16, "0001 1100 ddN0 1001 0000 ssss 0000 imm4m1", "ldm @rd,rs,n", 0,
+ "------", 15, 16, "0101 1100 ddN0 1001 0000 ssss 0000 imm4m1 address_dst", "ldm address_dst(rd),rs,n", 0,
+ "------", 14, 16, "0101 1100 0000 1001 0000 ssss 0000 imm4m1 address_dst", "ldm address_dst,rs,n", 0,
+ "------", 11, 16, "0001 1100 ssN0 0001 0000 dddd 0000 imm4m1", "ldm rd,@rs,n", 0,
+ "------", 15, 16, "0101 1100 ssN0 0001 0000 dddd 0000 imm4m1 address_src", "ldm rd,address_src(rs),n", 0,
+ "------", 14, 16, "0101 1100 0000 0001 0000 dddd 0000 imm4m1 address_src", "ldm rd,address_src,n", 0,
"CZSVDH", 12, 16, "0011 1001 ssN0 0000", "ldps @rs", 0,
"CZSVDH", 16, 16, "0111 1001 0000 0000 address_src", "ldps address_src", 0,
"------", 0, 16, "0011 1010 ssN0 0001 0000 aaaa ddN0 0000", "sinibr @rd,@rs,ra", 0,
"CZSV--", 13, 16, "1011 0011 dddd 1001 0000 0000 imm8", "sla rd,imm8", 0,
- "CZSV--", 13, 8, "1011 0010 dddd 1001 0000 0000 imm8", "slab rbd,imm8", 0,
+ "CZSV--", 13, 8, "1011 0010 dddd 1001 iiii iiii 0000 imm4", "slab rbd,imm4", 0,
"CZSV--", 13, 32, "1011 0011 dddd 1101 0000 0000 imm8", "slal rrd,imm8", 0,
"CZS---", 13, 16, "1011 0011 dddd 0001 0000 0000 imm8", "sll rd,imm8", 0,
- "CZS---", 13, 8, "1011 0010 dddd 0001 0000 0000 imm8", "sllb rbd,imm8", 0,
+ "CZS---", 13, 8, "1011 0010 dddd 0001 iiii iiii 0000 imm4", "sllb rbd,imm4", 0,
"CZS---", 13, 32, "1011 0011 dddd 0101 0000 0000 imm8", "slll rrd,imm8", 0,
"------", 0, 16, "0011 1011 ssss 0111 imm16", "sout imm16,rs", 0,
"------", 0, 16, "0011 1010 ssN0 0011 0000 aaaa ddN0 0000", "soutibr @rd,@rs,ra", 0,
"CZSV--", 13, 16, "1011 0011 dddd 1001 1111 1111 nim8", "sra rd,imm8", 0,
- "CZSV--", 13, 8, "1011 0010 dddd 1001 0000 0000 nim8", "srab rbd,imm8", 0,
+ "CZSV--", 13, 8, "1011 0010 dddd 1001 iiii iiii 1111 nim4", "srab rbd,imm4", 0,
"CZSV--", 13, 32, "1011 0011 dddd 1101 1111 1111 nim8", "sral rrd,imm8", 0,
"CZSV--", 13, 16, "1011 0011 dddd 0001 1111 1111 nim8", "srl rd,imm8", 0,
- "CZSV--", 13, 8, "1011 0010 dddd 0001 0000 0000 nim8", "srlb rbd,imm8", 0,
+ "CZSV--", 13, 8, "1011 0010 dddd 0001 iiii iiii 1111 nim4", "srlb rbd,imm4", 0,
"CZSV--", 13, 32, "1011 0011 dddd 0101 1111 1111 nim8", "srll rrd,imm8", 0,
"CZSV--", 7, 16, "0000 0011 ssN0 dddd", "sub rd,@rs", 0,
{"imm32", "CLASS_IMM+(ARG_IMM32)",},
{"imm4m1", "CLASS_IMM +(ARG_IMM4M1)",},
{"imm4", "CLASS_IMM +(ARG_IMM4)",},
- {"n", "CLASS_IMM + (ARG_IMMN)",},
+ {"n", "CLASS_IMM + (ARG_IMM4M1)",},
{"ctrl", "CLASS_CTRL",},
{"rba", "CLASS_REG_BYTE+(ARG_RA)",},
{"rbb", "CLASS_REG_BYTE+(ARG_RB)",},
"imm8", "CLASS_IMM+(ARG_IMM8)", 2,
"imm16", "CLASS_IMM+(ARG_IMM16)", 4,
"imm32", "CLASS_IMM+(ARG_IMM32)", 8,
+ "nim4", "CLASS_IMM+(ARG_NIM4)", 2,
"nim8", "CLASS_IMM+(ARG_NIM8)", 2,
"0ccc", "CLASS_0CCC", 1,
"1ccc", "CLASS_1CCC", 1,
"1disp7", "CLASS_1DISP7", 2,
"01ii", "CLASS_01II", 1,
"00ii", "CLASS_00II", 1,
+
+ "iiii", "CLASS_IGNORE", 1,
0, 0
};
printf ("#define ARG_IMM1OR2 0x0b\n");
printf ("#define ARG_DISP12 0x0b\n");
+ printf ("#define ARG_NIM4 0x0c\n");
printf ("#define ARG_DISP8 0x0c\n");
printf ("#define ARG_IMM4M1 0x0d\n");
printf ("#define CLASS_MASK 0x1fff0\n");
printf ("#define CLASS_IMM 0x60\n");
printf ("#define CLASS_CC 0x70\n");
printf ("#define CLASS_CTRL 0x80\n");
+ printf ("#define CLASS_IGNORE 0x90\n");
printf ("#define CLASS_ADDRESS 0xd0\n");
printf ("#define CLASS_0CCC 0xe0\n");
printf ("#define CLASS_1CCC 0xf0\n");