aboutsummaryrefslogtreecommitdiff
path: root/sim
AgeCommit message (Collapse)AuthorFilesLines
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.
2022-12-24sim: mips: add igen recursive depMike Frysinger2-24/+28
Make sure the igen tool exists before trying to compile the mips subdir. This happens to work when mips has a subconfigure, but hits a race condition when that is removed.
2022-12-24sim: mips: drop unused ENGINE_ISSUE_POSTFIX_HOOKMike Frysinger2-8/+0
Nothing defines this, and it isn't called in all the engine runtimes, so drop it entirely to avoid confusion.
2022-12-24sim: igen: drop move-if-changed usageMike Frysinger5-322/+155
Now that igen itself has this logic, drop these custom build rules to greatly simplify.
2022-12-24sim: igen: support in-place updates ourselfMike Frysinger2-16/+148
Every file that igen outputs is then processed with the move-if-changed shell script. This creates a lot of boilerplate in the build and not an insignificant amount of build-time overhead. Move the simple "is the file changed" logic into igen itself.
2022-12-24sim: igen: constify itable data structuresMike Frysinger1-16/+18
These are const data arrays of strings and numbers. We don't want or need them to be writable, so mark them all const.
2022-12-23sim: or1k: move arch-specific settings to internal headerMike Frysinger3-30/+30
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to the existing or1k-sim.h. Unfortunately, we can't yet drop the or1k-sim.h include from sim-main.h as many of the generated CGEN files refer only to sim-main.h. We'll have to improve the CGEN interface before we can make more progress, but this is at least a minor improvement.
2022-12-23sim: m32r: move arch-specific settings to internal headerMike Frysinger7-22/+33
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to the existing m32r-sim.h. Unfortunately, we can't yet drop the m32r-sim.h include from sim-main.h as many of the generated CGEN files refer only to sim-main.h. We'll have to improve the CGEN interface before we can make more progress, but this is at least a minor improvement.
2022-12-23sim: bfin: move arch-specific settings to internal headerMike Frysinger7-37/+39
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the bfin.h include and move the remaining bfin-specific settings into it.
2022-12-23sim: m68hc11: move arch-specific settings to internal headerMike Frysinger13-544/+583
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: sh: move arch-specific settings to internal headerMike Frysinger3-96/+120
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: mcore: move arch-specific settings to internal headerMike Frysinger3-40/+66
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: h8300: move arch-specific settings to internal headerMike Frysinger3-147/+155
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: pru: move arch-specific settings to internal headerMike Frysinger2-58/+56
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the pru.h include and move the remaining pru-specific settings into it.
2022-12-23sim: mn10300: standardize the arch-specific settings a littleMike Frysinger4-43/+27
Rename mn10300_sim.h to mn10300-sim.h to match other ports, and move most of the arch-specific content out of sim-main.h to it. This isn't a big win though as we still have to include the header in sim-main.h due to the igen interface: it hardcodes including sim-main.h in its files. So until we can fix that, we have to keep bleeding these settings into the common codes. Also take the opportunity to purge a lot of unused headers from these. The local modules should already include the right headers, so there's no need to force everyone to pull them in. A lot of this is a hold over from the pre-igen days of this port.
2022-12-23sim: microblaze: move arch-specific settings to internal headerMike Frysinger3-24/+47
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: example-synacor: move arch-specific settings to internal headerMike Frysinger4-14/+42
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: moxie: move arch-specific settings to internal headerMike Frysinger3-11/+36
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: riscv: move arch-specific settings to internal headerMike Frysinger5-55/+83
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include. We can also move the machs.h include out since the model logic was all generalized from compile-time to runtime last year.
2022-12-23sim: v850: standardize the arch-specific settings a littleMike Frysinger6-725/+733
Rename v850_sim.h to v850-sim.h to match other ports, and move most of the arch-specific content out of sim-main.h to it. This isn't a big win though as we still have to include the header in sim-main.h due to the igen interface: it hardcodes including sim-main.h in its files. So until we can fix that, we have to keep bleeding these settings into the common codes.
2022-12-23sim: msp430: move arch-specific settings to internal headerMike Frysinger3-8/+4
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the msp430-sim.h include and move it to the few files that actually need it. While we're here, drop redundant includes from sim-main.h: * sim-config.h & sim-types.h included by sim-basics.h already * sim-engine.h included by sim-base.h already And move sim-options.h to the one file that needs it.
2022-12-23sim: ft32: move arch-specific settings to internal headerMike Frysinger2-2/+2
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the ft32-sim.h include and move it to the few files that actually need it.
2022-12-23sim: d10v: move arch-specific settings to internal headerMike Frysinger6-4/+14
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the d10v_sim.h include and move it to the few files that actually need it. Also rename the file to standardize it a bit better with other ports.
2022-12-23sim: cr16: move arch-specific settings to internal headerMike Frysinger5-3/+7
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the cr16_sim.h include and move it to the few files that actually need it. Also rename the file to standardize it a bit better with other ports.
2022-12-23sim: arm: move arch-specific settings to internal headerMike Frysinger5-5/+35
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include. The BIT override would be better in the place where it's redefined, so move it to armdefs.h instead.
2022-12-23sim: aarch64: move arch-specific settings to internal headerMike Frysinger6-35/+66
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include. While we're here, drop redundant includes from sim-main.h: * sim-types.h is included by sim-base.h already * sim-base.h is included twice * sim-io.h is included by sim-base.h already
2022-12-23sim: avr: move arch-specific settings to internal headerMike Frysinger3-18/+42
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: lm32/m32r: drop redundant opcode/cgen.h includeMike Frysinger2-2/+0
The xxx-desc.h header file already includes this, and it's how the other cgen ports are getting it, so drop it from these two.