3 * config.in, configure: Regenerate.
7 * aclocal.m4, config.in, configure: Regenerate.
11 * interp.c (sim_fetch_register): Return length, not -1.
15 * sim-main.h: Reformat copyright header.
19 * aclocal.m4: New file.
20 * configure: Regenerate.
25 * dv-mn103iop.c (write_dedicated_control_reg): Convert && to &.
29 * configure: Regenerate after common/acinclude.m4 update.
33 * configure.ac: Change include to common/acinclude.m4.
37 * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER
38 call. Replace common.m4 include with SIM_AC_COMMON.
39 * configure: Regenerate.
43 * interp.c (sim_do_command): Delete.
47 * am33.igen (sub Rm,Rn,Rd): Fix computation of carry flag.
51 * interp.c (sim_store_register): Update return value to
56 * dv-mn103ser.c (sockser_addr, USE_SOCKSER_P): Delete
57 (do_polling_event): Change USE_SOCKSER_P to dv_sockser_status.
58 (read_status_reg): Likewise.
59 (write_txb): Likewise.
63 * configure: Regenerate.
67 * config.in: Regenerate.
68 * configure: Likewise.
70 * configure: Regenerate.
74 * configure: Regenerate to track ../common/common.m4 changes.
81 * configure: Regenerate.
86 * config.in: Regenerate.
90 * configure: Regenerated.
94 * configure: Regenerated.
98 * configure: Regenerated.
102 * configure: Regenerate.
106 * configure: Regenerate.
110 * configure.ac: Sinclude aclocal.m4 before common.m4. Add
111 explicit call to AC_CONFIG_HEADER.
112 * configure: Regenerate.
116 * configure.ac: Update to use ../common/common.m4.
117 * configure: Re-generate.
121 * configure: Regenerated to track ../common/aclocal.m4 changes.
125 * configure.ac: Rename configure.in, require autoconf 2.59.
126 * configure: Re-generate.
130 * configure: Regenerate for ../common/aclocal.m4 update.
135 * am33-2.igen (fmadd, fmsub, fmnadd, fmnsub): Correct typo.
137 * interp.c (fpu_disabled_exception, fpu_unimp_exception,
138 fpu_check_signal_exception): Take additional state arguments.
139 Print exception type and call program_interrupt. Adjust callers.
140 (fpu_rsqrt, fpu_cmp, fpu_add, fpu_sub, fpu_mul, fpu_div,
141 fpu_fmadd, fpu_fmsub, fpu_fnmadd, fpu_fnmsub): Take additional
143 * mn10300_sim.h (fpu_disabled_exception, fpu_unimp_exception,
144 fpu_check_signal_exception): Adjust prototypes.
145 (fpu_rsqrt, fpu_cmp, fpu_add, fpu_sub, fpu_mul, fpu_div,
146 fpu_fmadd, fpu_fmsub, fpu_fnmadd, fpu_fnmsub): Likewise.
147 * am33-2.igen: Adjust calls.
149 * op_utils.c (cmp2fcc): Moved...
150 * interp.c: ... here.
152 * am33-2.igen: Use `unsigned32', `signed32', `unsigned64' or
153 `signed64' where type width is relevant.
155 * mn10300_sim.h: Include sim-fpu.h.
156 (FD2FPU, FPU2FD): Enclose the FD argument in parentheses.
157 (fpu_check_signal_exception): Declare.
158 (struct fp_prec_t, fp_single_prec, fp_double_prec): Likewise.
159 (FP_SINGLE, FP_DOUBLE): Shorthands for fp_*_prec.
160 (fpu_rsqrt, fpu_cmp, fpu_add, fpu_sub, fpu_mul, fpu_div,
161 fpu_fmadd, fpu_fmsub, fpu_fnmadd, fpu_fnmsub): Declare.
162 * interp.c (fpu_disabled_exception): Document.
163 (fpu_unimp_exception): Likewise.
164 (fpu_check_signal_exception): Define.
165 (reg2val_32, round_32, val2reg_32, fp_single_prec): Likewise.
166 (reg2val_64, round_64, val2reg_64, fp_double_prec): Likewise.
167 (REG2VAL, ROUND, VAL2REG): Define shorthands.
168 (fpu_status_ok): Define.
169 (fpu_rsqrt, fpu_cmp, fpu_add, fpu_sub, fpu_mul, fpu_div,
170 fpu_fmadd, fpu_fmsub, fpu_fnmadd, fpu_fnmsub): Define.
171 * am33-2.igen (frsqrt, fcmp, fadd, fsub, fmul, fdiv,
172 fmadd, fmsub, fnmadd, fnmsub): Use new functions.
174 * interp.c (sim_create_inferior): Set PSW bit to enable FP insns
175 if architecture is AM33/2.0.
176 * am33.igen: Include am33-2.igen.
178 * mn10300.igen (movm, call, ret, retf): Check for am33_2 too.
179 * am33.igen (movm): Likewise.
181 * am33.igen: Added `*am33_2' to some instructions that were
184 * am33-2.igen: New file. All insns implemented, but FP flags are
185 only set for fcmp, exceptional conditions are not handled yet.
186 * Makefile.in (IGEN_INSN): Added am33-2.igen.
187 (tmp-igen): Added -M am33_2.
188 * mn10300.igen, am33.igen: Added `*am33_2' to all insns.
189 * gencode.c: Support FMT_D3.
190 * mn10300_sim.h (dword): New type.
191 (struct _state): Added fpregs.
192 (REG_FPCR, FPCR): New define. All assorted bitmaps.
193 (XS2FS, AS2FS, Xf2FD): New macros.
194 (FS2FPU, FD2FPU, FPU2FS, FPU2FD): Likewise.
195 (load_dword, store_dword): New functions or macros.
196 (u642dw, dw2u64): New functions.
197 (fpu_disabled_exception, fpu_unimp_exception): Declared.
198 * interp.c (fpu_disabled_exception): Defined; no actual
200 (fpu_unimp_exception): Likewise.
201 * op_utils.c (cmp2fcc): New function.
203 * interp.c, mn10300_sim.h, op_utils.c: Convert function prototypes
204 and definitions to ISO C.
206 * gencode.c, simops.c: Delete.
207 * Makefile.in: Remove non-COMMON dependencies and commands.
209 * configure.in: Use common simulator always. Don't subst sim_gen
211 * configure: Rebuilt.
212 * Makefile.in (WITHOUT_COMMON_OBJS, WITHOUT_COMMON_INTERP_DEP,
213 WITHOUT_COMMON_RUN_OBJS): Remove.
214 (WITH_COMMON_OBJS): Rename to MN10300_OBJS.
215 (WITH_COMMON_INTERP_DEP): Rename to MN10300_INTERP_DEP.
216 (WITH_COMMON_RUN_OBJS): Rename to SIM_RUN_OBJS.
217 (SIM_EXTRA_CFLAGS): Don't use @sim_gen@.
218 * interp.c: Remove non-common bits.
219 * mn10300_sim.h: Likewise.
223 * dv-mn103ser.c (do_polling_event): Change type of "serial_reg" to
225 (read_status_reg): Cast "serial_reg" to "long".
226 * dv-mn103tim.c (do_counter_event): Change type of "timer_nr" to
228 (do_counter6_event, write_mode_reg, write_tm6md): Ditto.
232 * interp.c (sim_open, sim_create_inferior, sim_open)
233 (sim_create_inferior): Rename _bfd to bfd.
237 * am33.igen: Call sim_engine_abort instead of abort.
241 * dv-mn103tim.c (read_special_timer6_reg): Add break after
242 empty default: label.
243 (write_special_timer6_reg): Ditto.
248 * sim-main.h: Only include "idecode.h" once.
249 * Makefile.in (SIM_EXTRA_DEPS): Define.
253 * configure: Regenerated to track ../common/aclocal.m4 changes.
257 * Makefile.in (INCLUDE): Update path to callback.h.
258 * mn10300_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
263 * mn10300.igen: Doc fixes.
267 * Makefile.in (idecode.o, op_utils.o, semantics.o, simops.o):
268 Depend on targ-vals.h.
272 * Makefile.in (simops.o): Add simops.h to dependency list.
276 * am33.igen: Warning clean-up.
277 (movm): Initialize PC and mask.
278 (mov, movbu, movhu): Set srcreg2 from RI0.
279 (bsch): Initialize c.
280 (sat16_cmp): Actually do the comparison.
281 (mov_llt): Do not overwrite dstreg with uninitialized variable.
285 * configure: Regenerated to track ../common/aclocal.m4 changes.
289 * am33.igen: Fix leading comments of SP-relative offset insns that
290 referred to other registers. Make their offsets unsigned.
294 * mn10300_sim.h (genericAdd, genericSub, genericCmp, genericOr,
295 genericXor, genericBtst): Use `unsigned32'.
296 * op_utils.c: Likewise.
297 * mn10300.igen, am33.igen: Use `unsigned32', `signed32',
298 `unsigned64' or `signed64' where type width is relevant.
302 * am33.igen (inc4 Rn): Use genericAdd so as to modify flags.
306 * am33.igen: Make SP-relative offsets unsigned. Add `*am33' for
307 some instructions that were missing it.
311 * Makefile.in (IGEN_INSN): Added am33.igen.
315 * configure: Regenerated to track ../common/aclocal.m4 changes.
319 * interp.c: Clarify error message reporting an unknown board.
323 * configure: Regenerated to track ../common/aclocal.m4 changes.
327 * interp.c (program_interrupt): Detect undesired recursion using
328 static flag. Set NMIRC register's SYSEF flag during
329 --board=stdeval1 mode.
330 * dv-mn103-int.c (write_icr): Add backdoor address to allow CPU to
335 * Makefile.in (SIM_EXTRA_CFLAGS): Define a POLL_QUIT_INTERVAL
336 for use in the simulator so that the poll_quit callback is
337 not called too often.
341 * dv-mn103int.c (mn103int_ioctl): Return something.
342 * dv-mn103tim.c (write_tm6md): GCC suggested parentheses around &&
347 * mn10300.igen (retf): Fix return address computation and store
348 the new pc value into nia.
352 * Makefile.in (WITH_COMMON_OBJS): Build also dv-sockser.o.
353 * interp.c (sim_open): Add stub mn103002 cache control memory regions.
354 Set OPERATING_ENVIRONMENT on "stdeval1" board.
355 (mn10300_core_signal): New function to intercept memory errors.
356 (program_interrupt): New function to dispatch to exception vector
357 (mn10300_exception_*): New functions to snapshot pre/post exception
359 * sim-main.h (SIM_CORE_SIGNAL): Define hook - call mn10300_core_signal.
360 (SIM_ENGINE_HALT_HOOK): Do nothing.
361 (SIM_CPU_EXCEPTION*): Define hooks to call mn10300_cpu_exception*().
362 (_sim_cpu): Add exc_* fields to store register value snapshots.
363 * dv-mn103ser.c (*): Support dv-sockser backend for UART I/O.
364 Various endianness and warning fixes.
365 * mn10300.igen (illegal): Call program_interrupt on error.
366 (break): Call program_interrupt on breakpoint
370 * dv-mn103int.c (mn103int_ioctl): New function for NMI
371 generation. (mn103int_finish): Install it as ioctl handler.
372 * dv-mn103tim.c: Support timer 6 specially. Endianness fixes.
376 * am33.igen: Allow autoincrement stores using the same register
377 for source and destination operands.
381 * am33.igen: Reverse HI/LO outputs of 4 operand "mul" and "mulu".
385 * interp.c (sim_open): Check for invalid --board option, fix
386 indentation, allocate memory for mem control and DMA regs.
390 * mn10300.igen (div,divu): Fix divide instructions so divide by 0
391 behaves like the hardware.
395 * sim-main.h (SIM_HANDLES_LMA): Define SIM_HANDLES_LMA.
399 * am33.igen: Handle case where first DSP operation modifies a
400 register used in the second DSP operation correctly.
404 * am33.igen: Detect cases where two operands must not match for
405 DSP instructions too.
409 * am33.igen: Detect cases where two operands must not match in
410 non-DSP instructions.
414 * op_utils.c (do_syscall): Rewrite to use common/syscall.c.
415 (syscall_read_mem, syscall_write_mem): New functions for syscall
417 * mn10300_sim.h: Add prototypes for syscall_read_mem and
419 * mn10300.igen: Change C++ style comments to C style comments.
420 Check for divide by zero in div and divu ops.
424 * am33.igen (translate_xreg): New function. Use it as needed.
428 * am33.igen: Add some missing instructions.
430 * am33.igen: Autoincrement loads/store fixes.
434 * am33.igen: Add mov_lCC DSP instructions.
436 * am33.igen: Add most am33 DSP instructions.
440 * mn10300.igen: Fix Z bit for addc and subc instructions.
441 Minor fixes in multiply/divide patterns.
443 * am33.igen: Add missing mul[u] imm32,Rn. Fix condition code
444 handling for many instructions. Fix sign extension for some
447 * am33.igen: Fix Z bit for remaining addc/subc instructions.
448 Do not sign extend immediate for mov imm,XRn.
449 More random mul, mac & div fixes.
450 Remove some unused variables.
451 Sign extend 24bit displacement in memory addresses.
453 * am33.igen: Fix Z bit for addc Rm,Rn and subc Rm,Rn. Various
454 fixes to 2 register multiply, divide and mac instructions. Set
455 Z,N correctly for sat16. Sign extend 24 bit immediate for add,
456 and sub instructions.
458 * am33.igen: Add remaining non-DSP instructions.
462 * am33.igen (translate_rreg): New function. Use it as appropriate.
464 * am33.igen: More am33 instructions. Fix "div".
468 * mn10300.igen: Add am33 support.
470 * Makefile.in: Use multi-sim to support both a mn10300 and am33
473 * am33.igen: Add many more am33 instructions.
477 * mn10300_sim.h (FETCH24): Define.
479 * mn10300_sim.h: Add defines for some registers found on the AM33.
480 * am33.igen: New file with some am33 support.
484 * mn10300_sim.h: Include bfd.h
485 (struct state): Add more room for processor specific registers.
490 * dv-mn103tim.c: Include sim-assert.h
491 * dv-mn103ser.c (do_polling_event): Check for incoming data on
492 serial line and schedule next polling event.
493 (read_status_reg): schedule events to check for incoming data on
494 serial line and issue interrupt if necessary.
498 * interp.c (sim_open): hook up serial 1 and 2 ports properly (typo).
502 * interp.c (board): Rename am32 to stdeval1 as this is the name
503 consistently used to refer to the mn1030002 board.
506 * interp.c (sim_open): Fix typo in address of EXTMD register
507 (0x34000280, not 0x3400280).
511 * simops.c (syscall): Handle change in opcode # for syscall.
512 * mn10300.igen (syscall): Likewise.
515 * dv-mn103int.c (mn103int_finish): Regular interrupts (not NMI or
516 reset) are not enabled on reset.
519 * dv-mn103iop.c (write_*_reg): Check for attempt to write r/o
521 * dv-mn103ser.c: Fill in methods for reading and writing to serial
523 * interp.c (sim_open): Make the serial device a polling device.
526 * dv-mn103iop.c: New file for handling am32 io ports.
527 * configure.in: Add mn103iop to hw_device list.
528 * configure: Re-generate.
529 * interp.c (sim_open): Create io port device.
532 * dv-mn103int.c (external_group): Use enumerated types to access
533 correct group addresses.
534 * dv-mn103tim.c (do_counter_event): Underflow of cascaded timer
535 triggers an interrupt on the higher-numbered timer's port.
538 * interp.c: (mn10300_option_handler): New function parses arguments
540 * (board): Add --board option for specifying am32.
541 * (sim_open): Create new timer and serial devices and control
542 configuration of other am32 devices via board option.
543 * dv-mn103tim.c, dv-mn103ser.c: New files for timers and serial devices.
544 * dv-mn103cpu.c: Fix typos in opening comments.
545 * dv-mn103int.c: Adjust interrupt controller settings for am32 instead of am30.
546 * configure.in: Add mn103tim and mn103ser to hw_device list.
547 * configure: Re-generate.
551 * dv-mn103int.c, dv-mn103cpu.c: Rename *_callback to *_method.
553 * dv-mn103cpu.c, dv-mn103int.c: Include hw-main.h and
554 sim-main.h. Declare a struct hw_descriptor instead of struct
555 hw_device_descriptor.
559 * dv-mn103cpu.c (struct mn103cpu): Change type of pending_handler
564 * configure.in (SIM_AC_OPTION_HARDWARE): Add argument "yes".
568 * interp.c (sim_open): Create a polling PAL device.
572 * dv-mn103int.c (mn103int_port_event):
573 (mn103int_port_event):
574 (mn103int_io_read_buffer):
575 (mn103int_io_write_buffer):
577 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Drop CPU/CIA args.
578 (mn103cpu_port_event): Ditto.
579 (mn103cpu_io_read_buffer): Ditto.
580 (mn103cpu_io_write_buffer): Ditto.
584 * configure: Regenerated to track ../common/aclocal.m4 changes.
586 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
588 * configure: Regenerated to track ../common/aclocal.m4 changes.
593 * acconfig.h: New file.
594 * configure.in: Reverted change of Apr 24; use sinclude again.
596 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
598 * configure: Regenerated to track ../common/aclocal.m4 changes.
603 * configure.in: Don't call sinclude.
607 * mn10300_sim.h: Declare all functions in op_utils.c using
610 * sim-main.c: New file. Include op_utils.c.
612 * mn10300.igen (mov, cmp): Use new igen operators `!' and `=' to
613 differentiate between MOV/CMP immediate/register instructions.
615 * configure.in (SIM_AC_OPTION_INLINE): Add and enable.
616 * configure: Regenerate.
620 * configure: Regenerated to track ../common/aclocal.m4 changes.
624 * interp.c (hw): Delete variable, moved to SIM_DESC.
625 (sim_open): Delete calls to hw_tree_create, hw_tree_finish.
626 Handled by sim-module.
627 (sim_open): Do not anotate tree with trace properties, handled by
629 (sim_open): Call sim_hw_parse instead of hw_tree_parse.
631 * configure: Regenerated to track ../common/aclocal.m4 changes.
635 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Save the entire PC
636 on the stack when delivering interrupts (not just the lower
638 * mn10300.igen (mov (Di,Am),Dn): Fix decode. Registers were
639 specified in the wrong order.
643 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Stop loss of
644 succeeding interrupts, clear pending_handler when the handler
649 * Makefile.in (tmp-igen): Prefix all usage of move-if-change
650 script with $(SHELL) to make NT native builds happy.
651 * configure: Regenerate because of change to ../common/aclocal.m4.
655 * configure.in: Make --enable-sim-common the default.
656 * configure: Re-generate.
658 * sim-main.h (CIA_GET, CIA_SET): Save/restore current instruction
659 address into Sate.regs[REG_PC] instead of common struct.
663 * mn10300.igen (cmp imm8,An): Do not sign extend imm8 value.
667 * simops.c (OP_F0FD): Initialise variable 'sp'.
671 * dv-mn103int.c (decode_group): A group register every 4 bytes not
673 (write_icr): Rewrite equation updating request field.
674 (read_iagr): Fix check that interrupt is still pending.
678 * interp.c (sim_open): Tidy up device creation.
680 * dv-mn103int.c (mn103int_port_event): Drive NMI with non-zero
682 (mn103int_io_read_buffer): Convert absolute address to register
684 (read_icr, write_icr): Convert block offset into group offset.
688 * interp.c (sim_open): Create second 1mb memory region at
690 (sim_open): Create a device tree.
692 (do_interrupt): Delete, needs to use dv-mn103cpu.c
694 * dv-mn103int.c, dv-mn103cpu.c: New files.
698 * mn10300_sim.h (EXTRACT_PSW_LM, INSERT_PSW_LM, PSW_IE, PSW_LM):
704 * configure: Regenerated to track ../common/aclocal.m4 changes.
708 * interp.c (sim-options.h): Include.
709 (sim_kind, myname): Declare when not using common framework.
711 * mn10300_sim.h (do_syscall, generic*): Provide prototypes for
712 functions found in op_utils.c
714 * mn10300.igen (add): Discard unused variables.
716 * configure, config.in: Re-generate with autoconf 2.12.1.
720 Add support for --enable-sim-common option.
721 * Makefile.in (WITHOUT_COMMON_OBJS): Files included if
722 ! --enable-sim-common
723 (WITH_COMMON_OBJS): Files included if --enable-sim-common.
724 (MN10300_OBJS,MN10300_INTERP_DEP): New variables.
726 ({WITHOUT,WITH}_COMMON_RUN_OBJS,SIM_RUN_OBJS): New variables.
727 (SIM_EXTRA_CFLAGS): New variable.
728 (clean-extra): Clean up igen files.
729 (../igen/igen,clean-igen,tmp-igen): New rules.
730 * configure.in: Add support for common framework via
732 * configure: Regenerate.
733 * interp.c: #include sim-main if WITH_COMMON, not mn10300_sim.h.
734 (hash,dispatch,sim_size): Don't compile if ! WITH_COMMON.
735 (init_system,sim_write,compare_simops): Likewise.
736 (sim_set_profile,sim_set_profile_size): Likewise.
737 (sim_stop,sim_resume,sim_trace,sim_info): Likewise.
738 (sim_set_callbacks,sim_stop_reason,sim_read,sim_load): Likewise.
739 (enum interrupt_type): New enum.
740 (interrupt_names): New global.
741 (do_interrupt): New function.
742 (sim_open): Define differently if WITH_COMMON.
743 (sim_close,sim_create_inferior,sim_do_command): Likewise.
744 * mn10300_sim.h ({load,store}_{byte,half,word}): Define versions
746 * mn10300.igen: New file.
747 * mn10300.dc: New file.
748 * op_utils.c: New file.
749 * sim-main.h: New file.
753 * configure: Regenerated to track ../common/aclocal.m4 changes.
757 * simops.c (inc): Fix typo.
761 * simops.c (signed multiply instructions): Cast input operands to
762 signed32 before casting them to signed64 so that the sign bit
763 is propagated properly.
767 * Makefile.in: Last change was bad. Define NL_TARGET
768 so that targ-vals.h will be used instead of syscall.h.
769 * simops.c: Use targ-vals.h instead of syscall.h.
770 (OP_F020): Disable unsupported system calls.
774 * Makefile.in: Get header files from libgloss/mn10300/sys.
778 * simops.c: Include sim-types.h.
782 * simops.c (multiply instructions): Cast input operands to a
783 signed64/unsigned64 type as appropriate.
787 * interp.c (sim_store_register, sim_fetch_register): Pass in
788 length parameter. Return -1.
792 * configure: Regenerated to track ../common/aclocal.m4 changes.
796 * configure: Regenerated to track ../common/aclocal.m4 changes.
798 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
800 * configure: Regenerated to track ../common/aclocal.m4 changes.
804 * configure: Regenerated to track ../common/aclocal.m4 changes.
809 * configure: Regenerated to track ../common/aclocal.m4 changes.
813 * simops.c (call:16 call:32): Stack adjustment is determined solely
818 * interp.c (sim_load): Pass lma_p and sim_write args to
823 * simops.c: Correctly handle register restores for "ret" and "retf"
828 * configure: Regenerated to track ../common/aclocal.m4 changes.
832 * configure: Regenerated to track ../common/aclocal.m4 changes.
836 * configure: Regenerated to track ../common/aclocal.m4 changes.
840 * configure: Regenerated to track ../common/aclocal.m4 changes.
844 * configure: Regenerated to track ../common/aclocal.m4 changes.
848 * configure: Regenerated to track ../common/aclocal.m4 changes.
850 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
852 * configure: Regenerated to track ../common/aclocal.m4 changes.
856 * configure: Regenerated to track ../common/aclocal.m4 changes.
861 * interp.c (sim_kill): Delete.
862 (sim_create_inferior): Add ABFD argument.
863 (sim_load): Move setting of PC from here.
864 (sim_create_inferior): To here.
868 * configure: Regenerated to track ../common/aclocal.m4 changes.
873 * interp.c (sim_open): Add ABFD argument.
877 * interp.c (sim_resume): Clear State.exited.
878 (sim_stop_reason): If State.exited is nonzero, then indicate that
879 the simulator exited instead of stopped.
880 * mn10300_sim.h (struct _state): Add exited field.
881 * simops.c (syscall): Set State.exited for SYS_exit.
885 * simops.c: Fix thinko in last change.
889 * simops.c: "call" stores the callee saved registers into the
890 stack! Update the stack pointer properly when done with
893 * simops.c: Fix return address computation for "call" instructions.
897 * interp.c (sim_open): Fix typo.
901 * interp.c (sim_resume): Add missing case in big switch
902 statement (for extb instruction).
906 * interp.c: Replace all references to load_mem and store_mem
907 with references to load_byte, load_half, load_3_byte, load_word
908 and store_byte, store_half, store_3_byte, store_word.
909 (INLINE): Delete definition.
910 (load_mem_big): Likewise.
911 (max_mem): Make it global.
912 (dispatch): Make this function inline.
913 (load_mem, store_mem): Delete functions.
914 * mn10300_sim.h (INLINE): Define.
915 (RLW): Delete unused definition.
916 (load_mem, store_mem): Delete declarations.
917 (load_mem_big): New definition.
918 (load_byte, load_half, load_3_byte, load_word): New functions.
919 (store_byte, store_half, store_3_byte, store_word): New functions.
920 * simops.c: Replace all references to load_mem and store_mem
921 with references to load_byte, load_half, load_3_byte, load_word
922 and store_byte, store_half, store_3_byte, store_word.
926 * interp.c (sim_open): Add callback to arguments.
927 (sim_set_callbacks): Delete SIM_DESC argument.
931 * interp.c (dispatch): Make this an inline function.
933 * simops.c (syscall): Use callback->write regardless of
934 what file descriptor we're writing too.
938 * interp.c (load_mem_big): Remove function. It's now a macro
940 (compare_simops): New function.
941 (sim_open): Sort the Simops table before inserting entries
943 * mn10300_sim.h: Remove unused #defines.
944 (load_mem_big): Define.
948 * interp.c (load_mem): If we get a load from an out of range
950 (store_mem): Likewise for stores.
951 (max_mem): New variable.
955 * mn10300_sim.h: Fix ordering of bits in the PSW.
957 * interp.c: Improve hashing routine to avoid long list
958 traversals for common instructions. Add HASH_STAT support.
959 Rewrite opcode dispatch code using a big switch instead of
960 cascaded if/else statements. Avoid useless calls to load_mem.
964 * mn10300_sim.h (struct _state): Add space for mdrq register.
966 * simops.c: Don't abort for trap. Add support for the extended
967 instructions, "getx", "putx", "mulq", "mulqu", "sat16", "sat24",
972 * configure: Regenerated to track ../common/aclocal.m4 changes.
976 * interp.c (sim_stop): Add stub function.
980 * Makefile.in (SIM_OBJS): Add sim-load.o.
981 * interp.c (sim_kind, myname): New static locals.
982 (sim_open): Set sim_kind, myname. Ignore -E arg.
983 (sim_load): Return SIM_RC. New arg abfd. Call sim_load_file to
984 load file into simulator. Set start address from bfd.
985 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
989 * simops.c (OP_F020): SYS_execv, SYS_time, SYS_times, SYS_utime
990 only include if implemented by host.
991 (OP_F020): Typecast arg passed to time function;
995 * simops.c (syscall): Handle new mn10300 calling conventions.
999 * configure: Regenerated to track ../common/aclocal.m4 changes.
1004 * Makefile.in: Change mn10300-opc.o to m10300-opc.o, to match
1005 corresponding change in opcodes directory.
1009 * interp.c (sim_open): New arg `kind'.
1011 * configure: Regenerated to track ../common/aclocal.m4 changes.
1015 * configure: Regenerated to track ../common/aclocal.m4 changes.
1019 * simops.c: Fix register extraction for a two "movbu" variants.
1020 Somewhat simplify "sub" instructions.
1021 Correctly sign extend operands for "mul". Put the correct
1022 half of the result in MDR for "mul" and "mulu".
1023 Implement remaining instructions.
1024 Tweak opcode for "syscall".
1028 * simops.c: Do syscall emulation in "syscall" instruction. Add
1029 dummy "trap" instruction.
1033 * configure: Regenerated to track ../common/aclocal.m4 changes.
1037 * configure: Re-generate.
1041 * configure: Regenerate to track ../common/aclocal.m4 changes.
1045 * interp.c (sim_open): New SIM_DESC result. Argument is now
1047 (other sim_*): New SIM_DESC argument.
1051 * simops.c: Fix carry bit computation for "add" instructions.
1053 * simops.c: Fix typos in bset insns. Fix arguments to store_mem
1054 for bset imm8,(d8,an) and bclr imm8,(d8,an).
1058 * simops.c: Fix register references when computing Z and N bits
1063 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
1064 COMMON_{PRE,POST}_CONFIG_FRAG instead.
1065 * configure.in: sinclude ../common/aclocal.m4.
1066 * configure: Regenerated.
1070 * interp.c (init_system): Allocate 2^19 bytes of space for the
1075 * configure configure.in Makefile.in: Update to new configure
1076 scheme which is more compatible with WinGDB builds.
1077 * configure.in: Improve comment on how to run autoconf.
1078 * configure: Re-run autoconf to get new ../common/aclocal.m4.
1079 * Makefile.in: Use autoconf substitution to install common
1084 * simops.c: Undo last change to "rol" and "ror", original code
1089 * simops.c: Fix "rol" and "ror".
1093 * simops.c: Fix typo in last change.
1097 * simops.c: Use REG macros in few places not using them yet.
1101 * mn10300_sim.h (struct _state): Fix number of registers!
1105 * mn10300_sim.h (struct _state): Put all registers into a single
1106 array to make gdb implementation easier.
1107 (REG_*): Add definitions for all registers in the state array.
1108 (SEXT32, SEXT40, SEXT44, SEXT60): Remove unused macros.
1109 * simops.c: Related changes.
1113 * interp.c (sim_resume): Handle 0xff as a single byte insn.
1115 * simops.c: Fix overflow computation for "add" and "inc"
1120 * simops.c: Handle "break" instruction.
1122 * simops.c: Fix restoring the PC for "ret" and "retf" instructions.
1126 * gencode.c (write_opcodes): Also write out the format of the
1128 * mn10300_sim.h (simops): Add "format" field.
1129 * interp.c (sim_resume): Deal with endianness issues here.
1133 * simops.c (REG0_4): Define.
1134 Use REG0_4 for indexed loads/stores.
1138 * simops.c (REG0_16): Fix typo.
1142 * simops.c: Call abort for any instruction that's not currently
1145 * simops.c: Define accessor macros to extract register
1146 values from instructions. Use them consistently.
1148 * interp.c: Delete unused global variable "OP".
1149 (sim_resume): Remove unused variable "opcode".
1150 * simops.c: Fix some uninitialized variable problems, add
1151 parens to fix various -Wall warnings.
1153 * gencode.c (write_header): Add "insn" and "extension" arguments
1154 to the OP_* declarations.
1155 (write_template): Similarly for function templates.
1156 * interp.c (insn, extension): Remove global variables. Instead
1157 pass them as arguments to the OP_* functions.
1158 * mn10300_sim.h: Remove decls for "insn" and "extension".
1159 * simops.c (OP_*): Accept "insn" and "extension" as arguments
1160 instead of using globals.
1164 * simops.c: Fix typos in "mov am,(d16,an)" and "mov am,(d32,an)"
1166 * simops.c: Fix thinkos in last change to "inc dn".
1170 * simops.c: "add imm,sp" does not effect the condition codes.
1171 "inc dn" does effect the condition codes.
1175 * simops.c: Treat both operands as signed values for
1178 * simops.c: Fix simulation of division instructions.
1179 Fix typos/thinkos in several "cmp" and "sub" instructions.
1183 * simops.c: Fix carry bit handling in "sub" and "cmp"
1186 * simops.c: Fix "mov imm8,an" and "mov imm16,dn".
1190 * simops.c: Fix overflow computation for many instructions.
1192 * simops.c: Fix "mov dm, an", "movbu dm, (an)", and "movhu dm, (an)".
1194 * simops.c: Fix "mov am, dn".
1196 * simops.c: Fix more bugs in "add imm,an" and
1201 * simops.c: Fix bugs in "movm" and "add imm,an".
1203 * simops.c: Don't lose the upper 24 bits of the return
1204 pointer in "call" and "calls" instructions. Rough cut
1205 at emulated system calls.
1207 * simops.c: Implement the remaining 5, 6 and 7 byte instructions.
1209 * simops.c: Implement remaining 4 byte instructions.
1211 * simops.c: Implement remaining 3 byte instructions.
1213 * simops.c: Implement remaining 2 byte instructions. Call
1214 abort for instructions we're not implementing now.
1218 * simops.c: Implement lots of random instructions.
1220 * simops.c: Implement "movm" and "bCC" insns.
1222 * mn10300_sim.h (_state): Add another register (MDR).
1224 * simops.c: Implement "cmp", "calls", "rets", "jmp" and
1225 a few additional random insns.
1227 * mn10300_sim.h (PSW_*): Define for CC status tracking.
1228 (REG_D0, REG_A0, REG_SP): Define.
1229 * simops.c: Implement "add", "addc" and a few other random
1232 * gencode.c, interp.c: Snapshot current simulator code.
1236 * Makefile.in, config.in, configure, configure.in: New files.
1237 * gencode.c, interp.c, mn10300_sim.h, simops.c: New files.