1 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
3 * configure: Regenerated to track ../common/aclocal.m4 changes.
8 * acconfig.h: New file.
9 * configure.in: Reverted change of Apr 24; use sinclude again.
11 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
13 * configure: Regenerated to track ../common/aclocal.m4 changes.
18 * configure.in: Don't call sinclude.
22 * mn10300_sim.h: Declare all functions in op_utils.c using
25 * sim-main.c: New file. Include op_utils.c.
27 * mn10300.igen (mov, cmp): Use new igen operators `!' and `=' to
28 differentiate between MOV/CMP immediate/register instructions.
30 * configure.in (SIM_AC_OPTION_INLINE): Add and enable.
31 * configure: Regenerate.
35 * configure: Regenerated to track ../common/aclocal.m4 changes.
40 * interp.c (hw): Delete variable, moved to SIM_DESC.
41 (sim_open): Delete calls to hw_tree_create, hw_tree_finish.
42 Handled by sim-module.
43 (sim_open): Do not anotate tree with trace properties, handled by
45 (sim_open): Call sim_hw_parse instead of hw_tree_parse.
47 * configure: Regenerated to track ../common/aclocal.m4 changes.
53 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Save the entire PC
54 on the stack when delivering interrupts (not just the lower
56 * mn10300.igen (mov (Di,Am),Dn): Fix decode. Registers were
57 specified in the wrong order.
63 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Stop loss of
64 succeeding interrupts, clear pending_handler when the handler
70 * Makefile.in (tmp-igen): Prefix all usage of move-if-change
71 script with $(SHELL) to make NT native builds happy.
72 * configure: Regenerate because of change to ../common/aclocal.m4.
76 * configure.in: Make --enable-sim-common the default.
77 * configure: Re-generate.
79 * sim-main.h (CIA_GET, CIA_SET): Save/restore current instruction
80 address into Sate.regs[REG_PC] instead of common struct.
84 * mn10300.igen (cmp imm8,An): Do not sign extend imm8 value.
88 * simops.c (OP_F0FD): Initialise variable 'sp'.
93 * dv-mn103int.c (decode_group): A group register every 4 bytes not
95 (write_icr): Rewrite equation updating request field.
96 (read_iagr): Fix check that interrupt is still pending.
102 * interp.c (sim_open): Tidy up device creation.
104 * dv-mn103int.c (mn103int_port_event): Drive NMI with non-zero
106 (mn103int_io_read_buffer): Convert absolute address to register
108 (read_icr, write_icr): Convert block offset into group offset.
113 * interp.c (sim_open): Create second 1mb memory region at
115 (sim_open): Create a device tree.
118 (do_interrupt): Delete, needs to use dv-mn103cpu.c
120 * dv-mn103int.c, dv-mn103cpu.c: New files.
125 * mn10300_sim.h (EXTRACT_PSW_LM, INSERT_PSW_LM, PSW_IE, PSW_LM):
131 * configure: Regenerated to track ../common/aclocal.m4 changes.
135 * interp.c (sim-options.h): Include.
136 (sim_kind, myname): Declare when not using common framework.
138 * mn10300_sim.h (do_syscall, generic*): Provide prototypes for
139 functions found in op_utils.c
141 * mn10300.igen (add): Discard unused variables.
143 * configure, config.in: Re-generate with autoconf 2.12.1.
147 Add support for --enable-sim-common option.
148 * Makefile.in (WITHOUT_COMMON_OBJS): Files included if
149 ! --enable-sim-common
150 (WITH_COMMON_OBJS): Files included if --enable-sim-common.
151 (MN10300_OBJS,MN10300_INTERP_DEP): New variables.
153 ({WITHOUT,WITH}_COMMON_RUN_OBJS,SIM_RUN_OBJS): New variables.
154 (SIM_EXTRA_CFLAGS): New variable.
155 (clean-extra): Clean up igen files.
156 (../igen/igen,clean-igen,tmp-igen): New rules.
157 * configure.in: Add support for common framework via
159 * configure: Regenerate.
160 * interp.c: #include sim-main if WITH_COMMON, not mn10300_sim.h.
161 (hash,dispatch,sim_size): Don't compile if ! WITH_COMMON.
162 (init_system,sim_write,compare_simops): Likewise.
163 (sim_set_profile,sim_set_profile_size): Likewise.
164 (sim_stop,sim_resume,sim_trace,sim_info): Likewise.
165 (sim_set_callbacks,sim_stop_reason,sim_read,sim_load): Likewise.
166 (enum interrupt_type): New enum.
167 (interrupt_names): New global.
168 (do_interrupt): New function.
169 (sim_open): Define differently if WITH_COMMON.
170 (sim_close,sim_create_inferior,sim_do_command): Likewise.
171 * mn10300_sim.h ({load,store}_{byte,half,word}): Define versions
173 * mn10300.igen: New file.
174 * mn10300.dc: New file.
175 * op_utils.c: New file.
176 * sim-main.h: New file.
180 * configure: Regenerated to track ../common/aclocal.m4 changes.
184 * simops.c (inc): Fix typo.
188 * simops.c (signed multiply instructions): Cast input operands to
189 signed32 before casting them to signed64 so that the sign bit
190 is propagated properly.
194 * Makefile.in: Last change was bad. Define NL_TARGET
195 so that targ-vals.h will be used instead of syscall.h.
196 * simops.c: Use targ-vals.h instead of syscall.h.
197 (OP_F020): Disable unsupported system calls.
201 * Makefile.in: Get header files from libgloss/mn10300/sys.
205 * simops.c: Include sim-types.h.
209 * simops.c (multiply instructions): Cast input operands to a
210 signed64/unsigned64 type as appropriate.
214 * interp.c (sim_store_register, sim_fetch_register): Pass in
215 length parameter. Return -1.
219 * configure: Regenerated to track ../common/aclocal.m4 changes.
223 * configure: Regenerated to track ../common/aclocal.m4 changes.
225 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
227 * configure: Regenerated to track ../common/aclocal.m4 changes.
231 * configure: Regenerated to track ../common/aclocal.m4 changes.
236 * configure: Regenerated to track ../common/aclocal.m4 changes.
240 * simops.c (call:16 call:32): Stack adjustment is determined solely
245 * interp.c (sim_load): Pass lma_p and sim_write args to
250 * simops.c: Correctly handle register restores for "ret" and "retf"
255 * configure: Regenerated to track ../common/aclocal.m4 changes.
259 * configure: Regenerated to track ../common/aclocal.m4 changes.
263 * configure: Regenerated to track ../common/aclocal.m4 changes.
267 * configure: Regenerated to track ../common/aclocal.m4 changes.
271 * configure: Regenerated to track ../common/aclocal.m4 changes.
275 * configure: Regenerated to track ../common/aclocal.m4 changes.
277 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
279 * configure: Regenerated to track ../common/aclocal.m4 changes.
283 * configure: Regenerated to track ../common/aclocal.m4 changes.
288 * interp.c (sim_kill): Delete.
289 (sim_create_inferior): Add ABFD argument.
290 (sim_load): Move setting of PC from here.
291 (sim_create_inferior): To here.
295 * configure: Regenerated to track ../common/aclocal.m4 changes.
300 * interp.c (sim_open): Add ABFD argument.
304 * interp.c (sim_resume): Clear State.exited.
305 (sim_stop_reason): If State.exited is nonzero, then indicate that
306 the simulator exited instead of stopped.
307 * mn10300_sim.h (struct _state): Add exited field.
308 * simops.c (syscall): Set State.exited for SYS_exit.
312 * simops.c: Fix thinko in last change.
316 * simops.c: "call" stores the callee saved registers into the
317 stack! Update the stack pointer properly when done with
320 * simops.c: Fix return address computation for "call" instructions.
324 * interp.c (sim_open): Fix typo.
328 * interp.c (sim_resume): Add missing case in big switch
329 statement (for extb instruction).
333 * interp.c: Replace all references to load_mem and store_mem
334 with references to load_byte, load_half, load_3_byte, load_word
335 and store_byte, store_half, store_3_byte, store_word.
336 (INLINE): Delete definition.
337 (load_mem_big): Likewise.
338 (max_mem): Make it global.
339 (dispatch): Make this function inline.
340 (load_mem, store_mem): Delete functions.
341 * mn10300_sim.h (INLINE): Define.
342 (RLW): Delete unused definition.
343 (load_mem, store_mem): Delete declarations.
344 (load_mem_big): New definition.
345 (load_byte, load_half, load_3_byte, load_word): New functions.
346 (store_byte, store_half, store_3_byte, store_word): New functions.
347 * simops.c: Replace all references to load_mem and store_mem
348 with references to load_byte, load_half, load_3_byte, load_word
349 and store_byte, store_half, store_3_byte, store_word.
353 * interp.c (sim_open): Add callback to arguments.
354 (sim_set_callbacks): Delete SIM_DESC argument.
358 * interp.c (dispatch): Make this an inline function.
360 * simops.c (syscall): Use callback->write regardless of
361 what file descriptor we're writing too.
365 * interp.c (load_mem_big): Remove function. It's now a macro
367 (compare_simops): New function.
368 (sim_open): Sort the Simops table before inserting entries
370 * mn10300_sim.h: Remove unused #defines.
371 (load_mem_big): Define.
375 * interp.c (load_mem): If we get a load from an out of range
377 (store_mem): Likewise for stores.
378 (max_mem): New variable.
382 * mn10300_sim.h: Fix ordering of bits in the PSW.
384 * interp.c: Improve hashing routine to avoid long list
385 traversals for common instructions. Add HASH_STAT support.
386 Rewrite opcode dispatch code using a big switch instead of
387 cascaded if/else statements. Avoid useless calls to load_mem.
391 * mn10300_sim.h (struct _state): Add space for mdrq register.
393 * simops.c: Don't abort for trap. Add support for the extended
394 instructions, "getx", "putx", "mulq", "mulqu", "sat16", "sat24",
399 * configure: Regenerated to track ../common/aclocal.m4 changes.
403 * interp.c (sim_stop): Add stub function.
407 * Makefile.in (SIM_OBJS): Add sim-load.o.
408 * interp.c (sim_kind, myname): New static locals.
409 (sim_open): Set sim_kind, myname. Ignore -E arg.
410 (sim_load): Return SIM_RC. New arg abfd. Call sim_load_file to
411 load file into simulator. Set start address from bfd.
412 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
416 * simops.c (OP_F020): SYS_execv, SYS_time, SYS_times, SYS_utime
417 only include if implemented by host.
418 (OP_F020): Typecast arg passed to time function;
422 * simops.c (syscall): Handle new mn10300 calling conventions.
426 * configure: Regenerated to track ../common/aclocal.m4 changes.
431 * Makefile.in: Change mn10300-opc.o to m10300-opc.o, to match
432 corresponding change in opcodes directory.
436 * interp.c (sim_open): New arg `kind'.
438 * configure: Regenerated to track ../common/aclocal.m4 changes.
442 * configure: Regenerated to track ../common/aclocal.m4 changes.
446 * simops.c: Fix register extraction for a two "movbu" variants.
447 Somewhat simplify "sub" instructions.
448 Correctly sign extend operands for "mul". Put the correct
449 half of the result in MDR for "mul" and "mulu".
450 Implement remaining instructions.
451 Tweak opcode for "syscall".
455 * simops.c: Do syscall emulation in "syscall" instruction. Add
456 dummy "trap" instruction.
460 * configure: Regenerated to track ../common/aclocal.m4 changes.
464 * configure: Re-generate.
468 * configure: Regenerate to track ../common/aclocal.m4 changes.
472 * interp.c (sim_open): New SIM_DESC result. Argument is now
474 (other sim_*): New SIM_DESC argument.
478 * simops.c: Fix carry bit computation for "add" instructions.
480 * simops.c: Fix typos in bset insns. Fix arguments to store_mem
481 for bset imm8,(d8,an) and bclr imm8,(d8,an).
485 * simops.c: Fix register references when computing Z and N bits
490 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
491 COMMON_{PRE,POST}_CONFIG_FRAG instead.
492 * configure.in: sinclude ../common/aclocal.m4.
493 * configure: Regenerated.
497 * interp.c (init_system): Allocate 2^19 bytes of space for the
502 * configure configure.in Makefile.in: Update to new configure
503 scheme which is more compatible with WinGDB builds.
504 * configure.in: Improve comment on how to run autoconf.
505 * configure: Re-run autoconf to get new ../common/aclocal.m4.
506 * Makefile.in: Use autoconf substitution to install common
511 * simops.c: Undo last change to "rol" and "ror", original code
516 * simops.c: Fix "rol" and "ror".
520 * simops.c: Fix typo in last change.
524 * simops.c: Use REG macros in few places not using them yet.
528 * mn10300_sim.h (struct _state): Fix number of registers!
532 * mn10300_sim.h (struct _state): Put all registers into a single
533 array to make gdb implementation easier.
534 (REG_*): Add definitions for all registers in the state array.
535 (SEXT32, SEXT40, SEXT44, SEXT60): Remove unused macros.
536 * simops.c: Related changes.
540 * interp.c (sim_resume): Handle 0xff as a single byte insn.
542 * simops.c: Fix overflow computation for "add" and "inc"
547 * simops.c: Handle "break" instruction.
549 * simops.c: Fix restoring the PC for "ret" and "retf" instructions.
553 * gencode.c (write_opcodes): Also write out the format of the
555 * mn10300_sim.h (simops): Add "format" field.
556 * interp.c (sim_resume): Deal with endianness issues here.
560 * simops.c (REG0_4): Define.
561 Use REG0_4 for indexed loads/stores.
565 * simops.c (REG0_16): Fix typo.
569 * simops.c: Call abort for any instruction that's not currently
572 * simops.c: Define accessor macros to extract register
573 values from instructions. Use them consistently.
575 * interp.c: Delete unused global variable "OP".
576 (sim_resume): Remove unused variable "opcode".
577 * simops.c: Fix some uninitialized variable problems, add
578 parens to fix various -Wall warnings.
580 * gencode.c (write_header): Add "insn" and "extension" arguments
581 to the OP_* declarations.
582 (write_template): Similarly for function templates.
583 * interp.c (insn, extension): Remove global variables. Instead
584 pass them as arguments to the OP_* functions.
585 * mn10300_sim.h: Remove decls for "insn" and "extension".
586 * simops.c (OP_*): Accept "insn" and "extension" as arguments
587 instead of using globals.
591 * simops.c: Fix typos in "mov am,(d16,an)" and "mov am,(d32,an)"
593 * simops.c: Fix thinkos in last change to "inc dn".
597 * simops.c: "add imm,sp" does not effect the condition codes.
598 "inc dn" does effect the condition codes.
602 * simops.c: Treat both operands as signed values for
605 * simops.c: Fix simulation of division instructions.
606 Fix typos/thinkos in several "cmp" and "sub" instructions.
610 * simops.c: Fix carry bit handling in "sub" and "cmp"
613 * simops.c: Fix "mov imm8,an" and "mov imm16,dn".
617 * simops.c: Fix overflow computation for many instructions.
619 * simops.c: Fix "mov dm, an", "movbu dm, (an)", and "movhu dm, (an)".
621 * simops.c: Fix "mov am, dn".
623 * simops.c: Fix more bugs in "add imm,an" and
628 * simops.c: Fix bugs in "movm" and "add imm,an".
630 * simops.c: Don't lose the upper 24 bits of the return
631 pointer in "call" and "calls" instructions. Rough cut
632 at emulated system calls.
634 * simops.c: Implement the remaining 5, 6 and 7 byte instructions.
636 * simops.c: Implement remaining 4 byte instructions.
638 * simops.c: Implement remaining 3 byte instructions.
640 * simops.c: Implement remaining 2 byte instructions. Call
641 abort for instructions we're not implementing now.
645 * simops.c: Implement lots of random instructions.
647 * simops.c: Implement "movm" and "bCC" insns.
649 * mn10300_sim.h (_state): Add another register (MDR).
651 * simops.c: Implement "cmp", "calls", "rets", "jmp" and
652 a few additional random insns.
654 * mn10300_sim.h (PSW_*): Define for CC status tracking.
655 (REG_D0, REG_A0, REG_SP): Define.
656 * simops.c: Implement "add", "addc" and a few other random
659 * gencode.c, interp.c: Snapshot current simulator code.
663 * Makefile.in, config.in, configure, configure.in: New files.
664 * gencode.c, interp.c, mn10300_sim.h, simops.c: New files.