Age | Commit message (Collapse) | Author | Files | Lines |
|
The $(arch) variable is only setup for cgen ports, so calculate this
value dynamically. We also need to generate multiple inputs in order
to properly recreate the subdir Makefile, so list them all.
|
|
We have some code tripping this warning, but it depends on the gcc
version & optimization levels. We've added some hints to the code
so some versions of gcc work better, but still not all. Let's just
disable the warning like gdb does.
|
|
Fix building on systems w/out a kill function (e.g. Windows).
|
|
This has been upstreamed into cgen itself.
|
|
The array of pointers is never modified, so mark it const so it ends
up in the read-only data section.
|
|
The compiler can still do basic format checks with vprintf style
funcs, so add the printf attribute to these.
|
|
This helps these funcs get printf format checking coverage.
The sim-io.c hack as a result is a bit unfortunate, but the compiler
throws warnings when printing with empty strings. In this one case,
we actually want that due to the side-effect of the callback halting
execution for us.
|
|
These cover functions aren't used anywhere, so drop them. There was
one caller, but it's old DOS code that most likely hasn't been tested
in years, so just delete that too.
|
|
We require C11 now, so we can assume & require long long exists.
Drop this old code that hasn't been used for a long long time.
|
|
Now that all bpf warnings have been cleaned up, turn on -Werror.
|
|
Use PRI macros to display 64-bit types instead of assuming long is
a 64-bit type itself.
|
|
Since there are no callers of this anywhere, nor is the function
implemented by anyone, drop it across the board to cleanup warnings.
|
|
|
|
This hook doesn't return a value, so don't define it to 0 to avoid
the compiler warning about it not being used.
|
|
Some of these were missing includes, some were unused funcs we can
cleanup, and some were missing prototypes for use in other files.
|
|
The %p usage was a real bug that would probably cause a crash.
|
|
This variable isn't set anywhere, so pass down NULL_CIA to indicate
we don't have a pc to pass.
|
|
These functions never return anything, so change the int return type
to void to fix a bunch of compiler warnings about missing return.
|
|
Add explicit braces to if bodies when the body is another if/else
to fix a bunch of compiler warnings.
|
|
These arches use cgen memory functions, so make sure to include the
header in the modules.
|
|
Various files were not including the relevant headers, or some funcs
were missing prototypes entirely, leading to mismatch between the
actual definition of the functions. Add includes to a few places and
fix the broken functions that are uncovered as a result. Fixing some
compile warnings (e.g. missing prototypes) often find real bugs.
|
|
The cgen trace macros are a bit ugly in that they specify a series of
format strings & arguments in a single call. This means we pass a
non-literal string to printf and the compiler warns about it. Use
the diagnostic macros to suppress that in this one place.
|
|
If the user passed in values outside the range of [0, MAX_NR_PROCESSORS),
it would cause the code to access out-of-bind engine function pointers.
Add some asserts to catch that and to fix the related compiler warnings.
|
|
This helps the compiler process calls to these functions and emit
warnings about mismatched format arguments.
|
|
Shouldn't be any functional changes here.
|
|
This fixes missing prototype warnings, and guarantees the prototypes
stay in sync with the function definitions. One of the macros had
fallen out by declaring the wrong return type.
|
|
This fixes missing prototype warnings, and guarantees the prototypes
stay in sync with the function definitions.
|
|
These prototype blocks are not normally used, so they've fallen out
of sync with the actual function definitions. Resync them all.
|
|
Since the value variable usually has an incompatible type for the wide
variety of types it is printed as, add explicit casts to them all.
|
|
|
|
Move the unique library tests to the common code so we can delete
the erc32 configure logic entirely.
|
|
This reduces the unique logic in bfin/configure to make it easier to
(eventually) unify it entirely.
|
|
Add a stub prototype for the dump function meant to be called by devs
from gdb, and trim unused functions that aren't supposed to be used.
|
|
The Linux syscall interface, depending on architecture, handles up to
7 arguments. Extend the callback API to handle those.
|
|
If code tries to send a signal to itself, the callback layer ignores
it and forces the caller to handle it. This allows the sim to turn
that into an engine halt rather than actually killing the sim.
|
|
The cris linux syscall layers assume getpid returns a constant,
so add a custom function to provide that.
|
|
This will make it easier to emulate the syscall. If the kill target
is the sim itself, don't do anything. This forces the higher layers
to make a decision as to how to handle this event: like halting the
overall engine process.
|
|
We rewrite srcdir in subdir Makefiles that we generate from the common
parent dir since it points to the parent dir. Since @srcdir@ can be a
variety of formats (relative & absolute), switch to @abs_srcdir@ which
is a lot easier to adjust. Our use of srcdir in here should handle it.
|
|
Include header for hw funcs called, adjust prototype to match the
args given to it, and adjust cast to match the function.
|
|
There's been a prototype for this forever, but the implementation was
missing. Probably because there weren't any callers, but we'll start
using it to implement the kill function.
|
|
We've been generating the syscall/errno/open maps, but not the signal
map, even though we've been including them in the source constants.
|
|
Rather than hit the OS interface directly, use the existing callback
layer so the instantiator can decide behavior.
|
|
Move the unique configure flag to acinclude.m4 so the common code
can include it, then delete the rx configure logic entirely.
|
|
These ports only use the pieces that have been unified, so we can
merge them into the common configure script and get rid of their
unique one entirely.
We still compile & link separate run programs, and have dedicated
subdir Makefiles, but the configure script portion is merged.
|
|
Move these options up to the common dir so we only test & export
them once across all ports.
|
|
The sim-hardware configure option allows builders to select a set of
device models to enable. But this seems like unnecessary overkill:
the existence of individual device models doesn't affect performance
at all as they are only enabled at runtime if the config uses them,
and individually these are all <5KB a piece. Stripping off a total
of ~50KB from a ~1MB binary doesn't seem useful, and it's extremely
unlikely anyone will ever bother.
So let's simplify the configure/make logic by turning sim-hardware
into a boolean option like many of the other sim options. Any ports
that have unique device models will declare them in their Makefile
instead of at configure time. This will allow us to (eventually)
unify the setting into the common dir.
|
|
Inline the stats printf calls to avoid compiler warnings about
non-literal format strings. This in turn highlights bad type
sizes being passed in, so fix the strings to use the right size
type. This in turn highlights the rest of the func using casts
rather than the right type directly, so adjust all of those.
Finally, replace a few abort+sim_engine_halt calls with the
common sim_engine_abort. This provides good output while still
aborting as we want.
|
|
This will make it possible to merge into the common configure by
making sure we never collide with other arches.
|
|
Now that we've moved all content out to the common file, this is
empty and can be deleted it entirely.
|
|
Move these options up to the common dir so we only test & export
them once across all ports. This takes a page from the cgen maint
logic to make $(MAINT) work for non-automake Makefiles which will
allow us to merge it together.
|