summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2004-02-12 19:32:12 +0000
committerMichael Snyder <msnyder@specifix.com>2004-02-12 19:32:12 +0000
commit6ef1faddcd98649624bb9d1f5cdde2614b628ecc (patch)
tree5381046ef81c7fef444f604876b153a2647608f3 /sim
parent3c81502b25c49eb8d68945e5f364f8fc514a121c (diff)
downloadgdb-6ef1faddcd98649624bb9d1f5cdde2614b628ecc.tar.gz
2004-02-12 Michael Snyder <msnyder@redhat.com>
* gencode.c (table): Change from char to short. (dumptable): Change generated table from char to short. * interp.c (sh_jump_table, sh_dsp_table, ppi_table): char to short. (init_dsp): Compute size of sh_dsp_table. (sim_resume): Change jump_table from char to short.
Diffstat (limited to 'sim')
-rw-r--r--sim/sh/ChangeLog8
-rw-r--r--sim/sh/gencode.c4
-rw-r--r--sim/sh/interp.c6
3 files changed, 13 insertions, 5 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 62edf59bfcd..9fbefe3cd45 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,11 @@
+2004-02-12 Michael Snyder <msnyder@redhat.com>
+
+ * gencode.c (table): Change from char to short.
+ (dumptable): Change generated table from char to short.
+ * interp.c (sh_jump_table, sh_dsp_table, ppi_table): char to short.
+ (init_dsp): Compute size of sh_dsp_table.
+ (sim_resume): Change jump_table from char to short.
+
2004-01-27 Michael Snyder <msnyder@redhat.com>
* gencode.c: (op tab): Some refs and defs fixes.
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 9769d7391c0..3d998f010f5 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -2265,7 +2265,7 @@ gengastab ()
}
}
-static unsigned char table[1 << 16];
+static unsigned short table[1 << 16];
/* Take an opcode, expand all varying fields in it out and fill all the
right entries in 'table' with the opcode index. */
@@ -2407,7 +2407,7 @@ dumptable (name, size, start)
int i = start;
- printf ("unsigned char %s[%d]={\n", name, size);
+ printf ("unsigned short %s[%d]={\n", name, size);
while (i < start + size)
{
int j = 0;
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 981067804cd..b7c77799447 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -53,7 +53,7 @@
#define SIGTRAP 5
#endif
-extern unsigned char sh_jump_table[], sh_dsp_table[0x1000], ppi_table[];
+extern unsigned short sh_jump_table[], sh_dsp_table[0x1000], ppi_table[];
int sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size);
@@ -1646,7 +1646,7 @@ init_dsp (abfd)
{
int i, tmp;
- for (i = sizeof sh_dsp_table - 1; i >= 0; i--)
+ for (i = (sizeof sh_dsp_table / sizeof sh_dsp_table[0]) - 1; i >= 0; i--)
{
tmp = sh_jump_table[0xf000 + i];
sh_jump_table[0xf000 + i] = sh_dsp_table[i];
@@ -1752,7 +1752,7 @@ sim_resume (sd, step, siggnal)
void (*prev) ();
void (*prev_fpe) ();
- register unsigned char *jump_table = sh_jump_table;
+ register unsigned short *jump_table = sh_jump_table;
register int *R = &(saved_state.asregs.regs[0]);
/*register int T;*/