summaryrefslogtreecommitdiff
path: root/sim/mips/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* sim: sim_{create_inferior,open,parse_args}: constify argv/env slightlyMike Frysinger2016-01-061-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.
* sim: punt x86-specific bswap logicMike Frysinger2016-01-041-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.
* sim: parse_args: display getopt error ourselvesMike Frysinger2016-01-031-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.
* sim: drop host endian configure optionMike Frysinger2016-01-031-0/+5
| | | | | | | 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.
* sim: convert to bfd_endianMike Frysinger2016-01-031-0/+7
| | | | | | | 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.
* sim: delete dead current_state globalsMike Frysinger2016-01-021-0/+4
| | | | | | | | | | | | | 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.
* sim: arm/d10v/h8300/m68hc11/microblaze/mips/mn10300/moxie/sh/v850: convert ↵Mike Frysinger2015-12-301-0/+11
| | | | to common sim_{fetch,store}_register
* sim: unify sim-hloadMike Frysinger2015-12-271-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.
* sim: punt WITH_DEVICES & tconfig.h supportMike Frysinger2015-12-261-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.
* sim: mips: delete mmu stubs to move to common sim_{read,write}Mike Frysinger2015-12-261-0/+19
| | | | | | | | | | | | The only unique thing about mip's sim_{read,write} helpers is the call to address_translation on the incoming address. When we look closer at that function though, we see it's just a stub that maps physical to virtual, and the cache/return values are hardcoded. If we delete this function, we can then collapse all the callers and drop the custom sim_{read,write} logic entirely. Some day we might want to add MMU support, but when we do, we'll want to have the common layers handle things so all targets benefit.
* sim: mips: delete TARGET_TX3904 defineMike Frysinger2015-12-241-0/+5
| | | | With the LMA cleanup, we no longer need this define.
* sim: mips: move SIM_QUIET_NAN_NEGATED to sim-main.hMike Frysinger2015-12-241-0/+5
| | | | | We want to kill off tconfig.h, so move the one define mips still uses to sim-main.h.
* sim: make LMA loading the default for all targetsMike Frysinger2015-12-241-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.
* sim: enable watchpoint module everywhereMike Frysinger2015-12-241-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.
* sim: delete SIM_HAVE_FLATMEM supportMike Frysinger2015-12-241-0/+4
| | | | | | No target has used this, and it's a cheap hack in place in using the common memory module. We want everyone using that though, so drop support for flatmem entirely.
* sim: delete SIM_HAVE_SIMCACHEMike Frysinger2015-12-241-0/+4
| | | | | This was used by the old run interface, but we punted that awhile ago, so drop this define too.
* Fix invalid left shift of negative valueDominik Vogt2015-12-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix occurrences of left-shifting negative constants in C code. sim/arm/ChangeLog: * thumbemu.c (handle_T2_insn): Fix left shift of negative value. * armemu.c (handle_v6_insn): Likewise. sim/avr/ChangeLog: * interp.c (sign_ext): Fix left shift of negative value. sim/mips/ChangeLog: * micromips.igen (process_isa_mode): Fix left shift of negative value. sim/msp430/ChangeLog: * msp430-sim.c (get_op, put_op): Fix left shift of negative value. sim/v850/ChangeLog: * simops.c (v850_bins): Fix left shift of negative value.
* sim: always enable modulo memoryMike Frysinger2015-11-171-0/+4
| | | | | | | | 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.
* sim: sim-stop/sim-reason/sim-reg: move to common obj listMike Frysinger2015-11-161-0/+4
| | | | | | 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.
* sim: sim-close: unify sim_close logicMike Frysinger2015-11-151-0/+8
| | | | | | | | | | | | | | | | 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.
* [PATCH] Add micromips support to the MIPS simulatorAndrew Bennett2015-09-251-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2015-09-25 Andrew Bennett <andrew.bennett@imgtec.com> Ali Lown <ali.lown@imgtec.com> sim/common/ * sim-bits.h (EXTEND6): New macro. (EXTEND12): New macro. (EXTEND25): New macro. sim/mips/ * Makefile.in (tmp-micromips): New rule. (tmp-mach-multi): Add support for micromips. * configure.ac (mips*-sde-elf* | mips*-mti-elf*): Made a multi sim that works for both mips64 and micromips64. (mipsisa32r2*-*-*): Made a multi sim that works for mips32 and micromips32. Add build support for micromips. * dsp.igen (do_ph_s_absq, do_w_s_absq, do_qb_s_absq, do_addsc, do_addwc, do_bitrev, do_extpv, do_extrv, do_extrv_s_h, do_insv, do_lxx do_modsub, do_mthlip, do_mulsaq_s_w_ph, do_ph_packrl, do_qb_pick do_ph_pick, do_qb_ph_precequ, do_qb_ph_preceu, do_w_preceq do_w_ph_precrq, do_ph_qb_precrq, do_w_ph_rs_precrq do_qb_w_raddu, do_rddsp, do_repl, do_shilov, do_ph_shl, do_qb_shl do_w_s_shllv, do_ph_shrlv, do_w_r_shrav, do_wrdsp, do_qb_shrav, do_append, do_balign, do_ph_w_mulsa, do_ph_qb_precr, do_prepend): New functions. Refactored instruction code to use these functions. * dsp2.igen: Refactored instruction code to use the new functions. * interp.c (decode_coproc): Refactored to work with any instruction encoding. (isa_mode): New variable (RSVD_INSTRUCTION): Changed to 0x00000039. * m16.igen (BREAK16): Refactored instruction to use do_break16. (JALX32): Add mips32, mips64, mips32r2 and mips64r2 models. * micromips.dc: New file. * micromips.igen: New file. * micromips16.dc: New file. * micromipsdsp.igen: New file. * micromipsrun.c: New file. * mips.igen (do_swc1): Changed to work with any instruction encoding. (do_add do_addi do_andi do_dadd do_daddi do_dsll32 do_dsra32 do_dsrl32, do_dsub, do_break, do_break16, do_clo, do_clz, do_dclo do_dclz, do_lb, do_lh, do_lwr, do_lwl, do_lwc, do_lw, do_lwu, do_lhu do_ldc, do_lbu, do_ll, do_lld, do_lui, do_madd, do_dsp_madd, do_maddu do_dsp_maddu, do_dsp_mfhi, do_dsp_mflo, do_movn, do_movz, do_msub do_dsp_msub, do_msubu, do_dsp_msubu, do_mthi, do_dsp_mthi, do_mtlo do_dsp_mtlo, do_mul, do_dsp_mult, do_dsp_multu, do_pref, do_sc, do_scd do_sub, do_sw, do_teq, do_teqi, do_tge, do_tgei, do_tgeiu, do_tgeu, do_tlt do_tlti, do_tltiu, do_tltu, do_tne, do_tnei, do_abs_fmt, do_add_fmt do_alnv_ps, do_c_cond_fmt, do_ceil_fmt, do_cfc1, do_ctc1, do_cvt_d_fmt do_cvt_l_fmt, do_cvt_ps_s, do_cvt_s_fmt, do_cvt_s_pl, do_cvt_s_pu do_cvt_w_fmt, do_div_fmt, do_dmfc1b, do_dmtc1b, do_floor_fmt, do_luxc1_32 do_luxc1_64, do_lwc1, do_lwxc1, do_madd_fmt, do_mfc1b, do_mov_fmt, do_movtf do_movtf_fmt, do_movn_fmt, do_movz_fmt, do_msub_fmt, do_mtc1b, do_mul_fmt do_neg_fmt, do_nmadd_fmt, do_nmsub_fmt, do_pll_ps, do_plu_ps, do_pul_ps do_puu_ps, do_recip_fmt, do_round_fmt, do_rsqrt_fmt, do_prefx, do_sdc1 do_suxc1_32, do_suxc1_64, do_sqrt_fmt, do_sub_fmt, do_swc1, do_swxc1 do_trunc_fmt): New functions, refactored from existing instructions. Refactored instruction code to use these functions. (RSVD): Changed to use new reserved instruction. (loadstore_ea, not_word_value, unpredictable, check_mt_hilo, check_mf_hilo, check_mult_hilo, check_div_hilo, check_u64, do_luxc1_32, do_sdc1, do_suxc1_32, check_fmt_p, check_fpu, do_load_double, do_store_double): Added micromips32 and micromips64 models. Added include for micromips.igen and micromipsdsp.igen Add micromips32 and micromips64 models. (DecodeCoproc): Updated to use new macro definition. * mips3264r2.igen (do_dsbh, do_dshd, do_dext, do_dextm, do_dextu, do_di, do_dins, do_dinsm, do_ei, do_ext, do_mfhc1, do_mthc1, do_ins, do_dinsu, do_seb, do_seh do_rdhwr, do_wsbh): New functions. Refactored instruction code to use these functions. * sim-main.h (CP0_operation): New enum. (DecodeCoproc): Updated macro. (IMEM32_MICROMIPS, IMEM16_MICROMIPS, MICROMIPS_MINOR_OPCODE, MICROMIPS_DELAYSLOT_SIZE_ANY, MICROMIPS_DELAYSLOT_SIZE_16, MICROMIPS_DELAYSLOT_SIZE_32, ISA_MODE_MIPS32 and ISA_MODE_MICROMIPS): New defines. (sim_state): Add isa_mode field. sim/testsuite/sim/mips/ * basic.exp (run_micromips_test, run_sim_tests): New functions Add support for micromips tests. * hilo-hazard-4.s: New file. * testutils.inc (_dowrite): Changed reserved instruction encoding. (writemsg): Moved the la and li instructions before the data they are assigned to, which prevents a bug where MIPS32 relocations are used instead of micromips relocations when building for micromips.
* Remove leading/trailing white spaces in ChangeLogH.J. Lu2015-07-241-158/+158
|
* sim: use AS_HELP_STRING everywhereMike Frysinger2015-06-231-0/+4
| | | | This helps standardize the configure --help output.
* sim: update configure.in->configure.ac docsMike Frysinger2015-06-121-0/+5
| | | | A few places still refer to the configure.in file; update them.
* sim: drop -DTRACE from configureMike Frysinger2015-06-121-0/+4
| | | | | No code uses this anymore and the symbol conflicts with the new TRACE helper. Punt it from configure.
* sim: mips: switch to common WITH_TRACE_ANY_PMike Frysinger2015-06-121-0/+13
| | | | | 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.
* sim: clean up duplicate sim-engine hooksMike Frysinger2015-04-181-0/+5
| | | | | | 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.
* sim: unify SIM_CPU definitionMike Frysinger2015-04-181-0/+4
| | | | | | | | 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.
* sim: unify sim_cia definitionMike Frysinger2015-04-181-0/+4
| | | | | | | | 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.
* sim: replace CIA_{GET,SET} with CPU_PC_{GET,SET}Mike Frysinger2015-04-171-0/+10
| | | | | | | | | | 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.
* sim: unify sim-cpu usageMike Frysinger2015-04-151-0/+5
| | | | | | 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.
* sim: fix the PKGVERSION defineMike Frysinger2015-04-131-0/+4
| | | | This should be SIM, not GDB.
* sim: mips: convert to sim-cpuMike Frysinger2015-04-131-0/+11
| | | | | Make cpu allocation fully dynamic so we can leverage the common sim-cpu and its APIs.
* sim: mips: fix prototype warningsMike Frysinger2015-04-131-0/+13
| | | | | Convert a bunch of old style prototypes and tweak various casts to match the function signatures.
* sim: arm/mips: fix sim_read/sim_write linkage errorsMike Frysinger2015-04-121-0/+4
| | | | | | With sim-hrw.o being built & linked in the common list, some people are getting linking errors now for these targets. Move the main objects that provide these functions before the common list to avoid that.
* sim: move sim-engine.o/sim-hrw.o to the common listMike Frysinger2015-04-061-0/+4
| | | | This makes these two objects available to all sims by default.
* sim: run: punt!Mike Frysinger2015-04-011-0/+4
| | | | | | | | | | | Now that all targets have been converted to nrun, we can finally punt this old inconsistent interface. A few stray references to the old run were sprinkled about; clean them up in the process. We leave behind the run(1) man page mostly so that we get it updated for the new nrun interface.
* sim: update zlib handlingMike Frysinger2015-04-011-0/+4
| | | | | With zlib being mandatory, and the updated m4 configs, we need to regen and use the new settings w/bfd to avoid linkage errors.
* sim: m68hc11/mips/mn10300/v850: add basic sim_pc_getMike Frysinger2015-03-241-0/+4
| | | | | | The previous profile change broke these sims that use sim-profile but not sim-cpu (due to missing model support). Add simple funcs until we can convert these over properly.
* sim: clean up SIM_HAVE_BIENDIANMike Frysinger2015-03-241-0/+5
| | | | | This define only applies when using the old run.o main. Document it as such, and delete it from mips/sh64 since both use nrun.o now.
* sim: fix sim-hardware configure optionMike Frysinger2015-03-241-0/+4
| | | | | | | | | | | The current default handling for the --enable-sim-hardware option ends up forcing the value to whatever is set as the first argument when calling the macro (by virtue of how autoconf works). Relocate the setup code to the 4th parameter of the AC_ARG_ENABLE macro to fix it. This was caused by the simplification work in 1517bd274290e06af498ef7e49. Reported-by: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
* sim: drop support for requiring hw supportMike Frysinger2015-03-231-0/+4
| | | | | | | Since no sim is using the "always" option to SIM_AC_OPTION_HARDWARE, and we don't want to require hw support to always be enabled, drop the option. This leads to a slight simplification in the macro too as we can collapse the sim_hw_p variable.
* sim: dv-sockser: move build to common dirMike Frysinger2015-03-231-0/+7
| | | | | | | | If dv-sockser is available, lets add it to the common SIM_HW_OBJS variable so it is always included automatically. Now ports do not have to shoe horn it in directly themselves. It does mean it will be compiled for targets that don't explicitly use it, but that's really what we want anyways.
* sim: dv-sockser: add stub funcs when not availableMike Frysinger2015-03-231-0/+5
| | | | | | This lets ports assume that the dv-sockser API is always available if they want to. This way we don't have to do an abort at configure time and it makes the resulting code a bit simpler.
* sim: rename tconfig.in to tconfig.hMike Frysinger2015-03-161-0/+6
| | | | | | | | | | | | | Rather than manually include tconfig.h when we think we'll need it (which is error prone as it can define symbols we expect from config.h), have it be included directly by config.h. Since we know we have to include that header everywhere already, this will make sure tconfig.h isn't missed. It should also be fine as tconfig.h is supposed to be simple and only set up a few core defines for the target. This allows us to stop symlinking it in place all the time and just use it straight out of the respective source directory.
* sim: dv-sockser: push module init prototype downMike Frysinger2015-03-151-0/+5
| | | | | | | | Pull out the duplicated dv_sockser_install prototype from the tconfig.in files and put it in the one place it gets used -- sim-module.c. This is still arguably incorrect, but it's better than the status quo where the tconfig.in has to include header files and duplicate the dv-sockser func. The tconfig header is meant to be simple and contain a target defines.
* sim: make nrun the default run programMike Frysinger2015-03-141-0/+4
| | | | | | | | We want people to stop using the run.c frontend, but it's hard to notice when it's still set as the default. Lets flip things so nrun.c is the default, and users of run.c will get an error by default. We turn that error into a warning for existing sims so we don't break them -- this is mostly meant for people starting new ports.
* sim: drop duplicate header checksMike Frysinger2015-03-141-0/+5
| | | | | The SIM_AC_COMMON macro already checks for a bunch of headers, so specific sim ports need not do it themselves.
* Fix --diable-shared --enable-plugins build breakageAlan Modra2014-08-191-0/+4
| | | | | | | | | | | | | | | | | Directories that don't use libtool need to add -ldl (on most *nix hosts) to provide dlopen for libbfd. config/ * plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to LIBS via AC_SEARCH_LIBS. gdb/ * acinclude.m4 (GDB_AC_CHECK_BFD): Don't add -ldl. * config.in: Regenerate. sim/ppc/ * configure.ac: Invoke AC_PLUGINS. * config.in: Regenerate. and regen lots of configure files.
* Regenerate sim configury.Roland McGrath2014-08-151-0/+5
|