Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Mostly converting old style prototypes. Also include a few missing
headers, and add static/casts where appropriate.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Just enough to know the sim isn't totally broken.
|
|
|
|
Use separate memory_iread() function for instruction fetching.
Speeds up execution and allows addition of an MMU at a later stage.
|
|
|
|
FT32 is a new high performance 32-bit RISC core developed by FTDI for
embedded applications.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
These funcs are only used with the old run.o, and these sims use nrun.o,
so drop these stub funcs.
|
|
|
|
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.
|
|
Since sim_module_install takes care of this for us, there's no need
to initialize the module twice.
|
|
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.
|
|
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>
|
|
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.
|
|
Looks like unused copy & paste from other sim ports. Drop it.
|
|
This code was calling SIM_AC_OPTION_HARDWARE twice -- we only want and
need to do it once.
|
|
The common code handles this for us now automatically.
|
|
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.
|
|
and G13 mode options.
* cpu.c (rl78_g10_mode): Declare.
(g13_multiply): Declare.
* cpu.h (rl78_g10_mode): Export.
(g13_multiply): Export.
|
|
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.
|
|
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.
|
|
This header is used only with run.o, and both of these use nrun.o.
|
|
This sim doesn't actually use dv-sockser code anywhere, so drop references
to it in its build files.
|
|
* 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.
|
|
|
|
|
|
No functional changes here.
|
|
Fix some various warnings and enable the extra warnings options.
|
|
|
|
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.
|
|
|
|
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.
|
|
Fix the type of the local var to match the function it is passed to.
|
|
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!
|
|
Clean out stub targets and rules that get autogenerated.
|
|
This triggers a bunch of new warnings, so fix some of them.
|
|
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.
|
|
The SIM_AC_COMMON macro already checks for a bunch of headers, so specific
sim ports need not do it themselves.
|
|
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.
|
|
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.
|
|
|
|
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
|