aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-25 13:19:07 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-25 13:22:53 -0500
commit2023145711ca36f06258e07f4fa1c490efbbf37e (patch)
tree262a8d1db3eb64851e26813b1ebb0d06b9d69a5d /sim
parent9c0c156bb7ddca2d3fce7bea96631715f8c67390 (diff)
downloadgdb-2023145711ca36f06258e07f4fa1c490efbbf37e.zip
gdb-2023145711ca36f06258e07f4fa1c490efbbf37e.tar.gz
gdb-2023145711ca36f06258e07f4fa1c490efbbf37e.tar.bz2
sim: frv: punt WITH_DEVICE support
The frv port used the device logic to support a single cache address, and the comments around that are "these were merely copied from a diff port and are unused", plus the code to attach the memory is "#if 0". Just punt it all.
Diffstat (limited to 'sim')
-rw-r--r--sim/frv/ChangeLog9
-rw-r--r--sim/frv/Makefile.in2
-rw-r--r--sim/frv/devices.c56
-rw-r--r--sim/frv/frv-sim.h18
-rw-r--r--sim/frv/sim-if.c16
-rw-r--r--sim/frv/tconfig.h4
6 files changed, 10 insertions, 95 deletions
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 26caec4..549ff72 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,5 +1,14 @@
2015-12-25 Mike Frysinger <vapier@gentoo.org>
+ * devices.c: Delete file.
+ * frv-sim.h (MCCR_ADDR, MCCR_CP, MCCR_CM0, MCCR_CM1, frv_devices,
+ struct _device): Delete.
+ * Makefile.in (SIM_OBJS): Delete devices.o.
+ * sim-if.c (sim_open): Delete #if 0 code.
+ * tconfig.h: Delete file.
+
+2015-12-25 Mike Frysinger <vapier@gentoo.org>
+
* Makefile.in (SIM_OBJS): Delete sim-model.o.
* tconfig.h (SIM_HAVE_MODEL): Delete.
diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in
index 86095ff..0f1ce51 100644
--- a/sim/frv/Makefile.in
+++ b/sim/frv/Makefile.in
@@ -28,7 +28,7 @@ SIM_OBJS = \
$(FRV_OBJS) \
traps.o interrupts.o memory.o cache.o pipeline.o \
profile.o profile-fr400.o profile-fr450.o profile-fr500.o profile-fr550.o options.o \
- devices.o reset.o registers.o
+ reset.o registers.o
# Extra headers included by sim-main.h.
SIM_EXTRA_DEPS = \
diff --git a/sim/frv/devices.c b/sim/frv/devices.c
deleted file mode 100644
index 176f370..0000000
--- a/sim/frv/devices.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* frv device support
- Copyright (C) 1998-2015 Free Software Foundation, Inc.
- Contributed by Red Hat.
-
-This file is part of the GNU simulators.
-
-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 3 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.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* ??? All of this is just to get something going. wip! */
-
-#include "sim-main.h"
-
-device frv_devices;
-
-int
-device_io_read_buffer (device *me, void *source, int space,
- address_word addr, unsigned nr_bytes,
- SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
-{
- if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
- return nr_bytes;
-
- return nr_bytes;
-}
-
-int
-device_io_write_buffer (device *me, const void *source, int space,
- address_word addr, unsigned nr_bytes,
- SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
-{
-
-#if WITH_SCACHE
- if (addr == MCCR_ADDR)
- {
- if ((*(const char *) source & MCCR_CP) != 0)
- scache_flush (sd);
- return nr_bytes;
- }
-#endif
-
- if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
- return nr_bytes;
-
- return nr_bytes;
-}
diff --git a/sim/frv/frv-sim.h b/sim/frv/frv-sim.h
index 6ed2823..c692008 100644
--- a/sim/frv/frv-sim.h
+++ b/sim/frv/frv-sim.h
@@ -122,24 +122,6 @@ extern void frvbf_force_update (SIM_CPU *);
/* Hardware/device support.
??? Will eventually want to move device stuff to config files. */
-/* Support for the MCCR register (Cache Control Register) is needed in order
- for overlays to work correctly with the scache: cached instructions need
- to be flushed when the instruction space is changed at runtime. */
-
-/* These were just copied from another port and are necessary to build, but
- but don't appear to be used. */
-#define MCCR_ADDR 0xffffffff
-#define MCCR_CP 0x80
-/* not supported */
-#define MCCR_CM0 2
-#define MCCR_CM1 1
-
-/* sim_core_attach device argument. */
-extern device frv_devices;
-
-/* FIXME: Temporary, until device support ready. */
-struct _device { int foo; };
-
/* maintain the address of the start of the previous VLIW insn sequence. */
extern IADDR previous_vliw_pc;
extern CGEN_ATTR_VALUE_ENUM_TYPE frv_current_fm_slot;
diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c
index 8c6ed6f..f908778 100644
--- a/sim/frv/sim-if.c
+++ b/sim/frv/sim-if.c
@@ -96,22 +96,6 @@ sim_open (kind, callback, abfd, argv)
return 0;
}
-#if 0
- /* Allocate a handler for the control registers and other devices
- if no memory for that range has been allocated by the user.
- All are allocated in one chunk to keep things from being
- unnecessarily complicated. */
- if (sim_core_read_buffer (sd, NULL, read_map, &c, FRV_DEVICE_ADDR, 1) == 0)
- sim_core_attach (sd, NULL,
- 0 /*level*/,
- access_read_write,
- 0 /*space ???*/,
- FRV_DEVICE_ADDR, FRV_DEVICE_LEN /*nr_bytes*/,
- 0 /*modulo*/,
- &frv_devices,
- NULL /*buffer*/);
-#endif
-
/* Allocate core managed memory if none specified by user.
Use address 4 here in case the user wanted address 0 unmapped. */
if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
diff --git a/sim/frv/tconfig.h b/sim/frv/tconfig.h
deleted file mode 100644
index e5db154..0000000
--- a/sim/frv/tconfig.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* FRV target configuration file. -*- C -*- */
-
-/* For MSPR support. FIXME: revisit. */
-#define WITH_DEVICES 1