aboutsummaryrefslogtreecommitdiff
path: root/sim
AgeCommit message (Collapse)AuthorFilesLines
2015-06-12sim: bfin: expand CB_SYS_xxx commentMike Frysinger2-1/+7
2015-06-12sim: update configure.in->configure.ac docsMike Frysinger62-40/+162
A few places still refer to the configure.in file; update them.
2015-06-12sim: drop -DTRACE from configureMike Frysinger55-84/+193
No code uses this anymore and the symbol conflicts with the new TRACE helper. Punt it from configure.
2015-06-12sim: msp430: use new common trace print helpersMike Frysinger2-109/+69
Replace the "if (TRACE_xxx_P) trace_generic" form with "TRACE_xxx". The output is the same, but the code is nicer to read.
2015-06-12sim: moxie: use new common trace definesMike Frysinger2-4/+14
Now that there's common helpers for printing trace data, switch to that to restore the insn tracing support for this target.
2015-06-12sim: trace: add common macros for logging infoMike Frysinger8-37/+74
The Blackfin port had some TRACE_xxx macros for easily logging trace data. Use these as a base for common ones that have a simple form and match the existing sets of helper macros.
2015-06-12sim: mips: switch to common WITH_TRACE_ANY_PMike Frysinger4-30/+36
We want to add new common trace helpers including "TRACE", so change the mips one to the new WITH_TRACE_ANY_P macro since they do the same thing.
2015-06-12sim: trace: add WITH_TRACE_ANY_P helperMike Frysinger4-8/+19
We have STRACE_ANY_P and TRACE_ANY_P, so add WITH_TRACE_ANY_P to fill out the API. This lets us wrap the internal configure symbol.
2015-06-12sim: moxie: rename TRACE to MOXIE_TRACE_INSNMike Frysinger2-73/+79
We want to add new common trace helpers including "TRACE", so rename the moxie one to MOXIE_TRACE_INSN. This also matches what the code is doing.
2015-06-12sim: cgen: namespace custom trace functionsMike Frysinger43-7039/+7143
The cgen code declares some macros/funcs using the trace_xxx prefix, but the code isn't generic and only works with cgen targets. This is blocking the creation of new common trace functions. Let's blindly add cgen_xxx prefixes to all these symbols. Some already use this convention to avoid conflicts, so it makes sense to align them. In the future we might want to move some to the common trace core, but one thing at a time.
2015-06-11sim: msp430: delete unused trace macrosMike Frysinger2-48/+6
These macros were copied from the Blackfin port but never used, so delete them as part of the trace unification work.
2015-06-11sim: trace: centralize the system tracingMike Frysinger4-17/+14
First we convert the ETRACE_P to STRACE_EVENTS_P. This means we move from using the sim_events.trace storage to the common sim_state_base.trace_data array. With that deleted, the common trace init code can be simplified so the sim state works the same as the sim cpu.
2015-06-11sim: trace: add STRACE_xxx_P macrosMike Frysinger2-0/+21
These are the parallel to the TRACE_xxx_P macros and fill out the full set to match the existing debug one.
2015-06-11sim: trace: use existing defines for the useful maskMike Frysinger2-4/+5
No point in duplicating the shift logic when we have macros already to keep that all unified.
2015-06-11sim: trace: create a common WITH_TRACE_P macroMike Frysinger2-19/+28
This way we can use the IDX macros everywhere and not worry about the encoding of the WITH_TRACE define in multiple places.
2015-06-11sim: frv: drop custom debug maskMike Frysinger2-5/+4
This is the only sim that sets up its own WITH_TRACE mask and it conflicts with the user setting their own list at configure time. Drop it to match all the other sims.
2015-06-11sim: m68hc11: delete unused interrupt_namesMike Frysinger2-8/+4
The interrupts.c file has a static/fuller definition that is used, so drop this copy in interp.c.
2015-06-11sim: m68hc11: switch to common sim_resumeMike Frysinger3-77/+7
This code already matched the common sim reusme logic, so we can simply drop it and pull in the common code.
2015-06-11sim: mn10300: delete unused memory codeMike Frysinger4-62/+19
Only one place used get_word/put_word, so inline the usage there. All the rest is dead code so trim it.
2015-06-11sim: mn10300: add missing static markingsMike Frysinger2-2/+6
2015-06-11sim: mn10300: delete unused exception/exited/debug stateMike Frysinger4-22/+11
The syscall path was the only code checking the custom exception state after recent cleanups. Once we change that to the common engine halt function, we can delete that state entirely. This also helps highlight some other dead code that we can cull.
2015-06-11sim: mn10300: use common size typesMike Frysinger2-29/+12
No point in open coding this logic here when we have common size types already that give the right answer.
2015-06-11sim: m68hc11/mn10300/v850: delete redundant INLINE definesMike Frysinger7-32/+13
The sim-inline.h header already takes care of this for us, so punt the local definitions.
2015-06-11sim: microblaze: switch to common sim_resume/sim_stop_reasonMike Frysinger4-28/+27
This allows us to use the common code for all exception handling.
2015-06-09Fix latest sim/common/ChangeLog entry.Joel Brobecker1-1/+0
2015-06-09Remove unnecessary empty line in sim/common/ChangeLogJoel Brobecker1-1/+0
2015-06-09Fix spelling mistakes in sim/common/sim-events.c error messages.Mike Stump2-1/+7
sim/common/ChangeLog: * sim-events.c (sim_events_schedule_after_signal): Fix spelling mistake in call to sim_engine_abort. (sim_events_schedule_after_signal): Likewise.
2015-05-17sim: erc32: restore attributionMike Frysinger8-7/+33
2015-05-08Switch erc32 simulator copyright headers to FSF.Joel Brobecker11-150/+158
Permission was granted by Jiri Gaisler, who has a copyright assignment on file for GDB. sim/erc32/ChangeLog: * configure.ac: Add copyright header. * erc32.c: Change copyright holder to FSF. Reformat. * exec.c, float.c, func.c, interf.c, sis.c, sis.h: Likewise. * help.c, startsim: Add copyright header.
2015-04-30Make RL78 disassembler and simulator respect ISA for mul/divDJ Delorie9-11/+121
[gas] * config/rl78-defs.h (rl78_isa_g10): New. (rl78_isa_g13): New. (rl78_isa_g14): New. * config/rl78-parse.y (ISA_G10): New. (ISA_G13): New. (ISA_G14): New. (MULHU, MULH, MULU, DIVHU, DIVWU, MACHU, MACH): Use them. * config/tc-rl78.c (rl78_isa_g10): New. (rl78_isa_g13): New. (rl78_isa_g14): New. [gdb] * rl78-tdep.c (rl78_analyze_prologue): Pass RL78_ISA_DEFAULT to rl78_decode_opcode [include] * dis-asm.h (print_insn_rl78_g10): New. (print_insn_rl78_g13): New. (print_insn_rl78_g14): New. (rl78_get_disassembler): New. * opcode/rl78.h (RL78_Dis_Isa): New. (rl78_decode_opcode): Add ISA parameter. [opcodes] * disassemble.c (disassembler): Choose suitable disassembler based on E_ABI. * rl78-decode.opc (rl78_decode_opcode): Take ISA parameter. Use it to decode mul/div insns. * rl78-decode.c: Regenerate. * rl78-dis.c (print_insn_rl78): Rename to... (print_insn_rl78_common): ...this, take ISA parameter. (print_insn_rl78): New. (print_insn_rl78_g10): New. (print_insn_rl78_g13): New. (print_insn_rl78_g14): New. (rl78_get_disassembler): New. [sim] * rl78/cpu.c (g14_multiply): New. * rl78/cpu.h (g14_multiply): New. * rl78/load.c (rl78_load): Decode ISA completely. * rl78/main.c (main): Expand -M to include other ISAs. * rl78/rl78.c (decode_opcode): Decode based on ISA. * rl78/trace.c (rl78_disasm_fn): New. (sim_disasm_init): Reset it. (sim_disasm_one): Get correct disassembler for ISA.
2015-04-29Fix problems in the sim sources discovered by running the cppcheck static ↵Nick Clifton8-6/+29
analysis tool. erc32 PR 18273 * sis.c (main): Remove unreachable code. m68hc11 * gencode.c (gen_fetch_operands): Remove unreachable code. ppc * hw_htab.c (htab_map_binary): Fix overlap check. common * sim-fpu.c (INLINE_SIM_FPU): Fix static analysis warning by increasing parenthesis around casts to signed values.
2015-04-27sim: avr: Fix 'multiple definition of sim_{read,write}'Senthil Kumar Selvaraj2-1/+6
This patch does whatever was done in https://sourceware.org/ml/gdb-patches/2015-04/msg00437.html to fix broken gdb build for the AVR target.
2015-04-24Fix typos in sim sources exposed by static analysis.Nick Clifton6-4/+23
bfin PR 18273 * bfin-sim.c (decode_dsp32alu_0): Remove spurious check for s == 1. erc32 PR 18273 * exec.c (add32): Fix typo in check for overflow. igen PR 18273 * misc.c (a2i): Fix typos checking for uppercase letters.
2015-04-24Fix typo in check for valid register number in RX sim.Nick Clifton2-1/+6
PR sim/18273 * reg.c (put_reg): Fix check for valid register number.
2015-04-21sim: mcore: clean up printf warningsMike Frysinger2-8/+13
These printf statements are showing "word" objects which are typedefed from long, so make sure to use l with %x when printing them to avoid warnings from gcc.
2015-04-21sim: mcore: convert to common memory/verbose functionsMike Frysinger2-319/+59
Re-use the existing memory core that handles reads/writes. The verbose command is converted to the common --verbose flag since only a few call sites use it now.
2015-04-21sim: mcore: drop watchpoint/dumpmem/clearstats supportMike Frysinger2-73/+12
In preparation for converting to the common memory framework, the custom commands get in our way. But when we realize that gdb support has been dropped for mcore, it makes things a bit easier: the main runner does not let you run arbitrary commands once simulation starts. So lets disable watchpoint support until it can be converted to the common watchpoint logic. There's already an ifdef to let us do that. We straight up drop support for the dumpmem command (no other sim supports this, and if it's a feature people want, we can add a common func) and the clearstats command (not a big deal -- just restart your simulation). We leave in place the verbose check points as a follow up commit will cut that over to common logic.
2015-04-21sim: mcore: switch to common syscall handlingMike Frysinger6-140/+64
Now that libgloss has a header tracking the syscalls for this arch, we can update the database to include it for the symbolic constants/maps. Then we can switch the mcore syscall callbacks over to the common ones.
2015-04-21sim: gennltvals.sh: handle split out newlib source treeMike Frysinger5-17/+32
Since newlib no longer shares the same repo as binutils/gdb, we have to go searching further afield to locate the sources. We still look at the top level for newlib, but if that is not found, we also try up one dir outside of this source tree. It sucks, but better than the status quo (no workie).
2015-04-19sim/erc32: Switched emulated memory to host endian order.Jiri Gaisler7-210/+159
Change data ordering in emulated memory from target order (big endian) to host order. Improves performance and simplifies most memory operations. Requires some byte twisting during stores on little endian hosts (intel). Also removed support for little-endian binaries.
2015-04-18sim: clean up duplicate sim-engine hooksMike Frysinger8-37/+17
Now that we've unified sim-cpu, we can delete the duplicate sim-engine hooks -- these targets defined these only because they didn't fully implement the sim-cpu callbacks.
2015-04-18sim: trim old USING_SIM_BASE_H defineMike Frysinger12-12/+24
This doesn't appear to have been used since 1998, but wasn't cleaned up since. So much for being "quick" ;).
2015-04-18sim: unify SIM_CPU definitionMike Frysinger46-57/+96
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 Frysinger47-54/+101
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: microblaze: switch to common memory functionsMike Frysinger4-332/+33
Re-use the existing memory core that handles reads/writes. This drops support for the dumpmem command, but gdb itself has support for dumping memory regions. The verbose command is converted to the common --verbose flag since only two call sites use it now. Support for the clearstats command is dropped entirely, but no other sim really does this, and the same thing can be done by reloading. If it's important (clearing cycle stats) to someone, we can add a common function for it.
2015-04-17sim: replace CIA_{GET,SET} with CPU_PC_{GET,SET}Mike Frysinger64-116/+184
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-17sim: arm/cr16/d10v/h8300/microblaze/sh: fill out sim-cpu pc fetch/store helpersMike Frysinger13-0/+159
This makes the common sim-cpu logic work.
2015-04-16sim: avr/mcore/moxie: fill out sim-cpu pc fetch/store helpersMike Frysinger7-1/+80
This makes the common sim-cpu logic work.
2015-04-15sim: unify sim-cpu usageMike Frysinger69-139/+126
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-15sim: cris/frv/h8300/iq2000/lm32/m32r/sh64: standardize cpu stateMike Frysinger15-15/+88
This sets up the sim_state structure and the cpu member to match what we do in most other sims, and what the common code suggests. This is a step to unifying on the sim-cpu.o object.