summaryrefslogtreecommitdiff
path: root/sim/sh
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year range in all GDB filesJoel Brobecker2018-01-022-2/+2
| | | | | | gdb/ChangeLog: Update copyright year range in all GDB files
* Honor an existing CC_FOR_BUILD in the environment for sim.John Baldwin2017-09-062-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This matches the equivalent bits in bfd/acinclude.m4 sim/ChangeLog: * configure.ac: Honor existing CC_FOR_BUILD in environment. * configure: Regenerate. sim/aarch64/ChangeLog: * configure: Regenerate. sim/arm/ChangeLog: * configure: Regenerate. sim/avr/ChangeLog: * configure: Regenerate. sim/bfin/ChangeLog: * configure: Regenerate. sim/common/ChangeLog: * acinclude.m4 (SIM_AC_COMMON) Honor existing CC_FOR_BUILD in environment. sim/cr16/ChangeLog: * configure: Regenerate. sim/cris/ChangeLog: * configure: Regenerate. sim/d10v/ChangeLog: * configure: Regenerate. sim/erc32/ChangeLog: * configure: Regenerate. sim/frv/ChangeLog: * configure: Regenerate. sim/ft32/ChangeLog: * configure: Regenerate. sim/h8300/ChangeLog: * configure: Regenerate. sim/iq2000/ChangeLog: * configure: Regenerate. sim/lm32/ChangeLog: * configure: Regenerate. sim/m32c/ChangeLog: * configure: Regenerate. sim/m32r/ChangeLog: * configure: Regenerate. sim/m68hc11/ChangeLog: * configure: Regenerate. sim/mcore/ChangeLog: * configure: Regenerate. sim/microblaze/ChangeLog: * configure: Regenerate. sim/mips/ChangeLog: * configure: Regenerate. sim/mn10300/ChangeLog: * configure: Regenerate. sim/moxie/ChangeLog: * configure: Regenerate. sim/msp430/ChangeLog: * configure: Regenerate. sim/rl78/ChangeLog: * configure: Regenerate. sim/rx/ChangeLog: * configure: Regenerate. sim/sh/ChangeLog: * configure: Regenerate. sim/sh64/ChangeLog: * configure: Regenerate. sim/v850/ChangeLog: * configure: Regenerate.
* sim: use ARRAY_SIZE instead of ad-hoc sizeof calculationsMike Frysinger2017-02-133-4/+11
|
* update copyright year range in GDB filesJoel Brobecker2017-01-012-2/+2
| | | | | | | | | This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
* Fix primary reason why the SH simulation hasn't been working on 64 bit hosts.Oleg Endo2016-04-103-37/+21
| | | | | | | sim/sh/ * interp.c (dmul): Split into dmul_s and dmul_u. Use explicit integer width types and simplify implementation. * gencode.c (dmuls.l, dmulu.l): Use new functions dmul_s and dmul_u.
* Move ChangeLog entries from sim/ChangeLog to sim/sh/ChangeLog.Oleg Endo2016-04-101-0/+5
|
* Adjust default memory size and stack base address for SH simulator.Oleg Endo2016-04-091-3/+3
| | | | | | | | | | ld/ChangeLog: * sh/interp.c (sim_memory_size): Default init to 30. (parse_and_set_memory_size): Adjust upper bound to 31. sim/ChangeLog: * sh/interp.c (sim_memory_size): Default init to 30. (parse_and_set_memory_size): Adjust upper bound to 31.
* sim: move many common settings from CPPFLAGS to config.hMike Frysinger2016-01-103-68/+124
| | | | | | | | | Rather than stuffing the command line with a bunch of -D flags, start moving things to config.h which is managed by autoheader. This makes the makefile a bit simpler and the build output tighter, and it makes the migration to automake easier as there are fewer vars to juggle. We'll want to move the other options out too, but it'll take more work.
* sim: drop unused SIM_AC_OPTION_PACKAGESMike Frysinger2016-01-102-7/+6
| | | | | | | | This was imported from the ppc sim, but that was only used to control a single file, and that is already governed by the hw models. There's no need to have a sep configure option here, especially since none of the other sims are using it. Even when the code is enabled, there's no runtime overhead.
* sim: allow the environment configure option everywhereMike Frysinger2016-01-103-23/+27
| | | | | | | Currently ports have to call SIM_AC_OPTION_ENVIRONMENT explicitly in order to make the configure flag available. There's no real reason to not allow this flag for all ports, so move it to the common sim macro. This way we get standard behavior across all ports too.
* sim: allow the assert configure option everywhereMike Frysinger2016-01-102-2/+23
| | | | | | | Currently ports have to call SIM_AC_OPTION_ASSERT explicitly in order to make the configure flag available, which none of them do. There's no real reason to not allow this flag for all ports, so move it to the common sim macro. This way we get standard behavior across all ports.
* sim: drop targ-vals.def->nltvals.def indirectionMike Frysinger2016-01-102-57/+5
| | | | | | | | | | | We don't have alternative nltvals.def files, so always symlinking the targ-vals.def file to it doesn't gain us anything. It does make the build more complicated though and a pain to convert to something newer (like automake). Drop the symlinking entirely. In the future, we'll want to explode this file anyways into the respective arch dirs so things can be selected dynamically at runtime, so it's not like we'll be bringing this back.
* sim: allow the inline configure option everywhereMike Frysinger2016-01-103-51/+41
| | | | | | | Currently ports have to call SIM_AC_OPTION_INLINE explicitly in order to make the configure flag available. There's no real reason to not allow this flag for all ports, so move it to the common sim macro. This way we get standard behavior across all ports too.
* sim: drop --enable-sim-{regparm,stdcall} optionsMike Frysinger2016-01-102-12/+6
| | | | | | | These options were never exposed for most sims (just the ppc one), and they are really only useful on 32-bit x86 systems. Considering modern systems tend to be 64-bit x86_64 and how well modern compilers are at optimizing code, these have outlived their usefulness.
* sim: drop --enable-sim-cflags optionMike Frysinger2016-01-102-23/+6
| | | | | | | | | | No other sub directory provides such a configuration option, so drop it from the sim dir as well. This cleans up a good bit of code in the process. If people want to use custom flags for just the sim, they can still run configure+make by hand in the sim subdir and use the normal CFLAGS settings.
* sim: drop common/cconfig.h in favor of a single config.hMike Frysinger2016-01-093-3/+406
| | | | | | | | | | The common subdir sets up a cconfig.h file to hold checks for the common code. In practice, most files still end up using config.h instead which just leads to confusion. Merge all the configure checks that went into cconfig.h into SIM_AC_COMMON so we can drop the cconfig.h file altogether. Now there is only a single config.h file like normal.
* sim: sim_{create_inferior,open,parse_args}: constify argv/env slightlyMike Frysinger2016-01-062-2/+9
| | | | | | | 2016-01-03 Mike Frysinger <vapier@gentoo.org> * sim-options.c (sim_parse_args): Mark argv array const. * sim-options.h (sim_parse_args): Likewise.
* sim: punt x86-specific bswap logicMike Frysinger2016-01-042-21/+6
| | | | | | | The compiler/C library should produce reasonable code for htonl/ntohl, and at least glibc tries pretty hard to always produce good code for them. This logic only had support for 32-bit x86 systems anymore, and it's unlikely people were even opting into this, so drop it all.
* sim: parse_args: display getopt error ourselvesMike Frysinger2016-01-032-3/+5
| | | | | | Fix a long standing todo where we let getopt write directly to stderr when an invalid option is passed. Use the sim io funcs instead as they go through the filtered callbacks that gdb wants.
* sim: use libiberty countargv in more placesMike Frysinger2016-01-032-17/+8
| | | | | A bunch of places open code the countargv implementation, or outright duplicate it (as count_argc). Replace all of those w/countargv.
* sim: drop host endian configure optionMike Frysinger2016-01-034-262/+235
| | | | | | | The --enable-sim-hostendian flag was purely so people had an escape route for when cross-compiling. This is because historically, AC_C_BIGENDIAN did not work in those cases. That was fixed a while ago though, so we can require that macro everywhere now and simplify a good bit of code.
* sim: convert to bfd_endianMike Frysinger2016-01-033-19/+26
| | | | | | | Rather than re-invent endian defines, as well as maintain our own list of OS & arch-specific includes, punt all that logic in favor of the bfd ones already set up and maintained elsewhere. We already rely on the bfd library, so leveraging the endian aspect should be fine.
* GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker2016-01-012-2/+2
| | | | | | gdb/ChangeLog: Update year range in copyright notice of all files.
* sim: arm/d10v/h8300/m68hc11/microblaze/mips/mn10300/moxie/sh/v850: convert ↵Mike Frysinger2015-12-302-4/+14
| | | | to common sim_{fetch,store}_register
* sim: unify sim-hloadMike Frysinger2015-12-272-1/+4
| | | | | | | Pretty much all targets are using this module already, so add it to the common list of objects. The only oddball out here is cris and that's because it supports loading via an offset for all the phdrs. We drop support for that.
* sim: punt WITH_DEVICES & tconfig.h supportMike Frysinger2015-12-263-6/+6
| | | | | | | | | | | | | No arch is using this anymore, and we want all new ports using the hardware framework instead. Punt WITH_DEVICES and the two callbacks device_io_{read,write}_buffer. We can also punt the tconfig.h file as no port is using it anymore. This fixes in-tree builds that get confused by picking up the wrong one (common/ vs <port>/) caused by commit ae7d0cac8ce971f7108d270c. Any port that needs to set up a global define can use their own sim-main.h file that they must provide regardless.
* sim: sh: delete global callback/argvMike Frysinger2015-11-223-46/+53
| | | | We can use the sim state everywhere now to get these values on the fly.
* sim: sim-stop/sim-reason/sim-reg: move to common obj listMike Frysinger2015-11-162-1/+4
| | | | | | Now that all arches (for the most part) have moved over, move sim-stop.o, sim-reason.o, and sim-reg.o to the common object list and out of all the arch ports.
* sim: sim-close: unify sim_close logicMike Frysinger2015-11-152-6/+4
| | | | | | | | | | | | | | | | Other than the nice advantage of all sims having to declare one fewer common function, this also fixes leakage in pretty much every sim. Many were not freeing any resources, and a few were inconsistent as to the ones they did. Now we have a single module that takes care of all the logic for us. Most of the non-cgen based ones could be deleted outright. The cgen ones required adding a callback to the arch-specific cleanup func. The few that still have close callbacks are to manage their internal state. We do not convert erc32, m32c, ppc, rl78, or rx as they do not use the common sim core.
* Remove leading/trailing white spaces in ChangeLogH.J. Lu2015-07-241-38/+38
|
* sim: use AS_HELP_STRING everywhereMike Frysinger2015-06-232-13/+28
| | | | This helps standardize the configure --help output.
* sim: update configure.in->configure.ac docsMike Frysinger2015-06-122-1/+5
| | | | A few places still refer to the configure.in file; update them.
* sim: drop -DTRACE from configureMike Frysinger2015-06-122-3/+7
| | | | | No code uses this anymore and the symbol conflicts with the new TRACE helper. Punt it from configure.
* sim: unify SIM_CPU definitionMike Frysinger2015-04-182-3/+4
| | | | | | | | Since every target typedefs this the same way, move it to the common code. We have to leave Blackfin behind here for now because of inter-dependencies on types and headers: sim-base.h includes sim-model.h which needs types in machs.h which needs types in bfim-sim.h which needs SIM_CPU.
* sim: unify sim_cia definitionMike Frysinger2015-04-182-2/+4
| | | | | | | | Almost every target defines sim_cia the same way -- either using the address_word type directly, or a type of equivalent size. The only odd one out is sh64 (who has 32bit address_word and 64bit cia), and even that case doesn't seem to make sense. We'll put off clean up though of sh64 and at least set up a sensible default for everyone.
* sim: replace CIA_{GET,SET} with CPU_PC_{GET,SET}Mike Frysinger2015-04-172-3/+4
| | | | | | | | | | The CIA_{GET,SET} macros serve the same function as CPU_PC_{GET,SET} except the latter adds a layer of indirection via the sim state. This lets models set up different functions at runtime and doesn't reach so directly into the arch-specific cpu state. It also doesn't make sense to have two sets of macros that do exactly the same thing, so lets standardize on the one that gets us more.
* sim: arm/cr16/d10v/h8300/microblaze/sh: fill out sim-cpu pc fetch/store helpersMike Frysinger2015-04-172-0/+26
| | | | This makes the common sim-cpu logic work.
* sim: unify sim-cpu usageMike Frysinger2015-04-153-6/+5
| | | | | | Now that all the targets are utilizing CPU_PC_{FETCH,STORE}, and the cpu state is multicore, and the STATE_CPU defines match, we can move it all to the common code.
* sim: fix the PKGVERSION defineMike Frysinger2015-04-132-2/+6
| | | | This should be SIM, not GDB.
* sim: move sim-engine.o/sim-hrw.o to the common listMike Frysinger2015-04-062-1/+4
| | | | This makes these two objects available to all sims by default.
* Regenerate configure in simH.J. Lu2015-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arm/configure: Regenerated. * avr/configure: Likewise. * bfin/configure: Likewise. * common/configure: Likewise. * cr16/configure: Likewise. * cris/configure: Likewise. * d10v/configure: Likewise. * erc32/configure: Likewise. * frv/configure: Likewise. * ft32/configure: Likewise. * h8300/configure: Likewise. * igen/configure: Likewise. * iq2000/configure: Likewise. * lm32/configure: Likewise. * m32c/configure: Likewise. * m32r/configure: Likewise. * m68hc11/configure: Likewise. * mcore/configure: Likewise. * microblaze/configure: Likewise. * mips/configure: Likewise. * mn10300/configure: Likewise. * moxie/configure: Likewise. * msp430/configure: Likewise. * ppc/configure: Likewise. * rl78/configure: Likewise. * rx/configure: Likewise. * sh/configure: Likewise. * sh64/configure: Likewise. * v850/configure: Likewise.
* Regenerate configure in simH.J. Lu2015-04-011-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arm/configure: Regenerated. * avr/configure: Likewise. * bfin/configure: Likewise. * common/configure: Likewise. * cr16/configure: Likewise. * cris/configure: Likewise. * d10v/configure: Likewise. * erc32/configure: Likewise. * frv/configure: Likewise. * ft32/configure: Likewise. * h8300/configure: Likewise. * igen/configure: Likewise. * iq2000/configure: Likewise. * lm32/configure: Likewise. * m32c/configure: Likewise. * m32r/configure: Likewise. * m68hc11/configure: Likewise. * mcore/configure: Likewise. * microblaze/configure: Likewise. * mips/configure: Likewise. * mn10300/configure: Likewise. * moxie/configure: Likewise. * msp430/configure: Likewise. * ppc/configure: Likewise. * rl78/configure: Likewise. * rx/configure: Likewise. * sh/configure: Likewise. * sh64/configure: Likewise. * v850/configure: Likewise.
* sim: update zlib handlingMike Frysinger2015-04-013-84/+17
| | | | | With zlib being mandatory, and the updated m4 configs, we need to regen and use the new settings w/bfd to avoid linkage errors.
* sim: sh: convert to nrunMike Frysinger2015-03-285-227/+260
| | | | | | A lot of cpu state is stored in global variables, as is memory handling. The sim_size support needs unwinding at some point. But at least this is an improvement on the status quo.
* sim: sh: clean up some warningsMike Frysinger2015-03-283-211/+131
| | | | | Mostly converting old style prototypes. Also include a few missing headers, and add static/casts where appropriate.
* sim: sh: fix broken handling in DSR regMike Frysinger2015-03-282-2/+6
| | | | | A missing */ caused a case statement to be incorrect masked out which also hide an error where the wrong value was being checked. Fix both.
* sim: sh: clean up gencodeMike Frysinger2015-03-283-68/+61
| | | | | | | The build line was missing the normal BUILD_xxx flags. Once we added that, we get warnings that weren't shown before. As we fix those, we notice that the -d option segfaults because it tries to write readonly memory. Fix that too as part of the const/prototype clean up.
* sim: sh: use common configure optionsMike Frysinger2015-03-284-2/+555
| | | | | | In preparation for converting to nrun, call the common functions that are needed. This also produces a bunch of warnings, but one thing at a time.
* sim: rename tconfig.in to tconfig.hMike Frysinger2015-03-164-10/+12
| | | | | | | | | | | | | Rather than manually include tconfig.h when we think we'll need it (which is error prone as it can define symbols we expect from config.h), have it be included directly by config.h. Since we know we have to include that header everywhere already, this will make sure tconfig.h isn't missed. It should also be fine as tconfig.h is supposed to be simple and only set up a few core defines for the target. This allows us to stop symlinking it in place all the time and just use it straight out of the respective source directory.
* sim: make nrun the default run programMike Frysinger2015-03-142-0/+10
| | | | | | | | We want people to stop using the run.c frontend, but it's hard to notice when it's still set as the default. Lets flip things so nrun.c is the default, and users of run.c will get an error by default. We turn that error into a warning for existing sims so we don't break them -- this is mostly meant for people starting new ports.