3 * dv-mn103int.c (external_group): Use enumerated types to access
4 correct group addresses.
5 * dv-mn103tim.c (do_counter_event): Underflow of cascaded timer
6 triggers an interrupt on the higher-numbered timer's port.
10 * interp.c: (mn10300_option_handler): New function parses arguments
13 * (board): Add --board option for specifying am32.
14 * (sim_open): Create new timer and serial devices and control
15 configuration of other am32 devices via board option.
16 * dv-mn103tim.c, dv-mn103ser.c: New files for timers and serial devices.
17 * dv-mn103cpu.c: Fix typos in opening comments.
18 * dv-mn103int.c: Adjust interrupt controller settings for am32 instead of am30.
19 * configure.in: Add mn103tim and mn103ser to hw_device list.
20 * configure: Re-generate.
26 * dv-mn103int.c, dv-mn103cpu.c: Rename *_callback to *_method.
28 * dv-mn103cpu.c, dv-mn103int.c: Include hw-main.h and
29 sim-main.h. Declare a struct hw_descriptor instead of struct
34 * dv-mn103cpu.c (struct mn103cpu): Change type of pending_handler
39 * configure.in (SIM_AC_OPTION_HARDWARE): Add argument "yes".
43 * interp.c (sim_open): Create a polling PAL device.
48 * dv-mn103int.c (mn103int_port_event):
49 (mn103int_port_event):
50 (mn103int_io_read_buffer):
51 (mn103int_io_write_buffer):
53 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Drop CPU/CIA args.
54 (mn103cpu_port_event): Ditto.
55 (mn103cpu_io_read_buffer): Ditto.
56 (mn103cpu_io_write_buffer): Ditto.
60 * configure: Regenerated to track ../common/aclocal.m4 changes.
62 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
64 * configure: Regenerated to track ../common/aclocal.m4 changes.
69 * acconfig.h: New file.
70 * configure.in: Reverted change of Apr 24; use sinclude again.
72 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
74 * configure: Regenerated to track ../common/aclocal.m4 changes.
79 * configure.in: Don't call sinclude.
83 * mn10300_sim.h: Declare all functions in op_utils.c using
86 * sim-main.c: New file. Include op_utils.c.
88 * mn10300.igen (mov, cmp): Use new igen operators `!' and `=' to
89 differentiate between MOV/CMP immediate/register instructions.
91 * configure.in (SIM_AC_OPTION_INLINE): Add and enable.
92 * configure: Regenerate.
96 * configure: Regenerated to track ../common/aclocal.m4 changes.
101 * interp.c (hw): Delete variable, moved to SIM_DESC.
102 (sim_open): Delete calls to hw_tree_create, hw_tree_finish.
103 Handled by sim-module.
104 (sim_open): Do not anotate tree with trace properties, handled by
106 (sim_open): Call sim_hw_parse instead of hw_tree_parse.
108 * configure: Regenerated to track ../common/aclocal.m4 changes.
114 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Save the entire PC
115 on the stack when delivering interrupts (not just the lower
117 * mn10300.igen (mov (Di,Am),Dn): Fix decode. Registers were
118 specified in the wrong order.
124 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Stop loss of
125 succeeding interrupts, clear pending_handler when the handler
131 * Makefile.in (tmp-igen): Prefix all usage of move-if-change
132 script with $(SHELL) to make NT native builds happy.
133 * configure: Regenerate because of change to ../common/aclocal.m4.
137 * configure.in: Make --enable-sim-common the default.
138 * configure: Re-generate.
140 * sim-main.h (CIA_GET, CIA_SET): Save/restore current instruction
141 address into Sate.regs[REG_PC] instead of common struct.
145 * mn10300.igen (cmp imm8,An): Do not sign extend imm8 value.
149 * simops.c (OP_F0FD): Initialise variable 'sp'.
154 * dv-mn103int.c (decode_group): A group register every 4 bytes not
156 (write_icr): Rewrite equation updating request field.
157 (read_iagr): Fix check that interrupt is still pending.
163 * interp.c (sim_open): Tidy up device creation.
165 * dv-mn103int.c (mn103int_port_event): Drive NMI with non-zero
167 (mn103int_io_read_buffer): Convert absolute address to register
169 (read_icr, write_icr): Convert block offset into group offset.
174 * interp.c (sim_open): Create second 1mb memory region at
176 (sim_open): Create a device tree.
179 (do_interrupt): Delete, needs to use dv-mn103cpu.c
181 * dv-mn103int.c, dv-mn103cpu.c: New files.
186 * mn10300_sim.h (EXTRACT_PSW_LM, INSERT_PSW_LM, PSW_IE, PSW_LM):
192 * configure: Regenerated to track ../common/aclocal.m4 changes.
196 * interp.c (sim-options.h): Include.
197 (sim_kind, myname): Declare when not using common framework.
199 * mn10300_sim.h (do_syscall, generic*): Provide prototypes for
200 functions found in op_utils.c
202 * mn10300.igen (add): Discard unused variables.
204 * configure, config.in: Re-generate with autoconf 2.12.1.
208 Add support for --enable-sim-common option.
209 * Makefile.in (WITHOUT_COMMON_OBJS): Files included if
210 ! --enable-sim-common
211 (WITH_COMMON_OBJS): Files included if --enable-sim-common.
212 (MN10300_OBJS,MN10300_INTERP_DEP): New variables.
214 ({WITHOUT,WITH}_COMMON_RUN_OBJS,SIM_RUN_OBJS): New variables.
215 (SIM_EXTRA_CFLAGS): New variable.
216 (clean-extra): Clean up igen files.
217 (../igen/igen,clean-igen,tmp-igen): New rules.
218 * configure.in: Add support for common framework via
220 * configure: Regenerate.
221 * interp.c: #include sim-main if WITH_COMMON, not mn10300_sim.h.
222 (hash,dispatch,sim_size): Don't compile if ! WITH_COMMON.
223 (init_system,sim_write,compare_simops): Likewise.
224 (sim_set_profile,sim_set_profile_size): Likewise.
225 (sim_stop,sim_resume,sim_trace,sim_info): Likewise.
226 (sim_set_callbacks,sim_stop_reason,sim_read,sim_load): Likewise.
227 (enum interrupt_type): New enum.
228 (interrupt_names): New global.
229 (do_interrupt): New function.
230 (sim_open): Define differently if WITH_COMMON.
231 (sim_close,sim_create_inferior,sim_do_command): Likewise.
232 * mn10300_sim.h ({load,store}_{byte,half,word}): Define versions
234 * mn10300.igen: New file.
235 * mn10300.dc: New file.
236 * op_utils.c: New file.
237 * sim-main.h: New file.
241 * configure: Regenerated to track ../common/aclocal.m4 changes.
245 * simops.c (inc): Fix typo.
249 * simops.c (signed multiply instructions): Cast input operands to
250 signed32 before casting them to signed64 so that the sign bit
251 is propagated properly.
255 * Makefile.in: Last change was bad. Define NL_TARGET
256 so that targ-vals.h will be used instead of syscall.h.
257 * simops.c: Use targ-vals.h instead of syscall.h.
258 (OP_F020): Disable unsupported system calls.
262 * Makefile.in: Get header files from libgloss/mn10300/sys.
266 * simops.c: Include sim-types.h.
270 * simops.c (multiply instructions): Cast input operands to a
271 signed64/unsigned64 type as appropriate.
275 * interp.c (sim_store_register, sim_fetch_register): Pass in
276 length parameter. Return -1.
280 * configure: Regenerated to track ../common/aclocal.m4 changes.
284 * configure: Regenerated to track ../common/aclocal.m4 changes.
286 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
288 * configure: Regenerated to track ../common/aclocal.m4 changes.
292 * configure: Regenerated to track ../common/aclocal.m4 changes.
297 * configure: Regenerated to track ../common/aclocal.m4 changes.
301 * simops.c (call:16 call:32): Stack adjustment is determined solely
306 * interp.c (sim_load): Pass lma_p and sim_write args to
311 * simops.c: Correctly handle register restores for "ret" and "retf"
316 * configure: Regenerated to track ../common/aclocal.m4 changes.
320 * configure: Regenerated to track ../common/aclocal.m4 changes.
324 * configure: Regenerated to track ../common/aclocal.m4 changes.
328 * configure: Regenerated to track ../common/aclocal.m4 changes.
332 * configure: Regenerated to track ../common/aclocal.m4 changes.
336 * configure: Regenerated to track ../common/aclocal.m4 changes.
338 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
340 * configure: Regenerated to track ../common/aclocal.m4 changes.
344 * configure: Regenerated to track ../common/aclocal.m4 changes.
349 * interp.c (sim_kill): Delete.
350 (sim_create_inferior): Add ABFD argument.
351 (sim_load): Move setting of PC from here.
352 (sim_create_inferior): To here.
356 * configure: Regenerated to track ../common/aclocal.m4 changes.
361 * interp.c (sim_open): Add ABFD argument.
365 * interp.c (sim_resume): Clear State.exited.
366 (sim_stop_reason): If State.exited is nonzero, then indicate that
367 the simulator exited instead of stopped.
368 * mn10300_sim.h (struct _state): Add exited field.
369 * simops.c (syscall): Set State.exited for SYS_exit.
373 * simops.c: Fix thinko in last change.
377 * simops.c: "call" stores the callee saved registers into the
378 stack! Update the stack pointer properly when done with
381 * simops.c: Fix return address computation for "call" instructions.
385 * interp.c (sim_open): Fix typo.
389 * interp.c (sim_resume): Add missing case in big switch
390 statement (for extb instruction).
394 * interp.c: Replace all references to load_mem and store_mem
395 with references to load_byte, load_half, load_3_byte, load_word
396 and store_byte, store_half, store_3_byte, store_word.
397 (INLINE): Delete definition.
398 (load_mem_big): Likewise.
399 (max_mem): Make it global.
400 (dispatch): Make this function inline.
401 (load_mem, store_mem): Delete functions.
402 * mn10300_sim.h (INLINE): Define.
403 (RLW): Delete unused definition.
404 (load_mem, store_mem): Delete declarations.
405 (load_mem_big): New definition.
406 (load_byte, load_half, load_3_byte, load_word): New functions.
407 (store_byte, store_half, store_3_byte, store_word): New functions.
408 * simops.c: Replace all references to load_mem and store_mem
409 with references to load_byte, load_half, load_3_byte, load_word
410 and store_byte, store_half, store_3_byte, store_word.
414 * interp.c (sim_open): Add callback to arguments.
415 (sim_set_callbacks): Delete SIM_DESC argument.
419 * interp.c (dispatch): Make this an inline function.
421 * simops.c (syscall): Use callback->write regardless of
422 what file descriptor we're writing too.
426 * interp.c (load_mem_big): Remove function. It's now a macro
428 (compare_simops): New function.
429 (sim_open): Sort the Simops table before inserting entries
431 * mn10300_sim.h: Remove unused #defines.
432 (load_mem_big): Define.
436 * interp.c (load_mem): If we get a load from an out of range
438 (store_mem): Likewise for stores.
439 (max_mem): New variable.
443 * mn10300_sim.h: Fix ordering of bits in the PSW.
445 * interp.c: Improve hashing routine to avoid long list
446 traversals for common instructions. Add HASH_STAT support.
447 Rewrite opcode dispatch code using a big switch instead of
448 cascaded if/else statements. Avoid useless calls to load_mem.
452 * mn10300_sim.h (struct _state): Add space for mdrq register.
454 * simops.c: Don't abort for trap. Add support for the extended
455 instructions, "getx", "putx", "mulq", "mulqu", "sat16", "sat24",
460 * configure: Regenerated to track ../common/aclocal.m4 changes.
464 * interp.c (sim_stop): Add stub function.
468 * Makefile.in (SIM_OBJS): Add sim-load.o.
469 * interp.c (sim_kind, myname): New static locals.
470 (sim_open): Set sim_kind, myname. Ignore -E arg.
471 (sim_load): Return SIM_RC. New arg abfd. Call sim_load_file to
472 load file into simulator. Set start address from bfd.
473 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
477 * simops.c (OP_F020): SYS_execv, SYS_time, SYS_times, SYS_utime
478 only include if implemented by host.
479 (OP_F020): Typecast arg passed to time function;
483 * simops.c (syscall): Handle new mn10300 calling conventions.
487 * configure: Regenerated to track ../common/aclocal.m4 changes.
492 * Makefile.in: Change mn10300-opc.o to m10300-opc.o, to match
493 corresponding change in opcodes directory.
497 * interp.c (sim_open): New arg `kind'.
499 * configure: Regenerated to track ../common/aclocal.m4 changes.
503 * configure: Regenerated to track ../common/aclocal.m4 changes.
507 * simops.c: Fix register extraction for a two "movbu" variants.
508 Somewhat simplify "sub" instructions.
509 Correctly sign extend operands for "mul". Put the correct
510 half of the result in MDR for "mul" and "mulu".
511 Implement remaining instructions.
512 Tweak opcode for "syscall".
516 * simops.c: Do syscall emulation in "syscall" instruction. Add
517 dummy "trap" instruction.
521 * configure: Regenerated to track ../common/aclocal.m4 changes.
525 * configure: Re-generate.
529 * configure: Regenerate to track ../common/aclocal.m4 changes.
533 * interp.c (sim_open): New SIM_DESC result. Argument is now
535 (other sim_*): New SIM_DESC argument.
539 * simops.c: Fix carry bit computation for "add" instructions.
541 * simops.c: Fix typos in bset insns. Fix arguments to store_mem
542 for bset imm8,(d8,an) and bclr imm8,(d8,an).
546 * simops.c: Fix register references when computing Z and N bits
551 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
552 COMMON_{PRE,POST}_CONFIG_FRAG instead.
553 * configure.in: sinclude ../common/aclocal.m4.
554 * configure: Regenerated.
558 * interp.c (init_system): Allocate 2^19 bytes of space for the
563 * configure configure.in Makefile.in: Update to new configure
564 scheme which is more compatible with WinGDB builds.
565 * configure.in: Improve comment on how to run autoconf.
566 * configure: Re-run autoconf to get new ../common/aclocal.m4.
567 * Makefile.in: Use autoconf substitution to install common
572 * simops.c: Undo last change to "rol" and "ror", original code
577 * simops.c: Fix "rol" and "ror".
581 * simops.c: Fix typo in last change.
585 * simops.c: Use REG macros in few places not using them yet.
589 * mn10300_sim.h (struct _state): Fix number of registers!
593 * mn10300_sim.h (struct _state): Put all registers into a single
594 array to make gdb implementation easier.
595 (REG_*): Add definitions for all registers in the state array.
596 (SEXT32, SEXT40, SEXT44, SEXT60): Remove unused macros.
597 * simops.c: Related changes.
601 * interp.c (sim_resume): Handle 0xff as a single byte insn.
603 * simops.c: Fix overflow computation for "add" and "inc"
608 * simops.c: Handle "break" instruction.
610 * simops.c: Fix restoring the PC for "ret" and "retf" instructions.
614 * gencode.c (write_opcodes): Also write out the format of the
616 * mn10300_sim.h (simops): Add "format" field.
617 * interp.c (sim_resume): Deal with endianness issues here.
621 * simops.c (REG0_4): Define.
622 Use REG0_4 for indexed loads/stores.
626 * simops.c (REG0_16): Fix typo.
630 * simops.c: Call abort for any instruction that's not currently
633 * simops.c: Define accessor macros to extract register
634 values from instructions. Use them consistently.
636 * interp.c: Delete unused global variable "OP".
637 (sim_resume): Remove unused variable "opcode".
638 * simops.c: Fix some uninitialized variable problems, add
639 parens to fix various -Wall warnings.
641 * gencode.c (write_header): Add "insn" and "extension" arguments
642 to the OP_* declarations.
643 (write_template): Similarly for function templates.
644 * interp.c (insn, extension): Remove global variables. Instead
645 pass them as arguments to the OP_* functions.
646 * mn10300_sim.h: Remove decls for "insn" and "extension".
647 * simops.c (OP_*): Accept "insn" and "extension" as arguments
648 instead of using globals.
652 * simops.c: Fix typos in "mov am,(d16,an)" and "mov am,(d32,an)"
654 * simops.c: Fix thinkos in last change to "inc dn".
658 * simops.c: "add imm,sp" does not effect the condition codes.
659 "inc dn" does effect the condition codes.
663 * simops.c: Treat both operands as signed values for
666 * simops.c: Fix simulation of division instructions.
667 Fix typos/thinkos in several "cmp" and "sub" instructions.
671 * simops.c: Fix carry bit handling in "sub" and "cmp"
674 * simops.c: Fix "mov imm8,an" and "mov imm16,dn".
678 * simops.c: Fix overflow computation for many instructions.
680 * simops.c: Fix "mov dm, an", "movbu dm, (an)", and "movhu dm, (an)".
682 * simops.c: Fix "mov am, dn".
684 * simops.c: Fix more bugs in "add imm,an" and
689 * simops.c: Fix bugs in "movm" and "add imm,an".
691 * simops.c: Don't lose the upper 24 bits of the return
692 pointer in "call" and "calls" instructions. Rough cut
693 at emulated system calls.
695 * simops.c: Implement the remaining 5, 6 and 7 byte instructions.
697 * simops.c: Implement remaining 4 byte instructions.
699 * simops.c: Implement remaining 3 byte instructions.
701 * simops.c: Implement remaining 2 byte instructions. Call
702 abort for instructions we're not implementing now.
706 * simops.c: Implement lots of random instructions.
708 * simops.c: Implement "movm" and "bCC" insns.
710 * mn10300_sim.h (_state): Add another register (MDR).
712 * simops.c: Implement "cmp", "calls", "rets", "jmp" and
713 a few additional random insns.
715 * mn10300_sim.h (PSW_*): Define for CC status tracking.
716 (REG_D0, REG_A0, REG_SP): Define.
717 * simops.c: Implement "add", "addc" and a few other random
720 * gencode.c, interp.c: Snapshot current simulator code.
724 * Makefile.in, config.in, configure, configure.in: New files.
725 * gencode.c, interp.c, mn10300_sim.h, simops.c: New files.