aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorMatthew Green <mrg@redhat.com>2002-01-11 07:24:59 +0000
committerMatthew Green <mrg@redhat.com>2002-01-11 07:24:59 +0000
commit1951c6f7f83b8f9d1d59355bf0b46d334caf1132 (patch)
tree52e86873e4d6a74a0dd61e6352b8916831bac6f2 /opcodes
parent352ed7b4c28a32bfad7f189dd4c8bd0ec5f4fca2 (diff)
downloadgdb-1951c6f7f83b8f9d1d59355bf0b46d334caf1132.zip
gdb-1951c6f7f83b8f9d1d59355bf0b46d334caf1132.tar.gz
gdb-1951c6f7f83b8f9d1d59355bf0b46d334caf1132.tar.bz2
[cgen/ChangeLog]
* cpu/xstormy16.cpu (gr-Rbj-names): Rename this ... (gr-Rb-names): ... to this. (h-Rb): New hardware peice. (h-Rbj): Use gr-Rb-names. (Rb): Use h-Rb. (holdx): New instruction. [opcodes/ChangeLog] * xstormy16-asm.c: Regenerate. * xstormy16-desc.c: Likewise. * xstormy16-desc.h: Likewise. * xstormy16-dis.c: Likewise. * xstormy16-opc.c: Likewise. * xstormy16-opc.h: Likewise. [gas/testsuite/ChangeLog] * gas/xstormy16/allinsn.sh (movf, jmp, call, icall): Update. * gas/xstormy16/allinsn.d: Regenerate. * gas/xstormy16/allinsn.s: Regenerate. [sid/component/cgen-cpu/xstormy16/ChangeLog] * xstormy16.cxx (do_holdx): Define. * xstormy16.h (do_holdx): Declare.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog9
-rw-r--r--opcodes/xstormy16-asm.c4
-rw-r--r--opcodes/xstormy16-desc.c38
-rw-r--r--opcodes/xstormy16-desc.h21
-rw-r--r--opcodes/xstormy16-dis.c10
-rw-r--r--opcodes/xstormy16-ibld.c4
-rw-r--r--opcodes/xstormy16-opc.c8
-rw-r--r--opcodes/xstormy16-opc.h5
8 files changed, 68 insertions, 31 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 69da386..0fd1bdd 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,12 @@
+2002-01-10 matthew green <mrg@redhat.com>
+
+ * xstormy16-asm.c: Regenerate.
+ * xstormy16-desc.c: Likewise.
+ * xstormy16-desc.h: Likewise.
+ * xstormy16-dis.c: Likewise.
+ * xstormy16-opc.c: Likewise.
+ * xstormy16-opc.h: Likewise.
+
2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
* po/es.po: New file: Spanish translation.
diff --git a/opcodes/xstormy16-asm.c b/opcodes/xstormy16-asm.c
index 5cb3921..3f26b18 100644
--- a/opcodes/xstormy16-asm.c
+++ b/opcodes/xstormy16-asm.c
@@ -154,10 +154,10 @@ xstormy16_cgen_parse_operand (cd, opindex, strp, fields)
switch (opindex)
{
case XSTORMY16_OPERAND_RB :
- errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_names, & fields->f_Rb);
+ errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_Rb_names, & fields->f_Rb);
break;
case XSTORMY16_OPERAND_RBJ :
- errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_Rbj_names, & fields->f_Rbj);
+ errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_Rb_names, & fields->f_Rbj);
break;
case XSTORMY16_OPERAND_RD :
errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_names, & fields->f_Rd);
diff --git a/opcodes/xstormy16-desc.c b/opcodes/xstormy16-desc.c
index 5d22acd..6586779 100644
--- a/opcodes/xstormy16-desc.c
+++ b/opcodes/xstormy16-desc.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -152,16 +152,24 @@ CGEN_KEYWORD xstormy16_cgen_opval_gr_names =
0, 0, 0, 0, ""
};
-static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_gr_Rbj_names_entries[] =
+static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_gr_Rb_names_entries[] =
{
{ "r8", 0, {0, {0}}, 0, 0 },
- { "r9", 1, {0, {0}}, 0, 0 }
+ { "r9", 1, {0, {0}}, 0, 0 },
+ { "r10", 2, {0, {0}}, 0, 0 },
+ { "r11", 3, {0, {0}}, 0, 0 },
+ { "r12", 4, {0, {0}}, 0, 0 },
+ { "r13", 5, {0, {0}}, 0, 0 },
+ { "r14", 6, {0, {0}}, 0, 0 },
+ { "r15", 7, {0, {0}}, 0, 0 },
+ { "psw", 6, {0, {0}}, 0, 0 },
+ { "sp", 7, {0, {0}}, 0, 0 }
};
-CGEN_KEYWORD xstormy16_cgen_opval_gr_Rbj_names =
+CGEN_KEYWORD xstormy16_cgen_opval_gr_Rb_names =
{
- & xstormy16_cgen_opval_gr_Rbj_names_entries[0],
- 2,
+ & xstormy16_cgen_opval_gr_Rb_names_entries[0],
+ 10,
0, 0, 0, 0, ""
};
@@ -224,7 +232,8 @@ const CGEN_HW_ENTRY xstormy16_cgen_hw_table[] =
{ "h-iaddr", HW_H_IADDR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
{ "h-pc", HW_H_PC, CGEN_ASM_NONE, 0, { 0|A(PC), { (1<<MACH_BASE) } } },
{ "h-gr", HW_H_GR, CGEN_ASM_KEYWORD, (PTR) & xstormy16_cgen_opval_gr_names, { 0, { (1<<MACH_BASE) } } },
- { "h-Rbj", HW_H_RBJ, CGEN_ASM_KEYWORD, (PTR) & xstormy16_cgen_opval_gr_Rbj_names, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+ { "h-Rb", HW_H_RB, CGEN_ASM_KEYWORD, (PTR) & xstormy16_cgen_opval_gr_Rb_names, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+ { "h-Rbj", HW_H_RBJ, CGEN_ASM_KEYWORD, (PTR) & xstormy16_cgen_opval_gr_Rb_names, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
{ "h-Rpsw", HW_H_RPSW, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
{ "h-z8", HW_H_Z8, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
{ "h-z16", HW_H_Z16, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
@@ -345,7 +354,7 @@ const CGEN_OPERAND xstormy16_cgen_operand_table[] =
{ "Rs", XSTORMY16_OPERAND_RS, HW_H_GR, 8, 4,
{ 0, { (1<<MACH_BASE) } } },
/* Rb: base register */
- { "Rb", XSTORMY16_OPERAND_RB, HW_H_GR, 17, 3,
+ { "Rb", XSTORMY16_OPERAND_RB, HW_H_RB, 17, 3,
{ 0, { (1<<MACH_BASE) } } },
/* Rbj: base register for jump */
{ "Rbj", XSTORMY16_OPERAND_RBJ, HW_H_RBJ, 11, 1,
@@ -1051,6 +1060,11 @@ static const CGEN_IBASE xstormy16_cgen_insn_table[MAX_INSNS] =
XSTORMY16_INSN_HOLD, "hold", "hold", 16,
{ 0, { (1<<MACH_BASE) } }
},
+/* holdx */
+ {
+ XSTORMY16_INSN_HOLDX, "holdx", "holdx", 16,
+ { 0, { (1<<MACH_BASE) } }
+ },
/* brk */
{
XSTORMY16_INSN_BRK, "brk", "brk", 16,
@@ -1208,8 +1222,8 @@ xstormy16_cgen_rebuild_tables (cd)
{
const CGEN_ISA *isa = & xstormy16_cgen_isa_table[i];
- /* Default insn sizes of all selected isas must be
- equal or we set the result to 0, meaning "unknown". */
+ /* Default insn sizes of all selected isas must be equal or we set
+ the result to 0, meaning "unknown". */
if (cd->default_insn_bitsize == UNSET)
cd->default_insn_bitsize = isa->default_insn_bitsize;
else if (isa->default_insn_bitsize == cd->default_insn_bitsize)
@@ -1217,8 +1231,8 @@ xstormy16_cgen_rebuild_tables (cd)
else
cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN;
- /* Base insn sizes of all selected isas must be equal
- or we set the result to 0, meaning "unknown". */
+ /* Base insn sizes of all selected isas must be equal or we set
+ the result to 0, meaning "unknown". */
if (cd->base_insn_bitsize == UNSET)
cd->base_insn_bitsize = isa->base_insn_bitsize;
else if (isa->base_insn_bitsize == cd->base_insn_bitsize)
diff --git a/opcodes/xstormy16-desc.h b/opcodes/xstormy16-desc.h
index c00ca79..fe18a13 100644
--- a/opcodes/xstormy16-desc.h
+++ b/opcodes/xstormy16-desc.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -71,9 +71,11 @@ typedef enum gr_names {
} GR_NAMES;
/* Enum declaration for . */
-typedef enum gr_rbj_names {
- H_RBJ_R8, H_RBJ_R9
-} GR_RBJ_NAMES;
+typedef enum gr_rb_names {
+ H_RBJ_R8 = 0, H_RBJ_R9 = 1, H_RBJ_R10 = 2, H_RBJ_R11 = 3
+ , H_RBJ_R12 = 4, H_RBJ_R13 = 5, H_RBJ_R14 = 6, H_RBJ_R15 = 7
+ , H_RBJ_PSW = 6, H_RBJ_SP = 7
+} GR_RB_NAMES;
/* Enum declaration for insn op enums. */
typedef enum insn_op1 {
@@ -214,10 +216,10 @@ typedef enum cgen_hw_attr {
/* Enum declaration for xstormy16 hardware types. */
typedef enum cgen_hw_type {
HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR
- , HW_H_IADDR, HW_H_PC, HW_H_GR, HW_H_RBJ
- , HW_H_RPSW, HW_H_Z8, HW_H_Z16, HW_H_CY
- , HW_H_HC, HW_H_OV, HW_H_PT, HW_H_S
- , HW_H_BRANCHCOND, HW_H_WORDSIZE, HW_MAX
+ , HW_H_IADDR, HW_H_PC, HW_H_GR, HW_H_RB
+ , HW_H_RBJ, HW_H_RPSW, HW_H_Z8, HW_H_Z16
+ , HW_H_CY, HW_H_HC, HW_H_OV, HW_H_PT
+ , HW_H_S, HW_H_BRANCHCOND, HW_H_WORDSIZE, HW_MAX
} CGEN_HW_TYPE;
#define MAX_HW ((int) HW_MAX)
@@ -279,7 +281,8 @@ extern const CGEN_ATTR_TABLE xstormy16_cgen_insn_attr_table[];
/* Hardware decls. */
extern CGEN_KEYWORD xstormy16_cgen_opval_gr_names;
-extern CGEN_KEYWORD xstormy16_cgen_opval_gr_Rbj_names;
+extern CGEN_KEYWORD xstormy16_cgen_opval_gr_Rb_names;
+extern CGEN_KEYWORD xstormy16_cgen_opval_gr_Rb_names;
extern CGEN_KEYWORD xstormy16_cgen_opval_h_branchcond;
extern CGEN_KEYWORD xstormy16_cgen_opval_h_wordsize;
diff --git a/opcodes/xstormy16-dis.c b/opcodes/xstormy16-dis.c
index 595ed2a..bd6c593 100644
--- a/opcodes/xstormy16-dis.c
+++ b/opcodes/xstormy16-dis.c
@@ -92,10 +92,10 @@ xstormy16_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length)
switch (opindex)
{
case XSTORMY16_OPERAND_RB :
- print_keyword (cd, info, & xstormy16_cgen_opval_gr_names, fields->f_Rb, 0);
+ print_keyword (cd, info, & xstormy16_cgen_opval_gr_Rb_names, fields->f_Rb, 0);
break;
case XSTORMY16_OPERAND_RBJ :
- print_keyword (cd, info, & xstormy16_cgen_opval_gr_Rbj_names, fields->f_Rbj, 0);
+ print_keyword (cd, info, & xstormy16_cgen_opval_gr_Rb_names, fields->f_Rbj, 0);
break;
case XSTORMY16_OPERAND_RD :
print_keyword (cd, info, & xstormy16_cgen_opval_gr_names, fields->f_Rd, 0);
@@ -350,9 +350,13 @@ print_insn (cd, pc, info, buf, buflen)
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
CGEN_EXTRACT_INFO ex_info;
+ int basesize;
/* Extract base part of instruction, just in case CGEN_DIS_* uses it. */
- insn_value = cgen_get_insn_value (cd, buf, buflen * 8);
+ basesize = cd->base_insn_bitsize < buflen * 8 ?
+ cd->base_insn_bitsize : buflen * 8;
+ insn_value = cgen_get_insn_value (cd, buf, basesize);
+
/* Fill in ex_info fields like read_insn would. Don't actually call
read_insn, since the incoming buffer is already read (and possibly
diff --git a/opcodes/xstormy16-ibld.c b/opcodes/xstormy16-ibld.c
index 2304514..0e4876a 100644
--- a/opcodes/xstormy16-ibld.c
+++ b/opcodes/xstormy16-ibld.c
@@ -35,9 +35,9 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "opintl.h"
#include "safe-ctype.h"
-#undef min
+#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef max
+#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
/* Used by the ifield rtx function. */
diff --git a/opcodes/xstormy16-opc.c b/opcodes/xstormy16-opc.c
index c4dc9c0..8c6d7d3 100644
--- a/opcodes/xstormy16-opc.c
+++ b/opcodes/xstormy16-opc.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -910,6 +910,12 @@ static const CGEN_OPCODE xstormy16_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, 0 } },
& ifmt_iret, { 0xa }
},
+/* holdx */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_iret, { 0xb }
+ },
/* brk */
{
{ 0, 0, 0, 0 },
diff --git a/opcodes/xstormy16-opc.h b/opcodes/xstormy16-opc.h
index 551d266..337afec 100644
--- a/opcodes/xstormy16-opc.h
+++ b/opcodes/xstormy16-opc.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -67,7 +67,8 @@ typedef enum cgen_insn_type {
, XSTORMY16_INSN_CALLRGR, XSTORMY16_INSN_CALLRIMM, XSTORMY16_INSN_CALLGR, XSTORMY16_INSN_CALLFIMM
, XSTORMY16_INSN_ICALLRGR, XSTORMY16_INSN_ICALLGR, XSTORMY16_INSN_ICALLFIMM, XSTORMY16_INSN_IRET
, XSTORMY16_INSN_RET, XSTORMY16_INSN_MUL, XSTORMY16_INSN_DIV, XSTORMY16_INSN_NOP
- , XSTORMY16_INSN_HALT, XSTORMY16_INSN_HOLD, XSTORMY16_INSN_BRK, XSTORMY16_INSN_SYSCALL
+ , XSTORMY16_INSN_HALT, XSTORMY16_INSN_HOLD, XSTORMY16_INSN_HOLDX, XSTORMY16_INSN_BRK
+ , XSTORMY16_INSN_SYSCALL
} CGEN_INSN_TYPE;
/* Index of `invalid' insn place holder. */