4 * am33.igen: Add some missing instructions.
6 * am33.igen: Autoincrement loads/store fixes.
10 * am33.igen: Add mov_lCC DSP instructions.
12 * am33.igen: Add most am33 DSP instructions.
17 * mn10300.igen: Fix Z bit for addc and subc instructions.
18 Minor fixes in multiply/divide patterns.
21 * am33.igen: Add missing mul[u] imm32,Rn. Fix condition code
22 handling for many instructions. Fix sign extension for some
25 * am33.igen: Fix Z bit for remaining addc/subc instructions.
26 Do not sign extend immediate for mov imm,XRn.
27 More random mul, mac & div fixes.
28 Remove some unused variables.
29 Sign extend 24bit displacement in memory addresses.
31 * am33.igen: Fix Z bit for addc Rm,Rn and subc Rm,Rn. Various
32 fixes to 2 register multiply, divide and mac instructions. Set
33 Z,N correctly for sat16. Sign extend 24 bit immediate for add,
36 * am33.igen: Add remaining non-DSP instructions.
42 * am33.igen (translate_rreg): New function. Use it as appropriate.
44 * am33.igen: More am33 instructions. Fix "div".
48 * mn10300.igen: Add am33 support.
50 * Makefile.in: Use multi-sim to support both a mn10300 and am33
53 * am33.igen: Add many more am33 instructions.
58 * mn10300_sim.h (FETCH24): Define.
61 * mn10300_sim.h: Add defines for some registers found on the AM33.
62 * am33.igen: New file with some am33 support.
67 * mn10300_sim.h: Include bfd.h
68 (struct state): Add more room for processor specific registers.
76 * dv-mn103tim.c: Include sim-assert.h
77 * dv-mn103ser.c (do_polling_event): Check for incoming data on
78 serial line and schedule next polling event.
79 (read_status_reg): schedule events to check for incoming data on
80 serial line and issue interrupt if necessary.
84 * interp.c (sim_open): hook up serial 1 and 2 ports properly (typo).
88 * interp.c (board): Rename am32 to stdeval1 as this is the name
89 consistently used to refer to the mn1030002 board.
92 * interp.c (sim_open): Fix typo in address of EXTMD register
93 (0x34000280, not 0x3400280).
98 * simops.c (syscall): Handle change in opcode # for syscall.
99 * mn10300.igen (syscall): Likewise.
103 * dv-mn103int.c (mn103int_finish): Regular interrupts (not NMI or
104 reset) are not enabled on reset.
107 * dv-mn103iop.c (write_*_reg): Check for attempt to write r/o
109 * dv-mn103ser.c: Fill in methods for reading and writing to serial
111 * interp.c (sim_open): Make the serial device a polling device.
114 * dv-mn103iop.c: New file for handling am32 io ports.
115 * configure.in: Add mn103iop to hw_device list.
116 * configure: Re-generate.
117 * interp.c (sim_open): Create io port device.
120 * dv-mn103int.c (external_group): Use enumerated types to access
121 correct group addresses.
122 * dv-mn103tim.c (do_counter_event): Underflow of cascaded timer
123 triggers an interrupt on the higher-numbered timer's port.
127 * interp.c: (mn10300_option_handler): New function parses arguments
130 * (board): Add --board option for specifying am32.
131 * (sim_open): Create new timer and serial devices and control
132 configuration of other am32 devices via board option.
133 * dv-mn103tim.c, dv-mn103ser.c: New files for timers and serial devices.
134 * dv-mn103cpu.c: Fix typos in opening comments.
135 * dv-mn103int.c: Adjust interrupt controller settings for am32 instead of am30.
136 * configure.in: Add mn103tim and mn103ser to hw_device list.
137 * configure: Re-generate.
143 * dv-mn103int.c, dv-mn103cpu.c: Rename *_callback to *_method.
145 * dv-mn103cpu.c, dv-mn103int.c: Include hw-main.h and
146 sim-main.h. Declare a struct hw_descriptor instead of struct
147 hw_device_descriptor.
151 * dv-mn103cpu.c (struct mn103cpu): Change type of pending_handler
156 * configure.in (SIM_AC_OPTION_HARDWARE): Add argument "yes".
160 * interp.c (sim_open): Create a polling PAL device.
165 * dv-mn103int.c (mn103int_port_event):
166 (mn103int_port_event):
167 (mn103int_io_read_buffer):
168 (mn103int_io_write_buffer):
170 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Drop CPU/CIA args.
171 (mn103cpu_port_event): Ditto.
172 (mn103cpu_io_read_buffer): Ditto.
173 (mn103cpu_io_write_buffer): Ditto.
177 * configure: Regenerated to track ../common/aclocal.m4 changes.
179 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
181 * configure: Regenerated to track ../common/aclocal.m4 changes.
186 * acconfig.h: New file.
187 * configure.in: Reverted change of Apr 24; use sinclude again.
189 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
191 * configure: Regenerated to track ../common/aclocal.m4 changes.
196 * configure.in: Don't call sinclude.
200 * mn10300_sim.h: Declare all functions in op_utils.c using
203 * sim-main.c: New file. Include op_utils.c.
205 * mn10300.igen (mov, cmp): Use new igen operators `!' and `=' to
206 differentiate between MOV/CMP immediate/register instructions.
208 * configure.in (SIM_AC_OPTION_INLINE): Add and enable.
209 * configure: Regenerate.
213 * configure: Regenerated to track ../common/aclocal.m4 changes.
218 * interp.c (hw): Delete variable, moved to SIM_DESC.
219 (sim_open): Delete calls to hw_tree_create, hw_tree_finish.
220 Handled by sim-module.
221 (sim_open): Do not anotate tree with trace properties, handled by
223 (sim_open): Call sim_hw_parse instead of hw_tree_parse.
225 * configure: Regenerated to track ../common/aclocal.m4 changes.
231 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Save the entire PC
232 on the stack when delivering interrupts (not just the lower
234 * mn10300.igen (mov (Di,Am),Dn): Fix decode. Registers were
235 specified in the wrong order.
241 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Stop loss of
242 succeeding interrupts, clear pending_handler when the handler
248 * Makefile.in (tmp-igen): Prefix all usage of move-if-change
249 script with $(SHELL) to make NT native builds happy.
250 * configure: Regenerate because of change to ../common/aclocal.m4.
254 * configure.in: Make --enable-sim-common the default.
255 * configure: Re-generate.
257 * sim-main.h (CIA_GET, CIA_SET): Save/restore current instruction
258 address into Sate.regs[REG_PC] instead of common struct.
262 * mn10300.igen (cmp imm8,An): Do not sign extend imm8 value.
266 * simops.c (OP_F0FD): Initialise variable 'sp'.
271 * dv-mn103int.c (decode_group): A group register every 4 bytes not
273 (write_icr): Rewrite equation updating request field.
274 (read_iagr): Fix check that interrupt is still pending.
280 * interp.c (sim_open): Tidy up device creation.
282 * dv-mn103int.c (mn103int_port_event): Drive NMI with non-zero
284 (mn103int_io_read_buffer): Convert absolute address to register
286 (read_icr, write_icr): Convert block offset into group offset.
291 * interp.c (sim_open): Create second 1mb memory region at
293 (sim_open): Create a device tree.
296 (do_interrupt): Delete, needs to use dv-mn103cpu.c
298 * dv-mn103int.c, dv-mn103cpu.c: New files.
303 * mn10300_sim.h (EXTRACT_PSW_LM, INSERT_PSW_LM, PSW_IE, PSW_LM):
309 * configure: Regenerated to track ../common/aclocal.m4 changes.
313 * interp.c (sim-options.h): Include.
314 (sim_kind, myname): Declare when not using common framework.
316 * mn10300_sim.h (do_syscall, generic*): Provide prototypes for
317 functions found in op_utils.c
319 * mn10300.igen (add): Discard unused variables.
321 * configure, config.in: Re-generate with autoconf 2.12.1.
325 Add support for --enable-sim-common option.
326 * Makefile.in (WITHOUT_COMMON_OBJS): Files included if
327 ! --enable-sim-common
328 (WITH_COMMON_OBJS): Files included if --enable-sim-common.
329 (MN10300_OBJS,MN10300_INTERP_DEP): New variables.
331 ({WITHOUT,WITH}_COMMON_RUN_OBJS,SIM_RUN_OBJS): New variables.
332 (SIM_EXTRA_CFLAGS): New variable.
333 (clean-extra): Clean up igen files.
334 (../igen/igen,clean-igen,tmp-igen): New rules.
335 * configure.in: Add support for common framework via
337 * configure: Regenerate.
338 * interp.c: #include sim-main if WITH_COMMON, not mn10300_sim.h.
339 (hash,dispatch,sim_size): Don't compile if ! WITH_COMMON.
340 (init_system,sim_write,compare_simops): Likewise.
341 (sim_set_profile,sim_set_profile_size): Likewise.
342 (sim_stop,sim_resume,sim_trace,sim_info): Likewise.
343 (sim_set_callbacks,sim_stop_reason,sim_read,sim_load): Likewise.
344 (enum interrupt_type): New enum.
345 (interrupt_names): New global.
346 (do_interrupt): New function.
347 (sim_open): Define differently if WITH_COMMON.
348 (sim_close,sim_create_inferior,sim_do_command): Likewise.
349 * mn10300_sim.h ({load,store}_{byte,half,word}): Define versions
351 * mn10300.igen: New file.
352 * mn10300.dc: New file.
353 * op_utils.c: New file.
354 * sim-main.h: New file.
358 * configure: Regenerated to track ../common/aclocal.m4 changes.
362 * simops.c (inc): Fix typo.
366 * simops.c (signed multiply instructions): Cast input operands to
367 signed32 before casting them to signed64 so that the sign bit
368 is propagated properly.
372 * Makefile.in: Last change was bad. Define NL_TARGET
373 so that targ-vals.h will be used instead of syscall.h.
374 * simops.c: Use targ-vals.h instead of syscall.h.
375 (OP_F020): Disable unsupported system calls.
379 * Makefile.in: Get header files from libgloss/mn10300/sys.
383 * simops.c: Include sim-types.h.
387 * simops.c (multiply instructions): Cast input operands to a
388 signed64/unsigned64 type as appropriate.
392 * interp.c (sim_store_register, sim_fetch_register): Pass in
393 length parameter. Return -1.
397 * configure: Regenerated to track ../common/aclocal.m4 changes.
401 * configure: Regenerated to track ../common/aclocal.m4 changes.
403 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
405 * configure: Regenerated to track ../common/aclocal.m4 changes.
409 * configure: Regenerated to track ../common/aclocal.m4 changes.
414 * configure: Regenerated to track ../common/aclocal.m4 changes.
418 * simops.c (call:16 call:32): Stack adjustment is determined solely
423 * interp.c (sim_load): Pass lma_p and sim_write args to
428 * simops.c: Correctly handle register restores for "ret" and "retf"
433 * configure: Regenerated to track ../common/aclocal.m4 changes.
437 * configure: Regenerated to track ../common/aclocal.m4 changes.
441 * configure: Regenerated to track ../common/aclocal.m4 changes.
445 * configure: Regenerated to track ../common/aclocal.m4 changes.
449 * configure: Regenerated to track ../common/aclocal.m4 changes.
453 * configure: Regenerated to track ../common/aclocal.m4 changes.
455 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
457 * configure: Regenerated to track ../common/aclocal.m4 changes.
461 * configure: Regenerated to track ../common/aclocal.m4 changes.
466 * interp.c (sim_kill): Delete.
467 (sim_create_inferior): Add ABFD argument.
468 (sim_load): Move setting of PC from here.
469 (sim_create_inferior): To here.
473 * configure: Regenerated to track ../common/aclocal.m4 changes.
478 * interp.c (sim_open): Add ABFD argument.
482 * interp.c (sim_resume): Clear State.exited.
483 (sim_stop_reason): If State.exited is nonzero, then indicate that
484 the simulator exited instead of stopped.
485 * mn10300_sim.h (struct _state): Add exited field.
486 * simops.c (syscall): Set State.exited for SYS_exit.
490 * simops.c: Fix thinko in last change.
494 * simops.c: "call" stores the callee saved registers into the
495 stack! Update the stack pointer properly when done with
498 * simops.c: Fix return address computation for "call" instructions.
502 * interp.c (sim_open): Fix typo.
506 * interp.c (sim_resume): Add missing case in big switch
507 statement (for extb instruction).
511 * interp.c: Replace all references to load_mem and store_mem
512 with references to load_byte, load_half, load_3_byte, load_word
513 and store_byte, store_half, store_3_byte, store_word.
514 (INLINE): Delete definition.
515 (load_mem_big): Likewise.
516 (max_mem): Make it global.
517 (dispatch): Make this function inline.
518 (load_mem, store_mem): Delete functions.
519 * mn10300_sim.h (INLINE): Define.
520 (RLW): Delete unused definition.
521 (load_mem, store_mem): Delete declarations.
522 (load_mem_big): New definition.
523 (load_byte, load_half, load_3_byte, load_word): New functions.
524 (store_byte, store_half, store_3_byte, store_word): New functions.
525 * simops.c: Replace all references to load_mem and store_mem
526 with references to load_byte, load_half, load_3_byte, load_word
527 and store_byte, store_half, store_3_byte, store_word.
531 * interp.c (sim_open): Add callback to arguments.
532 (sim_set_callbacks): Delete SIM_DESC argument.
536 * interp.c (dispatch): Make this an inline function.
538 * simops.c (syscall): Use callback->write regardless of
539 what file descriptor we're writing too.
543 * interp.c (load_mem_big): Remove function. It's now a macro
545 (compare_simops): New function.
546 (sim_open): Sort the Simops table before inserting entries
548 * mn10300_sim.h: Remove unused #defines.
549 (load_mem_big): Define.
553 * interp.c (load_mem): If we get a load from an out of range
555 (store_mem): Likewise for stores.
556 (max_mem): New variable.
560 * mn10300_sim.h: Fix ordering of bits in the PSW.
562 * interp.c: Improve hashing routine to avoid long list
563 traversals for common instructions. Add HASH_STAT support.
564 Rewrite opcode dispatch code using a big switch instead of
565 cascaded if/else statements. Avoid useless calls to load_mem.
569 * mn10300_sim.h (struct _state): Add space for mdrq register.
571 * simops.c: Don't abort for trap. Add support for the extended
572 instructions, "getx", "putx", "mulq", "mulqu", "sat16", "sat24",
577 * configure: Regenerated to track ../common/aclocal.m4 changes.
581 * interp.c (sim_stop): Add stub function.
585 * Makefile.in (SIM_OBJS): Add sim-load.o.
586 * interp.c (sim_kind, myname): New static locals.
587 (sim_open): Set sim_kind, myname. Ignore -E arg.
588 (sim_load): Return SIM_RC. New arg abfd. Call sim_load_file to
589 load file into simulator. Set start address from bfd.
590 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
594 * simops.c (OP_F020): SYS_execv, SYS_time, SYS_times, SYS_utime
595 only include if implemented by host.
596 (OP_F020): Typecast arg passed to time function;
600 * simops.c (syscall): Handle new mn10300 calling conventions.
604 * configure: Regenerated to track ../common/aclocal.m4 changes.
609 * Makefile.in: Change mn10300-opc.o to m10300-opc.o, to match
610 corresponding change in opcodes directory.
614 * interp.c (sim_open): New arg `kind'.
616 * configure: Regenerated to track ../common/aclocal.m4 changes.
620 * configure: Regenerated to track ../common/aclocal.m4 changes.
624 * simops.c: Fix register extraction for a two "movbu" variants.
625 Somewhat simplify "sub" instructions.
626 Correctly sign extend operands for "mul". Put the correct
627 half of the result in MDR for "mul" and "mulu".
628 Implement remaining instructions.
629 Tweak opcode for "syscall".
633 * simops.c: Do syscall emulation in "syscall" instruction. Add
634 dummy "trap" instruction.
638 * configure: Regenerated to track ../common/aclocal.m4 changes.
642 * configure: Re-generate.
646 * configure: Regenerate to track ../common/aclocal.m4 changes.
650 * interp.c (sim_open): New SIM_DESC result. Argument is now
652 (other sim_*): New SIM_DESC argument.
656 * simops.c: Fix carry bit computation for "add" instructions.
658 * simops.c: Fix typos in bset insns. Fix arguments to store_mem
659 for bset imm8,(d8,an) and bclr imm8,(d8,an).
663 * simops.c: Fix register references when computing Z and N bits
668 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
669 COMMON_{PRE,POST}_CONFIG_FRAG instead.
670 * configure.in: sinclude ../common/aclocal.m4.
671 * configure: Regenerated.
675 * interp.c (init_system): Allocate 2^19 bytes of space for the
680 * configure configure.in Makefile.in: Update to new configure
681 scheme which is more compatible with WinGDB builds.
682 * configure.in: Improve comment on how to run autoconf.
683 * configure: Re-run autoconf to get new ../common/aclocal.m4.
684 * Makefile.in: Use autoconf substitution to install common
689 * simops.c: Undo last change to "rol" and "ror", original code
694 * simops.c: Fix "rol" and "ror".
698 * simops.c: Fix typo in last change.
702 * simops.c: Use REG macros in few places not using them yet.
706 * mn10300_sim.h (struct _state): Fix number of registers!
710 * mn10300_sim.h (struct _state): Put all registers into a single
711 array to make gdb implementation easier.
712 (REG_*): Add definitions for all registers in the state array.
713 (SEXT32, SEXT40, SEXT44, SEXT60): Remove unused macros.
714 * simops.c: Related changes.
718 * interp.c (sim_resume): Handle 0xff as a single byte insn.
720 * simops.c: Fix overflow computation for "add" and "inc"
725 * simops.c: Handle "break" instruction.
727 * simops.c: Fix restoring the PC for "ret" and "retf" instructions.
731 * gencode.c (write_opcodes): Also write out the format of the
733 * mn10300_sim.h (simops): Add "format" field.
734 * interp.c (sim_resume): Deal with endianness issues here.
738 * simops.c (REG0_4): Define.
739 Use REG0_4 for indexed loads/stores.
743 * simops.c (REG0_16): Fix typo.
747 * simops.c: Call abort for any instruction that's not currently
750 * simops.c: Define accessor macros to extract register
751 values from instructions. Use them consistently.
753 * interp.c: Delete unused global variable "OP".
754 (sim_resume): Remove unused variable "opcode".
755 * simops.c: Fix some uninitialized variable problems, add
756 parens to fix various -Wall warnings.
758 * gencode.c (write_header): Add "insn" and "extension" arguments
759 to the OP_* declarations.
760 (write_template): Similarly for function templates.
761 * interp.c (insn, extension): Remove global variables. Instead
762 pass them as arguments to the OP_* functions.
763 * mn10300_sim.h: Remove decls for "insn" and "extension".
764 * simops.c (OP_*): Accept "insn" and "extension" as arguments
765 instead of using globals.
769 * simops.c: Fix typos in "mov am,(d16,an)" and "mov am,(d32,an)"
771 * simops.c: Fix thinkos in last change to "inc dn".
775 * simops.c: "add imm,sp" does not effect the condition codes.
776 "inc dn" does effect the condition codes.
780 * simops.c: Treat both operands as signed values for
783 * simops.c: Fix simulation of division instructions.
784 Fix typos/thinkos in several "cmp" and "sub" instructions.
788 * simops.c: Fix carry bit handling in "sub" and "cmp"
791 * simops.c: Fix "mov imm8,an" and "mov imm16,dn".
795 * simops.c: Fix overflow computation for many instructions.
797 * simops.c: Fix "mov dm, an", "movbu dm, (an)", and "movhu dm, (an)".
799 * simops.c: Fix "mov am, dn".
801 * simops.c: Fix more bugs in "add imm,an" and
806 * simops.c: Fix bugs in "movm" and "add imm,an".
808 * simops.c: Don't lose the upper 24 bits of the return
809 pointer in "call" and "calls" instructions. Rough cut
810 at emulated system calls.
812 * simops.c: Implement the remaining 5, 6 and 7 byte instructions.
814 * simops.c: Implement remaining 4 byte instructions.
816 * simops.c: Implement remaining 3 byte instructions.
818 * simops.c: Implement remaining 2 byte instructions. Call
819 abort for instructions we're not implementing now.
823 * simops.c: Implement lots of random instructions.
825 * simops.c: Implement "movm" and "bCC" insns.
827 * mn10300_sim.h (_state): Add another register (MDR).
829 * simops.c: Implement "cmp", "calls", "rets", "jmp" and
830 a few additional random insns.
832 * mn10300_sim.h (PSW_*): Define for CC status tracking.
833 (REG_D0, REG_A0, REG_SP): Define.
834 * simops.c: Implement "add", "addc" and a few other random
837 * gencode.c, interp.c: Snapshot current simulator code.
841 * Makefile.in, config.in, configure, configure.in: New files.
842 * gencode.c, interp.c, mn10300_sim.h, simops.c: New files.