3 * compile.c (OBITOP): Bit address mask low three bit.
4 * compile.c (decode): Fix warning.
8 * configure: Regenerated.
12 * configure: Regenerated.
16 * configure: Regenerated.
20 * configure: Regenerate.
24 * configure.ac: Sinclude aclocal.m4 before common.m4. Add
25 explicit call to AC_CONFIG_HEADER.
26 * configure: Regenerate.
30 * configure.ac: Update to use ../common/common.m4.
31 * configure: Re-generate.
35 * configure: Regenerated to track ../common/aclocal.m4 changes.
39 * configure.ac: Rename configure.in, require autoconf 2.59.
40 * configure: Re-generate.
44 * configure: Regenerate for ../common/aclocal.m4 update.
49 * compile.c (sim_resume): Make sure that dst.reg refers to the
50 right register byte in mova/sz.l @(dd,RnL),ERn.
52 * compile.c (sim_resume): Zero-extend immediate to muls, mulsu,
53 mulxs, divs and divxs.
55 * compile.c (sim_load): Update sd->memory_size.
60 * compile.c (sim_resume): Corrected ANDC operation on EXR for H8S.
64 * compile.c (sim_load): Don't pass a type to bfd_openr.
69 * sim-main.h (H8300H_MSIZE): Increase from 18 bits to 24 bits.
73 * compile.c (set_h8300h): Initialize globals to zero.
77 * compile.c (h8300_normal_mode): New.
78 (SP): Handle normal mode.
79 (bitfrom): Use normal mode flag to return suitable value.
80 (lvalue): Use normal mode flag to return command line location.
81 (decode): Decode instruction correctly for normal mode.
82 (init_pointers): Initialise memory correctly for normal mode.
83 (sim_resume): Handle cases for normal mode using h8300_normal_mode
85 (sim_store_register): Handle 2 byte PC for normal mode.
86 (sim_fetch_register): Handle 2 byte PC for normal mode.
87 (set_h8300h): Set normal mode flag as per architechture.
88 (sim_load): Allocate 64K for normal mode instead of bigger memory.
92 * compile.c (decode): Enhancements for mova.
93 Initialize cst, reg, and rdisp inside the loop, for each
94 new instruction. Defer correction of the disp2 values until
95 later, and then adjust them by the size of the first operand,
96 rather than the size of the instruction.
97 (sim_resume): For mova, adjust the size of the second operand
98 according to the type of the first operand (INDEXB vs. INDEXW).
99 In cases where there is only one operand, the other two must
100 both be composed on the fly.
104 * compile.c (sim_resume): Revert 6-24 change, it does not
105 work with gdb breakpoints.
109 * compile.c (sim_resume): Handle shll reg, reg and shlr reg, reg.
110 (decode): IMM16 is always zero-extended.
114 * sim-main.h (SIM_WIFSTOPPED, SIM_WSTOPSIG): Define.
115 * compile.c (sim_resume): Use the above to return stop signal.
119 * compile.c: Replace "Hitachi" with "Renesas".
120 (decode): Distinguish AV_H8S from AV_H8H.
121 (sim_resume): H8SX can use any register for TAS.
122 (decode): Add support for VECIND.
123 (sim_resume): Implement rte/l and rts/l.
124 (GETSR): New macro (actually old macro reincarnated).
125 (decode): Add handling for IMM2.
126 (sim_resume): Drop extra block around jmp, jsr, rts.
127 Add handling for trapa and rte.
128 For divxu.b, change 0xffff mask to 0xff.
129 (set_h8300h): Add bfd_mach_h8300sxn machine.
133 * sim-main.h (enum h8_regnum): Turn around order of MACH, MACL
138 * compile.c (sim_fetch_register): Handle SBR, VBR, MACH, MACL.
139 (sim_store_register): Ditto.
143 * compile.c (sim_info): Fix typo in output.
145 * compile.c (set_h8300h): Replace 'flag' arguments
146 with a bfd_machine argument, and decode it inline.
147 Check for bfd_mach_h8300hn and bfd_mach_h8300sn.
151 * compile.c: Add h8300sx insns and addressing modes.
152 * sim-main.h: Replaces h8300/inst.h.
153 * Makefile.in: Tweak to bring in some sim/common stuff.
157 * compile.c (sim_resume): Implement 'daa' and 'das' instructions.
161 * compile.c (cmdline_location): Added function to
162 return the location of 8-bit (256 locations) where the
163 Command Line arguments would be stored.
164 (decode): Added a TRAP to 0xcc for Commandline
165 processing using pseudo opcode O_SYS_CMDLINE.
166 (sim_resume): Added handling of O_SYS_CMDLINE Trap.
167 (sim_create_inferior): Setting a pointer to
168 Commandline Args array.
169 * inst.h: Added a new variable ptr_command_line for
170 storing pointer to Commandline array.
174 * compile.c (decode): Added code for some more magic traps.
175 * compile.c (sim_resume): Added support for File I/O system
176 calls through callback to host_system.
177 System calls provided support for :
178 open, read, write, lseek, close, stat, fstat
179 Only basic support for stat and fstat.
183 * compile.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
187 * compile.c (init_pointers): Abort if wreg never gets initialized.
188 (sim_resume): Fix the handling of exts.w and extu.w.
192 * compile.c (sim_resume): Fix the handling of bxor.
196 * compile.c: Change K&R function definitions to ISO.
197 (fetch): Make static, and eliminate unused parameter 'n'.
201 * compile.c: Fix formatting.
206 * compile.c: Include "gdb/sim-h8300.h"
207 * Makefile.in: Add dependences on "inst.h",
208 "gdb/callback.h", "gdb/remote-sim.h" and "gdb/sim-h8300.h".
212 * configure: Regenerated to track ../common/aclocal.m4 changes.
216 * compile.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
220 * compile.c: Fix formatting.
224 * compile.c: Fix formatting.
228 * compile.c: Add absented opcodes: LDC, STC, EEPMOV, TAS.
232 * compile.c: Add support of EXR register
237 * compile.c: Made h8300s as new target, not h8300h alias.
242 * compile.c: Add additional CCR flags (I,UI,H,U)
246 * compile.c: Change literal regnumbers to REGNUMS.
247 Fix instruction and cycles counting
251 * compile.c: Fix formatting.
255 * compile.c: Fix comment typos.
259 * compile.c (decode): Clean up the code.
263 * compile.c (decode): Distinguish inc/dec.[wl] and adds/subs
268 * compile.c: Don't include "wait.h".
269 (sim_resume): Use local SIM_WIFEXITED and SIM_WIFSIGNALED macros
270 instead of WIF* from host.
274 * compile.c, writecode.c: Correct typo.
278 * compile.c: Fix formatting.
282 * configure: Regenerated to track ../common/aclocal.m4 changes.
286 * configure: Regenerated to track ../common/aclocal.m4 changes.
290 * configure: Regenerated to track ../common/aclocal.m4 changes.
294 * compile.c (POLL_QUIT_INTERVAL): Define. Used to tweak the
295 frequency at which the poll_quit callback is used.
296 (sim_resume): Use POLL_QUIT_INTERVAL instead of hard-coded value.
300 * configure: Regenerated to track ../common/aclocal.m4 changes.
302 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
304 * configure: Regenerated to track ../common/aclocal.m4 changes.
309 * acconfig.h: New file.
310 * configure.in: Reverted change of Apr 24; use sinclude again.
312 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
314 * configure: Regenerated to track ../common/aclocal.m4 changes.
319 * configure.in: Don't call sinclude.
323 * configure: Regenerated to track ../common/aclocal.m4 changes.
327 * configure: Regenerated to track ../common/aclocal.m4 changes.
331 * configure: Regenerated to track ../common/aclocal.m4 changes.
335 * configure: Regenerated to track ../common/aclocal.m4 changes.
339 * compile.c (sim_store_register, sim_fetch_register): Pass in
340 length parameter. Return -1.
344 * configure: Regenerated to track ../common/aclocal.m4 changes.
348 * configure: Regenerated to track ../common/aclocal.m4 changes.
350 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
352 * configure: Regenerated to track ../common/aclocal.m4 changes.
356 * configure: Regenerated to track ../common/aclocal.m4 changes.
361 * configure: Regenerated to track ../common/aclocal.m4 changes.
365 * compile.c: #include stdio.h for definition of NULL on
370 * compile.c (sim_load): Pass lma_p and sim_write args to
375 * configure: Regenerated to track ../common/aclocal.m4 changes.
379 * configure: Regenerated to track ../common/aclocal.m4 changes.
383 * configure: Regenerated to track ../common/aclocal.m4 changes.
387 * configure: Regenerated to track ../common/aclocal.m4 changes.
391 * configure: Regenerated to track ../common/aclocal.m4 changes.
395 * Makefile.in (compile.o): Depend on config.h in local directory.
399 * configure: Regenerated to track ../common/aclocal.m4 changes.
403 * inst.h (sim_state): rename to h8300_sim_state, to avoid conflict
405 * configure.in: check for sys/param.h
406 * compile.c: #ifdef HAVE_SYS_PARAM_H.
407 #define SIGTRAP for wingdb.
408 (sim_resume): poll keyboard at least once per call.
409 (sim_resume): use host_callback instead of printf for syscall
412 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
414 * configure: Regenerated to track ../common/aclocal.m4 changes.
418 * configure: Regenerated to track ../common/aclocal.m4 changes.
423 * compile.c (sim_kill): Delete.
424 (sim_create_inferior): Add ABFD argument.
425 (sim_load): Move setting of PC from here.
426 (sim_create_inferior): To here.
427 (sim_open, sim_load, set_h8300h): Add fixme explaining why much of
428 the sim_load code should be moved to sim_open.
432 * configure: Regenerated to track ../common/aclocal.m4 changes.
437 * compile.c (sim_open): Add ABFD argument.
441 * compile.c (sim_open): Add callback argument.
442 (sim_set_callbacks): Delete SIM_DESC argument.
446 * compile.c (sim_load): Call bfd_get_mach instead of examining
448 * tconfig.in (SIM_PRE_LOAD): Delete, no longer used.
452 * configure: Regenerated to track ../common/aclocal.m4 changes.
456 * compile.c (sim_resume): Use poll_quit callback.
457 (sim_stop): New function.
461 * Makefile.in (SIM_OBJS): Add sim-load.o.
462 * compile.c (sim_kind, myname): New static locals.
463 (sim_open): Set sim_kind, myname.
464 (sim_load): Return SIM_RC. New arg abfd. Update test for h8300h.
465 Call sim_load_file to load file into simulator. Set start address
467 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
471 * configure: Regenerated to track ../common/aclocal.m4 changes.
476 * compile.c (sim_open): New arg `kind'.
478 * configure: Regenerated to track ../common/aclocal.m4 changes.
482 * configure: Regenerated to track ../common/aclocal.m4 changes.
486 * configure: Regenerated to track ../common/aclocal.m4 changes.
490 * configure: Re-generate.
494 * configure: Regenerate to track ../common/aclocal.m4 changes.
498 * compile.c (sim_open): New SIM_DESC result. Argument is now in
500 (other sim_*): New SIM_DESC argument.
504 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
505 COMMON_{PRE,POST}_CONFIG_FRAG instead.
506 * configure.in: sinclude ../common/aclocal.m4.
507 * configure: Regenerated.
511 * configure configure.in Makefile.in: Update to new configure
512 scheme which is more compatible with WinGDB builds.
513 * configure.in: Improve comment on how to run autoconf.
514 * configure: Re-run autoconf to get new ../common/aclocal.m4.
515 * Makefile.in: Use autoconf substitution to install common
520 * Makefile.in: Delete stuff moved to ../common/Make-common.in.
522 * configure.in: Simplify using macros in ../common/aclocal.m4.
523 * configure: Regenerated.
524 * inst.h (enum sim_state): Define.
525 (cpu_state_type): New member `state'. Set it whenever `exception'
527 * compile.c (sim_callback): New global.
528 (sim_set_simcache_size): Renamed from sim_csize.
529 (sim_resume, case O_SLEEP): Add right way to decode r0 but #if 0 out
530 'cus it can't work. Change main loop exit test to use cpu.state.
531 (sim_trace): New function.
532 (sim_stop_reason): Add right way to set results, but #if 0 out.
533 (sim_size): New function.
534 (sim_info): Redirect calls to printf_filtered through callback.
535 (sim_set_callbacks): Record callback.
536 * run.c: Deleted, using one in ../common now.
537 * tconfig.in: New file.
541 * Makefile.in (mostlyclean): Don't remove config.log here.
545 * compile.c (sim_resume): rts, sleep, bpt and nop have
546 no associated "size".
550 * compile.c (sim_resume): Fix all rotate-by-2-bits insns.
554 * run.c (main): Don't "load" sections which don't have
556 * compile.c (sim_resume, case "O_NOT"): Use ONOT instead
559 (sim_resume, shift/rotate cases): Add support for shift/rotate
561 (OSHIFTS): Corresponding changes.
565 * compile.c (sim_resume): Handle "ldm.l" and "stm.l".
569 * compile.c (h8300smode): Declare.
573 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
574 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
576 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
577 (AC_PROG_INSTALL): Added.
578 * configure: Rebuilt.
582 * compile.c (sim_load): Treat the H8/S like the H8/300H for now.
583 * run.c (main): Treat the H8/S like the H8/300H for now.
587 * compile.c (SEXTCHAR): Clear upper bits when sign
592 * compile.c (sim_resume): Correctly handle divu.
596 * compile.c (sim_resume): Never allow the PC to have an
601 * inst.h: Expand on comments regarding H8300H_MSIZE. Note
602 separate memory is allocate for the 8-bit area.
603 (struct cpu_state_type): Add new "eightbit' field.
604 * compile.c (GET_MEMORY_L): Handle access into the 8-bit
606 (GET_MEMORY_W, GET_MEMORY_B): Likewise.
607 (SET_MEMORY_L, SET_MEMORY_W, SET_MEMORY_B): Likewise.
608 (init_pointers): Initialize space for the 8-bit area.
609 (sim_write): Handle writing into the 8-bit area.
610 (sim_read): Handle reading from the 8-bit area.
611 (sim_load): Reallocate space for the 8-bit area.
613 * compile.c (sim_load): Re-allocate memory for the simulator
618 * compile.c (sim_resume): Fix and simplify overflow and carry
619 handling for 32bit ALU insns.
623 * compile.c (sim_resume): Fix overflow checks for ALU insns.
627 * compile.c (decode): Use "bit" to hold L_3 immediates instead
628 of holding them in "abs". Handle ABS8MEM memory references aka
629 8-bit area. Replace ABSMOV references with ABS8MEM.
633 * compile.c (fetch): Handle accesses to the exception/function
638 * compile.c: #include "wait.h".
639 (sim_resume, sleep insn): Check program exit status in r0.
640 (sim_resume, shift insns): Fix setting of overflow flag for shal.
641 * run.c: #include <signal.h>.
642 (main): Abort if program got SIGILL.
643 Print error message if argument is invalid.
644 (usage): Improve text.
648 * configure: Regenerate with autoconf 2.7.
652 * inst.h (MPOWER,MSIZE): Deleted.
653 (H8300{,H}_MSIZE): Define.
654 * compile.c (memory_size): New static global.
655 (init_pointers): Set memory size from one of H8300{,H}_MSIZE.
656 (sim_write,sim_read): Use memory_size.
660 * compile.c (sim_set_callbacks): New.
664 * Makefile.in (BISON): Remove macro.
668 * Makefile.in (maintainer-clean): New synonym for realclean.
672 * Makefile.in (install): Don't install in $(tooldir).
674 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
675 bfd/hosts/*.h file or bfd/config/*.mh file. Call AC_PROG_CC and
676 AC_PROG_RANLIB. Substitute in values for CFLAGS, HDEFINES and AR.
677 Call AC_CHECK_HEADERS for stdlib.h and time.h. Touch stamp.h if
679 * configure: Rebuild.
680 * config.in: New file, created by autoheader.
681 * Makefile.in (AR): Define as @AR@.
682 (CC): New variable, defined as @CC@.
683 (CFLAGS): Define as @CFLAGS@.
684 (RANLIB): Define as @RANLIB@.
685 (HDEFINES, TDEFINES): New variables.
686 (@host_makefile_frag@): Remove.
687 (compile.o, run.o): Depend upon config.h.
688 (mostlyclean): Make the same as clean, not distclean.
689 (clean): Remove config.log.
690 (distclean): Remove config.h and stamp-h.
691 (Makefile): Don't depend upon @frags@. Just rebuild Makefile when
692 invoking config.status.
693 (config.h, stamp-h): New targets.
694 * compile.c: Include "config.h". Don't include <sys/times.h>.
695 Include <time.h> and <stdlib.h> if they exist. Don't include
697 (get_now): Remove unused local b.
698 * run.c: Include "config.h". Include <stdlib.h> if it exists.
699 Don't include "sysdep.h".
700 * writecode.c: Don't include "bfd.h" or "sysdep.h". Include
705 * Update all FSF addresses except those in COPYING* files.
709 * Makefile.in (clean): Remove run.
710 (distclean): Remove Makefile.
714 * Makefile.in, configure.in: converted to autoconf.
715 * configure: New file, generated with autconf 2.4.
719 * compile.c (sim_do_command): New function.
723 * compile.c (get_now): Don't do if win32.
724 (sim_resume): Poll in win32 too.
728 * configure.in: Fix typo in last change.
732 * run.c: parse arguments with getopt().
736 * configure.in: Use ../../bfd/hosts/std-host.h if specific
739 Sun Jan 22 12:35:43 1995 Steve Chamberlain <sac@splat>
741 * compile.c (sim_resume): Initialize cpu.mask.
745 * inst.h (MPOWER): Bump simulated memory size to 2^18 bytes.
749 * compile.c: #include "bfd.h".
750 (sim_*): Set result type to void where there isn't one.
751 (sim_resume, default case): Set cpu.exception to SIGILL.
753 (sim_set_pc): Delete.
754 (sim_info): Delete printf_fn arg, all callers changed.
755 Call printf_filtered.
756 (set_h8300h): New arg `flag', all callers changed.
757 (sim_close): New function.
758 (sim_load): New function.
759 (sim_create_inferior): Renamed from sim_set_args, all callers changed.
760 * run.c: #include <varargs.h>, "remote-sim.h".
761 (printf_filtered): New function.
765 * compile.c (decode): Fix typo (16 bit branches).
766 (*): Some white space clean up.
770 * compile.c (decode): Compile 16bit branches properly.
774 * compile.c: Tidy up formatting. (sim_resume): Add orc, xorc,
775 andc. Poll for interrupts.
779 * compile.c: #include "ansidecl.h" for remote-sim.h.
783 * Makefile.in (CSEARCH): Add -I$(srcdir)/../../gdb
784 * compile.c: #include "remote-sim.h".
785 (sim_resume): New arg siggnal.
786 (sim_write): Use SIM_ADDR for type of arg addr.
787 Always return a value.
789 (sim_store_register): Result is type int.
790 (sim_fetch_register): Ditto.
791 (sim_stop_reason): Renamed from sim_stop_signal.
792 (sim_set_pc): Use SIM_ADDR for type of arg pc.
793 (sim_info): int result, new arg printf_fn.
794 (sim_kill): int result.
795 (sim_open): int result, new arg name.
796 * run.c (main): Use sim_set_pc to set pc.
797 Update call to sim_info.
801 * compile.c (sim_stop_signal): Result is now enum sim_stop.
805 * compile.c (sim_kill, sim_open, sim_set_args): New functions.
809 * compile.c (sim_set_pc): Write to the pc direcly.
810 (sim_store_register): Now value is passed by reference. (sim_read,
811 sim_write): Return number of bytes copied.
815 * compile.c (mop): New function to do multiplies.
819 * compile.c (sim_resume): Add support for nop insn.
823 * compile.c: Reset HMODE back to zero (accidently set it to 1).
825 * run.c (main): If h8/300h binary detected, call set_h8300h.
826 * compile.c (sim_resume): Fix O_NEG insn.
830 * run.c (main): Add -h flag to enable h8/300h emulation.
831 * compile.c: Rename Hmode to HMODE (consistency with gdb).
832 (set_h8300h): New function.
833 (sim_resume): Add support for extu,exts insns.
834 (sim_resume): Fix logical right shifting.
835 (sim_resume, label alu32): Fix setting of carry flag.
839 * compile.c (sim_csize): Initialize cpu.cache.
843 * Makefile.in: Add -I../../bfd to pick up bfd.h.
847 * run.c (main): Fix parsing of args.
849 * compile.c (sim_resume): Fix shll insn.
853 * compile.c: New file, supports H8/300H.
854 * p1,p3, gencode.c, state.h, writecode.c All dead and obsolete.
858 * run.c (main): Add -v to print info.
859 * p3.c (sim_info): New function.
863 * h8300.mt (DO_INSTALL): Renamed from INSTALL.
867 * Makefile.in: Don't use cb or indent
868 * p1.c, state.h, writecode.c: lint
872 * Makefile.in: Make SunOS halfdone VPATH work.
873 * p1.c: Lint picked up by HP native compiler.
877 * p1.c (sim_resume): when running on dos, any character typed to
878 the keyboard will cause a simulated exception.
882 * p1.c, p3.c, run.c, writecode.c: all used h8/300 opcodes in and