aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/igen.c
AgeCommit message (Collapse)AuthorFilesLines
2022-10-29sim, sim/{m32c,ppc,rl78}: Use getopt_longTsukasa OI1-3/+6
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/.
2022-10-19sim/ppc: fix warnings related to printf format stringsAndrew Burgess1-1/+1
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: 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-06-17sim: ppc: avoid "PAGE_SIZE" nameMike Frysinger1-1/+1
This define is used for a particular target and depends on the simulated CPU hardware. It has no relation to the host CPU that the sim is running on. So rename the common "PAGE_SIZE" here to better reflect its usage and avoid conflicts with system headers.
2021-05-15sim: ppc: clean up various warningsMike Frysinger1-0/+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.
2021-01-04sim: include stdlib.h for atoi()Mike Frysinger1-2/+1
Make sure the files using atoi() include stdlib.h for its prototype. These files were relying on it being included implicitly by others which isn't guaranteed, and newer toolchains produce warnings.
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.
2003-06-202003-06-19 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-4/+5
* 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.
2003-06-192003-06-19 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-3/+7
* Makefile.in (ICACHE_CFLAGS, SEMANTICS_CFLAGS): Delete. (SIM_FPU_FLAGS): Define. (icache.o): Delete explicit compile command. (semantics.o, idecode.o): Delete explicit compile command. (NOWARN_CFLAGS, STD_CFLAGS): Append SIM_FPU_CFLAGS. * gen-support.c (gen_support_c): Generate #include of "sim-inline.h" and "sim-fpu.h", but conditional on HAVE_COMMON_FPU. * gen-idecode.c (gen_idecode_c): Ditto. * igen.c (gen_icache_c, gen_semantics_c): Wrap #include of "sim-inline.h" and "sim-fpu.h" in HAVE_COMMON_FPU conditional. Move to before "support.h". * Makefile.in, gen-support.c, gen-idecode.c, igen.c: Update copyright.
2002-01-12* Makefile.in (tmp-igen): Pass -I $(srcdir) to igen.Matthew Green1-3/+44
* 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.
2001-12-14* support sim-fpu.c for correct FP emulation.Matthew Green1-2/+8
* Makefile.in (LIB_OBJ): Add @sim_fpu@. (ICACHE_CFLAGS, SEMANTICS_CFLAGS): New variables. (icache.o, semantics.o): Add new ICACHE_FLAGS & SEMANTICS_FLAGS. (sim-fpu.o, sim-bits.o, tconfig.h): New targets. * configure.in: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS. Add a check for sim/common/sim-fpu.c. Output sim_fpu and sim_fpu_cflags. * configure: Regenerate. * device.h (device_find_integer_array_property): Match function definition. * gen-icache.c (print_icache_internal_function_declaration): Rename INLINE_ICACHE to PSIM_INLINE_ICACHE. * gen-idecode.c (print_idecode_run_function_header): Rename INLINE_IDECODE to PSIM_INLINE_IDECODE. * gen-semantics.c (print_semantic_function_header): Rename EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS. * gen-support.c (print_support_function_name): Rename INLINE_SUPPORT to PSIM_INLINE_SUPPORT. * igen.c (print_function_name): Also escape `(' and `)'. (gen_semantics_h): Rename EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS. (gen_semantics_c): Likewise. Also output includes for "sim-fpu.h" * inline.h (INLINE_SIM_ENDIAN): Renamed INLINE_PSIM_ENDIAN. (EXTERN_SIM_ENDIAN): Renamed EXTERN_PSIM_ENDIAN. (STATIC_INLINE_SIM_ENDIAN): Renamed STATIC_INLINE_PSIM_ENDIAN. (INLINE_LOCALS): Renamed PSIM_INLINE_LOCALS. (EXTERN_SUPPORT): Renamed PSIM_EXTERN_SUPPORT. (INLINE_SUPPORT): Renamed PSIM_INLINE_SUPPORT. (EXTERN_SEMANTICS): Renamed PSIM_EXTERN_SEMANTICS. (INLINE_SEMANTICS): Renamed PSIM_INLINE_SEMANTICS. (EXTERN_IDECODE): Renamed PSIM_EXTERN_IDECODE. (INLINE_IDECODE): Renamed PSIM_INLINE_IDECODE. (EXTERN_ICACHE): Renamed PSIM_EXTERN_ICACHE. (INLINE_ICACHE): Renamed PSIM_INLINE_ICACHE. * options.c (options_inline): Fix names. * sim-endian-n.h: Change INLINE_SIM_ENDIAN to INLINE_PSIM_ENDIAN. * sim-endian.h: Likewise. * sim-main.h: New file. * std-config.h: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS.
1999-04-26import gdb-19990422 snapshotStan Shebs1-4/+1
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+516
1999-04-16Initial creation of sourceware repositoryStan Shebs1-490/+0
1997-01-27January 23rd mergeMichael Meissner1-11/+23
1996-07-23New simulator changes from AndrewMichael Meissner1-3265/+268
1996-03-23update from andrewMichael Meissner1-105/+73
1995-11-25Sort instruction names; Add igen -R option; count # of CRs that mtcrf movedMichael Meissner1-7/+56
1995-11-24Fix warnings to everything can be compiled with -Wall; Redo model specific ↵Michael Meissner1-5/+5
changes once again to speed things up
1995-11-21Add floating point model specific support; Redo method model specific ↵Michael Meissner1-38/+20
support is done; Add remaining floating add/subtract-multiply
1995-11-17checkpoint ppc simulatorMichael Meissner1-14/+18
1995-11-16Delete old functional_unit support; Add --enable-sim-model-issue; Monitor ↵Michael Meissner1-2/+12
branch prediction success
1995-11-16fix bug in last checkinMichael Meissner1-0/+2
1995-11-16more functional unit changesMichael Meissner1-26/+48
1995-11-15More model specific changesMichael Meissner1-245/+165
1995-11-14make inline model use static when inlining.Michael Meissner1-4/+7
1995-11-14make inline model use static when inlining.Michael Meissner1-7/+11
1995-11-14fix more warningsMichael Meissner1-1/+1
1995-11-14Fix warnings and dependencyMichael Meissner1-16/+1
1995-11-13checkpointMichael Meissner1-245/+337
1995-11-13Add model-functions supportMichael Meissner1-13/+104
1995-11-12Add support for setting model name and other thingsMichael Meissner1-23/+129
1995-11-10Tons of changes to allow model specific information in the instruction file.Michael Meissner1-29/+403
1995-11-09Turn on INLINES if using GCC to compile simulator; Print more stuff if ↵Michael Meissner1-1/+1
requests -t trace; If !WITH_ASSERT, do not check whether illegal bits in instruction are set
1995-11-09General cleanup; add -t options support to print all optionsMichael Meissner1-1/+1
1995-11-02Use autoconf correctly; provide more stats with -IMichael Meissner1-1/+10
1995-11-02Andrew's latest changes & print all instruction counts if -IMichael Meissner1-28/+48
1995-11-01Lots of changesMichael Meissner1-0/+2834