Commit graph

544 commits

Author SHA1 Message Date
Michael Meissner
0535fa1aa0 Rename sim_bfd -> exec_bfd for gdb compatibility 1996-09-18 13:56:57 +00:00
Michael Meissner
a49a15ade8 Make exit/stop return correct exit value; Add line number tracing. 1996-09-18 13:23:31 +00:00
Jackie Smith Cashion
3733d1095f Tue Sep 17 11:04:50 1996 James G. Smith <jsmith@cygnus.co.uk>
* run.c (main): Explicitly cast malloc() parameter.

This is needed because for certain builds the size field being given
to malloc() is actually 64bits long, and without a cast or malloc
prototype the resulting value used by malloc() depended on the host
endianness, and how long long paramaters are passed into functions.
1996-09-17 10:10:35 +00:00
Jackie Smith Cashion
f24b7b69ee Mon Sep 16 11:38:16 1996 James G. Smith <jsmith@cygnus.co.uk>
* interp.c (sim_monitor): Improved monitor printf
 	simulation. Tidied up simulator warnings, and added "--log" option
 	for directing warning message output.
	* gencode.c: Use sim_warning() rather than WARNING macro.
1996-09-16 10:47:20 +00:00
Michael Meissner
215ac9533c Fix brf0{t,f}.s <label> -> instruction not to execute instruction if branch succeeds 1996-09-15 03:46:52 +00:00
Ian Lance Taylor
ad0d14e7a2 * Makefile.in (CC_FOR_BUILD): New variable.
(AR, AR_FLAGS, BISON, MAKEINFO): Remove duplicate variables.
	(RANLIB, CC): Likewise.
	(end): Use $(CC_FOR_BUILD), not $(CC).
	* configure.in: Set CC_FOR_BUILD.
	* configure: Rebuild.
1996-09-14 04:05:41 +00:00
Michael Meissner
19d44375ff For unknown traps, print contents of registers and continue execution 1996-09-14 02:36:40 +00:00
Mark Alexander
65c0d7dee9 * simops.c (OP_5F00): Fix problems with system calls. 1996-09-12 19:52:40 +00:00
Michael Meissner
a57190924d Correct trap tracing information 1996-09-12 16:20:05 +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
9b280a864b Store bfd pointer in a global variable 1996-09-12 15:28:40 +00:00
Michael Meissner
5ceef1b54f fix typo 1996-09-11 22:56:25 +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
Michael Meissner
2254cd90a9 Addi needs to set the carry 1996-09-09 21:12:46 +00:00
Michael Meissner
308f64d3ac Fix ld2w tracing 1996-09-09 20:45:33 +00:00
Michael Meissner
60fc5b7270 Correct tracing of cpfg 1996-09-09 20:10:31 +00:00
Michael Meissner
293c76a376 Make ex{f,t}* tests agree with book 1996-09-09 18:24:18 +00:00
Michael Meissner
069398aaff Fix accumulator shifts 1996-09-09 17:30:36 +00:00
Stu Grossman
fad4a760fd * erc32.c (port_init): Disable this for __GO32__ (got no pty's
there either...).
1996-09-08 23:35:50 +00:00
Ian Lance Taylor
f39a09c9ad * configure.in: Do build erc32 for DOS and Windows hosts.
* configure: Rebuild.
1996-09-08 21:24:10 +00:00
Martin Hunt
ea2155e858 Fri Sep 6 17:56:17 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* simops.c (OP_2600, OP_2601): Changed min and max comparisons
	to use signed register values.
1996-09-07 00:58:25 +00:00
Stu Grossman
1852b017b8 * Makefile.in erc32/Makefile.in: Don't set srcroot. This should
be inherited from the parent.  Remove INSTALL_XFORM and
	INSTALL_XFORM1.  Make INSTALL be set from configure.
1996-09-05 01:16:22 +00:00
Ian Lance Taylor
68867afb88 * configure.in: Only build the MIPS simulator if we are using
gcc.
	* configure: Rebuild.
1996-09-04 19:50:55 +00:00
Michael Meissner
9b86c7e2e2 Second pass at canadian cross 1996-09-04 19:11:53 +00:00
Michael Meissner
1eaaf3050e First cut at dealing with canadian crosses; make -t in debugger set d10v_debug if DEBUG 1996-09-04 18:50:13 +00:00
Michael Meissner
7eebfc6296 More debug support; Enable -t/-v to work correctly; Add --enable-sim-cflags configure switch 1996-09-04 17:42:51 +00:00
Michael Meissner
87178dbdf7 Enhance debug support 1996-09-04 15:41:43 +00:00
Mark Alexander
8719be26c4 * simops.c: Include correct syscall.h for d10v, not host's.
Fix #ifdef SYS_stat.
1996-09-04 11:51:06 +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
Michael Meissner
63a91cfb9d Portability fixes; re-add printf/putchar traps 1996-09-03 18:01:03 +00:00
Jeff Law
2b6b2c6d8e Fix typpppo 1996-09-03 17:15:16 +00:00
Jeff Law
d81352b8b8 * interp.c: OP should be an array of 32bit operands!
(v850_callback): Declare.
        (do_format_5): Fix extraction of OP[0].
        (sim_size): Remove debugging printf.
        (sim_set_callbacks): Do something useful.
        (sim_stop_reason): Gross hacks to get c-torture running.
        * simops.c: Simplify code for computing targets of bCC
        insns.   Invert 's' bit if 'ov' bit is set for some
        instructions.  Fix 'cy' bit handling for numerous
        instructions.  Make the simulator stop when a halt
        instruction is encountered.  Very crude support for
        emulated syscalls (trap 0).
        * v850_sim.h: Include "callback.h" and declare
        v850_callback.  Items in the operand array are 32bits.
Fixes & syscall stuff.
1996-09-03 16:25:51 +00:00
Jeff Law
82feb39ed1 Opps. Forgot to commit this a few days ago. 1996-08-31 02:49:05 +00:00
Jeff Law
787d66bb4d * simops.c: Fix "not1" and "set1". 1996-08-30 21:55:26 +00:00
Jeff Law
3046d87986 * simops.c: Don't forget to initialize temp for
"ld.h" and "ld.w"
1996-08-30 20:15:51 +00:00
Jeff Law
ba853302f2 * interp.c: Remove various debugging printfs. 1996-08-30 16:42:49 +00:00
Jeff Law
0e4ccc58f2 * simops.c: Fix satadd, satsub boundary case handling. 1996-08-30 16:41:39 +00:00
Jeff Law
83fc3bac9f * interp.c (hash): Fix.
* interp.c (do_format_8): Get operands correctly and
        call the target function.
        * simops.c: Rough cut at "clr1", "not1", "set1", and "tst1".
1996-08-30 16:35:10 +00:00
Jeff Law
3cb6bf7818 * interp.c (do_format_4): Get operands correctly and
call the target function.
        * simops.c: Rough cut at "sld.b", "sld.h", "sld.w", "sst.b",
        "sst.h", and "sst.w".
1996-08-30 05:49:07 +00:00
Jeff Law
28647e4c0c * v850_sim.h: The V850 doesn't have split I&D spaces. Change
accordingly.  Remove many unused definitions.
        * interp.c: The V850 doesn't have split I&D spaces.  Change
        accordingly.
        (get_longlong, get_longword, get_word): Deleted.
        (write_longlong, write_longword, write_word): Deleted.
        (get_operands): Deleted.
        (get_byte, get_half, get_word): New functions.
        (put_byte, put_half, put_word): New functions.
        * simops.c: Remove unused functions.  Rough cut at
        "ld.b", "ld.h", "ld.w", "st.b", "st.h", "st.w" insns.
1996-08-30 05:41:10 +00:00
Jeff Law
614f1c68ed * v850_sim.h (struct _state): Remove "psw" field. Add
"sregs" field.
        (PSW): Remove bogus definition.
        * simops.c: Change condition code handling to use the psw
        register within the sregs array.  Handle "ldsr" and "stsr".
1996-08-30 05:09:08 +00:00
Jeff Law
dca41ba76b * simops.c: Handle "satadd", "satsub", "satsubi", "satsubr". 1996-08-30 04:59:02 +00:00
Jeff Law
e9b6cbaca5 * interp.c (do_format_5): Get operands correctly and
call the target function.
        (sim_resume): Don't do a PC update for format 5 instructions.
        * simops.c: Handle "jarl" and "jmp" instructions.
1996-08-30 04:27:48 +00:00
Jeff Law
3095b8dfc5 * simops.c: Fix minor typos. Handle "cmp", "setf", "tst"
"di", and "ei" instructions correctly.
1996-08-30 04:11:32 +00:00
Jeff Law
2108e86459 * interp.c (do_format_3): Get operands correctly and call
the target function.
        * simops.c: Handle bCC instructions.
1996-08-30 03:48:13 +00:00
Jeff Law
35404c7d07 * simops.c: Add condition code handling to shift insns.
Fix minor typos in condition code handling for other insns.
1996-08-30 03:23:36 +00:00
Jeff Law
aabce0f46c * Makefile.in: Fix typo.
* simops.c: Add condition code handling to "sub" "subr" and
        "divh" instructions.
1996-08-30 03:07:24 +00:00
Jeff Law
0ef0eba580 * interp.c (hash): Update to be more accurate.
(lookup_hash): Call hash rather than computing the hash
        code here.
        (do_format_1_2): Handle format 1 and format 2 instructions.
        Get operands correctly and call the target function.
        (do_format_6): Get operands correctly and call the target
        function.
        (do_formats_9_10): Rough cut so shift ops will work.
        (sim_resume): Tweak to deal with format 1 and format 2
        handling in a single funtion.  Don't update the PC
        for format 3 insns.  Fix typos.
        * simops.c: Slightly reorganize.  Add condition code handling
        to "add", "addi", "and", "andi", "or", "ori", "xor", "xori"
        and "not" instructions.
        * v850_sim.h (reg_t): Registers are 32bits.
        (_state): The V850 has 32 general registers.  Add a 32bit
        psw and pc register too.  Add accessor macros
Fixing lots of stuff.  Starting to add condition code support.  Basically
check pointing the work to date.
1996-08-29 23:39:23 +00:00
Jeff Law
775533747d * simops.c: Add shift support. 1996-08-29 22:29:41 +00:00
Jeff Law
fb8eb42bd6 Fix typos in multiply and divide code. 1996-08-29 22:05:15 +00:00
Jeff Law
e98e3b2c5a * simops.c: Add multiply & divide support. Abort for system
instructions.
1996-08-29 20:08:37 +00:00
Jeff Law
1fe983dcdf * simops.c: Add logicals, mov, movhi, movea, add, addi, sub
and subr.  No condition codes yet.
1996-08-29 19:53:37 +00:00
Jeff Law
22c1c7ddea * ChangeLog, Makefile.in, configure, configure.in, v850_sim.h,
gencode.c, interp.c, simops.c: Created.
So we've got something to hack on.
1996-08-29 01:06:42 +00:00
Jeff Law
085114ca36 * configure.in (v850-*-*): Added V850 simulator. 1996-08-29 01:05:40 +00:00
Martin Hunt
d70b4d426b Wed Aug 28 17:33:19 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* Makefile.in, d10v_sim.h, interp.c: Fix byte-order problems.
1996-08-29 00:35:11 +00:00
Martin Hunt
166acb9f8f New file. 1996-08-28 18:09:06 +00:00
Martin Hunt
4f425a3203 Mon Aug 26 18:30:28 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v_sim.h (SEXT32): Added.
	* interp.c: Commented out printfs.
	* simops.c:  Fixed error in sb and st2w.
1996-08-27 01:32:48 +00:00
Ian Lance Taylor
64d538ce80 * Makefile.in (gencode): Depend upon gencode.o, getopt.o, and
getopt1.o, rather than on gencode.c.  Link objects together.
	Don't link against -liberty.
	(gencode.o, getopt.o, getopt1.o): New targets.
	* gencode.c: Include <ctype.h> and "ansidecl.h".
	(AND): Undefine after including "ansidecl.h".
	(ULONG_MAX): Define if not defined.
	(OP_*): Don't define macros; now defined in opcode/mips.h.
	(main): Call my_strtoul rather than strtoul.
	(my_strtoul): New static function.
1996-08-22 22:06:21 +00:00
Michael Meissner
ca78464476 Fixes from Andrew 1996-08-19 22:21:19 +00:00
Angela Marie Thomas
e1fcafd594 removed NOTES from Things-to-keep since it's a dead file 1996-08-18 21:28:18 +00:00
Michael Meissner
83a650d857 Improve -t options support to list all of the configuration macros & work standalone 1996-08-13 17:29:04 +00:00
Michael Meissner
9aecf50da5 Test whether /dev/zero works before attemping to us it 1996-08-12 23:06:21 +00:00
Martin Hunt
f45dceb998 fix for D10V. 1996-08-12 18:04:58 +00:00
Michael Meissner
7b25dea587 If HAVE_TERMOS_STRUCTURE is not defined, make sure HAVE_TCGETATTR is also not defined. 1996-08-08 00:17:48 +00:00
Michael Meissner
def7f77515 Allow simulator to build on other machines than x86 1996-08-07 18:48:07 +00:00
Michael Meissner
2e913166b1 7/30 release from Andrew 1996-08-06 15:55:32 +00:00
Martin Hunt
4c38885c86 Fri Aug 2 17:44:24 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v_sim.h, simops.c: Snapshot
1996-08-03 00:45:58 +00:00
Martin Hunt
2934d1c925 Thu Aug 1 17:05:24 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* ChangeLog, Makefile.in, configure, configure.in, d10v_sim.h,
	gencode.c, interp.c, simops.c: Created.
1996-08-02 00:23:31 +00:00
Martin Hunt
745a0437db Thu Aug 1 17:08:41 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* configure.in (d10v-*-*): Added D10V simulator.
1996-08-02 00:22:58 +00:00
Michael Meissner
30c87b55ec New simulator changes from Andrew 1996-07-23 15:42:42 +00:00
Stu Grossman
4fa14cf71c * gencode.c (process_instructions): Generate word64 and uword64
instead of `long long' and `unsigned long long' data types.
	* interp.c:  #include sysdep.h to get signals, and define default
	for SIGBUS.
	* (Convert):  Work around for Visual-C++ compiler bug with type
	conversion.
	* support.h:  Make things compile under Visual-C++ by using
	__int64 instead of `long long'.  Change many refs to long long
	into word64/uword64 typedefs.
1996-07-18 01:21:16 +00:00
Jeff Law
9745c59321 * compile.c (sim_resume): Fix all rotate-by-2-bits insns. 1996-07-10 04:15:17 +00:00
Jeff Law
25b344a4a2 No longer need to sanitize away h8s stuff. 1996-07-05 18:59:31 +00:00
Stu Grossman
b7b3111471 * erc32.c (mec_reset mec_read mec_write memory_read memory_write),
sis.h:  Get rid of all uses of long long's.
	* (close_port read_uart write_uart uarta_tx):  Don't seg fault
	when can't open pty's.
	* exec.c:  Add two new instructions: smul, and divscc.
	* interf.c (flush_windows):  New routine to flush the register
	windows out to the stack just before returning to GDB.  Makes
	backtraces work much better.
1996-07-04 00:51:22 +00:00
Jeff Law
7647e0dd79 * run.c (main): Don't "load" sections which don't have
SEC_LOAD set.
        * compile.c (sim_resume, case "O_NOT"): Use ONOT instead
        of OSHIFTS.
        (ONOT): Define.
        (sim_resume, shift/rotate cases): Add support for shift/rotate
        by two bits.
        (OSHIFTS): Corresponding changes.
Handling more H8/S ops.
1996-07-03 05:10:47 +00:00
Jeff Law
171f4664be * compile.c (sim_resume): Handle "ldm.l" and "stm.l".
HMSE H8/S.
1996-07-02 07:37:50 +00:00
Michael Meissner
ed451ff744 Make simulator build again on SunOS and HP/US systems 1996-06-26 20:01:38 +00:00
Jackie Smith Cashion
c21ee46b49 Added. 1996-06-26 10:08:42 +00:00
Jackie Smith Cashion
2f82f75517 Keep the mips directory. 1996-06-26 10:03:58 +00:00
Jason Molenda
78c09e4af5 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
        (docdir): Removed.
        * configure.in (AC_PREREQ): autoconf 2.5 or higher.
        (AC_PROG_INSTALL): Added.
        * configure: Rebuilt.
1996-06-26 03:35:01 +00:00
Jason Molenda
a271d1d966 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
        (docdir): Removed.
        * configure.in (AC_PREREQ): autoconf 2.5 or higher.
        (AC_PROG_INSTALL): Added.
        (AC_PROG_CC): Moved to before configure.host call.
        * configure: Rebuilt.
1996-06-26 03:26:09 +00:00
Jason Molenda
445289655a * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
        (docdir): Removed.
        * configure.in (AC_PREREQ): autoconf 2.5 or higher.
        (AC_PROG_INSTALL): Added.
        * configure: Rebuilt.
1996-06-26 03:22:34 +00:00
Jason Molenda
31884e281b * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
        (docdir, oldincludedir): Removed.
        * configure.in (AC_PREREQ): autoconf 2.5 or higher.
        (AC_PROG_INSTALL): Added.
        * configure: Rebuilt.
1996-06-26 03:20:23 +00:00
Ian Lance Taylor
58f8c779f7 * configure.in: Call AC_PROG_CC before running configure.host.
* configure: Rebuild with autoconf 2.10.
1996-06-24 18:21:47 +00:00
Ian Lance Taylor
aac160d2bb * configure.in: Only configure erc32 if using gcc. 1996-06-24 18:20:52 +00:00
Jeff Law
88ea21e50c * compile.c (sim_load): Treat the H8/S like the H8/300H for now.
* run.c (main): Treat the H8/S like the H8/300H for now.

More sanitize H8/S stuff.
1996-06-18 23:33:49 +00:00
Michael Meissner
8477437c17 Latest changes from Andrew 1996-06-05 16:02:54 +00:00
Jackie Smith Cashion
c98ec95dba Wed Jun 5 08:28:13 1996 James G. Smith <jsmith@cygnus.co.uk>
* configure.in: Define @SIMCONF@ depending on mips target.
	* configure: Rebuild.
	* Makefile.in (run): Add @SIMCONF@ to control simulator
 	construction.
	* gencode.c: Change LOADDRMASK to 64bit memory model only.
	* interp.c: Remove some debugging, provide more detailed error
 	messages, update memory accesses to use LOADDRMASK.
1996-06-05 08:16:16 +00:00
Michael Meissner
5ea7fa7abb Build psim on ppc SVR4, Solaris, and Elf targets. 1996-06-04 13:27:31 +00:00
Michael Meissner
fe098bf490 Abort if we find the program has an .interp section 1996-06-03 20:26:09 +00:00
Michael Meissner
5b18a1a0bf Add time, gettimeofday, and getrusage system call support 1996-06-03 19:10:25 +00:00
Ian Lance Taylor
f64c2f5715 * Makefile.in (end.h): Use explicit ./ when running end. 1996-06-03 16:34:24 +00:00
Ian Lance Taylor
4fa134beac * configure.in: Add calls to AC_CONFIG_HEADER, AC_CHECK_HEADERS,
AC_CHECK_LIB, and AC_CHECK_FUNCS.  Change AC_OUTPUT to set
	stamp-h.
	* configure: Rebuild.
	* config.in: New file, generated by autoheader.
	* interp.c: Include "config.h".  Include <stdlib.h>, <string.h>,
	and <strings.h> if they exist.  Replace #ifdef sun with #ifdef
	HAVE_ANINT and HAVE_AINT, as appropriate.
	* Makefile.in (run): Use @LIBS@ rather than -lm.
	(interp.o): Depend upon config.h.
	(Makefile): Just rebuild Makefile.
	(clean): Remove stamp-h.
	(mostlyclean): Make the same as clean, not as distclean.
	(config.h, stamp-h): New targets.
1996-06-03 15:58:45 +00:00
Michael Meissner
88f1eac415 Add Solaris and Linux emulations 1996-06-02 15:40:16 +00:00
Michael Meissner
119b85f6ca More changes for GO32 canadian cross builds 1996-05-24 19:12:21 +00:00
Michael Meissner
0c18e3f002 More changes for GO32 canadian cross builds 1996-05-24 19:05:17 +00:00
Michael Meissner
f64dbcddaf Allow psim to be built on go32 1996-05-24 14:15:17 +00:00
Jeff Law
7e1e013fd9 * compile.c (sim_resume): Correctly handle divu.
More bugfixing.  HMSE
1996-05-23 04:25:43 +00:00
Rob Savoye
d46637152c * configure.in: Only built erc32 simulator on Unix hosts as it
uses pseudo ttys.
	* configure: Regenerated with autoconf 2.8.
1996-05-22 18:12:32 +00:00
Rob Savoye
fd58f4b10e Sanitize support for the ESA sparc simulator. 1996-05-20 03:18:13 +00:00
Rob Savoye
b5ef6d669e * func.c(bfd_load): Don't try to print the filename if the pfbd is
NULL.
	* interf.c(sim_load): Pass the whole string, not just the first
	byte.
1996-05-20 03:13:02 +00:00
Rob Savoye
f4d2ff34be New sparc simulator from the ESA. 1996-05-20 02:46:07 +00:00
Michael Meissner
d61eb8127b Check for sys/ioctl.h 1996-05-16 15:03:24 +00:00
Michael Meissner
048668d355 More progressive fixes 1996-05-13 17:25:06 +00:00
Jackie Smith Cashion
9a739379c4 Fri May 10 00:41:17 1996 James G. Smith <jsmith@cygnus.co.uk>
* interp.c (ColdReset): Fix boolean test.

Actually compare a boolean result, rather than the bitmasks!
1996-05-09 23:43:58 +00:00
Jackie Smith Cashion
f7481d45a5 Wed May 8 15:12:58 1996 James G. Smith <jsmith@cygnus.co.uk>
* interp.c (xfer_direct_word, xfer_direct_long,
	swap_direct_word, swap_direct_long, xfer_big_word,
	xfer_big_long, xfer_little_word, xfer_little_long,
	swap_word,swap_long): Added.
	* interp.c (ColdReset): Provide function indirection to
 	host<->simulated_target transfer routines.
	* interp.c (sim_store_register, sim_fetch_register): Updated to
 	make use of indirected transfer routines.
1996-05-08 14:22:12 +00:00
Michael Meissner
1ed0c0e75d Fix INLN in bugapi to read a full line 1996-05-06 16:03:44 +00:00
Michael Meissner
08dc78ad19 Make simulator build in a Canadian cross environment 1996-05-03 19:10:20 +00:00
Michael Meissner
a72d2509c2 Work in a cross compile environment 1996-04-30 22:50:22 +00:00
Jackie Smith Cashion
a9f7253f64 Fri Apr 19 15:48:24 1996 James G. Smith <jsmith@cygnus.co.uk>
* gencode.c (process_instructions): Ensure FP ABS instruction
 	recognised.
	* interp.c (AbsoluteValue): Add routine. Also provide simple PMON
 	system call support.
1996-04-19 14:53:16 +00:00
Michael Meissner
d4d3c7adbb update from Andrew 1996-04-17 20:09:36 +00:00
Jeff Law
132fdcb974 * compile.c (sim_load): Re-allocate memory for the simulator
here.
HMSE.
1996-04-12 22:42:03 +00:00
Jeff Law
9b1271617b * compile.c (sim_resume): Fix and simplify overflow and carry
handling for 32bit ALU insns.
1996-04-12 15:38:08 +00:00
Jackie Smith Cashion
8b554809c0 Wed Apr 10 09:51:38 1996 James G. Smith <jsmith@cygnus.co.uk>
* interp.c (sim_do_command): Complain if callback structure not
 	initialised.
1996-04-10 08:53:24 +00:00
Jeff Law
50d45d1b2f * compile.c (sim_resume): Fix overflow checks for ALU insns.
So that int-compare.c passes.
1996-04-09 05:57:15 +00:00
Fred Fish
ed086b0a71 From: Miles Bader <miles@gnu.ai.mit.edu>
* configure.in: Use AC_CHECK_TOOL to find AR & RANLIB.
	* configure: Regenerate using autoconf.
1996-04-08 04:56:53 +00:00
Jeff Law
e24146ec95 * compile.c (decode): Use "bit" to hold L_3 immediates instead
of holding them in "abs".  Handle ABS8MEM memory references aka
        8-bit area.  Replace ABSMOV references with ABS8MEM.
So we've got a chance of simulating something like btst #0,@40:8 correctly.
hmse.
1996-04-06 00:21:35 +00:00
Michael Meissner
997f0ee967 fix long lines 1996-04-04 20:19:28 +00:00
Michael Meissner
64646bd32b Doc fixes from Andrew 1996-04-04 20:03:33 +00:00
Michael Meissner
4e956fd5e1 Add dependency 1996-04-04 18:48:51 +00:00
Michael Meissner
6740925b4d Print WITH_STDIO if -t options 1996-03-29 18:06:42 +00:00
Michael Meissner
d6103e8eb6 Add --enable-sim-stdio to make console I/O use stdio, not printf_filtered and polling input 1996-03-29 17:33:56 +00:00
Jackie Smith Cashion
d0757082eb Thu Mar 28 13:50:51 1996 James G. Smith <jsmith@cygnus.co.uk>
* interp.c (Convert): Provide round-to-nearest and round-to-zero
 	support for Sun hosts.
	* Makefile.in (gencode): Ensure the host compiler and libraries
 	used for cross-hosted build.

Allow a DOS hosted version of the simulator to be built. NOTE: The FP
is still not complete, since round-to-nearest and round-to-zero have
not been implemented generically.
1996-03-28 14:08:51 +00:00
Jackie Smith Cashion
e871dd189e Wed Mar 27 14:42:12 1996 James G. Smith <jsmith@cygnus.co.uk>
* interp.c, gencode.c: Some more (TODO) tidying.
1996-03-27 14:46:27 +00:00
Michael Meissner
7a543ca48e Fix typo that clobbered the stack and rewrite 2/26 change 1996-03-26 21:20:54 +00:00
Michael Meissner
8a1d8a0b60 update from andrew 1996-03-23 15:02:42 +00:00
David Edelsohn
5d06fa80b2 (sim_resume, shift insns): Fix setting of overflow flag for shal. 1996-03-11 23:25:53 +00:00
David Edelsohn
e10bb7b3e9 * run.c (main): Print error message if argument is invalid.
(usage): Improve text.
1996-03-11 21:59:47 +00:00
David Edelsohn
741fd619cb (main): Print error message if argument is invalid.
(usage): Improve text.
1996-03-11 21:59:22 +00:00
David Edelsohn
4dfb4ffcd1 * compile.c: #include "wait.h".
(sim_resume, sleep insn): Check program exit status in r0.
1996-03-11 19:30:53 +00:00
David Edelsohn
e656ecf90c * compile.c (sim_resume): Watch for calls to abort.
* run.c: #include <signal.h>.
	(main): Abort if program got SIGILL.
1996-03-11 17:54:45 +00:00
Michael Meissner
98fe0e07c5 Make psim build on AIX 4.1 1996-03-08 01:24:01 +00:00
Jackie Smith Cashion
a647a859cb Thu Mar 7 11:19:33 1996 James G. Smith <jsmith@cygnus.co.uk>
* gencode.c, interp.c: Replaced explicit long long references with
 	WORD64HI, WORD64LO, SET64HI and SET64LO macro calls.
	* support.h (SET64LO, SET64HI): Macros added.

This is an intermediate checkin. The work of removing "long long"
usage is not yet finished. These changes are clean, and have been
sitting on my machine for a while (whilst doing other work), and it is
safer for them to be checked in.
1996-03-07 11:25:15 +00:00
Fred Fish
be7b99e5be Remove missing file "PROBLEMS" from list of files to keep. 1996-02-29 03:41:50 +00:00
Michael Meissner
0d02fbb844 Update to 1.0.1 1996-02-24 14:36:59 +00:00
Michael Meissner
262faa5417 Add input support; at end of user writes, call fflush 1996-02-22 20:11:41 +00:00
Michael Meissner
eaf2030fff fix typo 1996-02-22 16:32:31 +00:00
Michael Meissner
ad836e027c Add more write system calls; Add system call tracing 1996-02-21 21:58:43 +00:00
Michael Meissner
94feae28e3 Fix -m switch 1996-02-21 18:58:31 +00:00
Ian Lance Taylor
5c59ec4318 regenerate configure scripts with autoconf 2.7 1996-02-21 17:18:42 +00:00
Ian Lance Taylor
c8cd6f237b * Makefile.in (all): Simplify.
(clean, mostlyclean): SUBDIRS may contain whitespace; fix the loop
	as in the all target.
	(distclean, maintainer-clean, realclean): Likewise.
	(install): Likewise.
1996-02-21 17:02:23 +00:00
Michael Meissner
eada1efcaf Update to 1995-02-20 release 1996-02-21 16:47:06 +00:00
J.T. Conklin
d271dd0591 * config.in: Regenerated. 1996-02-21 01:02:10 +00:00
Michael Meissner
6cf9d64e77 Update to rev 1.0 from andrew 1996-02-16 15:51:57 +00:00
Michael Meissner
9fc3ba754e Make configure work on first stage of HP/UX and Solaris. 1996-02-15 23:46:30 +00:00
Michael Meissner
74eeaa7d57 Make simulator build on Solaris 2.4 1996-02-15 23:18:56 +00:00
Michael Meissner
7393a6f0b1 Work with HP/UX 9.00 1996-02-14 22:50:23 +00:00
Fred Fish
837d289362 * interp.c (LoadMemory): Enclose text following #endif in /* */.
* support.h: Remove superfluous "1" from #if.
	* support.h (CHECKSIM): Remove stray 'a' at end of line.
1996-01-31 02:36:07 +00:00
Michael Meissner
2e9bb935e8 Latest changes from Andrew 1996-01-22 15:56:15 +00:00
Jim Wilson
a7aa92e2cd Remove SH3e sanitization. 1996-01-16 20:18:32 +00:00
Michael Meissner
4ffd6ed0f3 Make {add to,subtract from} minus one; Make -t alu work better 1996-01-16 16:21:17 +00:00
Michael Meissner
52edddb970 Latest changes from Andrew 1996-01-10 20:42:29 +00:00
Michael Meissner
979c3c25fd Latest cagney update 1996-01-08 18:01:17 +00:00
Jason Molenda
ad3d97748b keep configure 1995-12-23 01:07:12 +00:00
Michael Meissner
a9ddbbf5a1 12/19 release from Andrew that fixes Netbsd break problem 1995-12-19 16:41:06 +00:00
Michael Meissner
98a497b3e9 Work with new and old BFDs; Do not inline model externs functions by default 1995-12-16 15:02:48 +00:00
Ian Lance Taylor
e924127a4f * run.c (main): Use new bfd_big_endian macro. 1995-12-15 21:28:11 +00:00
Michael Meissner
669b4e1ef6 Fix warnings when using full inlining. 1995-12-15 21:06:22 +00:00
Michael Meissner
93fac32455 Changes from Andrew 1995-12-15 20:20:13 +00:00
J.T. Conklin
2434e38489 * gencode.c (tab): Added several sh3 opcodes.
(think): Added printonmatch for A_SSR and A_SPC.
* interp.c (SSR, SPC): Added definitions.
(saved_state_type): Added ssr and spc registers.
1995-12-04 20:27:38 +00:00
Jackie Smith Cashion
8bae0a0c48 * gencode.c: Tidied instruction decoding, and added FP instruction
support.
* interp.c: Added dineroIII, and BSD profiling support. Also
run-time FP handling.

At the moment the options are still mostly build-time controlled,
rather than run-time. Also work still needs to be done to remove (long
long) usage (However this is trivial, just time-consuming).

The out-standing instruction work to be done is in supporting round
and trunc for FP operations, and providing better exception support.
1995-12-01 16:42:44 +00:00
Michael Meissner
1f1e5dd85f Let autoconf determine if host is big endian or not 1995-11-30 11:13:08 +00:00
Jim Wilson
9dfb65e661 * gencode.c (tab): In shad/shld definitions, negate R[m] before
the and operation instead of after.  For shad delete cast.  For shld
	use UR instead of R and delete cast.
1995-11-29 20:41:46 +00:00
Michael Meissner
cf644706d6 fix typo 1995-11-28 18:57:30 +00:00
Michael Meissner
290ad14a9d Add determining when we do not have enough writeback slots; Do not do model specific handling if not printing out the information 1995-11-28 18:47:07 +00:00
Michael Meissner
70fc4ad384 Build again on SunOS; Make MODEL_INLINE default to 1 if inlining, not 2; Use __attribute__((const)) 1995-11-27 22:54:40 +00:00
Michael Meissner
eade8e035c Check lf_printf for type correctness 1995-11-25 06:08:56 +00:00
Michael Meissner
3d2f9d7c88 Make WITH_MODEL_ISSUE==0 not core dump 1995-11-25 05:56:28 +00:00
Michael Meissner
f2181eff5f Sort instruction names; Add igen -R option; count # of CRs that mtcrf moved 1995-11-25 01:35:14 +00:00
Michael Meissner
63caaafa5b Sort instruction names; Add igen -R option; count # of CRs that mtcrf moved 1995-11-25 01:34:26 +00:00
Michael Meissner
45525d8d6d Fix warnings to everything can be compiled with -Wall; Redo model specific changes once again to speed things up 1995-11-24 16:44:37 +00:00
Michael Meissner
46c065ab31 Count each type of conditional branch 1995-11-22 21:02:49 +00:00
Michael Meissner
4a0351ab45 Add floating point model specific support; Redo method model specific support is done; Add remaining floating add/subtract-multiply 1995-11-21 21:41:25 +00:00
David Edelsohn
c3ccc15e43 minor cleanup 1995-11-21 01:45:07 +00:00
David Edelsohn
6d8e15cbaf * run.c: Include "getopt.h".
(verbose): Delete.
	(usage): Make static.
	(main): Call arm_sim_set_verbosity.
	Only load sections marked SEC_LOAD.
	* wrapper.c (mem_size, verbosity): New static global.
	(arm_sim_set_mem_size): Renamed from sim_size.
	Callers updated
	(arm_sim_set_profile{,_size}): Renamed from sim_foo.  Callers updated.
1995-11-21 01:44:50 +00:00
Michael Meissner
0bcce7d390 speed up search for free function unit slightly. 1995-11-20 04:05:36 +00:00
Angela Marie Thomas
50f694435f don't keep mips.. I don't think it's ready for primetime. 1995-11-19 10:12:19 +00:00
Angela Marie Thomas
86db8439a2 removed build-psim,config.make,config.hdr,function_unit.c,function_unit.h 1995-11-19 09:43:46 +00:00
David Edelsohn
e47e480588 * armdefs.h (ARMul_State): New member `verbose'.
* armrdi.c (ARMul_ConsolePrint): Add missing va_end.
	* run.c (verbose): Make global.
	* wrapper.c (init): Set state->verbose.
	(ARMul_ConsolePrint): Don't print anything if !verbose.
1995-11-18 03:39:17 +00:00
Jim Wilson
708f6147e4 Patch for Hitachi PR 8433, avoid core dump on HPUX host
* gencode.c (tab): Add explicit NaN support for ftrc instruction.
1995-11-18 02:03:21 +00:00
Michael Meissner
15ec5b60e2 Add scheduling support for M{F,T}CR 1995-11-18 01:39:04 +00:00
Michael Meissner
54e986998a More scheduling stuff 1995-11-18 01:14:45 +00:00
Michael Meissner
4220dcd698 checkpoint ppc simulator 1995-11-17 19:17:58 +00:00
Michael Meissner
84bbbc3577 Delete old functional_unit support; Add --enable-sim-model-issue; Monitor branch prediction success 1995-11-16 21:42:27 +00:00
Michael Meissner
867b71685a fix bug in last checkin 1995-11-16 19:25:47 +00:00
Michael Meissner
845ff5a45f more functional unit changes 1995-11-16 19:02:52 +00:00
Michael Meissner
acb06d3040 Add option to make options inline 1995-11-15 23:01:47 +00:00
Michael Meissner
80948f392b More model specific changes 1995-11-15 22:53:59 +00:00
Stu Grossman
fe2f8313f0 * gencode.c: jsr, bsr and bsrf actually save pc+4 in pr, and rts
actually uses pr+0.
1995-11-15 00:47:21 +00:00
Stu Grossman
9999417ef6 * gencode.c: jsr actually saves pc+4, and rts actually uses pr+0. 1995-11-14 23:42:22 +00:00
Michael Meissner
39c324612d make inline model use static when inlining. 1995-11-14 11:34:01 +00:00
Michael Meissner
f35df46cc3 make inline model use static when inlining. 1995-11-14 11:25:34 +00:00
Michael Meissner
fe439e0f18 fix more warnings 1995-11-14 10:52:24 +00:00
Michael Meissner
ac79ccd41d Fix warnings and dependency 1995-11-14 09:52:29 +00:00
Michael Meissner
1dc7c0ed84 checkpoint 1995-11-13 16:07:30 +00:00
Michael Meissner
eb4ef19775 Add model-functions support 1995-11-13 01:27:21 +00:00
Michael Meissner
28816f45f5 Add support for setting model name and other things 1995-11-12 14:20:39 +00:00
Michael Meissner
c05c182dd6 Various changes 1995-11-12 02:06:11 +00:00
Michael Meissner
d587782c78 fix typo 1995-11-11 12:30:17 +00:00