aboutsummaryrefslogtreecommitdiff
path: root/sim/m68hc11/sim-main.h
AgeCommit message (Collapse)AuthorFilesLines
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-12-23sim: m68hc11: move arch-specific settings to internal headerMike Frysinger1-541/+0
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-22sim: move bfd.h include out of sim-main.hMike Frysinger1-2/+0
Not all arches include this in sim-main.h, and the ones that do don't actually use bfd defines in the sim-main.h header. Prune it to make sim-main.h simpler so we can kill it off entirely in the future. We add the include to the files that utilize e.g. bfd_vma though.
2022-12-21sim: enable common sim_cpu usage everywhereMike Frysinger1-2/+0
All ports should be migrated now. Drop the SIM_HAVE_COMMON_SIM_CPU knob and require it be used everywhere now.
2022-12-21sim: m68hc11: invert sim_cpu storageMike Frysinger1-54/+62
2022-10-11sim/m68hc11: Add ATTRIBUTE_PRINTFTsukasa OI1-1/+2
Clang generates a warning if the format string of a printf-like function is not a literal ("-Wformat-nonliteral"). On the default configuration, it causes a build failure (unless "--disable-werror" is specified). To avoid warnings on the printf-like wrapper, it requires proper __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason. This commit adds ATTRIBUTE_PRINTF to a printf-like function.
2022-01-06sim: m68hc11: migrate to standard uintXX_t typesMike Frysinger1-78/+70
This old port setup its own uintXX types, but since we require C11 now, we can assume the standard uintXX_t types exist and use them. Also migrate off the sim-specific unsignedXX types.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-06-20sim: m68hc11: fix unused function warnings with -O0Mike Frysinger1-22/+22
Mark these functions as unused in case they don't get inlined when building with -O0.
2021-06-18sim: split sim-signal.h include outMike Frysinger1-1/+1
The sim-basics.h is too big and includes too many things. This leads to some arch's sim-main.h having circular loop issues with defs, and makes it hard to separate out common objects from arch-specific defs. By splitting up sim-basics.h and killing off sim-main.h, it'll make it easier to separate out the two.
2021-06-17sim: split sim/callback.h include outMike Frysinger1-1/+0
The sim-basics.h is too big and includes too many things. This leads to some arch's sim-main.h having circular loop issues with defs, and makes it hard to separate out common objects from arch-specific defs. By splitting up sim-basics.h and killing off sim-main.h, it'll make it easier to separate out the two. Start with splitting out sim/callback.h.
2021-05-17sim: fully merge sim_state_base into sim_stateMike Frysinger1-2/+0
Now that all ports have migrated to the new framework, drop support for the old sim_state_base layout.
2021-05-17sim: invert sim_state storageMike Frysinger1-7/+2
Currently all ports have to declare sim_state themselves in their sim-main.h and then embed the common sim_state_base & sim_cpu in it. This dynamic makes it impossible to share common object code among multiple ports because the core data structure is always different. Let's invert this relationship: common code declares sim_state, and if the port actually needs state on a per-instance basis, it can use the new arch_data field for it. Most ports don't actually use it, so they don't need to declare anything at all. This is the first in a series of changes: it adds a define to select between the old & new layouts, then converts all the ports that don't need custom state over to the new layout.
2021-05-14sim: create header namespaceMike Frysinger1-2/+2
The gdb/callback.h & gdb/remote-sim.h headers have nothing to do with gdb and are really definitions for the libsim API under the sim/ tree. While gdb uses those headers as a client, it's not specific to it. So create a new sim/ namespace and move the headers there.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-08-16sim: m68hc11: use standard STATIC_INLINE helperMike Frysinger1-25/+22
Rather than redefine inline locally, use the common STATIC_INLINE.
2016-08-13sim: m68hc11: standardize sim_cpu namingMike Frysinger1-138/+138
We use "sim_cpu *cpu" in the sim code base, not "struct _sim_cpu" or the name "proc", so clean up this sim to follow along.
2016-01-03sim: clean up some more device detritusMike Frysinger1-1/+0
Clean up some more remains of WITH_DEVICES that escaped notice. We also clean up GETTWI/SETTWI defines in a few ports where they were copied & pasted and are unused as they happen to be near the device code.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-12-24sim: make LMA loading the default for all targetsMike Frysinger1-2/+0
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: enable watchpoint module everywhereMike Frysinger1-1/+0
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-11-17sim: always enable modulo memoryMike Frysinger1-1/+0
Having this be a config option doesn't make sense: the code size is pretty much the same (as all the logic is still active), and if it's disabled, the sim throws an error if you try to use it. That means we can't break sims that weren't using it before by enabling it all the time.
2015-04-18sim: unify SIM_CPU definitionMike Frysinger1-3/+0
Since every target typedefs this the same way, move it to the common code. We have to leave Blackfin behind here for now because of inter-dependencies on types and headers: sim-base.h includes sim-model.h which needs types in machs.h which needs types in bfim-sim.h which needs SIM_CPU.
2015-04-18sim: unify sim_cia definitionMike Frysinger1-2/+0
Almost every target defines sim_cia the same way -- either using the address_word type directly, or a type of equivalent size. The only odd one out is sh64 (who has 32bit address_word and 64bit cia), and even that case doesn't seem to make sense. We'll put off clean up though of sh64 and at least set up a sensible default for everyone.
2015-04-17sim: replace CIA_{GET,SET} with CPU_PC_{GET,SET}Mike Frysinger1-3/+0
The CIA_{GET,SET} macros serve the same function as CPU_PC_{GET,SET} except the latter adds a layer of indirection via the sim state. This lets models set up different functions at runtime and doesn't reach so directly into the arch-specific cpu state. It also doesn't make sense to have two sets of macros that do exactly the same thing, so lets standardize on the one that gets us more.
2015-04-15sim: unify sim-cpu usageMike Frysinger1-6/+0
Now that all the targets are utilizing CPU_PC_{FETCH,STORE}, and the cpu state is multicore, and the STATE_CPU defines match, we can move it all to the common code.
2015-04-13sim: m68hc11: convert to sim-cpuMike Frysinger1-3/+5
Make cpu allocation fully dynamic so we can leverage the common sim-cpu and its APIs.
2015-03-31sim: m68hc11: fix gcc-5 build error w/restrict keywordMike Frysinger1-1/+1
2015-03-24sim: erc32/h8300/m68hc11: trim unused functionsMike Frysinger1-2/+0
These funcs are only used with the old run.o, and these sims use nrun.o, so drop these stub funcs.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-1/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1-2/+1
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-01-01run copyright.sh for 2011.Joel Brobecker1-1/+1
2010-01-01Update copyright notices to add year 2010.Joel Brobecker1-1/+1
2009-01-14 Update the copyright notice of some of the files I missedJoel Brobecker1-1/+1
in the previous copyright update.
2008-01-01 Updated copyright notices for most files.Daniel Jacobowitz1-1/+1
2007-08-24 Switch the license of all files explicitly copyright the FSFJoel Brobecker1-5/+4
to GPLv3.
2007-01-09Copyright updates for 2007.Daniel Jacobowitz1-1/+2
2003-08-08 * dv-m68hc11tim.c (cycle_to_string): Add flags parameter to betterStephane Carrez1-1/+4
control the translation. (m68hc11tim_print_timer): Update cycle_to_string conversion. (m68hc11tim_timer_event): Fix handling of output compare register with its interrupts. (m68hc11tim_io_write_buffer): Check output compare after setting M6811_TMSK1. (m68hc11tim_io_read_buffer): Fix compilation warning. * dv-m68hc11.c (m68hc11_option_handler): Likewise. * dv-m68hc11spi.c (m68hc11spi_info): Likewise. * dv-m68hc11sio.c (m68hc11sio_info): Likewise. * interrupts.c (interrupts_info): Likewise. (interrupts_reset): Recognize bootstrap mode. * sim-main.h (PRINT_CYCLE, PRINT_TIME): New defines. (_sim_cpu): Add cpu_start_mode. (cycle_to_string): Add flags member. * m68hc11_sim.c (OPTION_CPU_BOOTSTRAP): New option. (cpu_options): Declare new option bootstrap. (cpu_option_handler): Handle it. (cpu_info): Update call to cycle_to_string.
2003-08-08 * sim-main.h (phys_to_virt): Use memory bank parameters to translateStephane Carrez1-5/+14
the physical address in virtual address. (struct _sim_cpu): Add memory bank members. * m68hc11_sim.c (cpu_initialize): Clear memory bank parameters. * interp.c (sim_hw_configure): Create memory bank according to memory bank parameters. (sim_get_bank_parameters): New function to obtain memory bank config from the symbol table. (sim_prepare_for_program): Call it to obtain the memory bank parameters. (sim_open): Call sim_prepare_for_program. * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Use memory bank parameters to check if address is within bank window. (m68hc11cpu_io_read_buffer): Likewise. (attach_m68hc11_regs): Map the memory bank according to memory bank parameters.
2003-08-08 * sim-main.h (PAGE_REGNUM, Z_REGNUM): Use same numbering as gdb.Stephane Carrez1-2/+2
2003-08-08 * m68hc11_sim.c (print_io_word): New function to print 16-bit value.Stephane Carrez1-1/+3
* sim-main.h (print_io_word): Declare. * dv-m68hc11tim.c (tmsk1_desc): New description table for TMSK1. (tflg1_desc): Likewise for TFLG1. (m68hc11tim_info): Print input and output compare registers
2002-08-13 * m68hc11_sim.c (cpu_special): Handle call and rtc instructions.Stephane Carrez1-4/+24
* sim-main.h (M6812_CALL_INDIRECT): Add to enum. (m6811_regs): Add page register. (cpu_set_page, cpu_get_page): New macros. (phys_to_virt): New function. (cpu_get_indexed_operand_addr, cpu_return): Declare. * gencode.c: Identify indirect addressing mode for call and fix daa. (gen_function_entry): New param to tell if src8/dst8 locals are necessary. (gen_interpreter): Use it to avoid generation of unused variables. * interp.c (sim_fetch_register): Allow to read page register; page register, A, B and CCR are only 1 byte wide. (sim_store_register): Likewise for writing.
2002-06-09Move include/callback.h and include/remote-sim.h to include/gdb/.Andrew Cagney1-2/+2
Update accordingly.
2002-03-07 * interp.c (sim_hw_configure): Save the HW cpu pointer in theStephane Carrez1-1/+10
cpu struct. (sim_hw_configure): Connect the capture input/output events. * sim-main.h (_sim_cpu): New member hw_cpu. (m68hc11cpu_set_oscillator): Declare. (m68hc11cpu_clear_oscillator): Declare. (m68hc11cpu_set_port): Declare. * dv-m68hc11.c (m68hc11_options): New for oscillator commands. (m68hc11cpu_ports): New input ports and output ports to reflect the HC11 IOs. (m68hc11_delete): Cleanup any running oscillator. (attach_m68hc11_regs): Create the input oscillators. (make_oscillator): New function. (find_oscillator): New function. (oscillator_handler): New function. (reset_oscillators): New function. (m68hc11cpu_port_event): Handle the new input ports. (m68hc11cpu_set_oscillator): New function. (m68hc11cpu_clear_oscillator): New function. (get_frequency): New function. (m68hc11_option_handler): New function. (m68hc11cpu_set_port): New function. (m68hc11cpu_io_write): Post the port output events. * dv-m68hc11spi.c (set_bit_port): Use m68hc11cpu_set_port to set the output port value. * dv-m68hc11tim.c (m68hc11tim_port_event): Handle CAPTURE event by latching the TCNT value in the register.