Commit Graph

171 Commits

Author SHA1 Message Date
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Nick Clifton a21a12e39e Remove v850e sanitization 1999-02-01 11:21:32 +00:00
Andrew Cagney a6a5d34927 Fix --enable-build-warnings=-Werror failures.
v850/simops.c, d10v/simops.c, v850/Makefile.in, d10v/Makefile.in:
Include targ-vals.h instead of syscall.h. Replace SYS_* with
TARGET_SYS_*.  Add dependency.
z8k/support.c: Include <errno.h>
v850/simops.c: Replace long with portable signed32.
mips/interp.c: Make sim_monitor global - needed by sky.
1998-11-25 09:58:04 +00:00
Tom Tromey 5da9ce07eb * configure: Regenerated to track ../common/aclocal.m4 changes.
* config.in: Ditto.
	* acconfig.h: New file.
	* configure.in: Reverted change of Apr 24; use sinclude again.
1998-04-26 22:03:55 +00:00
Tom Tromey ead653821c * configure: Regenerated to track ../common/aclocal.m4 changes.
* config.in: Ditto.
	* configure.in: Don't call sinclude.
1998-04-24 22:02:29 +00:00
Andrew Cagney e625962d8e Delete function sim_stop. 1998-03-10 05:05:44 +00:00
Andrew Cagney 0e701ac37b Add generic sim-info.c:sim_info() function using module mechanism.
Clean up compile probs in mips/vr5400.
1998-02-28 02:51:06 +00:00
Andrew Cagney fbb8b6b9ab For sim_fetch_register / sim_store_register: Add LENGTH parameter,
return actual size of register, 0 if not applicable, -1 of legacy
implementation.
1998-02-17 04:06:38 +00:00
Jason Molenda 240dd45fde Add sim-main.h to v850e_files for sanitization. 1998-02-03 01:37:25 +00:00
Andrew Cagney 412c4e940e Add config support for the size of the target address and OF cell. 1998-01-31 14:07:23 +00:00
Andrew Cagney 9ec6741b17 igen: Fix SMP simulator generator support.
Use the bfd-processor name in the sim-engine switch.
	Add nr_cpus argument to sim_engine_run.
tic80, v850, d30v, mips, common:
	Update
mips:	Fill in bfd-processor field of model records so that
	they match ../bfd/archures.
1998-01-31 06:23:41 +00:00
Doug Evans 462cfbc4eb * aclocal.m4: Recognize --enable-maintainer-mode.
*/configure: Regenerated.
1998-01-20 06:37:00 +00:00
Nick Clifton 61c550e0bd Renamed v850eq -> v850ea 1997-12-12 19:12:11 +00:00
Nick Clifton 4098c12318 Reverrt breakpoint back to its old value. 1997-12-05 17:30:44 +00:00
Nick Clifton 22c39e1487 Reverrt BREAK value back to its old value 1997-12-05 17:27:34 +00:00
Doug Evans 6e51f990a2 Regenerate configure files. 1997-12-04 17:26:06 +00:00
Nick Clifton b65b4d8b06 Fixed sanitization,
Changed pattern for break insn.
1997-12-04 01:29:25 +00:00
Andrew Cagney fd9223f9af Strip ChangeLog of v850e information 1997-11-25 22:00:26 +00:00
Doug Evans 486740ce01 * Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS). 1997-11-18 23:40:40 +00:00
Andrew Cagney 89d0973831 Add support for 16 byte quantities to sim-endian macro H2T.
Add model-filter field to option, include, model anf function igen records
1997-10-28 07:10:36 +00:00
Felix Lee b28ad90b4d * sim-main.h: delete null override of SIM_ENGINE_HALT_HOOK and
SIM_ENGINE_RESTART_HOOK.
1997-09-26 19:24:45 +00:00
Andrew Cagney af51b8d56d Add/use SIM_AC_OPTION_BITSIZE. 1997-09-25 07:19:05 +00:00
Andrew Cagney 7a3fb4e6ea * config/v850/tm-v850.h (BREAKPOINT): Use 1 word DIVH insn with
RRRRR=0 for simulator breakpoint. Previous breakpoint insn was two
words.
1997-09-25 07:01:21 +00:00
Andrew Cagney 92f91d1ff0 Remove need to update <targ>/Makefile.in when adding optional options
to <targ>/configure.in.
Simplify logic used to select target [default] endianness.
1997-09-23 01:25:26 +00:00
Andrew Cagney 8d332f9c1a Enable --alignment option, stop sim-options.c hardwiring the alignment. 1997-09-22 09:34:28 +00:00
Andrew Cagney 794e9ac96a Simplify logic behind the generic configuration option --enable-sim-alignment. 1997-09-22 02:49:57 +00:00
Andrew Cagney b45caf050c Add support for --enable-sim-alignment to simulator common aclocal.m4
Add support for --alignment={strict,nonstrict,forced} to simulator common
run-time options.
For v850 use, make the default NONSTRICT_ALIGNMENT.
1997-09-22 00:24:46 +00:00
Nick Clifton f13f11b494 Removed the v850eq sanitization 1997-09-20 23:40:50 +00:00
Andrew Cagney 8122e3e471 Add alignment option.
Add support for hardwired and default alignment to configuration.
1997-09-19 08:11:40 +00:00
Andrew Cagney a276b6f057 Clean up tracing for Bcond & jmp insns.
Fix computation of disp16 and disp22.
Clean up tracing of sld* insns.
1997-09-19 06:39:21 +00:00
Andrew Cagney bd4c35cc6d Fix cmov immed. 1997-09-19 02:20:02 +00:00
Andrew Cagney 60fe0e06a8 Fix cmov insn. 1997-09-19 00:50:19 +00:00
Felix Lee 3e906c081a sanitization fixes. typoes, missing fences, "start" instead of "end", etc. 1997-09-18 06:03:52 +00:00
Andrew Cagney a72f8fb439 Clean up more tracing.
FIX interrupt delivery - was zapping PSW before it had been saved.
FIX interrupt return, was one instruction out.
1997-09-17 08:14:23 +00:00
Andrew Cagney 6aead89a5f Fix tracing for: "ctret", "bsw", "hsw"
Fix bugs in: "bsh", "callt", "stsr".
1997-09-17 05:31:00 +00:00
Andrew Cagney fb1fd47514 Smooth some of ALU tracing's rough edges.
Fix switch insn.
1997-09-16 14:00:15 +00:00
Andrew Cagney 3f33acd039 Use trace_one_insn in trace functions. Buffer up trace data so that
it is displayed in a single block.
1997-09-16 07:03:41 +00:00
Andrew Cagney c7db488f71 Restrict ldsr (load system register) to modifying just non-reserved PSW bits.
For v850eq, include PSW[US] in bits that can be modified.
1997-09-16 04:49:24 +00:00
Andrew Cagney 721478d51b Add v850e version of breakpoint instruction. 1997-09-16 02:15:55 +00:00
Jim Wilson 5262de2167 * simops.c (Multiply64): Don't store into register zero. 1997-09-16 01:45:23 +00:00
Andrew Cagney 4dda50b052 For instructions moved into v850.igen was computing (wrong) NIA when
this wasn't needed.
1997-09-15 23:09:26 +00:00
Andrew Cagney bda6163995 Fix sanitization for v850 V v850e V v850eq 1997-09-15 14:42:51 +00:00
Andrew Cagney 658303f7d4 For v850eq start up with US bit set.
Let sim_analyze_program determine the architecture.
Fix various sanitizations.
1997-09-15 08:18:20 +00:00
Andrew Cagney 410230cf6d Check reserved bits before executing instructions.
Make v850[eq] the the default simulator.
Report illegal instructions.
Include v850e instructions in v850eq.
1997-09-12 05:56:38 +00:00
Andrew Cagney 93e7a1b5b7 Add profiling support to v850*. 1997-09-12 02:44:03 +00:00
Andrew Cagney cad7297e80 o Wordwrap usage messages from sim-options
o	Clarify how to use alias options
o	use in sim-watch (better usage message)
o	Don't pass something on the stack into the
	watch-point interrupt hander.
1997-09-10 22:47:12 +00:00
Andrew Cagney 02508bb179 Have trace_input, trace_output use sim-trace for IO. 1997-09-10 05:40:04 +00:00
Andrew Cagney 5d37a07bc5 Add multi-sim support to v850/v850e/v850eq simulators. 1997-09-08 17:42:48 +00:00
David Edelsohn 6fea47635b * configure: Regenerated to track ../common/aclocal.m4 changes. 1997-09-05 00:42:05 +00:00
Andrew Cagney da3a66e5ca Replace memory model with one from sim/common directory. 1997-09-04 10:10:02 +00:00
Nick Clifton 2636486389 removed v850 sanitization
Added v850/sim-main.h to list of files to keep after sanitization.
1997-09-03 22:27:28 +00:00
Andrew Cagney b5e935ae85 Pacify gcc-current -Wall. 1997-09-03 07:30:17 +00:00
Andrew Cagney cabedd5871 Standard simulator header file. 1997-09-03 04:13:45 +00:00
Andrew Cagney 9cdd2c6d72 Add real SIM_DESC arg to v850 simulator.
Add --enable-sim-warnings, use/fix errors.
Add --enable-sim-endian, don't use.
Add common modules. Don't yet use most.
1997-09-03 04:10:33 +00:00
Andrew Cagney 0ffba68fdc Compile from UNIX to cygwin32. 1997-09-01 03:43:56 +00:00
Andrew Cagney 8811705410 Fix doco on enable-sim-inline. 1997-08-27 22:43:18 +00:00
Andrew Cagney fafce69ab1 Add ABFD argument to sim_create_inferior. Document.
Add file sim-hload.c - generic load for hardware only simulators.
Review each simulators sim_open, sim_load, sim_create_inferior so that
they more closely match required behavour.
1997-08-27 04:44:41 +00:00
Andrew Cagney 7230ff0faa Flush defunct sim_kill. 1997-08-26 02:05:18 +00:00
Andrew Cagney 247fccdeb5 Add ABFD argument to sim_open call. Pass through to sim_config so
that image properties such as endianness can be checked.

More strongly document the expected behavour of each of the sim_*
interfaces.

Add default endian argument to simulator config macro
SIM_AC_OPTION_ENDIAN.  Use in sim_config.
1997-08-25 23:14:25 +00:00
Nick Clifton 6061622830 Updated with respect to the HDD-tool-0611 document. 1997-08-22 17:41:20 +00:00
Nick Clifton 64ad9cecb6 Added N step divide routines, courtesy of Sugimoto at NEC. 1997-08-20 22:42:55 +00:00
Nick Clifton 70caad98c1 Fixed interpretation of SR bit in list18 structures. 1997-08-20 20:57:05 +00:00
Nick Clifton a0a6db4bfa Tidied up sanitization. 1997-08-14 19:45:14 +00:00
Nick Clifton f7fcba7a84 Added support for v850e and v850eq instructions. 1997-08-14 02:13:32 +00:00
David Edelsohn 2986085861 * interp.c (prog_bfd_was_opened_p): New static local.
(prog_bfd): New global variable.
	(sim_open): Undo patch to add -E support.
	(sim_close): Close prog_bfd if sim_load opened it.
	(sim_load): Record bfd of loaded file in prog_bfd.
	* simops.c (prog_bfd): Renamed from exec_bfd.
1997-04-24 00:22:10 +00:00
Andrew Cagney 8517f62b16 Ref gdb/11763 - can't stop a running simulator:
o	Provide poll_quit callback to simulators
		so that they can poll for SIGINT on
		clueless OS's.

	o	Add sim_stop to simulators so that clients
		can request a halt (eg gdbtk's STOP button)
		Works for PPC!

	o	Re-arange remote-sim.c so that the
		hard work is moved from gdbsim_resume()
		to gdbsim_wait() (where it should be).
1997-04-18 12:24:52 +00:00
David Edelsohn 1ad886c928 * Makefile.in (SIM_OBJS): Add sim-load.o.
* interp.c (sim_kind, myname): New static locals.
	(sim_open): Set sim_kind, myname.  Ignore -E arg.
	(sim_load): Return SIM_RC.  New arg abfd.  Call sim_load_file to
	load file into simulator.  Set start address from bfd.
	(sim_create_inferior): Return SIM_RC.  Delete arg start_address.
1997-04-17 10:54:07 +00:00
Andrew Cagney 87e43259f1 Cleanups to compile under FreeBSD 1997-04-17 06:05:19 +00:00
Andrew Cagney 08db4a658e Get configure to define RETSIGTYPE 1997-04-07 05:58:59 +00:00
David Edelsohn 8a7c3105b5 * interp.c (sim_open): New arg `kind'. 1997-04-02 23:39:50 +00:00
David Edelsohn fbda74b1c1 * aclocal.m4: Check for stdlib.h, string.h, strings.h, unistd.h.
(sim-debug): Allow arguments.  Define WITH_DEBUG in addition to
	-DDEBUG.
	* configure: Regenerated to track ../common/aclocal.m4 changes.
1997-04-02 23:17:50 +00:00
Andrew Cagney a35e91c3c7 New file common/sim-config.c sets/checks simulator configuration options.
Update common/aclocal.m4 to better work with sim-config.[hc].
1997-04-02 05:04:25 +00:00
Andrew Cagney a77aa7ec4b * configure: Re-generate.
* Make-common.in (CSEARCH): Do not include the gdb directory in
        the search path.
        * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
        SIM_WARNING): Drop, requiring the simulator specific Makefile.in
        to explicitly incorporate these.

        * aclocal.m4 (--enable-sim-alignment); New option. Strongly
        specify the alignment restrictions of the target architecture -
        without this option all alignment restrictions are accomodated.
        (--enable-sim-assert): New option.  Conditionally compile in
        assertion statements.
        (--enable-sim-float): New option. Strongly specify the target's
        floating point support.
        (--enable-sim-hardware): New option.  Specify the hardware devices
        included in the simulation.
        (--enable-sim-packages): New option.  Specify the hardware
        packages included in the simulation.
        (--enable-sim-regparm): New option.  Specify that parameters be
        passed in registers instead of on the stack.
        (--enable-sim-reserved-bits): New option. Specify that reserved
        bits within an instruction are are correctly set.
        (--enable-sim-smp): New option. Specify the level of SMP support
        to be included in the simulator.
        (--enable-sim-stdcall): New option.  Specify an alternative
        function call convention.
        (--enable-sim-xor-endian): New option.  Configure xor-endian
        support used by some targets to implement bi-endian support.
1997-03-17 15:29:29 +00:00
Michael Meissner 601fb8aea6 Regenerate simulator configure scripts; Remove d10v traps 1-3, Make 15 the system call trap, keeping 0 temporarily 1997-03-14 16:21:57 +00:00
David Edelsohn 0b0cc453a4 * interp.c (sim_open): New SIM_DESC result. Argument is now
in argv form.
	(other sim_*): New SIM_DESC argument.
1997-03-13 21:01:38 +00:00
David Edelsohn ce3189da63 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
COMMON_{PRE,POST}_CONFIG_FRAG instead.
	* configure.in: sinclude ../common/aclocal.m4.
	* configure: Regenerated.
1997-02-04 22:07:50 +00:00
Stu Grossman ae0d7848d8 * ../common/aclocal.m4 (COMMON_MAKEFILE_FRAG): Quote a couple of $'s in
comments and single quotes.  Fixes a problem found on hpux.
1997-01-24 18:44:29 +00:00
Stu Grossman a695143eae * configure: Remove targ-vals.def when doing distclean. (Change
is actually in ../common/aclocal.m4.)
1997-01-24 00:44:03 +00:00
Stu Grossman 2757866e9e * configure: Remove Make-common.in from dependencies. (Actually in
../common/aclocal.m4).
1997-01-24 00:04:57 +00:00
Stu Grossman 295dbbe44c * configure configure.in Makefile.in: Update to new configure
scheme which is more compatible with WinGDB builds.
	* configure.in:  Improve comment on how to run autoconf.
	* configure:  Re-run autoconf to get new ../common/aclocal.m4.
	* Makefile.in:  Use autoconf substitution to install common
	makefile fragment.
1997-01-23 22:09:52 +00:00
Michael Meissner 5a8023e5ba Multiply ops sign extend, not zero extend 1997-01-20 21:06:48 +00:00
Michael Meissner 6ec96a0265 Deal with kill encoding the signal via the exit status. 1996-12-31 23:18:55 +00:00
Michael Meissner ee3f2d4f6a Allow exit to work normally under gdb 1996-12-27 19:50:03 +00:00
David Edelsohn 5f270267a7 * Makefile.in: Delete stuff moved to ../common/Make-common.in.
(SIM_OBJS,SIM_EXTRA_CFLAGS,SIM_EXTRA_CLEAN): Define.
	* configure.in: Simplify using macros in ../common/aclocal.m4.
	Call AC_CHECK_HEADERS(unistd.h).
	* configure: Regenerated.
	* config.in: New file.
	* simops.c: #include "config.h".  #include <unistd.h> if present.
1996-11-20 10:27:55 +00:00
Gavin Romig-Koch 7fc45edb6c Fix linux build problem. 1996-10-31 19:58:14 +00:00
Jeff Law 8824fb459b * simops.c (OP_10007E0): Handle SYS_times and SYS_gettimeofday.
Check it into devo too.
1996-10-30 16:30:59 +00:00
Jeff Law 6803f89b14 * simops.c (OP_10007E0): Handle SYS_time.
Check into devo too.
1996-10-30 15:51:39 +00:00
Jeff Law c500c07496 * simops.c: Include <sys/stat.h>.
(OP_10007E0): Handle SYS_stat.
For RW testing.
1996-10-29 21:24:01 +00:00
Jeff Law f009978996 * simops.c (OP_500): Mask off low bit in displacement
for sld.w.
        (OP_501): Similarly.
More bugs exposed by tda testing.
1996-10-24 21:19:22 +00:00
Jeff Law 85c09b0518 * simops.c (OP_500): Fix displacement handling for sld.w.
(OP_501): Similarly for sst.w.
More fixes exposed by tda testing.
1996-10-24 20:49:06 +00:00
Jeff Law 0a89af6efd * simops.c (trace_input): Remove all references to SEXT7.
(OP_300, OP_400, OP_500, OP_380, OP_480, OP_501): Displacement
        is zero extended for sst/sld instructions.
        * v850_sim.h (SEX7): Delete.  It's no longer needed (and it
        was incorrect anyway).
So we properly simulate sst/sld instructions.
1996-10-24 18:28:43 +00:00
Stu Grossman 968519095a * Makefile.in: Get rid of srcroot. Set all INSTALL macros via
autoconf.
	* gencode.c (write_opcodes):  Pad operands field to account for
	MSVC braindamage.
	* simops.c:  Include errno.h.  Exclude SYS_chown, since MSVC
	doesn't support it.  (Why is this here in the first place?!?)
	* v850_sim.h:  Get rid of 64 bit defs.  Also, get rid of #elif's.
	Change number of operands in struct simops from 9 to 6.  Define
	SIGTRAP and SIGQUIT for MSVC.
1996-10-24 17:39:30 +00:00
Stu Grossman 254ef34062 * interp.c (MEM_SIZE): It's now bytes, not a power of 2.
* (map):  Add support for external mem in the 1->2 meg range.
	Also, abort() when memory access is way out of bounds.  (Better to
	die than to give wrong result.  (This will be fixed later.))
	* (sim_size):  MEM_SIZE is now bytes, not shift factor.
1996-10-15 23:23:00 +00:00
Stu Grossman 88777ce2a6 * gencode.c (write_opcodes): Output hex values for opcode mask
and patterns.
	* interp.c (sim_resume):  Save and restore PC from the appropriate
	register.
	* (sim_fetch_register sim_store_register):  Fix byte-order problem
	with reading and writing registers.
	* simops.c (OP_FFFF):  Implement pseudo-breakpoint insn.
1996-09-28 01:38:45 +00:00
Jeff Law da86a4fa81 * simops.c (trace_input): Fix thinko. 1996-09-27 23:41:12 +00:00
Michael Meissner 1d00ce8392 Print line # and function name or filename if they exist for each PC. 1996-09-12 16:06:02 +00:00
Michael Meissner ead4a3f157 Add tracing support; Fix some problems with hardwired sizes 1996-09-11 20:54:21 +00:00
Jeff Law 9909e232c0 * interp.c (hash): Make this an inline function
when compiling with GCC.  Simplify.
        * simpos.c: Explicitly include "sys/syscall.h".  Remove
        some #if 0'd code.  Enable more emulated syscalls.
Checking in more stuff.
1996-09-10 02:51:07 +00:00
Jeff Law 9fca2fd3c6 * gencode.c: Fix various indention & style problems.
Remove test code.  Remove #if 0 code.
        * interp.c: Provide prototypes for all static functions.
        Fix minor indention problems.
        (sim_open, sim_resume): Remove unused variables.
        (sim_read): Return type is "int".
        * simops.c: Remove unused variables.
        (divh): Make result of divide-by-zero zero.
        (setf): Initialize result to keep compiler quiet.
        (sar instructions): These just clear the overflow bit.
        * v850_sim.h: Provide prototypes for put_byte, put_half
        and put_word.
Cleaning up.
1996-09-03 18:31:48 +00:00
Jeff Law 2b6b2c6d8e Fix typpppo 1996-09-03 17:15:16 +00:00