aboutsummaryrefslogtreecommitdiff
path: root/sim/v850
Commit message (Collapse)AuthorAgeFilesLines
* update copyright year range in GDB filesJoel Brobecker2017-01-011-1/+1
| | | | | | | | | 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.
* 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-102-2/+28
| | | | | | | 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-102-3/+40
| | | | | | | 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-3/+8
| | | | | | | 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: drop host endian configure optionMike Frysinger2016-01-033-261/+232
| | | | | | | 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/+25
| | | | | | | 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-011-1/+1
| | | | | | 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-11/+19
| | | | 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: enable watchpoint module everywhereMike Frysinger2015-12-242-5/+4
| | | | | | | | We build & bundle the watchpoint module everywhere, but we don't make the command line flags available by default. A few targets opted in, but most did not. Just enable the flag for everyone. Not all targets will respect the flags (making them nops), but shouldn't be a big deal. This is how we handle other common modules already.
* Fix invalid left shift of negative valueDominik Vogt2015-12-152-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix occurrences of left-shifting negative constants in C code. sim/arm/ChangeLog: * thumbemu.c (handle_T2_insn): Fix left shift of negative value. * armemu.c (handle_v6_insn): Likewise. sim/avr/ChangeLog: * interp.c (sign_ext): Fix left shift of negative value. sim/mips/ChangeLog: * micromips.igen (process_isa_mode): Fix left shift of negative value. sim/msp430/ChangeLog: * msp430-sim.c (get_op, put_op): Fix left shift of negative value. sim/v850/ChangeLog: * simops.c (v850_bins): Fix left shift of negative value.
* sim: mn10300/v850: drop unused WITH_CORE defineMike Frysinger2015-11-172-1/+4
| | | | | This was dropped from the sim core in 1997, so no point in having these sim ports continue to define it.
* sim: always enable modulo memoryMike Frysinger2015-11-172-1/+4
| | | | | | | | Having this be a config option doesn't make sense: the code size is pretty much the same (as all the logic is still active), and if it's disabled, the sim throws an error if you try to use it. That means we can't break sims that weren't using it before by enabling it all the time.
* sim: sim-stop/sim-reason/sim-reg: move to common obj listMike Frysinger2015-11-162-3/+5
| | | | | | 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-7/+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-61/+61
|
* sim: use AS_HELP_STRING everywhereMike Frysinger2015-06-232-13/+27
| | | | 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: m68hc11/mn10300/v850: delete redundant INLINE definesMike Frysinger2015-06-112-8/+4
| | | | | The sim-inline.h header already takes care of this for us, so punt the local definitions.
* 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: 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: v850: convert to sim-cpuMike Frysinger2015-04-134-9/+42
| | | | | Make cpu allocation fully dynamic so we can leverage the common sim-cpu and its APIs.
* sim: move sim-engine.o/sim-hrw.o to the common listMike Frysinger2015-04-062-2/+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: m68hc11/mips/mn10300/v850: add basic sim_pc_getMike Frysinger2015-03-242-0/+10
| | | | | | The previous profile change broke these sims that use sim-profile but not sim-cpu (due to missing model support). Add simple funcs until we can convert these over properly.
* sim: rename tconfig.in to tconfig.hMike Frysinger2015-03-163-10/+10
| | | | | | | | | | | | | 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-2/+4
| | | | | | | | 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.
* sim: drop duplicate header checksMike Frysinger2015-03-144-18/+21
| | | | | The SIM_AC_COMMON macro already checks for a bunch of headers, so specific sim ports need not do it themselves.
* Fixes problems building the V850 simulator introduced with the previous delta.Nick Clifton2015-02-276-206/+305
| | | | | | | | | | | | * sim-main.h (reg64_t): New type. (v850_regs): Add selID_sregs field. (VR, SAT16, SAT32, ABS16, ABS32 ): New macros. * v850-dc: Add fields for v850e3v5 instructions. * v850.igen (cvtf.dl): Use correctly signed local value. (cvtf.dw, cvtf.sw, trncf.dul, trncf.dl, trncf.sul, trncf.sw): Likewise. * interp.c: Fix old style function declarations. * simops.c: Likewise.
* Adds support for emulating V850 e3v5 instructions to the simulator.Nick Clifton2015-02-242-22/+855
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * v850.igen: Add more e3v5 support. (FMAF.S): New pattern. (FMSF.S): New pattern. (FNMAF.S): New pattern. (FNMSF.S): New pattern. (cnvq15q30): New pattern. (cnvq30q15): New pattern. (cnvq31q62): New pattern. (cnvq62q31): New pattern. (dup.h): New pattern. (dup.w): New pattern. (expq31): New pattern. (modadd): New pattern. (mov.dw): New pattern. (mov.h): New pattern. (mov.w): New pattern. (pki16i32): New pattern. (pki16ui8): New pattern. (pki32i16): New pattern. (pki64i32): New pattern. (pkq15q31): New pattern. (pkq30q31): New pattern. (pkq31q15): New pattern. (pkui8i16): New pattern. (vabs.h): New pattern. (vabs.w): New pattern. (vadd.dw): New placeholder pattern. (vadd.h): New placeholder pattern. (vadd.w): New placeholder pattern. (vadds.h): New placeholder pattern. (vadds.w): New placeholder pattern. (vaddsat.h): New placeholder pattern. (vaddsat.w): New placeholder pattern. (vand): New pattern. (vbiq.h): New placeholder pattern. (vbswap.dw): New placeholder pattern. (vbswap.h): New placeholder pattern. (vbswap.w): New placeholder pattern. (vcalc.h): New placeholder pattern. (vcalc.w): New placeholder pattern. (vcmov): New placeholder pattern.
* Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker2015-01-011-1/+1
| | | | | | gdb/ChangeLog: Update year range in copyright notice of all files.
* Fix --diable-shared --enable-plugins build breakageAlan Modra2014-08-192-2/+64
| | | | | | | | | | | | | | | | | Directories that don't use libtool need to add -ldl (on most *nix hosts) to provide dlopen for libbfd. config/ * plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to LIBS via AC_SEARCH_LIBS. gdb/ * acinclude.m4 (GDB_AC_CHECK_BFD): Don't add -ldl. * config.in: Regenerate. sim/ppc/ * configure.ac: Invoke AC_PLUGINS. * config.in: Regenerate. and regen lots of configure files.
* Regenerate sim configury.Roland McGrath2014-08-153-9/+52
|
* sim: convert old style prototypesMike Frysinger2014-03-042-7/+8
| | | | | Most of these prototypes have been killed off, but we have a few left in the sim tree. Clean them up so we can enable the -W flag for it.