]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: frv: punt WITH_DEVICE support
authorMike Frysinger <vapier@gentoo.org>
Fri, 25 Dec 2015 18:19:07 +0000 (13:19 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 25 Dec 2015 18:22:53 +0000 (13:22 -0500)
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.

sim/frv/ChangeLog
sim/frv/Makefile.in
sim/frv/devices.c [deleted file]
sim/frv/frv-sim.h
sim/frv/sim-if.c
sim/frv/tconfig.h [deleted file]

index 26caec46bf40a49664ad889802b85fb801141e02..549ff72800ef01ed4af9d8947e6c5faf6c5740e6 100644 (file)
@@ -1,3 +1,12 @@
+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.
index 86095fff0dfe0447c2404a042c22d5c36674b082..0f1ce5140b725f2713c47fa6a56a7f604197fbe1 100644 (file)
@@ -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 (file)
index 176f370..0000000
+++ /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;
-}
index 6ed282374a82bc1ac8c611a765e5f6364d6f8119..c6920084539021d4878958c4e9c915404ac09c0b 100644 (file)
@@ -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;
index 8c6ed6ffc0341470911da933c74440c15461dfd0..f908778c6c11ce6641676da820964a1aaa52bf3b 100644 (file)
@@ -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 (file)
index e5db154..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/* FRV target configuration file.  -*- C -*- */
-
-/* For MSPR support.  FIXME: revisit.  */
-#define WITH_DEVICES 1