aboutsummaryrefslogtreecommitdiff
path: root/sim
AgeCommit message (Collapse)AuthorFilesLines
2021-11-02gdb/sim: update my email addressAndrew Burgess1-1/+1
gdb: * MAINTAINERS (Global Maintainers): Update my address. (Responsible Maintainers): Likewise. (Write After Approval): Likewise. sim: * MAINTAINERS (Global Maintainers): Update my address.
2021-11-01sim: iq2000: reduce -Wno-error scopeMike Frysinger2-5/+5
Clean up the warnings in sim-if, then reduce the -Werror disable to the files that still aren't clean that now that we require GNU make and can set variables on a per-object basis.
2021-11-01sim: lm32: reduce -Wno-error scopeMike Frysinger3-5/+5
Clean up some warnings in dv-lm32cpu, and all in sim-if, then reduce the -Werror disable to the files that still aren't clean that now that we require GNU make and can set variables on a per-object basis.
2021-11-01sim: frv: reduce -Wno-error scopeMike Frysinger1-2/+2
Only two files in here still generates warnings, so reduce the -Werror disable to that now that we require GNU make and can set variables on a per-object basis.
2021-11-01sim: m32r: reduce -Wno-error scopeMike Frysinger1-2/+2
Only two files in here still generates warnings, so reduce the -Werror disable to that now that we require GNU make and can set variables on a per-object basis.
2021-11-01sim: mips: reduce -Wno-error scopeMike Frysinger2-8/+8
Fix a few printf warnings in sim-main.c, and then we're left with only one file in here still generating warnings, so reduce the -Werror disable to that alone now that we require GNU make and can set variables on a per-object basis.
2021-11-01sim: erc32: reduce -Wno-error scopeMike Frysinger1-2/+2
Only one file in here still generates warnings, so reduce the -Werror disable to that alone now that we require GNU make and can set variables on a per-object basis.
2021-11-01sim: cris: reduce -Wno-error scopeMike Frysinger1-2/+2
Only two files in here still generates warnings, so reduce the -Werror disable to that now that we require GNU make and can set variables on a per-object basis.
2021-11-01sim: sh: reduce -Wno-error scopeMike Frysinger1-2/+2
Only one file in here still generates warnings, so reduce the -Werror disable to that alone now that we require GNU make and can set variables on a per-object basis.
2021-11-01sim: or1k: build with -WerrorMike Frysinger1-3/+0
The only warnings left in this port are a few maybe-uninitialized, but we don't abort the build for them, so turn on -Werror everywhere.
2021-11-01sim: igen: minor build output alignment fixMike Frysinger1-1/+1
The custom echo was off by one space relative to all the others.
2021-11-01sim: ppc: fix the printf fix for 32-bit systemsMike Frysinger1-1/+1
The time delta is a 64-bit value too.
2021-11-01sim: m68hc11: clean up pointer castsMike Frysinger1-3/+3
The void *data field is used to past arbitrary data between event handlers, and these are using it to pass an integer. Fix up the casts to avoid using (long) to cast to/from pointers since there is no guarantee that's the right size.
2021-11-01sim: d10v: clean up pointer castsMike Frysinger1-6/+6
Use %p to print pointers instead of trying to cast them to longs.
2021-10-31sim: bfin: cast pointers using uintptr_tMike Frysinger28-61/+61
We can't assume that sizeof(long) == sizeof(void*), so change all these casts over to uintptr_t.
2021-10-31sim: ppc: clean up printf format handlingMike Frysinger9-117/+116
Don't blindly cast every possible type to (long). Change to the right printf format specifier whether it be a 64-bit type or a pointer.
2021-10-31sim: ppc: switch core types to stdint.h typesMike Frysinger1-12/+11
There's no need to define these ourselves anymore, so switch to the stdint.h types. This will be important when we start using PRI* defines with printf formats.
2021-10-31sim: mn10300: clean up pointer castsMike Frysinger2-9/+9
The void *data field is used to past arbitrary data between event handlers, and these are using it to pass an enum. Fix up the casts to avoid using (long) to cast to/from pointers since there is no guarantee that's the right size.
2021-10-31sim: events: clean up trace castsMike Frysinger1-72/+83
Don't blindly cast every possible type to (long). Change to the right printf format specifier whether it be a 64-bit type or a pointer.
2021-10-31sim: ppc: handle \r in igen inputs [PR sim/28476]Mike Frysinger1-8/+16
Make sure we consume & ignore \r bytes in inputs in case the file encodings are from a non-LF systems (e.g. Windows).
2021-10-31sim: ppc: constify strings in igen toolingMike Frysinger13-50/+51
2021-10-31sim: ppc: use silent build rules here tooMike Frysinger3-50/+50
The ppc codebase is unique and doesn't leverage common/, so have to add silent rules to it specifically.
2021-10-31sim: rl78: drop obsolete manual dependency rulesMike Frysinger1-15/+0
We have GNU make generate these for us automatically now, so there's no need to manually specify any deps.
2021-10-31sim: drop unused targ-vals.h includesMike Frysinger6-7/+0
This is used in a few places where it's not needed. Drop the include to avoid the build-time generated header file as we move to drop it.
2021-10-31sim: unify callback.o buildingMike Frysinger3-1/+22
Now that the use of TARGET_xxx defines have been removed, we can move this to the common logic so we only build it once for multi-targets.
2021-10-31sim: nltvals: pull target open flags out into a dedicated source fileMike Frysinger6-45/+106
Like we just did for pulling out the errno & signal maps, pull out the open flag map into a dedicated common file. All newlib ports are using the same map which makes it easy.
2021-10-31sim: nltvals: localize TARGET_<open> definesMike Frysinger3-25/+40
Code should not be using these directly, instead they should be resolving these dynamically via the open_map. Rework the common callback code that was using the defines to use symbolic names instead, and localize some of the defines in the ARM code (since it's a bit unclear how many different APIs it supports currently), then remove the defines out of the header so no new code can rely on them.
2021-10-31sim: nltvals: pull target signal out into a dedicated source fileMike Frysinger6-65/+157
Like we just did for pulling out the errno map, pull out the signal map into a dedicated common file. All newlib ports are using the same signal map which makes it easy.
2021-10-31sim: nltvals: pull target errno out into a dedicated source fileMike Frysinger7-147/+384
The current system maintains a list of target errno constants in the nltvals.def file, then runs a build-time tool to turn that into a C file. This list of errno values is the same for all arches, so we don't need the arch-specific flexibility. Further, these are only for newlib/libgloss environments, which makes it confusing to support other userland runtimes (like Linux). Let's simplify to make this easier to understand & build. We don't namespace the variables yet, but sets up the framework for it. Create a new target-newlib-errno.c template file. The template file is hand written, but the inline map is still automatically generated. This allows us to move it to the common set of objects so it's only built once in a multi-target build. Now we can remove the output from the gentmap build-time tool since it's checked into the tree. Then we stop including the errno lists in nltvals.def since nothing uses it.
2021-10-31sim: erc32: use silent build rules with sis linkageMike Frysinger1-1/+1
2021-10-31sim: erc32: fix a few more build warningsMike Frysinger1-5/+8
Tweak the if indentation & brace style to avoid ambiguous warnings. Add ATTRIBUTE_UNUSED to UART functions that aren't used when FAST_UART is defined (which is the default).
2021-10-31sim: erc32: fix signedness compatibility and redefinition warningsOrgad Shaneh4-25/+27
2021-10-31sim: add arch-specific conditional logicMike Frysinger2-33/+532
This will make it easy to include arch-specific logic (build files) as we migrate ports to the common top level build.
2021-10-31sim: v850: delete old gencode logicMike Frysinger1-7/+2
The v850 port used to have a gencode helper, but it was deleted long ago. Clean up the settings that no longer make sense w/out it.
2021-10-31sim: common: merge multiple clean commandsMike Frysinger1-6/+6
This provides a minor speedup when cleaning in a multi-target build.
2021-10-31sim: m32c: tighten up opc2c build outputMike Frysinger2-7/+6
Drop the single debugging line that repeats the command line option, and use the silent build helpers to tighten up output.
2021-10-31sim: tighten up build regen rulesMike Frysinger1-4/+4
Update the makefile & configure related rules to use the silent build helpers.
2021-10-31sim: tighten up gencode outputMike Frysinger4-19/+19
Update the gencode rules to use the silent build helpers.
2021-10-31sim: igen: tighten up build outputMike Frysinger5-11/+14
Add a new stamp helper for quiet builds, and don't dump the command line options when it runs. That isn't standard tool behavior, and doesn't really seem necessary in any way.
2021-10-31sim: tighten up stamp rulesMike Frysinger8-31/+46
Add a new ECHO_STAMP helper and convert existing stamp code over to it. This is mostly common rules and cgen mloop rules.
2021-10-31sim: silence stamp touch rulesMike Frysinger12-48/+48
We pretty much never care about these stamp touches, so silence them. Also switch to using $@ when it makes sense.
2021-10-31sim: standardize move-if-change rulesMike Frysinger12-188/+158
Use the srcroot path and make them all silent.
2021-10-31sim: mips/v850: remove redundant variable setupMike Frysinger2-7/+0
The common/Make-common.in fragment already provides these variables.
2021-10-30sim: fix compilation on mingw64 [PR sim/28476]Orgad Shaneh4-10/+16
...by reordering includes. 1. sim-utils.c sim/mips/sim-main.h defines UserMode, while there is a struct in winnt.h which has UserMode as a member. So if sim-main.h is included before winnt.h, compilation fails. 2. ppc registers.h defines CR, which is used as a member in winnt.h. winsock2.h is included by sys/time.h, so sys/time.h has to be included before registers.h. Bug: https://sourceware.org/PR28476
2021-10-28[sim] Include defs.h in ppc/hw_memory.cChristian Biesinger1-0/+3
To fix this error (seen on cygwin): /../../sim/ppc/../common ../../../sim/ppc/hw_memory.c In file included from ../../gnulib/import/stdlib.h:100, from ../../../sim/ppc/hw_memory.c:28: ../../gnulib/import/unistd.h:663:3: error: #error "Please include config.h first." 663 | #error "Please include config.h first." | ^~~~~ ../../gnulib/import/unistd.h:665:24: error: expected ';' before 'extern' 665 | _GL_INLINE_HEADER_BEGIN | ^ | ; ../../gnulib/import/unistd.h:2806:22: error: expected ';' before 'extern' 2806 | _GL_INLINE_HEADER_END | ^ | ;
2021-10-04sim: add --info-target for listing supported BFD targetsMike Frysinger1-0/+19
It can be difficult to guess the exact bfd name, so add an option to list all the targets that the current build supports. This aligns with other simulator options like --info-architecture.
2021-10-03sim: filter out SIGSTKSZ [PR sim/28302]Mike Frysinger3-7/+5
We map target signals to host signals so we can propagate signals between the host & simulated worlds. That means we need to know the symbolic names & values of all signals that might be sent. The tools that generate that list use signal.h and include all symbols that start with "SIG" so as to automatically include any new symbols that the C library might add. Unfortunately, this also picks up "SIGSTKSZ" which is not actually a signal itself, but a signal related setting -- it's the size of the stack when a signal is handled. By itself this doesn't super matter as we will never see a signal with that same value (since the range of valid signals tend to be way less than 1024, and the size of the default signal stack will never be that small). But with recent glibc changes that make this into a dynamic value instead of a compile-time constant, some users see build failures when building the sim. As suggested by Adam Sampson, update our scripts to ignore this symbol to simplify everything and avoid the build failure. Bug: https://sourceware.org/PR28302
2021-10-03sim: ppc: fallback when ln is not available [PR sim/18864]Mike Frysinger2-2/+3
Not all systems have easy access to hard links or symlinks, so add fallback logic to the run->psim build code to handle those. Bug: https://sourceware.org/PR18864
2021-09-28sim: drop weak func attrs on module initsMike Frysinger1-1/+1
When I first wrote this, I was thinking we'd scan all source files that existed and generate a complete init list. That means for any particular build, we'd probably have a few functions that didn't exist, so weak attributes was necessary. What I ended up scanning though was only the source files that went into a particular build. There was another concern too: a source file might be included, but the build settings would cause all of its contents to be skipped (via CPP defines). So scanning via naive grep would pick up names not actually available. A check of the source tree shows that we never do this, and it's pretty easy to institute a policy that we don't start (by at the very least including a stub init func). The use of weak symbols ends up causing a problem in practice: for a few modules (like profiling), nothing else pulls it in, so the linker omits it entirely, which leads to the profiling module never being available. So drop the weak markings since we know all these funcs will be available.
2021-09-27configure: regenerate in all projects that use libtool.m4Nick Alcock1-45/+46
(including sim/, which has no changelog.) bfd/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. binutils/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. gas/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. gprof/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. ld/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. libctf/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. * Makefile.in: Regenerate. opcodes/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. zlib/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate.