aboutsummaryrefslogtreecommitdiff
path: root/sim/h8300
diff options
context:
space:
mode:
authorAndrey Volkov <avolkov@transas.com>2002-05-17 19:09:13 +0000
committerAndrey Volkov <avolkov@transas.com>2002-05-17 19:09:13 +0000
commita8cdafbd4e8dbf81a28d98de6a046bd9bc5cc097 (patch)
tree8b2577939ae2f269c86281b55c4c1a1aa24d7f6c /sim/h8300
parentb9c9142c4073da3ece8bbb1a0401c841d8daa142 (diff)
downloadfsf-binutils-gdb-a8cdafbd4e8dbf81a28d98de6a046bd9bc5cc097.zip
fsf-binutils-gdb-a8cdafbd4e8dbf81a28d98de6a046bd9bc5cc097.tar.gz
fsf-binutils-gdb-a8cdafbd4e8dbf81a28d98de6a046bd9bc5cc097.tar.bz2
* h8300s now new target, not alias of h8300h
Diffstat (limited to 'sim/h8300')
-rw-r--r--sim/h8300/ChangeLog5
-rw-r--r--sim/h8300/compile.c20
-rw-r--r--sim/h8300/inst.h8
3 files changed, 25 insertions, 8 deletions
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 1e3487d..f326692 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,5 +1,10 @@
2002-05-17 Andrey Volkov (avolkov@transas.com)
+ * compile.c: Made h8300s as new target, not h8300h alias.
+ * inst.h: Ditto.
+
+2002-05-17 Andrey Volkov (avolkov@transas.com)
+
* compile.c: Add additional CCR flags (I,UI,H,U)
2002-05-17 Andrey Volkov (avolkov@transas.com)
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index d5f72f7..87a0832 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -704,7 +704,9 @@ init_pointers ()
init = 1;
littleendian.i = 1;
- if (h8300hmode)
+ if (h8300smode)
+ memory_size = H8300S_MSIZE;
+ else if (h8300hmode)
memory_size = H8300H_MSIZE;
else
memory_size = H8300_MSIZE;
@@ -2008,13 +2010,14 @@ sim_info (sd, verbose)
FLAG is non-zero for the H8/300H. */
void
-set_h8300h (flag)
- int flag;
+set_h8300h (h_flag, s_flag)
+ int h_flag, s_flag;
{
/* FIXME: Much of the code in sim_load can be moved to sim_open.
This function being replaced by a sim_open:ARGV configuration
option. */
- h8300hmode = flag;
+ h8300hmode = h_flag;
+ h8300smode = s_flag;
}
SIM_DESC
@@ -2069,8 +2072,8 @@ sim_load (sd, prog, abfd, from_tty)
if (bfd_check_format (prog_bfd, bfd_object))
{
unsigned long mach = bfd_get_mach (prog_bfd);
- set_h8300h (mach == bfd_mach_h8300h
- || mach == bfd_mach_h8300s);
+ set_h8300h (mach == bfd_mach_h8300h || mach == bfd_mach_h8300s,
+ mach == bfd_mach_h8300s);
}
}
@@ -2088,7 +2091,10 @@ sim_load (sd, prog, abfd, from_tty)
so we just reallocate memory now; this will also allow us to handle
switching between H8/300 and H8/300H programs without exiting
gdb. */
- if (h8300hmode)
+
+ if (h8300smode)
+ memory_size = H8300S_MSIZE;
+ else if (h8300hmode)
memory_size = H8300H_MSIZE;
else
memory_size = H8300_MSIZE;
diff --git a/sim/h8300/inst.h b/sim/h8300/inst.h
index ce930c3..51db285 100644
--- a/sim/h8300/inst.h
+++ b/sim/h8300/inst.h
@@ -15,7 +15,13 @@
can only happen when simulating H8/300H programs). We make no attempt
to catch overlapping addresses, wrapped addresses, etc etc. */
#define H8300_MSIZE (1<<16)
-#define H8300H_MSIZE (1<<18)
+
+/* avolkov:
+ Next 2 macros are ugly for any workstation, but while they're work.
+ Memory size MUST be configurable.
+ */
+#define H8300H_MSIZE (1<<18)
+#define H8300S_MSIZE (1<<24)
#define CSIZE 1000