aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/interp.c
AgeCommit message (Collapse)AuthorFilesLines
2012-05-19 PR 14072Nick Clifton1-0/+1
* wrapper.c: Include config.h before system header files. * callback.c: Include config.h before system header files. * cgen-trace.c: Likewise. * cgen-utils.c: Likewise. * gentmap.c: Likewise. * sim-if.c: Include config.h before system header files. * compile.c: Include config.h before system header files. * sim-main.h: Likewise. * gdb-if.c: Include config.h before system header files. * load.c: Likewise. * syscalls.c: Likewise. * trace.c: Likewise. * interp.c: Include config.h before system header files.
2011-07-05sim: start a unified sim_do_commandMike Frysinger1-10/+0
Since sim_do_command for many people simply calls sim_args_command, start a unified version of it. For people who handle their own options, they could switch to this by using sim_add_option_table instead. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-14sim: punt zfree()Mike Frysinger1-3/+3
The sim keeps track of which allocations are zero-ed internally (via zalloc) and then calls a helper "zfree" function rather than "free". But this "zfree" function simply calls "free" itself. Since I can see no point in this and it is simply useless overhead, punt it. The only real change is in hw-alloc.c where we remove the zalloc_p tracking, and sim-utils.c where zfree is delete. The rest of the changes are a simple `sed` from "zfree" to "free". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-14sim: constify sim_write source buffer (part 2)Mike Frysinger1-1/+1
As pointed out by Sandra Loosemore, a bunch of targets define sim_write themselves instead of using the common/ code. So constify them too. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-18Cannot build mips simulator on darwin.Joel Brobecker1-2/+0
Masaki Muranaka <monaka@monami-software.com> (tiny change) * interp.c: Don't include sysdep.h
2007-09-04* interp.c (options enum): Add OPTION_INFO_MEMORY.Nick Clifton1-0/+45
(display_mem_info): New static variable. (mips_option_handler): Handle OPTION_INFO_MEMORY. (mips_options): Add info-memory and memory-info. (sim_open): After processing the command line and board specification, check display_mem_info. If it is set then call the real handler for the --memory-info command line switch.
2007-02-19 * interp.c (sim_monitor): Flush stdout and stderr file descriptorsThiemo Seufer1-0/+4
after each call to sim_io_write.
2007-02-19 (ColdReset): Set CP0 Config0 to reflect the address size supportedThiemo Seufer1-4/+53
by this simulator. (decode_coproc): Recognise additional CP0 Config registers correctly.
2007-02-19 * cp1.c (value_fpr): Don't inherit existing FPR_STATE forThiemo Seufer1-24/+136
uninterpreted formats. If fmt is one of the uninterpreted types don't update the FPR_STATE. Handle fmt_uninterpreted_32 like fmt_word, and fmt_uninterpreted_64 like fmt_long. (store_fpr): When writing an invalid odd register, set the matching even register to fmt_unknown, not the following register. * interp.c (sim_open): If STATE_MEM_SIZE isn't set then set it to the the memory window at offset 0 set by --memory-size command line option. (sim_store_register): Handle storing 4 bytes to an 8 byte floating point register. (sim_fetch_register): Likewise for reading 4 bytes from an 8 byte register. (sim_monitor): When returning the memory size to the MIPS application, use the value in STATE_MEM_SIZE, not an arbitrary hardcoded value. (cop_lw): Don' mess around with FPR_STATE, just pass fmt_uninterpreted_32 to StoreFPR. (cop_sw): Similarly. (cop_ld): Pass fmt_uninterpreted_64 not fmt_uninterpreted. (cop_sd): Similarly. * mips.igen (not_word_value): Single version for mips32, mips64 and mips16.
2007-02-19 * interp.c (MEM_SIZE): Increase default memory size from 2 to 8Thiemo Seufer1-1/+1
MBytes.
2004-05-122004-05-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>Chris Demetriou1-1/+1
* mips/interp.c (decode_coproc): Sign-extend the address retrieved from COP0_BADVADDR. * mips/sim-main.h (COP0_BADVADDR): Remove a cast.
2003-02-27Index: arm/ChangeLogAndrew Cagney1-2/+2
2003-02-27 Andrew Cagney <cagney@redhat.com> * wrapper.c (sim_create_inferior, sim_open): Rename _bfd to bfd. Index: common/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * sim-utils.h (sim_analyze_program, sim_load_file): Rename _bfd to bfd. * sim-hload.c (sim_load), sim-base.h (sim_state_base): Ditto. * nrun.c (main): Ditto. Index: d10v/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: erc32/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * interf.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: h8300/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * compile.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: h8500/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * compile.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: i960/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * sim-if.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: m32r/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * sim-if.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: m68hc11/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * interp.c (sim_prepare_for_program, sim_open) (sim_create_inferior): Rename _bfd to bfd. Index: mcore/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: mips/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * interp.c (sim_open): (sim_create_inferior): Index: mn10200/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: mn10300/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * interp.c (sim_open, sim_create_inferior, sim_open) (sim_create_inferior): Rename _bfd to bfd. Index: ppc/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * sim_calls.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: sh/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * interp.c (init_dsp, sim_open, sim_create_inferior): Rename _bfd to bfd. Index: v850/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd. Index: z8k/ChangeLog 2003-02-27 Andrew Cagney <cagney@redhat.com> * iface.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
2002-06-18* interp.c (sim_firmware_command): Initialize `address'.Andrew Cagney1-1/+4
2002-06-09Move include/callback.h and include/remote-sim.h to include/gdb/.Andrew Cagney1-2/+2
Update accordingly.
2002-06-042002-06-04 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-10/+10
* sim-main.h (FGRIDX): Remove, replace all uses with... (FGR_BASE): New macro. (FP0_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): New macros. (_sim_cpu): Move 'fgr' member to be right before 'fpr_state' member. (NR_FGR, FGR): Likewise. * interp.c: Replace all uses of FGRIDX with FGR_BASE. * mips.igen: Likewise.
2002-06-032002-06-03 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-5/+5
* cp1.c: fix formatting of switch case and default labels. * interp.c: Likewise. * sim-main.c: Likewise.
2002-05-01[ common/ChangeLog ]Chris Demetriou1-1/+1
2002-05-01 Chris Demetriou <cgd@broadcom.com> * callback.c: Use 'deprecated' rather than 'depreciated.' [ igen/ChangeLog ] 2002-05-01 Chris Demetriou <cgd@broadcom.com> * igen.c: Use 'deprecated' rather than 'depreciated.' [ mips/ChangeLog ] 2002-05-01 Chris Demetriou <cgd@broadcom.com> * interp.c: Use 'deprecated' rather than 'depreciated.' * sim-main.h: Likewise.
2002-05-012002-05-01 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-20/+23
* cp1.c (store_fpr): Remove #ifdef'd out call to UndefinedResult which wouldn't compile anyway. * sim-main.h (unpredictable_action): New function prototype. (Unpredictable): Define to call igen function unpredictable(). (NotWordValue): New macro to call igen function not_word_value(). (UndefinedResult): Remove. * interp.c (undefined_result): Remove. (unpredictable_action): New function. * mips.igen (not_word_value, unpredictable): New functions. (ADD, ADDI, do_addiu, do_addu, BGEZAL, BGEZALL, BLTZAL, BLTZALL) (CLO, CLZ, MADD, MADDU, MSUB, MSUBU, MUL, do_mult, do_multu) (do_sra, do_srav, do_srl, do_srlv, SUB, do_subu): Invoke NotWordValue() to check for unpredictable inputs, then Unpredictable() to handle them.
2002-04-20Revert previous change.Andrew Cagney1-4/+0
2002-04-18* interp.c (sim_open): Disable chunk of code that wrote code inAlexandre Oliva1-0/+4
vector table entries.
2002-03-202002-03-19 Chris G. Demetriou <cgd@broadcom.com>Chris Demetriou1-1069/+0
* interp.c: Move FPU support routines from here to... * cp1.c: Here. New file. * Makefile.in (SIM_OBJS): Add cp1.o to object list. (cp1.o): New target.
2002-03-032002-03-02 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-1/+1
* interp.c (load_word): Use EXTEND32 rather than SIGNEXTEND. * mips.igen (LL, CxC1, MxC1): Likewise.
2002-03-012002-03-01 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-1/+1
* mips.igen (CACHE): Provide instruction-printing string. * interp.c (signal_exception): Comment tokens after #endif.
2001-02-192001-02-19 Ben Elliston <bje@redhat.com>Ben Elliston1-6/+8
* sim-main.h (sim_monitor): Return an int. * interp.c (sim_monitor): Add return values. (signal_exception): Handle error conditions from sim_monitor.
2000-05-29Remove RCS tags to make synchronisation easier.Nick Clifton1-3/+0
2000-04-09Fix printf botch.Andrew Cagney1-2/+2
2000-03-21* simplify eCos testingFrank Ch. Eigler1-5/+6
2000-03-21 Frank Ch. Eigler <fche@redhat.com> * interp.c (sim_open): Sort & extend dummy memory regions for --board=jmr3904 for eCos.
2000-03-02* autoconf correctionFrank Ch. Eigler1-0/+7
* merge from internal repo -> sourceware 2000-03-02 Frank Ch. Eigler <fche@redhat.com> * configure: Regenerated. Tue Feb 8 18:35:01 2000 Donald Lindsay <dlindsay@hound.cygnus.com> * interp.c, mips.igen: all 5 DEADC0DE situations now have sim_io_eprintf calls, conditional on the simulator being in verbose mode.
1999-12-07import gdb-1999-12-06 snapshotJason Molenda1-1/+2
1999-11-17import gdb-1999-11-16 snapshotJason Molenda1-2/+7
1999-09-09import gdb-1999-09-08 snapshotStan Shebs1-1/+6
1999-08-02import gdb-1999-08-02 snapshotJason Molenda1-8/+44
1999-07-19import gdb-1999-07-19 snapshotJason Molenda1-45/+197
1999-07-12import gdb-1999-07-12 snapshotJason Molenda1-5/+37
1999-04-26import gdb-19990422 snapshotStan Shebs1-0/+1
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+3228
1999-04-16Initial creation of sourceware repositoryStan Shebs1-4265/+0
1998-12-30* resolution of eCos-vs.-sky merge conflict!Frank Ch. Eigler1-1/+9
[ChangeLog] 1998-12-30 Frank Ch. Eigler <fche@cygnus.com> * mips.igen (BREAK): Call signal_exception instead of sim_engine_halt. start-sanitize-sky * interp.c (signal_exception): Call SIM_CPU_EXCEPTION_TRIGGER hook. Call sim_engine_halt on BreakPoint. end-sanitize-sky [ChangeLog.sky] 1998-12-30 Frank Ch. Eigler <fche@cygnus.com> * sky-gdb.c (sky_sim_engine_halt): Do not set CIA here.
1998-12-30* eCos->devo merge; tx3904 sanitize tags removedFrank Ch. Eigler1-255/+160
1998-12-29 Frank Ch. Eigler <fche@cygnus.com> * interp.c (sim_open): Allocate jm3904 memory in smaller chunks. (load_word): Call SIM_CORE_SIGNAL hook on error. (signal_exception): Call SIM_CPU_EXCEPTION_TRIGGER hook before starting. For exception dispatching, pass PC instead of NULL_CIA. (decode_coproc): Use COP0_BADVADDR to store faulting address. * sim-main.h (COP0_BADVADDR): Define. (SIM_CORE_SIGNAL): Define hook to call mips_core_signal. (SIM_CPU_EXCEPTION*): Define hooks to call mips_cpu_exception*(). (_sim_cpu): Add exc_* fields to store register value snapshots. * mips.igen (*): Replace memory-related SignalException* calls with references to SIM_CORE_SIGNAL hook. * dv-tx3904irc.c (tx3904irc_port_event): printf format warning fix. * sim-main.c (*): Minor warning cleanups.
1998-11-23Pacify GCC.Andrew Cagney1-7/+5
1998-11-12Add configury for mips-lsi-elf target (32 bit MIPS16).Andrew Cagney1-3/+0
Fix numerous problems with PENDING_* code. In old gencode simulator, don't double tick each cycle. Add BREAK instruction to MIPS16 gencode simulator.
1998-10-27* MONSTER sky -> devo mergeFrank Ch. Eigler1-68/+534
* ChangeLog / ChangeLog.sky entries were merged with original time stamps; a few were moved between the files
1998-07-31 * sim-main.h: shadow NUM_CORE_REGS from tm-txvu.hRon Unrau1-66/+98
* interp.c: use NUM_CORE_REGS * sky-gdb.c (set_fifo_breakpoints): use VIF interrupt bit for break * sky-pke.c (pke_issue): use interrupt bit for break points
1998-06-16 * sky-pke.c(read_pke_pc): return source address of current pcRon Unrau1-4/+8
* sky-pke.c(read_pke_pcx): return index of current pc * sky-pke.h: export read_pke_pcx * interp.c(sim_fetch_registers): read pke pc/pcx * sky-libvpe.c: track name change from GDB * sim-main.h: add vif memory based pc - extend gdb comm area for fifo breakpoints - define SIM_ENGINE_RESTART_HOOK * sky-gdb.c: add support for VIF breakpoints
1998-06-16* Implement remaining bits in VPU_STAT, CMSAR0, CMSAR1, FBRST. Fix COP2 ↵Ian Carmichael1-15/+2
interface * to VI registers (CFC2/CTC2). * * Modified Files: * ChangeLog.sky interp.c sim-main.c sky-pke.h sky-vu.c sky-vu.h
1998-06-12 * interp.c: added call to sky_command_options_end() to closePatrick Macdonald1-1/+8
any open file handles before exiting * sky-gpuif.[c|h]: add disassembly on the fly code, log and log file option support * sky-gdb.[c|h] (sky_command_options_close()): new function, added some body to the log and log file option sections
1998-06-10* Support for sky hardware interrupts. The sky-dma cannot triggerFrank Ch. Eigler1-1/+7
interrupts properly yet (jlemke TODO). Wed Jun 10 13:22:32 1998 Frank Ch. Eigler <fche@cygnus.com> * interp.c (decode_coproc): For TX39, add stub COP0 register #7, to allay warnings. (interrupt_event): Made non-static. start-sanitize-tx3904 * dv-tx3904tmr.c (deliver_tx3904tmr_tick): Correct accidental interchange of configuration values for external vs. internal clock dividers. end-sanitize-tx3904 start-sanitize-sky * sky-device.c (sky_signal_interrupt): New function to generate interrupt event. * sky-device.h: Declare it. * sky-dma.c (check_int1): Call it. * sky-pke.c (pke_begin_interrupt_stall): Call it. end-sanitize-sky
1998-06-10 * Updated several files to place all sky specific runtime optionsPatrick Macdonald1-98/+10
in sky-gdb.c. * Added two new runtime options --sky-debug and --screen-refresh * ChangeLog.sky contains a detailed description of the mods
1998-06-09* Updates to tx3904 peripheral simulations for ECC.Frank Ch. Eigler1-0/+16
Tue Jun 9 12:29:50 1998 Frank Ch. Eigler <fche@cygnus.com> * dv-tx3904cpu.c (deliver_*_interrupt,*_port_event): Set the CAUSE register upon non-zero interrupt event level, clear upon zero event value. * dv-tx3904irc.c (*_port_event): Handle deactivated interrupt signal by passing zero event value. (*_io_{read,write}_buffer): Endianness fixes. * dv-tx3904tmr.c (*_io_{read,write}_buffer): Endianness fixes. (deliver_*_tick): Reduce sim event interval to 75% of count interval. * interp.c (sim_open): Added jmr3904pal board type that adds PAL-based serial I/O and timer module at base address 0xFFFF0000.
1998-06-09* Handle 10 and 20-bit versions of Break instruction. Move handlingIan Carmichael1-44/+1
* of special values from signal_exception() in interp.c into mips.igen. * * Modified: gencode.c interp.c mips.igen sim-main.h