3 * configure: Regenerated.
7 * configure: Regenerated.
11 * configure: Regenerated.
15 * interp.c (sim_memory_size): Use same amount of memory on Windows as
20 * interp.c (<sys/mman.h>): Include.
21 (mcalloc): New function / macro.
23 (sim_size): Use mcalloc and mfree.
27 * interp.c (strswaplen): Add one for '\0' delimiter.
31 * gencode.c (tab): Avoid lvalue casts. Suggested by
36 * gencode.c (tab): Avoid inserting code before variables all declared.
40 * configure: Regenerate.
44 * configure.ac: Sinclude aclocal.m4 before common.m4. Add
45 explicit call to AC_CONFIG_HEADER.
46 * configure: Regenerate.
50 * configure.ac: Update to use ../common/common.m4.
51 * configure: Re-generate.
55 * configure: Regenerated to track ../common/aclocal.m4 changes.
59 * configure.ac: Rename configure.in, require autoconf 2.59.
60 * configure: Re-generate.
64 * configure: Regenerate for ../common/aclocal.m4 update.
69 * gencode.c (movua.l): Compensate for endianness.
73 * interp.c (RAISE_EXCEPTION_IF_IN_DELAY_SLOT): New macro.
74 (in_delay_slot): New flag variable.
75 (Delay_Slot): Set in_delay_slot.
76 (sim_resume): Reset in_delay_slot after leaving code switch.
77 * gencode.c (op tab): Call RAISE_EXCEPTION_IF_IN_DELAY_SLOT for all
78 instructions not allowed in delay slots.
83 Introduce SH2a support.
84 * interp.c: Change type of jump table to short. Add various macros.
85 (sim_load): Save the bfd machine code.
86 (sim_create_inferior): Ditto.
87 (union saved_state_type): Add tbr, ibnr and ibcr registers.
88 Move bfd_mach to end of struct. Add regstack pointer.
89 (init_dsp): Don't swap contents of sh_dsp_table any more. Instead
90 use it directly in its own switch statement. Allocate space for 512
92 (do_long_move_insn): New function.
93 (do_blog_insn): Ditto.
94 (trap): Use trap #13 and trap #14 to set ibnr and ibcr.
95 * gencode.c: Move movx/movy insns into separate switch statement.
96 (op tab): Add sh2a insns. Reject instructions that are disabled
98 (gensim_caselist): Generate default case here instead of in caller.
99 (gensim): Generate two separate switch statements. Call
100 gensim_caselist once for each (for movsxy_tab and for tab).
101 Add tokens for r15 and multiple regs.
102 (conflict_warn, warn_conflicts): Add for debugging.
106 * gencode.c (tab): For shad snd shld, fix result for
107 (op1 < 0 && shift_amount == 0).
111 * gencode.c (movua.l): Set thislock to 0, not n.
115 * gencode.c (table): Change from char to short.
116 (dumptable): Change generated table from char to short.
117 * interp.c (sh_jump_table, sh_dsp_table, ppi_table): char to short.
118 (init_dsp): Compute size of sh_dsp_table.
119 (sim_resume): Change jump_table from char to short.
123 * gencode.c: (op tab): Some refs and defs fixes.
124 "fsrra" -> "fsrra <FREG_N>".
125 "sleep": replace array ref with array addr.
127 Comment and whitespace clean-ups.
131 * gencode.c: Whitespace cleanup.
134 * gencode.c: Replace 'Hitachi' with 'Renesas'.
135 (op tab): Add new instructions for sh4a, DBR, SBR.
136 (expand_opcode): Add handling for new movxy combinations.
137 (gensym_caselist): Ditto.
138 (expand_ppi_movxy): Remove movx/movy expansions,
139 now handled in expand_opcode.
140 (gensym): Add some helpful macros.
141 (expand_ppi_code): Flatten loop for simplicity, tweak for 12-bit
142 instead of 8-bit table (some insns are ambiguous to 8 bits).
143 (ppi_gensim, main): Generate 12-bit instead of 8-bit ppi table.
145 * interp.c: Replace 'Hitachi' with 'Renesas'.
146 (union saved_state_type): Add dbr, sgr, ldst.
147 (get_loop_bounds_ext): New function.
148 (init_dsp): Add bfd_mach_sh4al_dsp.
149 (sim_resume): Handle extended loop bounds.
153 * gencode.c (expand_opcode): Simplify and reorganize.
154 Eliminate "shift" parameter. Eliminate "4 bits at a time"
155 assumption. Flatten switch statement to a single level.
156 Add "eeee" token for even-numbered registers.
158 (fsca): Use "eeee" token.
159 (ppi_moves): Rename to "expand_ppi_movxy". Do the ddt
160 [movx/movy] expansion here, as well as the ppi expansion.
161 (gensim_caselist): Accept 'eeee' along with 'nnnn'.
165 * interp.c (fsca_s, fsrra_s): New functions.
166 * gencode.c (tab): Add entries for fsca and fsrra.
167 (expand_opcode): Allow variable length n / m fields.
171 * syscall.h (SYS_truncate, SYS_ftruncate): Define.
172 * interp.c (trap): Add support for SYS_ftruncate and SYS_truncate.
175 * sim/sh/gencode.c ( tab[] ): Addition of MAC.L handler and
176 correction for MAC.W handler
177 * sim/sh/interp.c ( macl ): New Function. Implementation of
182 * gencode.c (expand_ppi_code): Comment spelling fix.
186 * gencode.c (pshl): Change < to <= (shift by 16 is allowed).
187 Cast argument of >> to unsigned to prevent sign extension.
188 (psha): Change < to <= (shift by 32 is allowed).
192 * gencode.c: Fix typo in comment.
196 * gencode.c: A few more fix-ups of refs and defs.
197 (frchg): Raise SIGILL if in double-precision mode.
198 (ldtlb): We don't simulate cache, so this is a no-op.
199 (movsxy_tab): Correct a few bit pattern errors.
203 * gencode.c (prnd): Clear LSW of result to zeros.
204 * gencode.c (pmuls): Expression is mis-parenthesized.
205 * gencode.c (ppi_gensim): For a conditional ppi insn, if the
206 condition is false, we want to return (not break). A break
207 will take us to the end of the function where registers will
208 be updated, whereas the desired outcome is for nothing to change.
212 * gencode.c (movs): Fix a couple of text transpositions.
216 * gencode.c (op tab): Some fix-ups of refs and defs.
217 (ocbi, ocbp): Cache not simulated, but may cause memory fault.
218 (gensym_caselist): Add default case to switch statement.
219 (expand_ppi_code): Add default case to switch statement.
220 * gencode.c (op tab): Implement movca.l.
221 * gencode.c (op movsxy_tab): Fix an error in the bit pattern.
222 * gencode.c (gensim_caselist): The movy instructions use
223 registers R6 and R7 (not R4 and R5 like the movx insns).
227 * gencode.c (op movsxy_tab): Fix up some copy/paste errors
228 in name: s/REG_x/REG_y/.
230 * gencode.c (op tab): Move misplaced semicolon.
234 * interp.c (init_dsp, sim_open, sim_create_inferior): Rename _bfd
239 * interp.c (trap): Return int. Take extra parameter for address
240 of the trap instruction. Changed all callers.
241 Add case 33 for profiling.
242 * gencode.c (trapa): Handle trap 33 using the trap function.
243 Add read of vector for generic traps.
247 * Makefile.in (interp.o): Depend on $(srcroot)/include/gdb/sim-sh.h.
248 * interp.c: Include "gdb/sim-sh.h".
249 (sim_store_register, sim_fetch_register): Use constants defined there.
253 * interp.c (sim_resume): Fix setting of bus error for
258 * configure: Regenerated to track ../common/aclocal.m4 changes.
262 * interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
266 * interp.c (sim_create_inferior): Record program arguments for
267 later inspection by the trap handler.
268 (count_argc): New function.
269 (prog_argv): Declare static.
270 (sim_write): Declare.
271 (trap): Implement argc, argnlen and argn system calls. Do not
272 abort on unknown system calls--simply return -1.
273 * syscall.h (SYS_argc, SYS_argnlen, SYS_argn): Define.
277 * interp.c (trap): Implement time.
281 * gencode.c (tab): Delimit strings with commas where applicable.
285 * configure: Regenerated to track ../common/aclocal.m4 changes.
289 sh-dsp support, simulator speedup by using host byte order:
291 * Makefile.in (interp.o): Depends on ppi.c .
293 * gencode.c (printonmatch, think, genopc): Deleted.
294 (MAX_NR_STUFF): Now 42.
295 (tab): Add SH-DSP CPU instructions.
296 Amalgamate ldc / stc / lds / sts instructions with similar
297 bit patterns. Fix opcodes of stc Rm_BANK,@-<REG_N>.
298 Fix semantics of lds.l @<REG_N>+,MACH (no sign extend).
299 (movsxy_tab): New array.
300 For movs, change MMMM field to GGGG, and mmmm field to MMMM.
301 Added entries for movx, movy and parallel processing insns.
302 (ppi_tab): New array.
303 (qfunc): Stabilize sort.
304 (expand_opcode): Handle [01][01]NN, [01][01]xx and [01][01]yy.
305 Handle 'M', 'G' 's' 'X', 'a', 'Y' and 'A'.
306 (dumptable): Now takes three arguments. Changed all callers.
307 Emit just one contigous jump table.
308 (filltable): Now takes an argument. Changed all callers.
310 (ppi_moves, expand_ppi_code, ppi_filltable, ppi_gensim): New functions.
311 (gensim_caselist): New function, broken out of gensim.
312 Handle opcode fields 'x', 'y', 's', 'M', 'G', 'X', 'a', and 'Y'.
314 (gensim): Handle 'N' in code field and '8' in refs field.
315 Call gensim_caselist - twice.
316 (ppi_index): New static variable.
317 (main): Unsupport default action.
318 Add dsp support for -x / -s option. Add -p option.
319 * interp.c (sh_jump_table, sh_dsp_table, ppi_table): Declare.
320 (saved_state_type): Rearrange to allow amalgamated ldc / stc /
321 lds / sts to work efficiently.
322 (target_dsp): New static variable.
323 (GBR, VBR, SSR, SPC, MACH, MACL): Reflect saved_state_type change.
324 (FPUL, Rn_BANK, SET_Rn_BANK, M, Q, S, T, SR_BL, SR_RB): Likewise.
325 (SR_MD, SR_RC, SET_SR_BIT, GET_SR, SET_RC, GET_FPSCR): Likewise.
326 (RS, RE, MOD, MOD_ME, DSP_R): Likewise.
327 (set_fpscr1): Likewise. Use target_dsp to check for dsp.
328 (MOD_MSi, SIG_BUS_FETCH): Deleted.
329 (CREG, SREG, PR, SR_MASK_DMY, SR_MASK_DMX, SR_DMY): New macros.
330 (SR_DMX, DSR, MOD_DELTA, GET_DSP_GRD): Likewise.
331 (SET_MOD): Reflect saved_state_type change. Set MOD_DELTA instead
332 of MOD_MS, and encode SR_DMY / SR_DMX into high word of MOD_ME.
333 (set_sr): Reflect saved_state_type change. Fix SR_RB handling.
335 (MA, L, TL, TB): Now controlled by ACE_FAST.
336 (SEXT32): Just cast to int.
337 (SIGN32): Fixed to only shift by 31.
338 (CHECK_INSN_PTR): SIGBUS at insn fetch now represented by insn_end 0.
341 (init_dsp): Set target_dsp. When it changes, switch end of
342 sh_jump_table with sh_dsp_table.
343 (sim_resume) Don't declare sh_jump_table0. Use sh_jump_table instead.
344 Don't Declare PR if it's #defined.
345 Fix single-stepping (Was broken in Mar 6 16:59:10 patch).
346 (sim_store_register, sim_read_register): Translate accesses to
347 reflect saved_state_type change.
349 * interp.c (set_sr): Set sr.
350 (SET_RC, MOD, MOD_MS, MOD_ME, SET_MOD, MOD_MS, MOD_ME): New macros.
351 (set_fpscr1): Don't bank-switch fpu registers when simulating sh-dsp.
352 (DSP_R): Fix definition.
353 (sim_resume): Remove outdated SET_SR use.
355 * interp.c (saved_state): New members for struct member asregs:
356 rs, re, insn_end, xram_start, yram_start.
357 (struct loop_bounds): New struct.
358 (SKIP_INSN): New macro.
359 (get_loop_bounds): New function.
360 (endianw): Renamed to global_endianw.
361 (maskw): negated bits.
363 (SR_MASK_RC, SR_RC_INCREMENT, SR_RC, RAISE_EXCEPTION): New macros.
364 (RS, RE, DSP_R, DSP_GRD, A1, A0, X0, X1, Y0, Y1, M0, A1G): Likewise.
365 (M1, A0G, RIAT, PT2H, PH2T, SET_NIP, CHECK_INSN_PTR): Likewise.
366 (SIG_BUS_FETCH): Likewise
367 (raise_exception, riat_fast): New functions.
368 (raise_buserror, sim_stop): Use raise_exception.
369 (PROCESS_SPECIAL_ADDRESS): Use xram_start / yram_start.
370 (BUSERROR, WRITE_BUSERROR, READ_BUSERROR):
371 Reverse sense of mask argument.
372 (FP_OP, set_dr): Use RAISE_EXCEPTION.
373 (wlat_fast, wwat_fast, wbat_fast, rlat_fast, rwat_fast, rbat_fast):
374 Declare. Remove redundant masking.
375 (wwat_fast, rwat_fast): Add argument endianw. Changed callers.
376 (MA): Updated for change pc -> PC.
377 (Delay_Slot): Use RIAT.
379 (trap): Remove argument little_endian. Add argument endianw.
380 Changed all callers. Use raise_exception.
381 (macw): Add argument endainw. Changed all callers.
382 (init_dsp): New function, extended after broken out of init_pointers.
383 (sim_resume): Replace pc with insn_ptr. Replace little_endian with
384 endianw. Replace nia with nip. Reverse sense of maskb / maskw /
385 maskl. Implement logic for zero-overhead loops. Don't try to
386 interpret garbage when getting a SIGBUS at insn fetch.
387 (sim_open): Call init_dsp.
388 * gencode.c (tab): Use SET_NIP instead of nia = . Use PH2T / PT2H /
389 RAISE_EXCEPTION where appropriate.
390 Add extra cycles for brai, braf , bsr, bsrf, jmp, jsr.
392 * interp.c (sim_store_register, sim_fetch_register):
393 Do proper endianness switch.
395 * interp.c (saved_state_type): New members for struct member asregs:
396 xymem_select, xmem, ymem, xmem_offset, ymem_offset.
397 (special_address): Delete.
398 (BUSERROR): Now a two-argument predicate.
399 (PROCESS_SPECIAL_ADDRESS, WRITE_BUSERROR, READ_BUSERROR): New macros.
400 (wlat_little, wwat_little, wbat_any, wlat_big, wwat_big): Delete.
401 (process_wlat_addr, process_wwat_addr): New functions.
402 (process_wbat_addr, process_rlat_addr, process_rwat_addr): Likewise.
403 (process_rbat_addr): Likewise.
404 (wlat_fast, wwat_fast, wbat_fast): Use WRITE_BUSERROR.
405 (rlat_little, rwat_little, rbat_any, rlat_big, rwat_big): Delete.
406 (rlat_fast, rwat_fast, rbat_fast): Use READ_BUSERROR.
407 (RWAT, RLAT, RBAT, WWAT, WLAT, WBAT): Delete SLOW versions.
408 (do_rdat, trap): Delete SLOW code.
409 (SEXT32, SIGN32): New macros.
410 (swap, swap16): Now integer in - integer out. Changed all callers.
411 (strswaplen, strnswap): Delete SLOW versions.
412 (init_pointers): Initialize dsp memory selection (preliminary).
413 (sim_store_register, sim_fetch_register): Use swap instead of
414 big / little endian read / write functions.
416 * interp.c (maskl): Deleted.
417 (endianw, endianb): New variables.
418 (special_address): Now inline.
419 (bp_holder): Put raising of buserror there, rename to:
421 (BUSERROR): Now yields a value. Changed all users.
423 (wlat_fast, wwat_fast, wbat_fast): New functions.
424 (rlat_fast, rwat_fast, rbat_fast): Likewise.
425 (RWAT, RLAT, RBAT, WWAT, WLAT, WBAT): Use new functions.
426 (do_rdat, do_wdat): Likewise. Take maskl argument instead of
427 little_endian one. Changed caller macros.
428 (swap, swap16): Use w[rw]lat_big / w[rw]lat_little directly.
429 (strswaplen, strnswap): New functions.
430 (trap): Use them to fix up endian mismatches;
431 disable SYS_execve and SYS_execv; fix double address translation for
432 SYS_pipe and SYS_stat.
433 (sym_write, sym_read): Add endianness translation.
434 (sym_store_register, sym_fetch_register): Add maskl local variable.
435 (sim_open): Set endianw and endianb.
439 * configure: Regenerated to track ../common/aclocal.m4 changes.
443 * gencode.c (fcnvds <DR_N>,FPUL): Rewrite to use a local anonymous
444 union type, instead of casting to an int* then a float*.
445 (fcnvsd FPUL,<DR_N>): Likewise.
446 (flds <FREG_N>,FPUL): Likewise.
447 (fsts FPUL,<FREG_N>): Likewise.
451 * configure: Regenerated to track ../common/aclocal.m4 changes.
455 * interp.c (POLL_QUIT_INTERVAL): Define. Used to tweak the
456 frequency at which the poll_quit callback is called.
457 (sim_resume): Use POLL_QUIT_INTERVAL instead of a
462 * interp.c (saved_state.asregs): Add new member pad_dummy.
463 (sim_store_register, sim_fetch_regsiter): Add 1 to rn for use
464 as index into saved_state.asints.
468 * interp.c (sim_open): set endianness based on the ABFD if a -E
469 option is not present and we have an ABFD.
473 * configure: Regenerated to track ../common/aclocal.m4 changes.
475 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
477 * configure: Regenerated to track ../common/aclocal.m4 changes.
482 * acconfig.h: New file.
483 * configure.in: Reverted change of Apr 24; use sinclude again.
485 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
487 * configure: Regenerated to track ../common/aclocal.m4 changes.
492 * configure.in: Don't call sinclude.
496 * configure: Regenerated to track ../common/aclocal.m4 changes.
500 * configure: Regenerated to track ../common/aclocal.m4 changes.
504 * configure: Regenerated to track ../common/aclocal.m4 changes.
508 * configure: Regenerated to track ../common/aclocal.m4 changes.
512 * interp.c (sim_fetch_register, sim_store_register): Pass in
513 length parameter. Return -1.
517 * configure: Regenerated to track ../common/aclocal.m4 changes.
521 * configure: Regenerated to track ../common/aclocal.m4 changes.
523 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
525 * configure: Regenerated to track ../common/aclocal.m4 changes.
529 * configure: Regenerated to track ../common/aclocal.m4 changes.
534 * configure: Regenerated to track ../common/aclocal.m4 changes.
538 * interp.c (sim_load): Pass lma_p and sim_write args to
543 * configure: Regenerated to track ../common/aclocal.m4 changes.
547 * configure: Regenerated to track ../common/aclocal.m4 changes.
551 * configure: Regenerated to track ../common/aclocal.m4 changes.
555 * configure: Regenerated to track ../common/aclocal.m4 changes.
559 * configure: Regenerated to track ../common/aclocal.m4 changes.
563 * configure: Regenerated to track ../common/aclocal.m4 changes.
567 * interp.c (sim_resume): poll_quit() at least once per call;
568 otherwise gdb can loop sim_resume() uninterruptably.
570 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
572 * configure: Regenerated to track ../common/aclocal.m4 changes.
576 * gencode.c (tab): Order instructions according to SH3 document.
580 * configure: Regenerated to track ../common/aclocal.m4 changes.
585 * interp.c (sim_kill): Delete.
586 (sim_create_inferior): Add ABFD argument.
587 (sim_load): Move setting of PC from here.
588 (sim_create_inferior): To here.
592 * configure: Regenerated to track ../common/aclocal.m4 changes.
597 * interp.c (sim_open): Add ABFD argument.
601 * interp.c (get_dr): Avoid SIGFPE by moving integers instead of
607 * interp.c (XD, SET_XD): Delete.
608 (XF, SET_XF, XD_TO_XF): Define, move around registers in either
611 * gencode.c (fmov): Update.
615 * interp.c (set_fpscr1): From J"orn Rennecke
620 * interp.c (special_address): New function.
621 (BUSERROR): Call it. Added parameters bits_written and data.
623 * gencode.c (tab): Fixed ocbwb and pref.
627 * interp.c (do_wdat, do_wdat): Fix bug in register number calculation.
631 * interp.c (sim_create_inferior): Clear registers each time an
636 * interp.c (*FP, FP_OP, FP_CMP, FP_UNARY): Provide a hook for
637 when a host doesn't support IEEE FP.
638 (*DP): Provide alternative definition that supports 64bit floating
640 (target_little_endian): Combine little_endian and little_endian_p.
641 (saved_state_type): Make fpscr and sr simple integers.
642 (SET_FPSCR, GET_FPSCR): Use macros to update fpscr register.
643 (set_fpscr1): New function. Handle swapping when PR / FR bits
644 changed. Call via *_FPSCR macro.
645 (SET_SR*, GET_SR*): Use macro's to access the SR bits - avoids
648 * gencode.c (tab): Update.
652 * gencode.c (main): Perform basic checks on tab entries.
654 * Makefile.in (gencode): Always compile with -g.
658 * gencode.c (gensim): Move ref checking code to before `stuff'.
659 For branches with delay slots refs were not being checked.
661 * interp.c (sim_resume): Use nia to specify the next instruction
662 address instead of overloading pc.
663 (C): Delete definiton - refer to cycles directly.
664 (SEXT12): New macro - sign extend a 12 bit quantity.
665 (Delay_Slot): Rename from SL.
667 * gencode.c (tab): Update/simplify.
669 * gencode.c (gensim): Better formatting of output code.
670 (gensim): Replace 10 with constant MAX_NR_STUFF- define as 15.
671 (tab): Sort alphabetically. Break `stuff' into multiple lines.
675 * gencode.c (braf, bsrf): Fix branch destination calculation to
676 be in accordance with the documentation.
680 * interp.c (init_pointers): Fix little endian test.
684 * interp.c (init_pointers): SH4 hardware is always WORDS_BIT_ENDIAN.
685 * gencode (fmov from/to memory): take endian_mismatch into account
686 for 32 bit moves too.
690 * gencode.c (swap.b): Fix treatment of high word.
695 * interp.c: experimental SH4 support.
696 DFmode moves are probaly broken for target little endian.
700 * interp.c (sim_open): Add callback argument.
701 (sim_set_callbacks): Delete SIM_DESC argument.
705 * Makefile.in (SIM_EXTRA_CLEAN): Define.
706 (clean targets): Delete.
707 (sh-clean): New target.
711 * configure: Regenerated to track ../common/aclocal.m4 changes.
715 * tconfig.in: New file.
716 * interp.c (sim_open): Handle missing arg to -E.
720 * Makefile.in: Add clean targets.
724 * interp.c: Include float.h and define SIGTRAP if _WIN32.
726 * (trap): Do do SYS_chown for _WIN32.
730 * interp.c (sim_resume): Fix argument to poll_quit.
734 * interp.c (sim_stop): New function.
735 (sim_resume): Use poll_quit for polling.
739 * Makefile.in (SIM_OBJS): Add sim-load.o.
740 * interp.c (target_byte_order): Delete.
741 (sim_kind, myname, little_endian_p): New static locals.
742 (init_pointers): Use little_endian_p instead of target_byte_order.
743 (sim_resume): Likewise.
744 (sim_open): Set sim_kind, myname. Set little_endian_p from -E arg.
745 (sim_load): Return SIM_RC. New arg abfd. Call sim_load_file to
746 load file into simulator. Set start address from bfd.
747 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
751 * configure: Regenerated to track ../common/aclocal.m4 changes.
756 * interp.c (sim_open): New arg `kind'.
758 * configure: Regenerated to track ../common/aclocal.m4 changes.
762 * configure: Regenerated to track ../common/aclocal.m4 changes.
766 * interp.c (sim_do_command): Check for NULL command or empty
767 string and handle it the same as a "help" command. Use callback
768 to print error message for unrecognized commands. Replace
769 hardcoded tab in literal string with a \t. Other minor code
774 * configure: Regenerated to track ../common/aclocal.m4 changes.
778 * configure: Re-generate.
782 * configure: Regenerate to track ../common/aclocal.m4 changes.
786 * interp.c (sim_open): New SIM_DESC result. Argument is now
788 (other sim_*): New SIM_DESC argument.
792 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
793 COMMON_{PRE,POST}_CONFIG_FRAG instead.
794 * configure.in: sinclude ../common/aclocal.m4.
795 * configure: Regenerated.
799 * configure configure.in Makefile.in: Update to new configure
800 scheme which is more compatible with WinGDB builds.
801 * configure.in: Improve comment on how to run autoconf.
802 * configure: Re-run autoconf to get new ../common/aclocal.m4.
803 * Makefile.in: Use autoconf substitution to install common
808 * Makefile.in: Delete stuff moved to ../common/Make-common.in.
809 (SIM_OBJS,SIM_EXTRA_LIBS): Define.
810 * configure.in: Simplify using macros in ../common/aclocal.m4.
811 Call AC_CHECK_HEADERS(unistd.h).
812 * configure: Regenerated.
813 * config.in: New file.
814 * interp.c: #include "config.h". #include <unistd.h> if present.
815 (trap): Fetch errno value with callback->get_errno.
819 * interp.c: Don't include windows polling code if inside simluator.
823 * interp.c: Minor formatting improvements.
824 (saved_state_type): Add bank registers.
825 (bp_holder): New function, use to break on when debugging BUSERROR.
826 (BUSERROR): Call it if bus error occurs.
830 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
831 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
833 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
834 (AC_PROG_INSTALL): Added.
835 * configure: Rebuilt.
839 * interp.c (saved_state_type): Add memstalls field.
841 (sim_resume): New local variable memstalls. Add it back in to
842 saved_state at the end of the function.
843 (sim_info): Report memstalls.
844 * gencode.c (tab): Add MA() to the execution string of all
845 instructions which access memory.
849 * configure: Regenerate with autoconf 2.7.
853 * gencode.c (mac.l): Don't abort GDB if executing mac.l
854 instruction (which is unimplemented). Generate a SIGTRAP (in the
855 simulated target) instead.
859 * gencode.c (tab): Added several sh3 opcodes.
860 (think): Added printonmatch for A_SSR and A_SPC.
861 * interp.c (SSR, SPC): Added definitions.
862 (saved_state_type): Added ssr and spc registers.
866 * gencode.c (tab): In shad/shld definitions, negate R[m] before
867 the and operation instead of after. For shad delete cast. For shld
868 use UR instead of R and delete cast.
872 * gencode.c (tab): Add explicit NaN support for ftrc instruction.
876 * interp.c: Make target_byte_order be extern to prevent SGI cc from
877 issuing warnings about the use of common symbols.
881 * gencode.c: jsr, bsr and bsrf actually save pc+4 in pr, and rts
886 * sh/interp.c (sim_stop_reason): Catch SIGQUIT and indicate
888 (sim_get_quit_code): Delete.
890 * gencode.c (gensim): Indicate SIGILL instead of calling abort for
895 * interp.c (saved_state_type): Move FP registers to immediately
900 * Makefile.in (BISON): Remove macro.
904 * interp.c (trap, case SYS_utime): Cast second arg of utime to
905 void * to avoid compiler error.
907 * interp.c (callback): Remove last change. It is initialized by
908 a sim_set_callbacks call.
912 * interp.c (callback): Initialize to default callback.
916 * run.c: Moved to ../common.
917 * interp.c (trap): Use gdb's callback interface.
918 * Makefile.in: Updated.
922 * Makefile.in (maintainer-clean): New synonym for realclean.
926 * run.c (sim_callback_write_stdout): New.
927 * interp.c (trap): Call sim_callback_write_stdout when needed.
931 * interp.c (trap): Remove useless code.
935 * syscall.h: Copy from newlib.
939 * gencode.c: Back up PC by 2 for breakpoints.
940 * interp.c: Move fp regs beyond pc/pr/etc to avoid confusing GDB,
941 which expect pc to immediatly follow regs[].
945 * configure.in: Define CC_FOR_BUILD. Don't call AC_PROG_INSTALL.
946 * configure: Rebuild.
947 * Makefile.in (INSTALL): Revert to using install.sh.
948 (INSTALL_PROGRAM, INSTALL_DATA): Set to $(INSTALL).
949 (INSTALL_XFORM, INSTALL_XFORM1): Restore.
950 (CC_FOR_BUILD): Restore.
951 (gencode): Build using $(CC_FOR_BUILD).
952 (install): Don't install in $(tooldir).
956 (Try to) Update to new bfd autoconf scheme.
957 * run.c: Don't include sysdep.h.
958 * Makefile.in (INSTALL{,_PROGRAM,_DATA}): Use autoconf computed value.
959 (CC, CFLAGS, AR, RANLIB): Likewise.
960 (HDEFINES, TDEFINES): Define.
961 (CC_FOR_BUILD): Delete.
962 (host_makefile_frag): Delete.
963 (Makefile): Don't depend on frags.
964 * configure.in (sysdep.h): Don't create symlink.
965 (host_makefile_frag, frags): Deleted.
966 (CC, CFLAGS, AR, RANLIB, INSTALL): Compute values.
967 * configure: Regenerated.
971 * interp.c: Include <math.h>.
975 * Makefile.in (run): Link in math library too.
976 * gencode.c (gensim): abort if an unknown opcode is encountered.
977 * interp.c (FPSCR, FPUL): Define.
978 (struct save_state): Add fields for floating point registers,
980 (sim_resume): Add 'F' for accessing floating point registers
981 in the save state structure.
982 * gencode.c: Add sh3e opcodes.
983 (gensym): Define a buffer for int<->fp conversions.
987 * interp.c (trap): Use trap vector 34 for host system interface.
988 * gencode.c: Add 34 to conditional which determines which traps
989 will be handled by simulator.
993 * run.c: Include <signal.h>. Define SIGQUIT if not defined.
994 (main): New variables reason and sigrc. After simulator exits,
995 check to see if it exited because of a signal, and if so, then
996 use the signal number as the return value.
1000 * Update all FSF addresses except those in COPYING* files.
1002 Tue Jul 18 23:33:10 1995 Fred Fish <fnf@fishbowl>
1004 * interp.c (trap): Only use SYS_execv if defined. Might be
1005 implemented as execve(arg1,arg2,0), as with Unixware 2.0.
1006 (sim_resume): In sbit initializer, cast shifted arg to unsigned
1007 to avoid signed integer overflow.
1011 * Makefile.in (clean): Remove run, libsim.a.
1012 (distclean, mostlyclean, realclean): Remove Makefile and
1017 * Makefile.in, configure.in: converted to autoconf.
1018 * configure: New file, generated with autconf 2.4.
1022 * interp.c (sim_open): If argument supplied, interpret as
1023 desired memory size.
1024 (parse_and_set_memory_size): New function.
1025 (sim_do_command): New function.
1029 * interp.c (SYS_wait): Define as SYS_wait4 if available and
1030 SYS_wait is not already defined (SunOS 4.1.3 for example).
1031 (SYS_utime): Define as SYS_utimes if available and
1032 SYS_utime is not already defined.
1036 * interp.c: Don't include sys/times.h or sys/param.h
1040 * interp.c (SIGBUS, SIGTERM): Define if not.
1041 (sim_memory_size): default to 2^19 on PCs.
1042 (sim_resume): Poll for quits on win32.
1046 * gencode.c (op_tab): Add SH3 support.
1050 * gencode.c (tab): Add bsrf and braf.
1054 * configure.in: use ../../bfd/hosts/std-host.h, not
1055 ../bfd/hosts/std-host.h (which doesn't exist).
1059 * run.c: parse arguments with getopt().
1063 * configure.in: Use ../../bfd/hosts/std-host.h if specific
1068 * interp.c (macw): Sign extend MACH at bit 10 for non-saturating case.
1072 * gencode.c (op_tab): Make MAC.W call macw, not abort.
1073 * interp.c (macw): New function.
1078 * gencode.c (op_tab): New code for ADDV and SUBV.
1079 Make MAC.L abort sicne it is not implemented.
1081 * interp.c (dmul): Handle the signed case by adjusting after unsigned multiply.
1082 Get rid of __GNUC__ conditional.
1086 * gencode.c (op_tab): Also replace NEGC, and try again with SUBC.
1087 Change ADDC for symmetry.
1089 * gencode.c (op_tab): Replace code for ADDC and SUBC.
1093 * interp.c: Remove def of INLINE. This comes from bfd.h. Also,
1094 declare IOMEM before using it.
1098 * interp.c (BUSERROR): New macro.
1099 ([r|w][bwl]at[little|big]) New functions.
1100 (sim_resume): If GO32 check for interrupt every now
1101 and again. Decrement PC if SIGBUS seen.
1102 * run.c (main): Return result of simulated _exit.
1106 * Makefile.in (gencode): Allow build in different directory.
1110 * Makefile.in (gencode): Change $< to gencode.c for portability.
1114 * interp.c ([wr][bwl]at): New functions.
1115 (trap): Cope with both byte modes.
1119 * gencode.c (tab): Simulate T bit after a negc insn right.
1120 * interp.c (RSBAT): Sign extend the arg.
1121 (ACE_FAST): New macro.
1122 (sim_resume): Remove obsolete test of sim_timeout.
1126 * interp.c (IOMEM): New function, simulates very basic I/O area of
1128 (WBAT, RBAT) : Call I/O functions.
1129 * gencode.c (tab): Special case trapa #3.
1133 * run.c (main): Specify the file type again.
1137 * interp.c (trap): Fix irix incompatibility.
1138 * run.c (main): open without specifying file type.
1142 * interp.c (sim_*): Make result void where there isn't one.
1143 (sim_set_pc): Delete.
1144 (sim_info): Delete printf_fn arg, all callers changed.
1145 Call printf_filtered instead.
1146 (sim_close): New function.
1147 (sim_load): New function.
1148 (sim_create_inferior): Renamed from sim_set_args, all callers changed.
1149 * run.c: #include <varargs.h>, "remote-sim.h".
1150 (printf_filtered): New function.
1154 * gencode.c (table): Get direction of some opcodes right.
1155 (trapa, rte): Implement fully.
1156 * interp.c (trap): Make stat call more portable.
1160 * gencode.c (main, gendefines): New -d option prints table of defines.
1161 * interp.c (trap): Add a load of system calls.
1162 (sim_memory_size): Now default to 8Mbyte.
1163 (PARANOID): Keep vector of registers with undefined contents.
1167 * gencode.c: mova uses aligned addresses
1168 * interp.c (trap): Return results in r0.
1172 * Makefile.in (CSEARCH): Add -I$(srcdir)/../../gdb
1173 * interp.c: #include "remote-sim.h".
1174 (sim_resume): int result, new arg `siggnal'.
1175 (sim_write): Use SIM_ADDR for type of arg `addr'.
1176 (sim_read): Use SIM_ADDR for type of arg `addr'.
1177 Use unsigned char * for `buffer'.
1178 (sim_store_register): int result.
1179 (sim_fetch_register): Ditto.
1180 (sim_stop_reason): Renamed from sim_stop_signal. New arg `reason'.
1181 (sim_set_pc): int result, use SIM_ADDR for type of arg `x'.
1182 (sim_info): int result, new args `verbose', `printf_fn'.
1183 (sim_kill): int result.
1184 (sim_open): int result, new arg `name'.
1185 * run.c: #include <stdio.h>
1186 (main): Update call to sim_info.
1190 * interp.c (sim_stop_signal): Result is now enum sim_stop.
1194 * gencode.c (table): Becomes unsigned.
1195 * interp.c (trap): Get right breakpoint SIGnum. (sim_write,
1196 sim_read): Return number of bytes copied. (sim_store_register):
1197 Value passed by reference. (sim_kill, sim_open, sim_set_args): New functions.
1201 * interp.c (sim_info): Fix small typo in printf string.
1205 * interp.c (sim_resume): Set memory after pointers inited.
1209 * interp.c (get_now): Use time system call.
1210 * Makefile.in: install correctly.
1214 * run.c (main), interp.c (sim_set_timeout): Remove timeout
1217 Thu Jun 24 13:29:57 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
1219 * Makefile.in: don't run indent everytime; also add a space in the
1224 * gencode.c: Fix some opcodes.
1225 * interp.c: Support for profiling and portability fixes.
1226 * run.c (main): Get profiling args.
1230 * gencode.c (tab): Lint for sgi compiler
1231 * interp.c: Lint for sgi compiler.
1235 * run.c (main): Support for resizing simulated RAM.
1236 * Makefile.in: Support for broken makes.
1237 * interp.c, gencode.c: Lint.