3 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Stop loss of
4 succeeding interrupts, clear pending_handler when the handler
9 * Makefile.in (tmp-igen): Prefix all usage of move-if-change
10 script with $(SHELL) to make NT native builds happy.
11 * configure: Regenerate because of change to ../common/aclocal.m4.
15 * configure.in: Make --enable-sim-common the default.
16 * configure: Re-generate.
18 * sim-main.h (CIA_GET, CIA_SET): Save/restore current instruction
19 address into Sate.regs[REG_PC] instead of common struct.
23 * mn10300.igen (cmp imm8,An): Do not sign extend imm8 value.
27 * simops.c (OP_F0FD): Initialise variable 'sp'.
31 * dv-mn103int.c (decode_group): A group register every 4 bytes not
33 (write_icr): Rewrite equation updating request field.
34 (read_iagr): Fix check that interrupt is still pending.
38 * interp.c (sim_open): Tidy up device creation.
40 * dv-mn103int.c (mn103int_port_event): Drive NMI with non-zero
42 (mn103int_io_read_buffer): Convert absolute address to register
44 (read_icr, write_icr): Convert block offset into group offset.
48 * interp.c (sim_open): Create second 1mb memory region at
50 (sim_open): Create a device tree.
52 (do_interrupt): Delete, needs to use dv-mn103cpu.c
54 * dv-mn103int.c, dv-mn103cpu.c: New files.
58 * mn10300_sim.h (EXTRACT_PSW_LM, INSERT_PSW_LM, PSW_IE, PSW_LM):
64 * configure: Regenerated to track ../common/aclocal.m4 changes.
68 * interp.c (sim-options.h): Include.
69 (sim_kind, myname): Declare when not using common framework.
71 * mn10300_sim.h (do_syscall, generic*): Provide prototypes for
72 functions found in op_utils.c
74 * mn10300.igen (add): Discard unused variables.
76 * configure, config.in: Re-generate with autoconf 2.12.1.
80 Add support for --enable-sim-common option.
81 * Makefile.in (WITHOUT_COMMON_OBJS): Files included if
83 (WITH_COMMON_OBJS): Files included if --enable-sim-common.
84 (MN10300_OBJS,MN10300_INTERP_DEP): New variables.
86 ({WITHOUT,WITH}_COMMON_RUN_OBJS,SIM_RUN_OBJS): New variables.
87 (SIM_EXTRA_CFLAGS): New variable.
88 (clean-extra): Clean up igen files.
89 (../igen/igen,clean-igen,tmp-igen): New rules.
90 * configure.in: Add support for common framework via
92 * configure: Regenerate.
93 * interp.c: #include sim-main if WITH_COMMON, not mn10300_sim.h.
94 (hash,dispatch,sim_size): Don't compile if ! WITH_COMMON.
95 (init_system,sim_write,compare_simops): Likewise.
96 (sim_set_profile,sim_set_profile_size): Likewise.
97 (sim_stop,sim_resume,sim_trace,sim_info): Likewise.
98 (sim_set_callbacks,sim_stop_reason,sim_read,sim_load): Likewise.
99 (enum interrupt_type): New enum.
100 (interrupt_names): New global.
101 (do_interrupt): New function.
102 (sim_open): Define differently if WITH_COMMON.
103 (sim_close,sim_create_inferior,sim_do_command): Likewise.
104 * mn10300_sim.h ({load,store}_{byte,half,word}): Define versions
106 * mn10300.igen: New file.
107 * mn10300.dc: New file.
108 * op_utils.c: New file.
109 * sim-main.h: New file.
113 * configure: Regenerated to track ../common/aclocal.m4 changes.
117 * simops.c (inc): Fix typo.
121 * simops.c (signed multiply instructions): Cast input operands to
122 signed32 before casting them to signed64 so that the sign bit
123 is propagated properly.
127 * Makefile.in: Last change was bad. Define NL_TARGET
128 so that targ-vals.h will be used instead of syscall.h.
129 * simops.c: Use targ-vals.h instead of syscall.h.
130 (OP_F020): Disable unsupported system calls.
134 * Makefile.in: Get header files from libgloss/mn10300/sys.
138 * simops.c: Include sim-types.h.
142 * simops.c (multiply instructions): Cast input operands to a
143 signed64/unsigned64 type as appropriate.
147 * interp.c (sim_store_register, sim_fetch_register): Pass in
148 length parameter. Return -1.
152 * configure: Regenerated to track ../common/aclocal.m4 changes.
156 * configure: Regenerated to track ../common/aclocal.m4 changes.
158 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
160 * configure: Regenerated to track ../common/aclocal.m4 changes.
164 * configure: Regenerated to track ../common/aclocal.m4 changes.
169 * configure: Regenerated to track ../common/aclocal.m4 changes.
173 * simops.c (call:16 call:32): Stack adjustment is determined solely
178 * interp.c (sim_load): Pass lma_p and sim_write args to
183 * simops.c: Correctly handle register restores for "ret" and "retf"
188 * configure: Regenerated to track ../common/aclocal.m4 changes.
192 * configure: Regenerated to track ../common/aclocal.m4 changes.
196 * configure: Regenerated to track ../common/aclocal.m4 changes.
200 * configure: Regenerated to track ../common/aclocal.m4 changes.
204 * configure: Regenerated to track ../common/aclocal.m4 changes.
208 * configure: Regenerated to track ../common/aclocal.m4 changes.
210 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
212 * configure: Regenerated to track ../common/aclocal.m4 changes.
216 * configure: Regenerated to track ../common/aclocal.m4 changes.
221 * interp.c (sim_kill): Delete.
222 (sim_create_inferior): Add ABFD argument.
223 (sim_load): Move setting of PC from here.
224 (sim_create_inferior): To here.
228 * configure: Regenerated to track ../common/aclocal.m4 changes.
233 * interp.c (sim_open): Add ABFD argument.
237 * interp.c (sim_resume): Clear State.exited.
238 (sim_stop_reason): If State.exited is nonzero, then indicate that
239 the simulator exited instead of stopped.
240 * mn10300_sim.h (struct _state): Add exited field.
241 * simops.c (syscall): Set State.exited for SYS_exit.
245 * simops.c: Fix thinko in last change.
249 * simops.c: "call" stores the callee saved registers into the
250 stack! Update the stack pointer properly when done with
253 * simops.c: Fix return address computation for "call" instructions.
257 * interp.c (sim_open): Fix typo.
261 * interp.c (sim_resume): Add missing case in big switch
262 statement (for extb instruction).
266 * interp.c: Replace all references to load_mem and store_mem
267 with references to load_byte, load_half, load_3_byte, load_word
268 and store_byte, store_half, store_3_byte, store_word.
269 (INLINE): Delete definition.
270 (load_mem_big): Likewise.
271 (max_mem): Make it global.
272 (dispatch): Make this function inline.
273 (load_mem, store_mem): Delete functions.
274 * mn10300_sim.h (INLINE): Define.
275 (RLW): Delete unused definition.
276 (load_mem, store_mem): Delete declarations.
277 (load_mem_big): New definition.
278 (load_byte, load_half, load_3_byte, load_word): New functions.
279 (store_byte, store_half, store_3_byte, store_word): New functions.
280 * simops.c: Replace all references to load_mem and store_mem
281 with references to load_byte, load_half, load_3_byte, load_word
282 and store_byte, store_half, store_3_byte, store_word.
286 * interp.c (sim_open): Add callback to arguments.
287 (sim_set_callbacks): Delete SIM_DESC argument.
291 * interp.c (dispatch): Make this an inline function.
293 * simops.c (syscall): Use callback->write regardless of
294 what file descriptor we're writing too.
298 * interp.c (load_mem_big): Remove function. It's now a macro
300 (compare_simops): New function.
301 (sim_open): Sort the Simops table before inserting entries
303 * mn10300_sim.h: Remove unused #defines.
304 (load_mem_big): Define.
308 * interp.c (load_mem): If we get a load from an out of range
310 (store_mem): Likewise for stores.
311 (max_mem): New variable.
315 * mn10300_sim.h: Fix ordering of bits in the PSW.
317 * interp.c: Improve hashing routine to avoid long list
318 traversals for common instructions. Add HASH_STAT support.
319 Rewrite opcode dispatch code using a big switch instead of
320 cascaded if/else statements. Avoid useless calls to load_mem.
324 * mn10300_sim.h (struct _state): Add space for mdrq register.
326 * simops.c: Don't abort for trap. Add support for the extended
327 instructions, "getx", "putx", "mulq", "mulqu", "sat16", "sat24",
332 * configure: Regenerated to track ../common/aclocal.m4 changes.
336 * interp.c (sim_stop): Add stub function.
340 * Makefile.in (SIM_OBJS): Add sim-load.o.
341 * interp.c (sim_kind, myname): New static locals.
342 (sim_open): Set sim_kind, myname. Ignore -E arg.
343 (sim_load): Return SIM_RC. New arg abfd. Call sim_load_file to
344 load file into simulator. Set start address from bfd.
345 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
349 * simops.c (OP_F020): SYS_execv, SYS_time, SYS_times, SYS_utime
350 only include if implemented by host.
351 (OP_F020): Typecast arg passed to time function;
355 * simops.c (syscall): Handle new mn10300 calling conventions.
359 * configure: Regenerated to track ../common/aclocal.m4 changes.
364 * Makefile.in: Change mn10300-opc.o to m10300-opc.o, to match
365 corresponding change in opcodes directory.
369 * interp.c (sim_open): New arg `kind'.
371 * configure: Regenerated to track ../common/aclocal.m4 changes.
375 * configure: Regenerated to track ../common/aclocal.m4 changes.
379 * simops.c: Fix register extraction for a two "movbu" variants.
380 Somewhat simplify "sub" instructions.
381 Correctly sign extend operands for "mul". Put the correct
382 half of the result in MDR for "mul" and "mulu".
383 Implement remaining instructions.
384 Tweak opcode for "syscall".
388 * simops.c: Do syscall emulation in "syscall" instruction. Add
389 dummy "trap" instruction.
393 * configure: Regenerated to track ../common/aclocal.m4 changes.
397 * configure: Re-generate.
401 * configure: Regenerate to track ../common/aclocal.m4 changes.
405 * interp.c (sim_open): New SIM_DESC result. Argument is now
407 (other sim_*): New SIM_DESC argument.
411 * simops.c: Fix carry bit computation for "add" instructions.
413 * simops.c: Fix typos in bset insns. Fix arguments to store_mem
414 for bset imm8,(d8,an) and bclr imm8,(d8,an).
418 * simops.c: Fix register references when computing Z and N bits
423 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
424 COMMON_{PRE,POST}_CONFIG_FRAG instead.
425 * configure.in: sinclude ../common/aclocal.m4.
426 * configure: Regenerated.
430 * interp.c (init_system): Allocate 2^19 bytes of space for the
435 * configure configure.in Makefile.in: Update to new configure
436 scheme which is more compatible with WinGDB builds.
437 * configure.in: Improve comment on how to run autoconf.
438 * configure: Re-run autoconf to get new ../common/aclocal.m4.
439 * Makefile.in: Use autoconf substitution to install common
444 * simops.c: Undo last change to "rol" and "ror", original code
449 * simops.c: Fix "rol" and "ror".
453 * simops.c: Fix typo in last change.
457 * simops.c: Use REG macros in few places not using them yet.
461 * mn10300_sim.h (struct _state): Fix number of registers!
465 * mn10300_sim.h (struct _state): Put all registers into a single
466 array to make gdb implementation easier.
467 (REG_*): Add definitions for all registers in the state array.
468 (SEXT32, SEXT40, SEXT44, SEXT60): Remove unused macros.
469 * simops.c: Related changes.
473 * interp.c (sim_resume): Handle 0xff as a single byte insn.
475 * simops.c: Fix overflow computation for "add" and "inc"
480 * simops.c: Handle "break" instruction.
482 * simops.c: Fix restoring the PC for "ret" and "retf" instructions.
486 * gencode.c (write_opcodes): Also write out the format of the
488 * mn10300_sim.h (simops): Add "format" field.
489 * interp.c (sim_resume): Deal with endianness issues here.
493 * simops.c (REG0_4): Define.
494 Use REG0_4 for indexed loads/stores.
498 * simops.c (REG0_16): Fix typo.
502 * simops.c: Call abort for any instruction that's not currently
505 * simops.c: Define accessor macros to extract register
506 values from instructions. Use them consistently.
508 * interp.c: Delete unused global variable "OP".
509 (sim_resume): Remove unused variable "opcode".
510 * simops.c: Fix some uninitialized variable problems, add
511 parens to fix various -Wall warnings.
513 * gencode.c (write_header): Add "insn" and "extension" arguments
514 to the OP_* declarations.
515 (write_template): Similarly for function templates.
516 * interp.c (insn, extension): Remove global variables. Instead
517 pass them as arguments to the OP_* functions.
518 * mn10300_sim.h: Remove decls for "insn" and "extension".
519 * simops.c (OP_*): Accept "insn" and "extension" as arguments
520 instead of using globals.
524 * simops.c: Fix typos in "mov am,(d16,an)" and "mov am,(d32,an)"
526 * simops.c: Fix thinkos in last change to "inc dn".
530 * simops.c: "add imm,sp" does not effect the condition codes.
531 "inc dn" does effect the condition codes.
535 * simops.c: Treat both operands as signed values for
538 * simops.c: Fix simulation of division instructions.
539 Fix typos/thinkos in several "cmp" and "sub" instructions.
543 * simops.c: Fix carry bit handling in "sub" and "cmp"
546 * simops.c: Fix "mov imm8,an" and "mov imm16,dn".
550 * simops.c: Fix overflow computation for many instructions.
552 * simops.c: Fix "mov dm, an", "movbu dm, (an)", and "movhu dm, (an)".
554 * simops.c: Fix "mov am, dn".
556 * simops.c: Fix more bugs in "add imm,an" and
561 * simops.c: Fix bugs in "movm" and "add imm,an".
563 * simops.c: Don't lose the upper 24 bits of the return
564 pointer in "call" and "calls" instructions. Rough cut
565 at emulated system calls.
567 * simops.c: Implement the remaining 5, 6 and 7 byte instructions.
569 * simops.c: Implement remaining 4 byte instructions.
571 * simops.c: Implement remaining 3 byte instructions.
573 * simops.c: Implement remaining 2 byte instructions. Call
574 abort for instructions we're not implementing now.
578 * simops.c: Implement lots of random instructions.
580 * simops.c: Implement "movm" and "bCC" insns.
582 * mn10300_sim.h (_state): Add another register (MDR).
584 * simops.c: Implement "cmp", "calls", "rets", "jmp" and
585 a few additional random insns.
587 * mn10300_sim.h (PSW_*): Define for CC status tracking.
588 (REG_D0, REG_A0, REG_SP): Define.
589 * simops.c: Implement "add", "addc" and a few other random
592 * gencode.c, interp.c: Snapshot current simulator code.
596 * Makefile.in, config.in, configure, configure.in: New files.
597 * gencode.c, interp.c, mn10300_sim.h, simops.c: New files.