aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/dgen.c
AgeCommit message (Collapse)AuthorFilesLines
2022-12-20sim: ppc: drop old dgen.c generatorMike Frysinger1-334/+0
The spreg.[ch] files live in the source tree now and are created with the dgen.py script, so we don't need this old tool anymore.
2022-12-19sim: ppc: change spreg switch table generation to compile-timeMike Frysinger1-11/+10
Simplify the generator by always outputting the switch tables, and leave the choice of whether to use them to the compiler via a -D flag.
2022-11-10sim: ppc: drop support for dgen -L optionMike Frysinger1-5/+1
Nothing passes this to dgen, and even if it did, nothing would happen because the generated spreg.[ch] files don't include any references back to the original data table. So drop it to simplify.
2022-11-10sim: ppc: collapse is_readonly & length switch tables heavilyMike Frysinger1-7/+15
Since we know we'll return 0 by default, we don't have to output case statements for readonly or length fields whose values are also zero. This is the most common case by far and thus generates a much smaller switch table in the end.
2022-11-10sim: ppc: collapse is_valid switch table moreMike Frysinger1-1/+4
Instead of writing: case 1: return 1; case 2: return 1; ...etc... Output a single return so we get: case 1: case 2: case ... return 1; This saves ~100 lines of code. Hopefully the compiler was already smart enough to optimize to the same code, but if not, this probably helps there too :).
2022-11-10sim: ppc: pull default switch return outMike Frysinger1-2/+1
This saves a single line for the same result. By itself, it's not interesting, but we can further optimize the generated output and completely omit the switch table in some cases. Which we'll do in follow up commits.
2022-11-10sim: ppc: constify spreg tableMike Frysinger1-2/+2
This internal table is only ever read, so constify it.
2022-10-29sim, sim/{m32c,ppc,rl78}: Use getopt_longTsukasa OI1-2/+4
Because of a Libiberty hack, getopt on GNU libc (2.25 or earlier) is currently unusable on sim, causing a regression on CentOS 7. This is caused as follows: 1. If HAVE_DECL_GETOPT is defined (getopt declaration with known prototype is detected while configuration), a declaration of getopt in "include/getopt.h" is suppressed. The author started to define HAVE_DECL_GETOPT in sim with the commit 340aa4f6872c ("sim: Check known getopt definition existence"). 2. GNU libc (2.25 or earlier)'s <unistd.h> includes <getopt.h> with a special purpose macro defined to declare only getopt function but due to include path (not tested while configuration), it causes <unistd.h> to include Libiberty's "include/getopt.h". 3. If both 1. and 2. are satisfied, despite that <unistd.h> tries to declare getopt by including <getopt.h>, "include/getopt.h" does not do so, causing getopt function undeclared. Getting rid of "include/getopt.h" (e.g. renaming this header file) is the best solution to avoid hacking but as a short-term solution, this commit replaces getopt with getopt_long under sim/.
2021-10-31sim: ppc: use silent build rules here tooMike Frysinger1-0/+2
The ppc codebase is unique and doesn't leverage common/, so have to add silent rules to it specifically.
2021-01-11sim: clean up C11 header includesMike Frysinger1-10/+0
Since we require C11 now, we can assume many headers exist, and clean up all of the conditional includes. It's not like any of this code actually accounted for the headers not existing, just whether we could include them. The strings.h cleanup is a little nuanced: it isn't in C11, but every use of it in the codebase will include strings.h only if string.h doesn't exist. Since we now assume the C11 string.h exists, we'll never include strings.h, so we can delete it.
2012-12-19[sim] Update old contact info in GPL license noticesJoel Brobecker1-2/+1
sim/ChangeLog: Update old contact info in GPL license notices.
2012-12-19Update sim copyright headers from GPLv2-or-later to GPLv3-or-later.Joel Brobecker1-1/+1
gdb/sim/ChangeLog: Update the non-FSF-copyrighted files in sim to GPLv3 or later.
2009-11-14 * configure.ac: If build != host, create a separate build-config.hNathan Froyd1-1/+1
file desecribing the build machine. * configure: Regenerate. * lf.c: Include build-config.h instead of config.h. * dgen.c: Likewise. * igen.c: Likewise. * misc.c: Likewise. * misc.h: Likewise. * filter.c: Likewise. * table.c: Likewise.
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+336
1999-04-16Initial creation of sourceware repositoryStan Shebs1-333/+0
1995-11-02Use autoconf correctly; provide more stats with -IMichael Meissner1-3/+17
1995-11-02Andrew's latest changes & print all instruction counts if -IMichael Meissner1-0/+319