aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorJonathan Larmour <jifl@eCosCentric.com>2005-04-14 20:16:06 +0000
committerJonathan Larmour <jifl@eCosCentric.com>2005-04-14 20:16:06 +0000
commit53f541af8d1854d17a2919e787446e502d205799 (patch)
tree732368a43d2b943bb2b7f382e21f469fd0bc65dd /sim
parent57bf0e56f8f2f0fad9ab6c562cb2f7fbc8fea257 (diff)
downloadgdb-53f541af8d1854d17a2919e787446e502d205799.zip
gdb-53f541af8d1854d17a2919e787446e502d205799.tar.gz
gdb-53f541af8d1854d17a2919e787446e502d205799.tar.bz2
* gencode.c (tab): Avoid inserting code before variables all declared.
Diffstat (limited to 'sim')
-rw-r--r--sim/sh/ChangeLog4
-rw-r--r--sim/sh/gencode.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 14a67d0..8a6d6ff 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,7 @@
+2005-04-12 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * gencode.c (tab): Avoid inserting code before variables all declared.
+
2005-03-23 Mark Kettenis <kettenis@gnu.org>
* configure: Regenerate.
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index f03ba4e..c3c8c05 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -102,8 +102,8 @@ op tab[] =
{ "", "n", "bit32 #imm3,@(disp12,<REG_N>)", "0011nnnni8*11001",
"/* 32-bit logical bit-manipulation instructions. */",
- "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"int word2 = RIAT (nip);",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"i >>= 4; /* BOGUS: Using only three bits of 'i'. */",
"/* MSB of 'i' must be zero. */",
"if (i > 7)",
@@ -238,9 +238,9 @@ op tab[] =
"saved_state.asregs.regstack[bankn].regs[regn] = R0;",
},
{ "", "", "resbank", "0000000001011011",
+ "int i;",
"RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
/* FIXME: cdef all */
- "int i;",
"if (BO) { /* Bank Overflow */",
/* FIXME: how do we know when to reset BO? */
" for (i = 0; i <= 14; i++) {",
@@ -587,8 +587,8 @@ op tab[] =
" and mov.bwl <REG_N>, @(disp12,<REG_M>)",
" and mov.bwl @(disp12,<REG_N>),<REG_M>",
" and movu.bw @(disp12,<REG_N>),<REG_M>. */",
- "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"int word2 = RIAT (nip);",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"SET_NIP (nip + 2); /* Consume 2 more bytes. */",
"MA (1);",
"do_long_move_insn (word2 & 0xf000, word2 & 0x0fff, m, n, &thislock);",
@@ -1493,8 +1493,8 @@ op tab[] =
},
{ "0", "", "trapa #<imm>", "11000011i8*1....",
- "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"long imm = 0xff & i;",
+ "RAISE_EXCEPTION_IF_IN_DELAY_SLOT ();",
"if (i < 20 || i == 33 || i == 34 || i == 0xc3)",
" nip += trap (i, &R0, PC, memory, maskl, maskw, endianw);",
#if 0