From patchwork Fri Dec 25 18:24:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 10135 X-Patchwork-Delegate: vapier@gentoo.org Received: (qmail 88706 invoked by alias); 25 Dec 2015 18:24:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 88692 invoked by uid 89); 25 Dec 2015 18:24:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=cached, 966, sk:access_ X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 25 Dec 2015 18:24:47 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id E874F33BEBE for ; Fri, 25 Dec 2015 18:24:44 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: frv: punt WITH_DEVICE support [committed] Date: Fri, 25 Dec 2015 13:24:44 -0500 Message-Id: <1451067884-30518-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes 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 | 9 +++++++++ sim/frv/Makefile.in | 2 +- sim/frv/devices.c | 56 ----------------------------------------------------- sim/frv/frv-sim.h | 18 ----------------- sim/frv/sim-if.c | 16 --------------- sim/frv/tconfig.h | 4 ---- 6 files changed, 10 insertions(+), 95 deletions(-) delete mode 100644 sim/frv/devices.c delete mode 100644 sim/frv/tconfig.h 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 + * 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 + * 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 . */ - -/* ??? 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