aboutsummaryrefslogtreecommitdiff
path: root/sim
AgeCommit message (Collapse)AuthorFilesLines
2010-04-12sim: add helper macros for branch profilingMike Frysinger2-0/+21
The profile code has a lot of helper macros already, but none yet for the branch profiling code. So add ones for the basic functions -- taken and untaken branches. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-12sim: add missing values to array initializersMike Frysinger12-60/+74
The sim code has a lot of static initializer for options and devices, but since they aren't using newer struct style, they have to specify a value for every option otherwise gcc spits a lot of warnings about "missing initializer". So add NULL/0 stubs for pointers/values. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-12sim: constify dup_arg_pMike Frysinger2-3/+8
The dup_arg_p function is only given const strings, and it maintains a local table of those const strings. So constify the whole thing to fix the GCC warnings: common/sim-options.c: In function 'sim_parse_args': common/sim-options.c:559: warning: passing argument 1 of 'dup_arg_p' discards qualifiers from pointer target type common/sim-options.c: In function 'print_help': common/sim-options.c:675: warning: passing argument 1 of 'dup_arg_p' discards qualifiers from pointer target type Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-10sim: also constify sim_fpu_print_funcMike Frysinger2-1/+2
2010-04-10sim: constify sim_fpu_print_statusMike Frysinger2-1/+6
I've committed the following patch as obvious. The local "prefix" variable is only assigned const strings, and only passed to printf() functions, so add "const" to avoid gcc warnings: common/sim-fpu.c: In function 'sim_fpu_print_status': common/sim-fpu.c:2508: warning: initialization discards qualifiers from pointer target type common/sim-fpu.c:2566: warning: assignment discards qualifiers from pointer target type Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-10sim: drop duplicate break statements in sim-fpuMike Frysinger2-6/+4
2010-04-10sim: constify save_data()Mike Frysinger2-1/+5
The local save_data() function takes a pointer to a buffer and only uses it as the source to the memcpy() function. Since it is given const strings, GCC likes to spit out warnings: common/sim-trace.c: In function 'trace_prefix': common/sim-trace.c:697: warning: passing argument 5 of 'save_data' discards qualifiers from pointer target type So I've committed this as obvious. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-10sim: add const markings to env stringMike Frysinger2-1/+6
The sim-options code assigns a const string to "char *" in decoding the current environment settings, and only uses it to pass to a printf. GCC outputs the warnings: common/sim-options.c: In function 'standard_option_handler': common/sim-options.c:271: warning: assignment discards qualifiers from pointer target type common/sim-options.c:272: warning: assignment discards qualifiers from pointer target type common/sim-options.c:273: warning: assignment discards qualifiers from pointer target type So I've committed this as "obvious". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-02sim: fix typos in hw-ports.hMike Frysinger2-5/+9
2010-03-30sim: v850: fix build failure after watchpoint constificationMike Frysinger2-2/+7
2010-03-30sim: use socklen_t with accept()Mike Frysinger5-14/+100
The accept() function takes a socklen_t, not an int. Using an int causes: dv-sockser.c: In function 'connected_p': dv-sockser.c:273: warning: pointer targets in passing argument 3 of 'accept' differ in signedness So use the same socklen_t detection code as gdb and convert the accept().
2010-03-30sim: fix printf format warning about non-string literalMike Frysinger3-2/+7
This is the normal "passing a buffer straight to printf makes GCC warn". While we know this particular case is fine, the trend in this source tree is to fix this anyways to avoid the warnings.
2010-03-30sim: constify watchpoint interrupt namesMike Frysinger3-5/+13
GCC issues warnings because const strings like "foo" are passed as char*. sim-watch.c: In function 'watchpoint_type_to_str': sim-watch.c:120: warning: return discards qualifiers from pointer target type
2010-03-30sim: change raddr to address_wordMike Frysinger2-2/+7
The sim read/write buffer functions deal with address_word's, not unsigned_words's, so make sure the local raddr variable matches accordingly.
2010-03-30sim: fix unused cpu_nr warningsMike Frysinger2-1/+6
The trace_option_handler() function only uses cpu_nr when the SIM_HAVE_ADDR_RANGE define is enabled. So move the decl down to where the code exists. Otherwise GCC warns: sim-trace.c: In function 'trace_option_handler': sim-trace.c:236: warning: unused variable 'cpu_nr'
2010-03-30sim: update device_error() prototypeMike Frysinger8-4/+20
The device_error() takes a printf style string, so update the prototype accordingly. The message should be const and it should use an attribute. This fixes gcc warnings like: sim-core.c: In function 'sim_core_map_attach': sim-core.c:200: warning: passing argument 2 of 'device_error' discards qualifiers from pointer target type sim-core.c:237: warning: passing argument 2 of 'device_error' discards qualifiers from pointer target type sim-core.c: In function 'sim_core_attach': sim-core.c:304: warning: passing argument 2 of 'device_error' discards qualifiers from pointer target type sim-core.c:314: warning: passing argument 2 of 'device_error' discards qualifiers from pointer target type sim-core.c:335: warning: passing argument 2 of 'device_error' discards qualifiers from pointer target type sim-core.c:348: warning: passing argument 2 of 'device_error' discards qualifiers from pointer target type
2010-03-30sim: fix unused profile_print_addr_ranges warningMike Frysinger2-0/+7
The profile_print_addr_ranges() function is only used when SIM_HAVE_ADDR_RANGE is defined, so #ifdef it accordingly.
2010-03-30sim: tweak static order on hw_glue_portsMike Frysinger2-1/+5
GCC likes to warn when static comes after const: dv-glue.c:191: warning: 'static' is not at beginning of declaration
2010-03-30sim: convert old style function definitionsMike Frysinger5-26/+21
GCC currently emits warnings like: nrun.c: In function 'usage': nrun.c:223: warning: old-style function definition
2010-03-22sim: always enable support for the --endian optionMike Frysinger2-6/+6
The gdb code always passes down -E <little|big> to the sim core when using the sim target. But the sim core only recognizes this option when the sim supports big endian systems. So for little endian simulators, any attempt to use the sim target fails with: (gdb) target sim gdbsim: invalid option -- 'E' unable to create simulator instance Since always respecting the option doesn't cause any problems, do just that. If someone tries to use an invalid endian, they'll get an error anyways.
2010-03-16sim: avoid TRACE redefine warningsMike Frysinger3-16/+13
The common code sets up an autoconf option --enable-sim-trace which adds -DTRACE= to CPPFLAGS. This causes warnings in the building of some files that declare a local TRACE() helper macro. So punt it from hw-ports.c (since it isn't actually used) and convert hw-properties.c to HW_TRACE().
2010-03-15sim: rename bool argument to avoid stdbool clashMike Frysinger2-1/+6
Including stdbool.h before hw-properties.h results in a build error due to the hw_add_boolean_property function having an argument named "bool" in its prototype. The source file has already be renamed to not use this ("boolean" instead), so match the header to the source.
2010-02-27sim/moxie/Jan Kratochvil2-2/+7
* interp.c (sim_create_inferior): Fix crashes on zero PROG_BFD or ARGV.
2010-02-14* ppc-instructions: Fix missing assignment in last change.Andreas Schwab2-0/+5
2010-02-14 * configure.in: Check if the host has getopt.h.Masaki Muranaka5-0/+138
* configure: Regenerate. * config.in: Regenerate. * main.c: Include config.h. Use HAVE_STDLIB_H, HAVE_UNISTD_H, HAVE_GETOPT_H. Include getopt.h in case HAVE_GETOPT_H is defined.
2010-02-14 * interp.c: Don't include sysdep.h.Masaki Muranaka2-1/+24
Include stdio.h and errno.h. Include string.h strings.h stdlib.h sys/stat.h if present.
2010-02-13regenerate cgen-based filesDoug Evans6-95/+606
2010-02-12Regenerate cgen-derived files.Doug Evans53-795/+720
2010-02-05* ppc-instructions: Fix aliasing bugs when callingAndreas Schwab2-8/+28
invalid_arithemetic_operation.
2010-02-04sim-model.c: Include sim-model.hMike Frysinger2-0/+5
2010-02-04sime-base.h: fix typos in STATE_CPU() examplesMike Frysinger2-3/+8
2010-02-03Fix nop insn for moxieAnthony Green2-11/+20
2010-01-25 common/Doug Evans7-75/+103
* cgen-accfp.c (fextsfdf): New arg how. All callers updated. (ftruncdfsf, floatsisf, flostsidf, ufloatsisf, fixsfsi, fixdfsi, ufixsfsi): Ditto. * cgen-fpu.h (CGEN_FPCONV_KIND): New enum. (struct cgen_fp_ops): Update signatures of floating point conversion operations. frv/ * sem.c: Regenerate. sh64/ * cpu.h: Regenerate.
2010-01-25 * Make-common.in (CGEN_SIM_DEPS): Define.Doug Evans2-9/+19
(CGEN_INCLUDE_DEPS): Use it. (CGEN_MAIN_CPU_DEPS): Simplify.
2010-01-22 * cgen-ops.h (SUBWORDXFSI): Fix word ordering.Doug Evans2-6/+14
(SUBWORDTFSI, JOINSIDI): Ditto.
2010-01-20* m32c.opc (MATH_OP): When doing subtraction, also set carry ifDJ Delorie2-1/+6
the result is zero.
2010-01-18Cannot build mips simulator on darwin.Joel Brobecker2-2/+4
Masaki Muranaka <monaka@monami-software.com> (tiny change) * interp.c: Don't include sysdep.h
2010-01-13Add period to sentence in comment.Anthony Green2-1/+5
2010-01-13Initialize SIM_DESC properly.Anthony Green2-0/+21
2010-01-09Sync Libtool from GCC.Ralf Wildenhues43-25/+126
/: * libtool.m4: Sync from git Libtool. * ltmain.sh: Likewise. * ltoptions.m4: Likewise. * ltversion.m4: Likewise. * lt~obsolete.m4: Likewise. sim/iq2000/: * configure: Regenerate. sim/d10v/: * configure: Regenerate. sim/m32r/: * configure: Regenerate. sim/frv/: * configure: Regenerate. sim/: * avr/configure: Regenerate. * cris/configure: Regenerate. * microblaze/configure: Regenerate. sim/h8300/: * configure: Regenerate. sim/mn10300/: * configure: Regenerate. sim/erc32/: * configure: Regenerate. sim/arm/: * configure: Regenerate. sim/m68hc11/: * configure: Regenerate. sim/lm32/: * configure: Regenerate. sim/sh64/: * configure: Regenerate. sim/v850/: * configure: Regenerate. sim/cr16/: * configure: Regenerate. sim/moxie/: * configure: Regenerate. sim/m32c/: * configure: Regenerate. sim/mips/: * configure: Regenerate. sim/mcore/: * configure: Regenerate. sim/sh/: * configure: Regenerate. gprof/: * Makefile.in: Regenerate. * configure: Regenerate. opcodes/: * Makefile.in: Regenerate. * configure: Regenerate. gas/: * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. ld/: * configure: Regenerate. gdb/testsuite/: * gdb.cell/configure: Regenerate. binutils/: * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. bfd/: * Makefile.in: Regenerate. * configure: Regenerate. bfd/doc/: * Makefile.in: Regenerate.
2010-01-06 * cpu.h: Regenerate.Doug Evans3-5/+10
* decode.c: Regenerate.
2010-01-06 * cgen-types.h (SETDI): Delete, unused.Doug Evans2-2/+4
2010-01-02Regenerate cgen files, update copyright year.Doug Evans93-87/+129
2010-01-01tweak wording of previous checkinDoug Evans2-2/+2
2010-01-01cris/Doug Evans4-2/+10
* mloop.in: Fix copyright update snafu. iq2000/ * mloop.in: Fix copyright update snafu.
2010-01-01Update copyright notices to add year 2010.Joel Brobecker357-368/+401
2009-12-23* rx/rx.c (decode_opcode): btst bit address mask fix.DJ Delorie2-1/+5
2009-12-092009-12-09 Yoshinori Sato <ysato@users.sourceforge.jp>Yoshinori Sato2-42/+42
* compile.c(fetch_1): Fix pre-dec, pre-inc, post-dec and post-inc. Index registers not masked memory areas. Only simply increment or decrement. * compile.c(store_1): Ditto.
2009-12-02 * cgen-engine.h: Remove duplicated comment.Doug Evans2-12/+4
2009-11-30* rx/rx.c (decode_opcode): fix SWHILE logic.DJ Delorie2-3/+7