aboutsummaryrefslogtreecommitdiff
path: root/sim/h8300
AgeCommit message (Collapse)AuthorFilesLines
2017-01-01update copyright year range in GDB filesJoel Brobecker1-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.
2016-01-10sim: move many common settings from CPPFLAGS to config.hMike Frysinger3-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.
2016-01-10sim: drop unused SIM_AC_OPTION_PACKAGESMike Frysinger2-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.
2016-01-10sim: allow the environment configure option everywhereMike Frysinger2-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.
2016-01-10sim: allow the assert configure option everywhereMike Frysinger2-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.
2016-01-10sim: drop targ-vals.def->nltvals.def indirectionMike Frysinger2-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.
2016-01-10sim: allow the inline configure option everywhereMike Frysinger2-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.
2016-01-10sim: drop --enable-sim-{regparm,stdcall} optionsMike Frysinger2-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.
2016-01-10sim: drop --enable-sim-cflags optionMike Frysinger2-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.
2016-01-09sim: drop common/cconfig.h in favor of a single config.hMike Frysinger3-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.
2016-01-06sim: sim_{create_inferior,open,parse_args}: constify argv/env slightlyMike Frysinger2-2/+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.
2016-01-04sim: punt x86-specific bswap logicMike Frysinger2-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.
2016-01-03sim: parse_args: display getopt error ourselvesMike Frysinger2-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.
2016-01-03sim: drop host endian configure optionMike Frysinger3-7/+246
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.
2016-01-03sim: convert to bfd_endianMike Frysinger3-13/+18
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.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-12-30sim: h8300: inline sim_state_initializeMike Frysinger2-27/+7
All the state is handled already by the common cpu allocation which zeros out the entire state.
2015-12-30sim: h8300: simplify h8300_reg_{fetch,store} funcsMike Frysinger2-53/+29
We can leverage the cpu->regs array rather than going through the function helpers to get nice compact code. Further, fix up the return values: return -1 when we can't find a register (and let the caller write out warnings), return 2/4 when we actually write out that amount, and handle the zero reg.
2015-12-30sim: h8300: switch to common sim-resumeMike Frysinger3-40/+57
2015-12-30sim: h8300: move default endian/alignment to configureMike Frysinger4-6/+112
2015-12-30sim: arm/d10v/h8300/m68hc11/microblaze/mips/mn10300/moxie/sh/v850: convert ↵Mike Frysinger2-5/+16
to common sim_{fetch,store}_register
2015-12-30sim: h8300: move unused/buggy lregs arrayMike Frysinger2-4/+5
This array isn't used anywhere, and the init phase actually corrupts some memory because the array has 18 elements but tries to set the 19th (ZERO) position.
2015-12-30sim: h8300: drop unused inst.hMike Frysinger3-104/+5
We can also drop the compile.o rule since the common dep generation logic takes care of this for us.
2015-12-26sim: punt WITH_DEVICES & tconfig.h supportMike Frysinger3-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.
2015-12-24sim: h8300: move h8300-specific options out of common codeMike Frysinger3-5/+62
Register the options in sim_open like other arches to avoid having to hack up the common modules.
2015-12-24sim: delete SIM_HAVE_SIMCACHEMike Frysinger2-6/+4
This was used by the old run interface, but we punted that awhile ago, so drop this define too.
2015-11-22sim: h8300: delete global callback/kind/nameMike Frysinger2-47/+27
We can use the sim state everywhere now to get these values on the fly.
2015-11-16sim: sim-stop/sim-reason/sim-reg: move to common obj listMike Frysinger2-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.
2015-11-15sim: h8300: convert to common sim_{reason,stop}Mike Frysinger3-15/+8
This ends up being pretty easy as the h8300 port already supports much of the common engine core.
2015-11-15sim: clean up redundant objectsMike Frysinger2-2/+5
Some of the target makefiles listed objects that were already pulled in via SIM_NEW_COMMON_OBJS. Clean those up.
2015-11-15sim: sim-close: unify sim_close logicMike Frysinger2-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.
2015-11-10sim: h8300: drop unused littleendian variableMike Frysinger2-13/+5
2015-07-24Remove leading/trailing white spaces in ChangeLogH.J. Lu1-22/+22
2015-06-23sim: use AS_HELP_STRING everywhereMike Frysinger2-8/+16
This helps standardize the configure --help output.
2015-06-12sim: update configure.in->configure.ac docsMike Frysinger2-1/+5
A few places still refer to the configure.in file; update them.
2015-06-12sim: drop -DTRACE from configureMike Frysinger2-3/+7
No code uses this anymore and the symbol conflicts with the new TRACE helper. Punt it from configure.
2015-04-18sim: unify SIM_CPU definitionMike Frysinger2-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.
2015-04-18sim: unify sim_cia definitionMike Frysinger2-3/+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.
2015-04-17sim: replace CIA_{GET,SET} with CPU_PC_{GET,SET}Mike Frysinger2-2/+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.
2015-04-17sim: arm/cr16/d10v/h8300/microblaze/sh: fill out sim-cpu pc fetch/store helpersMike Frysinger3-0/+31
This makes the common sim-cpu logic work.
2015-04-15sim: unify sim-cpu usageMike Frysinger3-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.
2015-04-15sim: cris/frv/h8300/iq2000/lm32/m32r/sh64: standardize cpu stateMike Frysinger3-3/+22
This sets up the sim_state structure and the cpu member to match what we do in most other sims, and what the common code suggests. This is a step to unifying on the sim-cpu.o object.
2015-04-13sim: fix the PKGVERSION defineMike Frysinger2-2/+6
This should be SIM, not GDB.
2015-04-06sim: move sim-engine.o/sim-hrw.o to the common listMike Frysinger2-1/+4
This makes these two objects available to all sims by default.
2015-04-02Regenerate configure in simH.J. Lu1-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.
2015-04-02sim: clean up SIM_EXTRA_OBJS referencesMike Frysinger2-3/+6
This variable was deleted in previous commits and is not used anymore. Prune any stray references to it.
2015-04-01Regenerate configure in simH.J. Lu1-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.
2015-04-01sim: update zlib handlingMike Frysinger3-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.
2015-03-24sim: erc32/h8300/m68hc11: trim unused functionsMike Frysinger3-29/+5
These funcs are only used with the old run.o, and these sims use nrun.o, so drop these stub funcs.
2015-03-16sim: rename tconfig.in to tconfig.hMike Frysinger4-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.