aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/ld-insn.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-03sim: ppc: unify igen filter modulesMike Frysinger1-6/+7
The common igen code was forked from the ppc long ago. The filter module is still pretty similar in API, so we can unfork them with a little bit of effort. The filter.c module is still here because of the unique it_is API. The common igen code doesn't seem to have an equiv API as this only operates on two strings and not an actual filter object, and it's easy enough to leave behind to unfork the rest.
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-7/+7
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: rename igen max_insn_bit_sizeMike Frysinger1-1/+1
We want to avoid conflicts with the common igen enums. This should get migrated over to the common parsing logic, but for now, switch the name to avoid redefinition.
2022-10-19sim/ppc: fix warnings related to printf format stringsAndrew Burgess1-26/+15
This commit is a follow on to: commit 182421c9d2eea8c4877d983a2124e591f0aca710 Date: Tue Oct 11 15:02:08 2022 +0100 sim/ppc: fixes for arguments to printf style functions where commit 182421c9d2ee addressed issues with printf format arguments that were causing the compiler to give an error, this commit addresses issues that caused the compiler to emit a warning. This commit is mostly either changing the format string to match the argument, or in some cases, excess, unused arguments are removed.
2021-10-31sim: ppc: constify strings in igen toolingMike Frysinger1-8/+8
2021-05-15sim: ppc: clean up various warningsMike Frysinger1-1/+1
A random grab bag of minor fixes to enable -Werror for this port. Cast address vars to long when the format was using %l. Use %zu with sizeof operations. Add const to a bunch of strings. Trim unused variables. Fix sizeof call to calculate target storage and not the pointer itself.
2020-07-03sim/ppc: Fix linker error with -fno-commonSebastian Huber1-0/+18
GCC 10 enables -fno-common by default. This resulted in a multiple definition linker error since global variables were declared and defined in a header file: ld: ld-insn.o:sim/ppc/ld-insn.h:221: multiple definition of `max_model_fields_len'; igen.o:sim/ppc/ld-insn.h:221: first defined here sim/ppc * ld-insn.h (last_model, last_model_data, last_model_function, last_model_internal, last_model_macro, last_model_static): Delete. (max_model_fields_len, model_data, model_functions, model_internal, model_macros, model_static, models): Declare, but do not define. * ld-insn.c (last_model, last_model_data, last_model_function, last_model_internal, last_model_macro, last_model_static, max_model_fields_len, model_data, model_functions, model_internal, model_macros, model_static, models): Define.
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.
2003-06-202003-06-19 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-3/+45
* ld-insn.h: Update copyright. (cache_fields): Define. (insn_table_fields): Add insn_field_6 and insn_field_7. (load_insn_table): Pass in the "cache_rules". * ld-insn.c: Update copyright. (load_insn_table): Add parameter "cache_rules". Handle "cache", "computed" and "scratch" fields. (main): Pass "cache_rules" to load_insn_table. * ld-cache.h: Update copyright. (append_cache_table): Declare. * ld-cache.c: Update copyright. (append_cache_table): New function. (load_cache_table): Call. * gen-model.c: Include "ld-cache.h". * gen-itable.c: Include "ld-cache.h". * igen.c: Move #include "ld-cache.h" to earlier. Update copyright. (main): Permit a NULL "cache_rules". Pass address of "cache_rules" to load_insn_table. * Makefile.in (tmp-ld-insn): Add "ld-cache.o". (tmp-igen): Do not include ppc-cache-rules. (gen-itable.o, gen-model.o): Add "ld-cache.h". * ppc-cache-rules: Delete file. * ppc-instructions: Add cache rules.
2002-01-12* Makefile.in (tmp-igen): Pass -I $(srcdir) to igen.Matthew Green1-2/+25
* 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/+925
1999-04-16Initial creation of sourceware repositoryStan Shebs1-925/+0
1996-07-23New simulator changes from AndrewMichael Meissner1-0/+925