aboutsummaryrefslogtreecommitdiff
path: root/sim/m32r/ChangeLog
AgeCommit message (Collapse)AuthorFilesLines
2021-04-08Do not use old-style definitions in simTom Tromey1-0/+5
This changes all the non-generated (hand-written) code in sim to use "new" (post-K&R) style function definitions. 2021-04-08 Tom Tromey <tom@tromey.com> * bpf.c (bpf_def_model_init): Use new-style declaration. sim/common/ChangeLog 2021-04-08 Tom Tromey <tom@tromey.com> * cgen-utils.c (RORQI, ROLQI, RORHI, ROLHI, RORSI, ROLSI): Use new-style declaration. sim/erc32/ChangeLog 2021-04-08 Tom Tromey <tom@tromey.com> * sis.c (run_sim, main): Use new-style declaration. * interf.c (run_sim, sim_open, sim_close, sim_load) (sim_create_inferior, sim_store_register, sim_fetch_register) (sim_info, sim_stop_reason, flush_windows, sim_do_command): Use new-style declaration. * help.c (usage, gen_help): Use new-style declaration. * func.c (batch, set_regi, set_rega, disp_reg, limcalc) (reset_stat, show_stat, init_bpt, int_handler, init_signals) (disp_fpu, disp_regs, disp_ctrl, disp_mem, dis_mem, event) (init_event, set_int, advance_time, now, wait_for_irq, check_bpt) (reset_all, sys_reset, sys_halt): Use new-style declaration. * float.c (get_accex, clear_accex, set_fsr): Use new-style declaration. * exec.c (sub_cc, add_cc, log_cc, dispatch_instruction, fpexec) (chk_asi, execute_trap, check_interrupts, init_regs): Use new-style declaration. * erc32.c (init_sim, reset, decode_ersr, mecparerror) (error_mode, decode_memcfg, decode_wcr, decode_mcr, sim_halt) (close_port, exit_sim, mec_reset, mec_intack, chk_irq, mec_irq) (set_sfsr, mec_read, mec_write, init_stdio, restore_stdio) (port_init, read_uart, write_uart, flush_uart, uarta_tx) (uartb_tx, uart_rx, uart_intr, uart_irq_start, wdog_intr) (wdog_start, rtc_intr, rtc_start, rtc_counter_read) (rtc_scaler_set, rtc_reload_set, gpt_intr, gpt_start) (gpt_counter_read, gpt_scaler_set, gpt_reload_set, timer_ctrl) (memory_read, memory_write, get_mem_ptr, sis_memory_write) (sis_memory_read): Use new-style declaration. sim/frv/ChangeLog 2021-04-08 Tom Tromey <tom@tromey.com> * sim-if.c (sim_open, frv_sim_close, sim_create_inferior): Use new-style declaration. sim/h8300/ChangeLog 2021-04-08 Tom Tromey <tom@tromey.com> * compile.c (cmdline_location): Use new-style declaration. sim/iq2000/ChangeLog 2021-04-08 Tom Tromey <tom@tromey.com> * sim-if.c (sim_open, sim_create_inferior): Use new-style declaration. * iq2000.c (fetch_str): Use new-style declaration. sim/lm32/ChangeLog 2021-04-08 Tom Tromey <tom@tromey.com> * sim-if.c (sim_open, sim_create_inferior): Use new-style declaration. sim/m32r/ChangeLog 2021-04-08 Tom Tromey <tom@tromey.com> * sim-if.c (sim_open, sim_create_inferior): Use new-style declaration.
2021-04-02sim: unify toolchain settingsMike Frysinger1-0/+4
The toplevel, common, and igen dirs all have their own code for setting up toolchain settings. Unify all of that in a new macro.
2021-02-28sim: require AC_PROG_CPP explicitlyMike Frysinger1-0/+4
All the scripts were using this implicitly already, so there's no real change for them, but we want to call it explicitly as the CPP tool is used to generate nltvals.def.
2021-02-21sim: common: split up acinclude.m4 into individual m4 filesMike Frysinger1-0/+5
This file is quite large and is getting unmanageable. Split it apart to follow aclocal best practices by putting one-macro-per-file. There shouldn't be any real functional changes here as can be seen in the configure script regens.
2021-02-13sim: switch to AC_CONFIG_MACRO_DIRSMike Frysinger1-0/+5
Rather than hand maintain m4 includes in various autotool files, use AC_CONFIG_MACRO_DIRS to declare the relevant search paths. This simplifies the code, makes it more robust, and cleans out unused logic from configure.
2021-02-06sim: watchpoints: use common sim_pc_getMike Frysinger1-0/+4
Few arches implement STATE_WATCHPOINTS()->pc while all of them implement sim_pc_get. Lets switch the sim-watch core for monitoring pc events to the sim_pc_get API so this module works for all ports, and then we can delete this old back channel of snooping in the port's cpu state -- the code needs the pointer to the pc storage so that it can read out bytes and compare them to the watchrange. This also fixes the logic on multi-cpu sims by removing the limitation of only being able to watch CPU0's state.
2021-02-06sim: drop use of bfd/configure.hostMike Frysinger1-0/+4
These settings might have made sense in darker compiler times, but I think they're largely obsolete now. Looking through the values that get used in HDEFINES, it's quite limited, and configure itself should handle them. If we still need something, we can leverage standard autoconf macros instead, after we get a clear user report. TDEFINES was never set anywhere and was always empty, so prune that.
2021-01-30sim: watchpoints: change sizeof_pc to sizeof(sim_cia)Mike Frysinger1-0/+4
Existing ports already have sizeof_pc set to the same size as sim_cia, so simply make that part of the core code. We already assume this in places by way of sim_pc_{get,set}, and this is how it's documented in the sim-base.h API. There is code to allow sims to pick different register word sizes from address sizes, but most ports use the defaults for both (32-bits), and the few that support multiple register sizes never change the address size (so address defaults to register). I can't think of any machine where the register hardware size would be larger than the address word size either. We have ABIs that behave that way (e.g. x32), but the hardware is still equivalent register sized.
2021-01-11sim: call SIM_AC_OPTION_WARNINGS(no) in remaining portsMike Frysinger1-0/+5
We want all ports to opt into extra warnings as the default compiler settings lets a lot slide. Opt all the ports that haven't already in to the warning system. None of them build with -Werror, so disable that by default. Hopefully someone finds these important enough to start fixing at some point.
2021-01-11sim: clean up C11 header includesMike Frysinger1-0/+6
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.
2021-01-09sim: clean up stale AC_PREREQ refsMike Frysinger1-0/+4
This was purged from the tree when we upgraded to autoconf-2.69, but a few references in the sim tree were missed.
2021-01-08sim: require a C11 compilerMike Frysinger1-0/+4
With GDB requiring a C++11 compiler now, this hopefully shouldn't be a big deal. It's been 10 years since C11 came out, so should be plenty of time to upgrade. This will allow us to start cleaning up random header logic and many of our non-standard custom types.
2021-01-04sim: update bug URI to https://Mike Frysinger1-0/+4
2020-11-12m32r sim: Add prototypes for functions that pass/return DI valuesNick Clifton1-0/+8
* m32r-sim.h (m32rbf_h_accum_get_handler): Always provide a prototype for this function. (m32rbf_h_accum_set_handler): Likewise. (m32r2f_h_accums_get_handler): Prototype. (m32r2f_h_accums_set_handler): Prototype.
2020-09-18sim/m32r: return register sizes after fetch and storeAndrew Burgess1-0/+6
The m32r simulator currently always returns -1 for the register size after both a fetch and a store. In the fetch case GDB is forgiving of this, but in the store case GDB treats a return value of -1 as an error. This commit updates the m32r simulator to return a valid register size when fetching or storing a register. This fixes any GDB test that writes to a register, which will include any GDB test that makes an inferior call, for example gdb.base/break.exp. sim/m32r/ChangeLog: * m32r.c (m32rbf_register_size): New function. (m32rbf_fetch_register): Use new function. (m32rbf_store_register): Likewise.
2017-09-06Honor an existing CC_FOR_BUILD in the environment for sim.John Baldwin1-0/+4
This matches the equivalent bits in bfd/acinclude.m4 sim/ChangeLog: * configure.ac: Honor existing CC_FOR_BUILD in environment. * configure: Regenerate. sim/aarch64/ChangeLog: * configure: Regenerate. sim/arm/ChangeLog: * configure: Regenerate. sim/avr/ChangeLog: * configure: Regenerate. sim/bfin/ChangeLog: * configure: Regenerate. sim/common/ChangeLog: * acinclude.m4 (SIM_AC_COMMON) Honor existing CC_FOR_BUILD in environment. sim/cr16/ChangeLog: * configure: Regenerate. sim/cris/ChangeLog: * configure: Regenerate. sim/d10v/ChangeLog: * configure: Regenerate. sim/erc32/ChangeLog: * configure: Regenerate. sim/frv/ChangeLog: * configure: Regenerate. sim/ft32/ChangeLog: * configure: Regenerate. sim/h8300/ChangeLog: * configure: Regenerate. sim/iq2000/ChangeLog: * configure: Regenerate. sim/lm32/ChangeLog: * configure: Regenerate. sim/m32c/ChangeLog: * configure: Regenerate. sim/m32r/ChangeLog: * configure: Regenerate. sim/m68hc11/ChangeLog: * configure: Regenerate. sim/mcore/ChangeLog: * configure: Regenerate. sim/microblaze/ChangeLog: * configure: Regenerate. sim/mips/ChangeLog: * configure: Regenerate. sim/mn10300/ChangeLog: * configure: Regenerate. sim/moxie/ChangeLog: * configure: Regenerate. sim/msp430/ChangeLog: * configure: Regenerate. sim/rl78/ChangeLog: * configure: Regenerate. sim/rx/ChangeLog: * configure: Regenerate. sim/sh/ChangeLog: * configure: Regenerate. sim/sh64/ChangeLog: * configure: Regenerate. sim/v850/ChangeLog: * configure: Regenerate.
2017-02-13sim: use ARRAY_SIZE instead of ad-hoc sizeof calculationsMike Frysinger1-0/+6
2016-01-10sim: move many common settings from CPPFLAGS to config.hMike Frysinger1-0/+4
Rather than stuffing the command line with a bunch of -D flags, start moving things to config.h which is managed by autoheader. This makes the makefile a bit simpler and the build output tighter, and it makes the migration to automake easier as there are fewer vars to juggle. We'll want to move the other options out too, but it'll take more work.
2016-01-10sim: drop unused SIM_AC_OPTION_PACKAGESMike Frysinger1-0/+4
This was imported from the ppc sim, but that was only used to control a single file, and that is already governed by the hw models. There's no need to have a sep configure option here, especially since none of the other sims are using it. Even when the code is enabled, there's no runtime overhead.
2016-01-10sim: allow the environment configure option everywhereMike Frysinger1-0/+5
Currently ports have to call SIM_AC_OPTION_ENVIRONMENT explicitly in order to make the configure flag available. There's no real reason to not allow this flag for all ports, so move it to the common sim macro. This way we get standard behavior across all ports too.
2016-01-10sim: allow the assert configure option everywhereMike Frysinger1-0/+4
Currently ports have to call SIM_AC_OPTION_ASSERT explicitly in order to make the configure flag available, which none of them do. There's no real reason to not allow this flag for all ports, so move it to the common sim macro. This way we get standard behavior across all ports.
2016-01-10sim: drop targ-vals.def->nltvals.def indirectionMike Frysinger1-0/+4
We don't have alternative nltvals.def files, so always symlinking the targ-vals.def file to it doesn't gain us anything. It does make the build more complicated though and a pain to convert to something newer (like automake). Drop the symlinking entirely. In the future, we'll want to explode this file anyways into the respective arch dirs so things can be selected dynamically at runtime, so it's not like we'll be bringing this back.
2016-01-10sim: allow the inline configure option everywhereMike Frysinger1-0/+5
Currently ports have to call SIM_AC_OPTION_INLINE explicitly in order to make the configure flag available. There's no real reason to not allow this flag for all ports, so move it to the common sim macro. This way we get standard behavior across all ports too.
2016-01-10sim: drop --enable-sim-{regparm,stdcall} optionsMike Frysinger1-0/+4
These options were never exposed for most sims (just the ppc one), and they are really only useful on 32-bit x86 systems. Considering modern systems tend to be 64-bit x86_64 and how well modern compilers are at optimizing code, these have outlived their usefulness.
2016-01-10sim: drop --enable-sim-cflags optionMike Frysinger1-0/+4
No other sub directory provides such a configuration option, so drop it from the sim dir as well. This cleans up a good bit of code in the process. If people want to use custom flags for just the sim, they can still run configure+make by hand in the sim subdir and use the normal CFLAGS settings.
2016-01-09sim: drop common/cconfig.h in favor of a single config.hMike Frysinger1-0/+4
The common subdir sets up a cconfig.h file to hold checks for the common code. In practice, most files still end up using config.h instead which just leads to confusion. Merge all the configure checks that went into cconfig.h into SIM_AC_COMMON so we can drop the cconfig.h file altogether. Now there is only a single config.h file like normal.
2016-01-06sim: sim_{create_inferior,open,parse_args}: constify argv/env slightlyMike Frysinger1-0/+5
2016-01-03 Mike Frysinger <vapier@gentoo.org> * sim-options.c (sim_parse_args): Mark argv array const. * sim-options.h (sim_parse_args): Likewise.
2016-01-04sim: punt x86-specific bswap logicMike Frysinger1-0/+4
The compiler/C library should produce reasonable code for htonl/ntohl, and at least glibc tries pretty hard to always produce good code for them. This logic only had support for 32-bit x86 systems anymore, and it's unlikely people were even opting into this, so drop it all.
2016-01-03sim: parse_args: display getopt error ourselvesMike Frysinger1-0/+4
Fix a long standing todo where we let getopt write directly to stderr when an invalid option is passed. Use the sim io funcs instead as they go through the filtered callbacks that gdb wants.
2016-01-03sim: TODO: move to wikiMike Frysinger1-0/+4
We're maintaining development docs in the wiki now: https://sourceware.org/gdb/wiki/Sim/TODO
2016-01-03sim: drop host endian configure optionMike Frysinger1-0/+8
The --enable-sim-hostendian flag was purely so people had an escape route for when cross-compiling. This is because historically, AC_C_BIGENDIAN did not work in those cases. That was fixed a while ago though, so we can require that macro everywhere now and simplify a good bit of code.
2016-01-03sim: convert to bfd_endianMike Frysinger1-0/+9
Rather than re-invent endian defines, as well as maintain our own list of OS & arch-specific includes, punt all that logic in favor of the bfd ones already set up and maintained elsewhere. We already rely on the bfd library, so leveraging the endian aspect should be fine.
2016-01-02sim: iq2000/m32r/lm32/sh64: delete dead option codeMike Frysinger1-0/+4
The iq2000/m32r/sh64 option parsing logic appears to have always been dead. At least iq2000/sh64 are simply copy & paste rot from m32r. The lm32 option parsing hack here hasn't been needed for a while -- this was fixed back in commit 11409fac6b95d71a92848a4499b02d60a4f4c5bb in the common code.
2016-01-02sim: delete dead current_state globalsMike Frysinger1-0/+5
The global current_state handle to the current simulator state is a design idea that was half implemented, but never really cleaned up. The point was to have a global variable pointing to the state so that funcs could more quickly & easily access the state anywhere. We've instead moved in the direction of passing state around everywhere and don't have any intention of moving back. I also can't find any references to gdb using this variable, or to cgen related "dump_regs" functions, both of which were used in the comments related to this code.
2015-12-27sim: unify sim-hloadMike Frysinger1-0/+4
Pretty much all targets are using this module already, so add it to the common list of objects. The only oddball out here is cris and that's because it supports loading via an offset for all the phdrs. We drop support for that.
2015-12-26sim: punt WITH_DEVICES & tconfig.h supportMike Frysinger1-0/+4
No arch is using this anymore, and we want all new ports using the hardware framework instead. Punt WITH_DEVICES and the two callbacks device_io_{read,write}_buffer. We can also punt the tconfig.h file as no port is using it anymore. This fixes in-tree builds that get confused by picking up the wrong one (common/ vs <port>/) caused by commit ae7d0cac8ce971f7108d270c. Any port that needs to set up a global define can use their own sim-main.h file that they must provide regardless.
2015-12-26sim: standardize sim_create_inferior handling of argv a bit moreMike Frysinger1-0/+4
For targets that process argv in sim_create_inferior, improve the code: - provide more details in the comment - make the check for when to re-init more robust - clean out legacy sim_copy_argv code This will be cleaned up more in the future when we have a common inferior creation function, but at least help new ports get it right until then.
2015-12-25sim: m32r: migrate from WITH_DEVICES to WITH_HWMike Frysinger1-0/+16
The m32r port was using the device framework to handle two devices: the cache and uart registers. Both can be implemented in the newer hardware framework instead which allows us to drop the device logic entirely, as well as delete the tconfig.h file. While creating the new uart device model, I also added support for using stdin to read/write data rather than only supporting sockets. This has been lightly tested as there doesn't appear to be test coverage for the code already. If anyone still cares about this port, then they should (hopefully) file bug reports.
2015-12-25sim: sim-model: build for everyoneMike Frysinger1-0/+4
Rather than include this for some targets, set it up so we can build it all the time via the common code. This makes it easier for targets to opt into it when they're ready, increases build coverage, and allows us to centralize much of the logic. We also get to delete tconfig.h from two more targets -- they were setting WITH_DEVICES to 0 which has the same behavior as not defining it at all. While the SIM_HAVE_MODEL knob is gone, we now have WITH_MODEL_P, but it is only used by the common sim-model code. We use it to declare dummy model lists when the arch hasn't created its own.
2015-12-25sim: move MACH/MODEL types into SIM_xxx namespaceMike Frysinger1-0/+8
The "MACH" and "MODEL" names are a bit generic and collide with symbols used by other sections of code (like h8300's opcodes). Since these are sim-specific types, they really should have a "SIM_" prefix.
2015-12-25sim: move WITH_SCACHE_PBB to sim-main.hMike Frysinger1-0/+5
This helps us break up tconfig.h more. Any file using this define should be pulling in sim-main.h already, so things should continue working.
2015-12-25sim: device_error: puntMike Frysinger1-0/+4
Only four targets implement this function, and three of them do nothing. The 4th merely calls abort. Since calls to this function are followed by calls to sim_hw_abort or sim_io_error, this is largely useless. In the two places where we don't, replace the call with sim_engine_abort. We want to kill off the WITH_DEVICES logic in favor of WITH_HW, so this is a good first step.
2015-12-24sim: make LMA loading the default for all targetsMike Frysinger1-0/+4
Most targets already default to loading code via their LMA, but for a few, this means the default changes from loading VMA to LMA. It's better to have the different targets be consistent, and allows some code clean up.
2015-12-24sim: delete old breakpoint codeMike Frysinger1-0/+8
This code relies on the old sim-break module, but that was deleted in 2003. The module only existed for gdb to tell the sim to set breakpoints on its behalf, but then that logic was abandoned in favor of gdb knowing all about proper breakpoints (since it does already for non-sim targets). Some dead code lived on in the older ports though -- clean it up now.
2015-12-24sim: enable watchpoint module everywhereMike Frysinger1-0/+4
We build & bundle the watchpoint module everywhere, but we don't make the command line flags available by default. A few targets opted in, but most did not. Just enable the flag for everyone. Not all targets will respect the flags (making them nops), but shouldn't be a big deal. This is how we handle other common modules already.
2015-12-24sim: delete SIM_HAVE_MEM_SIZEMike Frysinger1-0/+4
This define isn't used anywhere (doesn't seem to ever have been used by versions committed), so delete the commented out code as it's dead.
2015-11-16sim: sim-stop/sim-reason/sim-reg: move to common obj listMike Frysinger1-0/+5
Now that all arches (for the most part) have moved over, move sim-stop.o, sim-reason.o, and sim-reg.o to the common object list and out of all the arch ports.
2015-11-15sim: sim-close: unify sim_close logicMike Frysinger1-0/+4
Other than the nice advantage of all sims having to declare one fewer common function, this also fixes leakage in pretty much every sim. Many were not freeing any resources, and a few were inconsistent as to the ones they did. Now we have a single module that takes care of all the logic for us. Most of the non-cgen based ones could be deleted outright. The cgen ones required adding a callback to the arch-specific cleanup func. The few that still have close callbacks are to manage their internal state. We do not convert erc32, m32c, ppc, rl78, or rx as they do not use the common sim core.
2015-07-24Remove leading/trailing white spaces in ChangeLogH.J. Lu1-14/+14
2015-06-23sim: use AS_HELP_STRING everywhereMike Frysinger1-0/+4
This helps standardize the configure --help output.