aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/table.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-03sim: ppc: unify igen line number output modulesMike Frysinger1-1/+1
The common igen code was forked from the ppc long ago. The lf module is still pretty similar in API, so we can unfork them with a little bit of effort. Some of the generated ppc code is now slightly different, but that's because of fixes the common igen code has gained, but not the ppc igen code (e.g. fixing of #line numbers). The ppc code retains lf_print__c_code because the common igen code rewrote the logic to a new table.c API. Let's delay that in the ppc code to at least unfork all this code.
2024-01-01sim: ppc: merge misc igen APIsMike Frysinger1-0/+1
The common igen code provides the same misc APIs as the ppc version, so delete the ppc code and pull in the common one. There is one minor difference: the ppc code has a unique dumpf function. The common code switched to lf_printf for the same functionality, but since that requires changes throughout the igen codebase, delay that cleanup for now so we can merge the rest.
2024-01-01sim: ppc: rework igen error to match commonMike Frysinger1-1/+1
Switch to an ERROR macro and tweak the error signature to match the common igen version in preparation for merging the two implementations.
2024-01-01sim: ppc: drop build-config.h usageMike Frysinger1-1/+0
This header is only used by the igen tool, and none of the igen code depends on the configure-time checks. Delete the logic to simplify to prepare for moving it to the local.mk code.
2023-01-16sim: formally assume unistd.h always exists (via gnulib)Mike Frysinger1-2/+0
We have many uses of unistd.h that are unprotected by HAVE_UNISTD_H, so this is more formalizing the reality that we require this header. Since we switched to gnulib, it guarantees that a unistd.h exists for us to include, so we're doubly OK.
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-01-11sim: clean up C11 header includesMike Frysinger1-3/+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.
2011-02-14sim: punt zfree()Mike Frysinger1-1/+1
The sim keeps track of which allocations are zero-ed internally (via zalloc) and then calls a helper "zfree" function rather than "free". But this "zfree" function simply calls "free" itself. Since I can see no point in this and it is simply useless overhead, punt it. The only real change is in hw-alloc.c where we remove the zalloc_p tracking, and sim-utils.c where zfree is delete. The rest of the changes are a simple `sed` from "zfree" to "free". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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.
2002-01-12* Makefile.in (tmp-igen): Pass -I $(srcdir) to igen.Matthew Green1-20/+86
* igen.c (main): Change -I to add include paths for :include: files. Implement -G as per sim/igen, with just gen-icache=N support. Call load_insn_table() with the built include path. * ld-insn.c (parse_include_entry): New. Load an :include: file. (load_insn_table): New `includes' argument. Look for :include: entries and call parse_include_entry() for them. (main): Adjust load_insn_table() call. * ld-insn.h (model_include_fields): New enum. (load_insn_table): Update prototype. * table.c (struct _open_table, struct _table): Rework structures to handle included files. (table_push): Move the guts of table_open() here. * table.c (struct _open table, struct table): Make table object an indirect ptr to the current table file. (current_line, new_table_entry, next_line): Make file arg type open_table. (table_open): Use table_push. (table_entry_read): Point variable file at current table, at eof, pop last open table. * misc.h (NZALLOC): New macro. From sim/igen. * table.h, table.c (table_push): New function.
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+279
1999-04-16Initial creation of sourceware repositoryStan Shebs1-272/+0
1995-11-16more functional unit changesMichael Meissner1-3/+54
1995-11-08first stage in function unit support; add new switches & latest code from andrewMichael Meissner1-0/+1
1995-11-02Use autoconf correctly; provide more stats with -IMichael Meissner1-0/+220