aboutsummaryrefslogtreecommitdiff
path: root/sim
AgeCommit message (Collapse)AuthorFilesLines
2015-03-28sim: sh: convert to nrunMike Frysinger5-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.
2015-03-28sim: sh: clean up some warningsMike Frysinger3-211/+131
Mostly converting old style prototypes. Also include a few missing headers, and add static/casts where appropriate.
2015-03-28sim: sh: fix broken handling in DSR regMike Frysinger2-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.
2015-03-28sim: sh: clean up gencodeMike Frysinger3-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.
2015-03-28sim: sh: use common configure optionsMike Frysinger4-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.
2015-03-28sim: avr: convert to nrun.oMike Frysinger7-843/+1378
Looks like a lot more work than actually was -- the main decode loop was de-indented by dropping the loop as a step-once function.
2015-03-28sim: avr: start a basic testsuiteMike Frysinger9-0/+78
Just enough to know the sim isn't totally broken.
2015-03-28sim/erc32: Fix a few compiler warningsJiri Gaisler3-10/+18
2015-03-28sim/erc32: Use memory_iread() function for instruction fetching.Jiri Gaisler5-10/+42
Use separate memory_iread() function for instruction fetching. Speeds up execution and allows addition of an MMU at a later stage.
2015-03-28sim: erc32: strip paren from return statementsMike Frysinger7-80/+93
2015-03-28sim: ft32: new portJames Bowman18-0/+18088
FT32 is a new high performance 32-bit RISC core developed by FTDI for embedded applications.
2015-03-24sim: m68hc11/mips/mn10300/v850: add basic sim_pc_getMike Frysinger8-0/+38
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.
2015-03-24sim: profile: disconnect from watchpoint coreMike Frysinger2-12/+11
The profile code was using STATE_WATCHPOINTS to get access to the PC, but we already have a standard method for getting the pc, so switch to that. This assumes that sizeof_pc is the same size as sim_cia, but we already assume this in places by way of sim_pc_{get,set}, and this is how it's documented in the sim-base.h API.
2015-03-24sim: moxie: clean up build time warningsMike Frysinger2-44/+30
2015-03-24sim: moxie: convert to nrun.oMike Frysinger6-189/+201
This port already used a lot of common/ files, so cutting it over to nrun.o and using a few more common objects is pretty straight forward.
2015-03-24sim: erc32/h8300/m68hc11: trim unused functionsMike Frysinger10-85/+21
These funcs are only used with the old run.o, and these sims use nrun.o, so drop these stub funcs.
2015-03-24sim: moxie: switch to common sim-command.oMike Frysinger3-12/+6
2015-03-24sim: clean up SIM_HAVE_BIENDIANMike Frysinger7-11/+15
This define only applies when using the old run.o main. Document it as such, and delete it from mips/sh64 since both use nrun.o now.
2015-03-24sim: m32r: drop duplicate dv_sockser_install callMike Frysinger2-8/+4
Since sim_module_install takes care of this for us, there's no need to initialize the module twice.
2015-03-24sim: Revert "Fix frv/iq2000/m32r/sh64 sim, default hardware to off."Mike Frysinger12-10/+24
This partially reverts commits: 105dd264de9a2fa7eee45eff897aa1d6171c1c4b 3df3af7c3f9095f9dc951fe680ce76f6e497914b c4892a6b37647a0b33a2113b59762f678aabe4b2 9e3042ec073e05a0a5aa56398fd2662c5dcd5002 Now that dv-sockser is handled entirely by the common build logic, the failure these targets were hitting isn't really possible anymore. Lets reset their hardware status back to defaulting to on. Some of these were set to "always" previously, but we don't support that anymore.
2015-03-24sim: fix sim-hardware configure optionMike Frysinger22-67/+67
The current default handling for the --enable-sim-hardware option ends up forcing the value to whatever is set as the first argument when calling the macro (by virtue of how autoconf works). Relocate the setup code to the 4th parameter of the AC_ARG_ENABLE macro to fix it. This was caused by the simplification work in 1517bd274290e06af498ef7e49. Reported-by: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
2015-03-23sim: drop support for requiring hw supportMike Frysinger21-111/+96
Since no sim is using the "always" option to SIM_AC_OPTION_HARDWARE, and we don't want to require hw support to always be enabled, drop the option. This leads to a slight simplification in the macro too as we can collapse the sim_hw_p variable.
2015-03-23sim: cris: delete unused CONFIG_DEVICESMike Frysinger2-3/+5
Looks like unused copy & paste from other sim ports. Drop it.
2015-03-23sim: mn10300: fix duplicated hardware optionMike Frysinger3-119/+4
This code was calling SIM_AC_OPTION_HARDWARE twice -- we only want and need to do it once.
2015-03-23sim: iq2000/mn10300: drop dv-sockser.o referencesMike Frysinger4-7/+11
The common code handles this for us now automatically.
2015-03-23sim: frv: delete UART device supportMike Frysinger2-37/+6
This looks like copy & paste logic from the m32r port (and history suggests this as well). Since building with hw & device support enabled leads to failures: sim/frv/devices.c: In function 'device_io_read_buffer': sim/frv/devices.c:39:15: error: 'UART_INCHAR_ADDR' undeclared (first use in this function) Delete it entirely. We leave device support in place as it is used to flush the scache.
2015-03-23Fix thinko with previous delta to RL78 sim, by adding code to define the G10 ↵Nick Clifton4-2/+14
and G13 mode options. * cpu.c (rl78_g10_mode): Declare. (g13_multiply): Declare. * cpu.h (rl78_g10_mode): Export. (g13_multiply): Export.
2015-03-23sim: dv-sockser: move build to common dirMike Frysinger29-100/+123
If dv-sockser is available, lets add it to the common SIM_HW_OBJS variable so it is always included automatically. Now ports do not have to shoe horn it in directly themselves. It does mean it will be compiled for targets that don't explicitly use it, but that's really what we want anyways.
2015-03-23sim: dv-sockser: add stub funcs when not availableMike Frysinger11-36/+61
This lets ports assume that the dv-sockser API is always available if they want to. This way we don't have to do an abort at configure time and it makes the resulting code a bit simpler.
2015-03-23sim: bfin/msp430: drop run-sim.h includeMike Frysinger4-2/+8
This header is used only with run.o, and both of these use nrun.o.
2015-03-23sim: sh64: delete dv-sockser referencesMike Frysinger2-5/+6
This sim doesn't actually use dv-sockser code anywhere, so drop references to it in its build files.
2015-03-20Fixes implementation of hardware multiply/divide peripheral in RL78 G13 cores.Nick Clifton3-6/+35
* load.c (rl78_load): If the G10, G13 or G14 flag bits are set in the ELF header use them to select the proper emulation mode. * mem.c (mem_put_byte): Use mem_put_hi to store a value into the MDB register. (mem_get_byte): Use mem_get_hi to extract a value from the MDB register.
2015-03-17sim/erc32: Removed type mismatch compiler warningsJiri Gaisler2-9/+19
2015-03-17sim/erc32: Added -v command line switch for verbose outputJiri Gaisler5-12/+23
2015-03-16sim: mcore/microblaze: strip trailing whitespaceMike Frysinger4-140/+148
No functional changes here.
2015-03-16sim: mcore/microblaze: clean up a bitMike Frysinger8-272/+319
Fix some various warnings and enable the extra warnings options.
2015-03-16sim: convert some old prototypesMike Frysinger3-9/+9
2015-03-16sim: rename tconfig.in to tconfig.hMike Frysinger109-404/+410
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.
2015-03-16sim/erc32: use SIM_AC_OPTION_HOSTENDIAN to probe for host endianessJiri Gaisler10-56/+296
2015-03-15sim: dv-sockser: push module init prototype downMike Frysinger22-90/+62
Pull out the duplicated dv_sockser_install prototype from the tconfig.in files and put it in the one place it gets used -- sim-module.c. This is still arguably incorrect, but it's better than the status quo where the tconfig.in has to include header files and duplicate the dv-sockser func. The tconfig header is meant to be simple and contain a target defines.
2015-03-14sim: bfin: fix signed warningMike Frysinger2-1/+5
Fix the type of the local var to match the function it is passed to.
2015-03-14sim: delete unused sim-inline.c ruleMike Frysinger2-9/+5
This dates back to the start of the repo, but has never really been used. The sim-inline.c file has been checked in to the source, and attempts to build it in the build tree leads to a circular dep warning from make. It also doesn't produce a file that is usable -- it can't be compiled. Punt!
2015-03-14sim: mcore/moxie: clean up makefiles a bitMike Frysinger4-11/+12
Clean out stub targets and rules that get autogenerated.
2015-03-14sim: msp430: use common warnings optionsMike Frysinger7-15/+186
This triggers a bunch of new warnings, so fix some of them.
2015-03-14sim: make nrun the default run programMike Frysinger47-37/+157
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.
2015-03-14sim: drop duplicate header checksMike Frysinger52-313/+218
The SIM_AC_COMMON macro already checks for a bunch of headers, so specific sim ports need not do it themselves.
2015-03-14sim: move sim-io.h to sim-assert.hMike Frysinger3-1/+8
Since sim-endian.c doesn't actually use sim_io funcs, it's weird to include the sim-io.h header here. It's doing so only for the assert header. So lets relocate the include to the right place.
2015-03-10sim: bfin: fix up linux-fixed-code.h generation more [PR sim/13160]Mike Frysinger2-1/+7
Add a trailing semi-colon to the sed print command as the BSD sed implementation wants it. It's a nop otherwise and works fine on GNU/etc... implementations too.
2015-03-09sim: bfin: fix bug referenceMike Frysinger1-1/+1
2015-03-09sim: bfin: fix up linux-fixed-code.h generation [PR sim/10143]Mike Frysinger2-3/+11
The use of $< ends up picking the wrong object out of the depend list. Specify the input name directly to avoid fragility. On BSD systems, we need to make sure all options come before the non-options (i.e. the files). Reported-by: Chris Johns <chrisj@rtems.org> URL: https://sourceware.org/bugzilla/show_bug.cgi?id=13160