1 1999-02-11 Hugo Tyson <hmt@cygnus.co.uk>
3 * exec.c (dispatch_instruction):
4 Correct the sense of the
6 sregs->trap = TRAP_UNIMP;
9 clause that has been pasted around: it's correct in the SCAN and
10 DIVScc (divide step) cases (where it was probably originally
11 written?), but reversed in the SDIV, SDIVcc, UDIV, UDIVcc cases
12 ie. instructions only in the SPARC V8 or SPARClite 86x
13 architectures. It was also present when not required for SMUL,
14 SMULcc, UMUL, UMULcc instructions that are present in all
17 1999-01-25 Hugo Tyson <hmt@cygnus.co.uk>
19 * interf.c (run_sim): Fix a bug in the main loop's handling of
20 annulled delay slot instructions. There is precedent for this
21 change; the _other_ main loop in sis.c gets it right according to
22 my reading of the code.
24 The bug is: if an interrupt happens when the next instruction
25 (at sregs->pc) is annulled, the trap is taken (by execute_trap())
26 with the current values of PC and NPC, so when the trap returns,
27 the annulled instruction is indeed executed. Another giveaway is
28 that the annul flag is cleared in execute_trap(): the information
29 is demonstrably discarded.
31 The solution is: perform annulling before looking for traps, in
32 fact it's neater to do annulling, see if there's an interrupt and
33 if not, do the instruction, then handle traps be they generated by
34 interrupts pending or by the instruction we might just have done.
35 That's what the sis.c one does.
37 1999-01-20 Hugo Tyson <hmt@cygnus.co.uk>
39 * sis.h: Add asr17 register for support of SparcLITE (at least the
40 Hitachi ones I find before me)
42 * exec.c (dispatch_instruction): Case WRY: Allow write of asr17 if
43 sparclite. Other ASR numbers than 17 or 0 (Y) trap out.
44 Case RDY: Allow read of asr17 if sparclite. Other ASRs ditto.
45 (execute_trap): Do single-vector-trapping if asr17 bit 0 is set.
46 (init_regs): Initialize y and asr17.
47 NB: In instruction-set space, the Y register is asr0; the
48 instructions have different names for human reasons only.
51 * interf.c: Set boolean mode variable dumbio if invoked with
52 argument "-dumbio" and mention it of verbose.
53 * erc32.c: if "dumbio" is set, do not assume that there is a
54 terminal type device attached to stdin/stdout. Do not set
55 buffering or mess with tcsetattr or do any read operations in
56 order to make UART interrupts; not input data is supported.
57 This is necessary to allow the sim to be used within the eCos
58 testing infrastructure where stdin/stdout are pipes to a TCL
59 program; the sim hangs otherwise.
61 Thu Jul 23 07:17:03 1998 Mark Alexander <marka@cygnus.com>
63 * exec.c (dispatch_instruction): Add SPARClite 'scan' instruction.
65 Tue Jul 7 21:12:41 1998 Mark Alexander <marka@cygnus.com>
67 * func.c (bfd_load): Add special handling of a.out executables.
69 Sat Jun 13 08:33:25 1998 Mark Alexander <marka@cygnus.com>
71 * func.c (bfd_load): Print correct endianness.
72 * interf.c (run_sim): Print debugging information if verbosity level
74 (sim_open): Repeated -v options now increment verbosity level.
75 (sim_store_register): Handle little-endian case.
76 (flush_window): Print debugging information if verbosity level
79 Tue Jun 2 15:20:35 1998 Mark Alexander <marka@cygnus.com>
81 * interf.c (sim_open): Use revamped memory_read, which makes
82 byte-swapping unnecessary. Add -sparclite-board option for
83 emulating RAM found on typical SPARClite boards. Print
84 error message for unrecognized option.
85 * erc32.c: Change RAM address and size from constants to variables,
86 to allow emulation of SPARClite board RAM.
87 (fetch_bytes, store_bytes): New helper functions for revamped
88 mememory_read and memory_write.
89 (memory_read, memory_write): Rewrite to store bytes in target
90 byte order instead of storing words in host byte order; this
91 greatly simplifies support of little-endian programs.
92 (get_mem_ptr): Remove unnecessary byte parameter.
93 (sis_memory_write, sis_memory_read): Store words in target
94 byte order instead of host byte order.
95 (byte_swap_words): Remove, no longer needed.
96 * sis.h ((byte_swap_words): Remove declaration, no longer needed.
97 (memory_read): Add new sz parameter.
98 * sis.c (run_sim): Use revamped memory_read, which makes
99 byte-swapping unnecessary.
100 * exec.c (dispatch_instruction): Use revamped memory_read, which
101 makes byte-swapping and double-word fetching unnecessary.
102 * func.c (sparclite_board): Declare new variable.
103 (get_regi): Handle little-endian data.
104 (bfd_load): Recognize little-endian SPARClite as having
107 Fri May 22 14:23:16 1998 Mark Alexander <marka@cygnus.com>
109 * erc32.c (port_init): Print messages only if sis_verbose is true.
110 * func.c (bfd_load): Ditto.
111 * interf.c (sim_open): Ditto.
113 Thu May 14 23:10:48 1998 Mark Alexander <marka@cygnus.com>
115 * sis.h (uint64, int64): Define.
116 * exec.c (SDIV, SDIVCC, UDIV, UDIVCC): Define new opcodes.
117 * (mul64): Simplify calculation of negative result.
118 * (div64): New helper function for 64-bit division.
119 * (dispatch_instruction): Add emulation of SDIV, SDIVCC, UDIV,
122 Wed May 13 14:59:54 1998 Mark Alexander <marka@cygnus.com>
124 * erc32.c (close_port): Don't close stdin; it kills GDB.
125 (byte_swap_words): New function.
126 * sis.h: (byte_swap_words): Declare.
127 * interf.c (run_sim): Always fetch instructions as big-endian.
128 * sis.c (run_sim): Ditto.
130 Tue Apr 28 18:33:31 1998 Geoffrey Noer <noer@cygnus.com>
132 * configure: Regenerated to track ../common/aclocal.m4 changes.
134 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
136 * configure: Regenerated to track ../common/aclocal.m4 changes.
139 Sun Apr 26 15:20:17 1998 Tom Tromey <tromey@cygnus.com>
141 * acconfig.h: New file.
142 * configure.in: Reverted change of Apr 24; use sinclude again.
144 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
146 * configure: Regenerated to track ../common/aclocal.m4 changes.
149 Fri Apr 24 11:19:52 1998 Tom Tromey <tromey@cygnus.com>
151 * configure.in: Don't call sinclude.
153 Sat Apr 18 12:00:16 1998 Mark Alexander <marka@cygnus.com>
155 * func.c (disp_fpu): Fix build problem on big-endian hosts.
157 Wed Apr 8 19:33:34 1998 Mark Alexander <marka@cygnus.com>
159 * erc32.c (sim_stop): Handle SIGINT gracefully.
160 * interf.c (sim_open): Don't catch SIGINT; GDB will do that for us.
162 Wed Apr 8 18:29:40 1998 Mark Alexander <marka@cygnus.com>
164 * exec.c (dispatch_instruction): Change how carry out is calculated
165 in DIVSCC. Add emulation of SMULCC, UMUL, and UMULCC.
167 Sat Apr 4 20:36:25 1998 Andrew Cagney <cagney@b1.cygnus.com>
169 * configure: Regenerated to track ../common/aclocal.m4 changes.
171 Wed Apr 1 21:19:18 1998 Mark Alexander <marka@cygnus.com>
173 * end.c: Update to version 2.7.5, fix compiler warnings and bugs.
183 Fri Mar 27 16:15:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
185 * configure: Regenerated to track ../common/aclocal.m4 changes.
187 Wed Mar 25 12:35:29 1998 Andrew Cagney <cagney@b1.cygnus.com>
189 * configure: Regenerated to track ../common/aclocal.m4 changes.
191 Wed Mar 18 12:38:12 1998 Andrew Cagney <cagney@b1.cygnus.com>
193 * configure: Regenerated to track ../common/aclocal.m4 changes.
195 Tue Feb 17 12:41:11 1998 Andrew Cagney <cagney@b1.cygnus.com>
197 * interf.c (sim_store_register, sim_fetch_register): Pass in
198 length parameter. Return -1.
200 Sun Feb 1 16:47:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
202 * configure: Regenerated to track ../common/aclocal.m4 changes.
204 Sat Jan 31 18:15:41 1998 Andrew Cagney <cagney@b1.cygnus.com>
206 * configure: Regenerated to track ../common/aclocal.m4 changes.
208 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
210 * configure: Regenerated to track ../common/aclocal.m4 changes.
212 Mon Dec 15 23:17:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
214 * configure: Regenerated to track ../common/aclocal.m4 changes.
217 Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com>
219 * configure: Regenerated to track ../common/aclocal.m4 changes.
221 Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
223 * configure: Regenerated to track ../common/aclocal.m4 changes.
225 Wed Sep 24 17:38:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
227 * configure: Regenerated to track ../common/aclocal.m4 changes.
229 Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
231 * configure: Regenerated to track ../common/aclocal.m4 changes.
233 Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
235 * configure: Regenerated to track ../common/aclocal.m4 changes.
237 Fri Sep 19 17:45:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
239 * configure: Regenerated to track ../common/aclocal.m4 changes.
241 Mon Sep 15 17:36:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
243 * configure: Regenerated to track ../common/aclocal.m4 changes.
245 Wed Aug 27 18:13:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
247 * configure: Regenerated to track ../common/aclocal.m4 changes.
250 Tue Aug 26 10:38:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
252 * float.c (__setfpucw): Compile on any i386 target. Not just NT.
254 * interf.c (sim_kill): Delete.
255 (sim_create_inferior): Add ABFD argument. Initialize PC from ABFD
257 (sim_load): Don't save start address.
258 (start_address): Delete variable.
260 Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
262 * configure: Regenerated to track ../common/aclocal.m4 changes.
265 Mon Aug 25 16:19:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
267 * interf.c (sim_open): Add ABFD argument. Change ARGV to PARGV.
269 Mon Jun 30 11:45:25 1997 Doug Evans <dje@canuck.cygnus.com>
271 * Makefile.in (install-sis): Change $(srcdir)/sis to sis.
273 Wed May 28 09:46:13 1997 Andrew Cagney <cagney@b1.cygnus.com>
275 * interf.c (sim_set_callbacks): Drop SD argument - not applicable.
276 (sim_open): Add callback arg, save it.
278 Thu Apr 24 00:39:51 1997 Doug Evans <dje@canuck.cygnus.com>
280 * configure: Regenerated to track ../common/aclocal.m4 changes.
282 Tue Apr 22 11:05:01 1997 Doug Evans <dje@canuck.cygnus.com>
284 * interf.c (sim_open): Undo patch to add -E support.
286 Thu Apr 17 03:03:56 1997 Doug Evans <dje@canuck.cygnus.com>
288 * interf.c (sim_open): Ignore -E arg.
289 (start_address): New static local.
290 (sim_load): Return SIM_RC. New arg abfd. Set start_address from bfd.
291 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
293 Tue Apr 15 15:16:11 1997 Ian Lance Taylor <ian@cygnus.com>
295 * Makefile.in (install-sis): Depend upon installdirs. Use
296 $(program_transform_name) directly, rather than using
299 Mon Apr 7 15:45:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
301 * configure: Regenerated to track ../common/aclocal.m4 changes.
304 Wed Apr 2 15:06:28 1997 Doug Evans <dje@canuck.cygnus.com>
306 * interf.c (sim_open): New arg `kind'.
308 * configure: Regenerated to track ../common/aclocal.m4 changes.
310 Wed Apr 2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
312 * configure: Regenerated to track ../common/aclocal.m4 changes.
314 Mon Mar 17 15:10:07 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
316 * configure: Re-generate.
318 Thu Mar 13 12:46:04 1997 Doug Evans <dje@canuck.cygnus.com>
320 * interf.c (sim_open): New SIM_DESC result. Argument is now in
322 (other sim_*): New SIM_DESC argument.
324 Tue Feb 4 13:35:20 1997 Doug Evans <dje@canuck.cygnus.com>
326 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
327 COMMON_{PRE,POST}_CONFIG_FRAG instead.
328 * configure.in: sinclude ../common/aclocal.m4.
329 * configure: Regenerated.
331 Thu Jan 23 11:46:23 1997 Stu Grossman (grossman@critters.cygnus.com)
333 * configure configure.in Makefile.in: Update to new configure
334 scheme which is more compatible with WinGDB builds.
335 * configure.in: Improve comment on how to run autoconf.
336 * configure: Re-run autoconf to get new ../common/aclocal.m4.
337 * Makefile.in: Use autoconf substitution to install common
340 Wed Dec 4 18:25:04 1996 Rob Savoye <rob@chinadoll.cygnus.com>
342 * interf.c (run_sim): Stop the simulator and reset the stdio after
345 Tue Dec 3 11:54:37 1996 Rob Savoye <rob@chinadoll.cygnus.com>
347 * configure.in: Look for libtermcap.a.
348 * Makefile.in: Only link in -ltermcap if it exists.
349 * erc32.c: Update to version 2.6a. Fix uart handling.
350 * exec.c: Update to version 2.6a. Add sparclite support.
351 * float.c: Update to version 2.6a. Convert comments to
352 preprocessor warnings. Add __setfpucw() for i385 hosts so floating
353 point exceptions work on win32.
354 * func.c: Update to version 2.6a. Fix uart handling, add support
355 for user error traps.
356 * help.c: Update to version 2.6a. Add help note on user error
358 * interf.c: Update to version 2.6a. Fix uart handling, and add
360 * examples/gccx: Use sparclite cross compiler, not native gcc.
361 * examples/srt0.S: Use "mov" rather than "wr" for manipulating
364 Mon Nov 25 08:28:10 1996 Fred Fish <fnf@cygnus.com>
366 * Makefile.in (run.o): Remove this rule, it hides the one in
367 ../common/Make-common.in that correctly references the source
368 in the sibling ../common directory.
370 Wed Nov 20 01:30:12 1996 Doug Evans <dje@canuck.cygnus.com>
372 * Makefile.in: Delete stuff moved to ../common/Make-common.in.
373 (SIM_{OBJS,EXTRA_LIBS,EXTRA_LIBDEPS,EXTRA_ALL,EXTRA_INSTALL}): Define.
374 (SIM_{EXTRA_CLEAN,EXTRA_CFLAGS}): Define.
375 * configure.in: Simplify using macros in ../common/aclocal.m4.
376 Call AC_CHECK_HEADERS(stdlib.h).
377 * configure: Regenerated.
378 * config.in: New file.
379 * func.c (sim_set_callbacks): Delete, moved to
380 * interf.c (sim_set_callbacks): here.
381 (sim_callback): New global.
382 Rewrite all calls to printf_filtered to go through callback.
383 (sim_size,sim_trace): New functions.
384 (sim_{insert,remove}_breakpoint): #if 0 out.
385 * sis.c: #include "config.h". #include <stdlib.h> if present.
386 (main): Coerce fprintf arg to INIT_DISASSEMBLE_INFO to fprintf_ftype.
387 * sis.h: #include "callback.h".
388 * run.c: Deleted, using one in ../common now.
390 Thu Oct 3 16:12:03 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
392 * Makefile.in (clean): Move config.log to distclean.
394 Wed Oct 2 16:57:57 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
396 * Makefile.in (clean): Also remove config.log.
398 Sat Sep 14 00:00:46 1996 Ian Lance Taylor <ian@cygnus.com>
400 * Makefile.in (CC_FOR_BUILD): New variable.
401 (AR, AR_FLAGS, BISON, MAKEINFO): Remove duplicate variables.
402 (RANLIB, CC): Likewise.
403 (end): Use $(CC_FOR_BUILD), not $(CC).
404 * configure.in: Set CC_FOR_BUILD.
405 * configure: Rebuild.
407 Sun Sep 8 14:04:37 1996 Stu Grossman (grossman@critters.cygnus.com)
409 * erc32.c (port_init): Disable this for __GO32__ (got no pty's
412 Mon Aug 12 17:04:58 1996 Stu Grossman (grossman@critters.cygnus.com)
414 * erc32.c: Don't include sys/ioctl.h or sys/file.h. They aren't
416 * (port_init): Don't even *try* to open pty's under _WIN32.
417 * Use SIM_ADDR, not caddr_t for declaring vars that hold addresses.
418 * float.c: Get rid of #warning. Makes Microsoft C barf.
419 * interf.c (sim_open): Cast fprintf to (fprintf_ftype) to fix
421 * (sim_load sim_create_inferior sim_read): Use prototypes only in
423 * Get rid of enum sim_stop. It's defined in remote-sim.h.
424 * (sim_stop_reason): Define SIGTRAP if _WIN32.
425 * sis.h: Include ansidecl.h and remote-sim.h.
427 Wed Jul 3 16:05:23 1996 Stu Grossman (grossman@critters.cygnus.com)
429 * erc32.c (mec_reset mec_read mec_write memory_read memory_write),
430 sis.h: Get rid of all uses of long long's.
431 * (close_port read_uart write_uart uarta_tx): Don't seg fault
432 when can't open pty's.
433 * exec.c: Add two new instructions: smul, and divscc.
434 * interf.c (flush_windows): New routine to flush the register
435 windows out to the stack just before returning to GDB. Makes
436 backtraces work much better.
438 Wed Jun 26 12:19:11 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
440 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
441 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
442 (docdir, oldincludedir): Removed.
443 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
444 (AC_PROG_INSTALL): Added.
445 * configure: Rebuilt.
447 Mon Jun 24 14:19:07 1996 Ian Lance Taylor <ian@cygnus.com>
449 * configure.in: Call AC_PROG_CC before running configure.host.
450 * configure: Rebuild with autoconf 2.10.
452 Tue Jun 4 10:37:12 1996 Tom Tromey <tromey@csk3.cygnus.com>
454 * Makefile.in (install): Don't check to see if tooldir exists.
455 Make $(tooldir) and $(tooldir)/bin.
457 Mon Jun 3 12:33:38 1996 Ian Lance Taylor <ian@cygnus.com>
459 * Makefile.in (end.h): Use explicit ./ when running end.
461 Sun May 19 21:05:31 1996 Rob Savoye <rob@chinadoll.cygnus.com>
463 * func.c(bfd_load): Don't try to print the filename if the pfbd is
465 * interf.c(sim_load): Pass the whole string, not just the first
471 * Fixed bug in "go" command.
476 * Fixed bug in interrupt force register (erc32.c).
478 * Change file load function to use bfd_openr.
480 * SIS should now be endian independent.
485 * Fixed FPU timing - some sequences of FPU instructions did not calculate
486 the resource dependencies right.
488 * Corrected STDFQ when qne = 0 (again!). The ftt is set to sequence_error
489 but no FPU trap is generated.
491 version 1.7.1 31-10-95
494 * Corrected STDFQ when qne = 0. Now, a trap is immidiately generated but
495 the FPU stays in execute mode.
497 * Corrected JMPL and RETT timing (these instructions takes two cycles).
503 * Interrupt during annuled instruction corrupted return address - fixed.
506 version 1.6.2 25-10-95
509 * Added -DFAST_UART to Makefile
512 version 1.6.1 24-10-95
515 * Fixed bug in STDFQ which caused bus error
521 * Modified srt0.s to include code that initiates registers in IU and FPU
522 and initializes the data segment. The simulator 'load' command does not
523 longer initialize the data segment!
525 * Corrected MEC timer operation; scalers now divide the frequency by
528 * MEC breakpoints are not checked during store operation
534 * Fixed some bugs in the cycle counting for IU & FPU instructions.
536 * Fixed bug that allowed an annuled instruction to cause memory exception.
538 * The *ws parameter in mem.c should now contain the number of waitstates
539 required by the memory access (was total number of cycles).
541 * The supplied srt0.s now clears the BSS (thanks Joel).
546 * Added a '-g' switch to enable/disable the GNU readline(), which cause
547 some problems on solaris 2.x machines.
549 * Enabled MEC watchpoint and breakpoint function to mem.c. Performance
552 NOTE: The UARTs are now connected to /dev/ttypc and /dev/ttypd.
557 * Fixed bug in mulscc instruction (how could that ever have worked?)
559 * Fixed bug in UART B (flushed characters on UART A), thanks Paul.
564 * Fixed bug in interrupt handling (wrong interrupt selected when more that
565 one interrupt pending)
567 * Fixed updating of condition codes during logical instructions (carry and
568 overflow were not reset)
570 * Fixed bug in WRTBR (tt field was wrongly over-written)
575 * Fixed several bugs in the interrupt handler and callback routines.
576 (reported by Paul Warren, Alsys)