From patchwork Fri Dec 25 00:53:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 10114 X-Patchwork-Delegate: vapier@gentoo.org Received: (qmail 11521 invoked by alias); 25 Dec 2015 00:54:06 -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 11202 invoked by uid 89); 25 Dec 2015 00:54:05 -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=sk:option_, sk:OPTION_, OPTION, 3676 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 00:54:03 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 45B63340662 for ; Fri, 25 Dec 2015 00:54:01 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: delete SIM_HAVE_FLATMEM support [committed] Date: Thu, 24 Dec 2015 19:53:58 -0500 Message-Id: <1451004838-26799-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes No target has used this, and it's a cheap hack in place in using the common memory module. We want everyone using that though, so drop support for flatmem entirely. --- sim/common/ChangeLog | 9 +++++++++ sim/common/sim-base.h | 10 ---------- sim/common/sim-module.c | 3 --- sim/common/sim-options.c | 38 -------------------------------------- sim/mips/ChangeLog | 4 ++++ sim/mips/interp.c | 3 --- 6 files changed, 13 insertions(+), 54 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 10ad029..80fc164 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,14 @@ 2015-12-24 Mike Frysinger + * sim-base.h [SIM_HAVE_FLATMEM] (sim_state_base): Delete flatmem code. + * sim-module.c [SIM_HAVE_FLATMEM] (modules): Always call + sim_memopt_install. + * sim-options.c (OPTION_MEM_SIZE): Delete. + [SIM_HAVE_FLATMEM] (standard_options): Delete flatmem code. + (standard_option_handler): Likewise. + +2015-12-24 Mike Frysinger + * tconfig.h (SIM_HAVE_SIMCACHE): Delete. 2015-11-21 Mike Frysinger diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h index 21f61f4..cfef6ec 100644 --- a/sim/common/sim-base.h +++ b/sim/common/sim-base.h @@ -202,16 +202,6 @@ typedef struct { unsigned int scache_size; #define STATE_SCACHE_SIZE(sd) ((sd)->base.scache_size) - /* FIXME: Move to top level sim_state struct (as some struct)? */ -#ifdef SIM_HAVE_FLATMEM - unsigned int mem_size; -#define STATE_MEM_SIZE(sd) ((sd)->base.mem_size) - unsigned int mem_base; -#define STATE_MEM_BASE(sd) ((sd)->base.mem_base) - unsigned char *memory; -#define STATE_MEMORY(sd) ((sd)->base.memory) -#endif - /* core memory bus */ #define STATE_CORE(sd) (&(sd)->base.core) sim_core core; diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c index 2d8e7dc..afadb07 100644 --- a/sim/common/sim-module.c +++ b/sim/common/sim-module.c @@ -53,10 +53,7 @@ static MODULE_INSTALL_FN * const modules[] = { profile_install, #endif sim_core_install, -#ifndef SIM_HAVE_FLATMEM - /* FIXME: should handle flatmem as well FLATMEM */ sim_memopt_install, -#endif #if WITH_WATCHPOINTS sim_watchpoint_install, #endif diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index f823143..5e04573 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -102,9 +102,6 @@ typedef enum { OPTION_VERBOSE, OPTION_ENDIAN, OPTION_DEBUG, -#ifdef SIM_HAVE_FLATMEM - OPTION_MEM_SIZE, -#endif OPTION_HELP, OPTION_VERSION, #ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */ @@ -162,12 +159,6 @@ static const OPTION standard_options[] = standard_option_handler }, #endif -#ifdef SIM_HAVE_FLATMEM - { {"mem-size", required_argument, NULL, OPTION_MEM_SIZE}, - 'm', "[in bytes, Kb (k suffix), Mb (m suffix) or Gb (g suffix)]", - "Specify memory size", standard_option_handler }, -#endif - { {"do-command", required_argument, NULL, OPTION_DO_COMMAND}, '\0', "COMMAND", ""/*undocumented*/, standard_option_handler }, @@ -376,35 +367,6 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, break; #endif -#ifdef SIM_HAVE_FLATMEM - case OPTION_MEM_SIZE: - { - char * endp; - unsigned long ul = strtol (arg, &endp, 0); - - switch (* endp) - { - case 'k': case 'K': size <<= 10; break; - case 'm': case 'M': size <<= 20; break; - case 'g': case 'G': size <<= 30; break; - case ' ': case '\0': case '\t': break; - default: - if (ul > 0) - sim_io_eprintf (sd, "Ignoring strange character at end of memory size: %c\n", * endp); - break; - } - - /* 16384: some minimal amount */ - if (! isdigit (arg[0]) || ul < 16384) - { - sim_io_eprintf (sd, "Invalid memory size `%s'", arg); - return SIM_RC_FAIL; - } - STATE_MEM_SIZE (sd) = ul; - } - break; -#endif - case OPTION_DO_COMMAND: sim_do_command (sd, arg); break; diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index b48f69f..34ab06d 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,5 +1,9 @@ 2015-12-24 Mike Frysinger + * interp.c [SIM_HAVE_FLATMEM] (sim_open): Delete flatmem code. + +2015-12-24 Mike Frysinger + * tconfig.h (SIM_HAVE_SIMCACHE): Delete. 2015-12-15 Dominik Vogt diff --git a/sim/mips/interp.c b/sim/mips/interp.c index 8a584d3..524f5be 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -399,9 +399,6 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) /* Look for largest memory region defined on command-line at phys address 0. */ -#ifdef SIM_HAVE_FLATMEM - mem_size = STATE_MEM_SIZE (sd); -#endif for (entry = STATE_MEMOPT (sd); entry != NULL; entry = entry->next) { /* If we find an entry at address 0, then we will end up