Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
|
|
|
|
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().
|
|
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.
|
|
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
|
|
The sim read/write buffer functions deal with address_word's, not
unsigned_words's, so make sure the local raddr variable matches
accordingly.
|
|
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'
|
|
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
|
|
The profile_print_addr_ranges() function is only used when
SIM_HAVE_ADDR_RANGE is defined, so #ifdef it accordingly.
|
|
GCC likes to warn when static comes after const:
dv-glue.c:191: warning: 'static' is not at beginning of declaration
|
|
GCC currently emits warnings like:
nrun.c: In function 'usage':
nrun.c:223: warning: old-style function definition
|
|
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.
|
|
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().
|
|
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.
|
|
* interp.c (sim_create_inferior): Fix crashes on zero PROG_BFD or ARGV.
|
|
|
|
* 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.
|
|
Include stdio.h and errno.h.
Include string.h strings.h stdlib.h sys/stat.h if present.
|
|
|
|
|
|
invalid_arithemetic_operation.
|
|
|
|
|
|
|
|
* 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.
|
|
(CGEN_INCLUDE_DEPS): Use it.
(CGEN_MAIN_CPU_DEPS): Simplify.
|
|
(SUBWORDTFSI, JOINSIDI): Ditto.
|
|
the result is zero.
|
|
Masaki Muranaka <monaka@monami-software.com> (tiny change)
* interp.c: Don't include sysdep.h
|
|
|
|
|
|
/:
* 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.
|
|
* decode.c: Regenerate.
|
|
|
|
|
|
|
|
* mloop.in: Fix copyright update snafu.
iq2000/
* mloop.in: Fix copyright update snafu.
|
|
|
|
|
|
* 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.
|
|
|
|
|