aboutsummaryrefslogtreecommitdiff
path: root/sim
AgeCommit message (Collapse)AuthorFilesLines
2023-01-04sim: mips: add multi source to built sourcesMike Frysinger2-1/+6
The multirun generation mode is a bit of a mess as generated run files depend on generate igen files, all with unknown names ahead of time. In the multirun mode, be lazy and declare all of these generated source files as built sources so they'll be created early on.
2023-01-05sim: Move getopt checking inside SIM_AC_PLATFORMTsukasa OI3-42/+46
This commit moves getopt declaration checker originally in sim/ configure.ac; added in commit 340aa4f6872c ("sim: Check known getopt definition existence") to sim/m4/sim_ac_platform.m4 (inside the SIM_AC_PLATFORM macro). It also regenerates configuration files using the maintainer mode.
2023-01-04sim: bpf: fix testsuite due to linker warnings [PR sim/29954]Guillermo E. Martinez1-4/+1
On a bpf-*-* testsuite fails: ./ld/ld-new: warning: test has a LOAD segment with RWX permissions Adjusting `--memory-size=10Mb' to the simulator bpf testsuite passes. Tested on bpf-*-*: Bug: https://sourceware.org/PR29954 sim/testsuite: * bpf/allinsn.exp (SIMFLAGS_FOR_TARGET): Adjust sim flags.
2023-01-04sim: Regenerate using the maintainer modeTsukasa OI1-1/+1
Those files have changed by regenerating using the maintainer mode. The first line of sim/ppc/pk.h have changed by an effect of the commit 319e41e83a40 ("sim: ppc: inline the sim-packages option").
2023-01-02sim: sh: move some generated source files to built sourcesMike Frysinger2-13/+20
This should have been part of the previous commit 80636a54bcfa2bca3dc8f ("sim: build: move generated headers to built sources"), but they were missed because they're .c files effectively treated as .h files.
2023-01-02sim: build: add var for tracking sim enable directlyMike Frysinger2-34/+69
Rather than rely on SIM_SUBDIRS being set, add a dedicated variable to track whether to enable the sim. While the current code works fine, it won't work as we remove the recursive make logic (i.e. the SIM_SUBDIRS variable).
2023-01-02sim: common: drop libcommon.a linkageMike Frysinger2-8/+3
All of these objects should be in libsim.a already, so don't link to it too. In practice it never gets used, but no point in listing it.
2023-01-02sim: build: move generated headers to built sourcesMike Frysinger14-123/+189
Automake's automatic header deptracking has a bootstrap problem where it can't detect generated headers when compiling. We've been handling that by adding a custom SIM_ALL_RECURSIVE_DEPS variable, but that only works when building objects recursively in subdirs. As we move those out to the top-level, we don't have any recursive steps anymore. The Automake approach is to declare those headers in BUILT_SOURCES. This isn't completely foolproof as the Automake manual documents: it only activates for `make all`, not `make foo.o`, but that shouldn't be a huge limitation as it only affects the initial compile. After that, rebuilds should work fine.
2023-01-02sim: cgen: drop common subdir build rulesMike Frysinger2-74/+0
Now that everything has been hoisted to the top-level, we can delete this unused logic.
2023-01-02sim: or1k: hoist cgen rules to top-levelMike Frysinger3-34/+21
2023-01-02sim: m32r: hoist cgen rules to top-levelMike Frysinger3-48/+37
2023-01-02sim: lm32: hoist cgen rules to top-levelMike Frysinger3-22/+21
2023-01-02sim: iq2000: hoist cgen rules to top-levelMike Frysinger3-26/+21
2023-01-02sim: frv: hoist cgen rules to top-levelMike Frysinger3-24/+21
2023-01-02sim: cris: hoist cgen rules to top-levelMike Frysinger3-33/+33
2023-01-02sim: bpf: hoist cgen rules to top-levelMike Frysinger3-90/+67
2023-01-02sim: cgen: hoist rules to the top-level buildMike Frysinger2-0/+113
The rules seem to generate the same output as existing subdir cgen rules with cgen ports, so hopefully this should be correct. These are the last set of codegen rules that we run in subdirs, so this will help unblock killing off subdir builds entirely.
2023-01-02sim: build: use Automake include varsMike Frysinger4-14/+4
Rather than define our own hack for emitting an include statement, use the existing Automake include variables. These have the nice side-effect of being more portable.
2023-01-01sim: replace -I$srcroot/bfd include with -I$srcrootMike Frysinger11-13/+13
Clean up includes a bit by making ports include bfd/ headers explicitly. This matches other projects, and makes it more clear where these headers are coming from.
2023-01-01sim: replace -I$srcroot/opcodes include with -I$srcrootMike Frysinger12-19/+19
Clean up includes a bit by making ports include opcodes/ headers explicitly. This matches other projects, and makes it more clear where these headers are coming from.
2023-01-01sim: build: drop unused SIM_EXTRA_LIBSMike Frysinger3-6/+1
Now that all run binaries are linked in the topdir, this subdir libs variable isn't used anywhere, so punt it.
2023-01-01sim: erc32: drop -I$(srcroot)Mike Frysinger1-1/+1
Since the port doesn't actually use this include, drop it. No other port is doing this either.
2023-01-01sim: drop mention of & support for subdir configureMike Frysinger3-105/+2
Now that no ports use these common configure APIs, delete the logic and remove it from the documentation.
2023-01-01sim: refresh copyright dates a bitMike Frysinger6-7/+7
Update a few files that were missed, and revert the generated Automake output that uses dates from Automake itself.
2023-01-01sim: or1k: drop unused rulesMike Frysinger1-12/+0
These rules are the same as the common ones, so drop them to simplify.
2023-01-01sim: iq2000: drop unused cpu define logicMike Frysinger1-6/+0
These defines seem to have been added in anticipation of adding another cpu port (IQ10BF?), but that was over 20 years ago, and that port has yet to materialize. So drop these compile flags since they don't do anything to the generated code. If another port ever shows up, it's easy enough to readd things as needed.
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker721-721/+721
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-12-27sim: build: clean up unused codegen logicMike Frysinger2-11/+1
Now that all igen ports are in the top-level makefile, we don't need this logic in any subdirs anymore, so clean it up.
2022-12-27sim: mips: hoist "multi" igen rules up to common buildsMike Frysinger5-153/+248
Since these are the last mips igen rules, we can clean up a number of bits in the local Makefile.in.
2022-12-27sim: mips: hoist "m16" igen rules up to common buildsMike Frysinger5-111/+217
2022-12-27sim: mips: hoist "single" igen rules up to common buildsMike Frysinger5-79/+147
2022-12-27sim: mips: rename "igen" generation mode to "single"Mike Frysinger4-60/+60
The naming in here has grown organically and is confusing to follow. Originally there was only one set of rules for generating code from the igen sources, so calling it "tmp-igen" and such made sense. But when other multigen modes were added ("m16" & "multi") which also used igen, it's not clear what's common igen and what's specific to this generation mode. So rename the set of rules from "igen" to "single" so it's easier to follow.
2022-12-27sim: mips: hoist itable igen rules up to common buildsMike Frysinger3-62/+121
Since this rule is pretty simple, hoist it up to the common build.
2022-12-27sim: mips: unify itable generation (a bit)Mike Frysinger3-34/+26
The m16 & multi targets generate itable once even when all the other modules are generated multiple times. The default igen target will generate itable with everything else out of convenience. This means flags are passed which don't affect the generated itable there. We can unify the itable generation by making sure the right -F/-M filter variables are passed down. Since there's already a dedicated rule & variable in the multi build mode, generalize that and switch the m16 & igen builds over too. I spent a lot of time staring at this code, building for diff mips targets, and exploring all the shell code paths. I think this is safe, but only time (and users) will really tell.
2022-12-27sim: mips: rename multi_flags to igen_itable_flagsMike Frysinger4-16/+16
This variable is only used to generate the itable files. In preparation for merging the itable logic among all ports, rename "multi_flags" to a more appropriate "igen_itable_flags" variable. There should be no real chagnes here otherwise.
2022-12-27sim: mips: drop unused micromips igen logicMike Frysinger4-165/+2
This code appears to be unused since it was first merged. When micromips was enabled, it was via the "MULTI" config, not the "MICROMIPS" config, and the multi configs have sep vars. Since nothing sets SIM_MIPS_GEN=MICROMIPS in the config, all of this should be unreachable, so punt it to simplify. Further, the SIM_MIPS_MICROMIPS16_FLAGS & SIM_MIPS_MICROMIPS_FLAGS settings rely on sim_mips_micromips{,16}_{filter,machine} variables that are never set in the configure script.
2022-12-25sim: build: drop support for subdir distcleanMike Frysinger1-5/+2
All ports that need to clean things up at distclean time have moved to the top-level build, so we can drop support for this hook.
2022-12-25sim: mips: move distclean settings to common buildMike Frysinger3-28/+28
This was missed when mips/configure was merged into the top-level.
2022-12-25sim: smp: plumb igen flag down to all usersMike Frysinger8-17/+22
While mips has respected sim_igen_smp at configure time (which was always empty since it defaulted smp to off), no other igen port did. Move this to a makefile variable and plumb it through the common IGEN_RUN variable instead so everyone gets it by default. We also clean up some redundant -N0 setting with multirun mips.
2022-12-25sim: smp: make option available againMike Frysinger6-8/+48
At some point we want this to work, but it's not easy to test if the configure option isn't available. Restore it, but keep the default off.
2022-12-25sim: cpu: change default init to handle all cpusMike Frysinger28-27/+32
All the runtimes were only initializing a single CPU. When SMP is enabled, things quickly crash as none of the other CPU structs are setup. Change the default from 0 to the compile time value.
2022-12-25sim: msp430: add basic SMP cpu initMike Frysinger1-12/+16
There's no need to assert there's only 1 CPU when setting them all up here is trivial.
2022-12-25sim: m32r: fix iterator typo when setting up cpusMike Frysinger1-1/+1
This code loops over available cpus with "c", but then looks up the cpu with "i". Fix the typo so the code works correctly with smp.
2022-12-25sim: v850: fix SMP compileMike Frysinger3-81/+84
The igen tool sets up the SD & CPU defines for code fragments to use, but v850 was expecting "sd". Change all the igen related code to use SD so it actually compiles, and fix a few places to use "CPU" instead of hardcoding cpu0.
2022-12-25sim: or1k: fix iterator typo when setting up cpusMike Frysinger1-1/+1
This code loops over available cpus with "c", but then looks up the cpu with "i". Fix the typo so the code works correctly with smp.
2022-12-25sim: mn10300: fix SMP compileMike Frysinger3-18/+18
The igen tool sets up the SD define for code fragments to use, but mn10300 was expecting "sd". Change all the igen related code to use SD so it actually compiles.
2022-12-25sim: cpu: fix SMP msg prefix helperMike Frysinger1-4/+7
This code fails to compile when SMP is enabled due to some obvious errors. Fix those and change the logic to avoid CPP to prevent any future rot from creeping back in.
2022-12-24sim: mips: clean up a bit after mips/configure removalMike Frysinger5-13/+5
Now that there is no subdir configure script, we can clean up some logic that was spread between the files.
2022-12-24sim: mips: move igen settings to top-level configureMike Frysinger7-3652/+560
This is the last bit of logic that exists in the mips configure script, so move it to the top-level configure to kill it off. We still have to move the Makefile.in igen logic to local.mk, but this is a required first step for that.
2022-12-24sim: mips: namespace igen configure varsMike Frysinger3-209/+218
To prepare moving this logic to the top-level configure, the vars need to be namespaced. Do that here to make it easier to review. Basically sim_xxx -> SIM_MIPS_XXX when a var is exported from the configure script to the Makefile, and sim_xxx -> sim_mips_xxx when the var is internal in the configure script.