3 * Makefile.in (tmp-igen): Prefix all usage of move-if-change
4 script with $(SHELL) to make NT native builds happy.
5 * configure: Regenerate because of change to ../common/aclocal.m4.
9 * configure.in: Make --enable-sim-common the default.
10 * configure: Re-generate.
12 * sim-main.h (CIA_GET, CIA_SET): Save/restore current instruction
13 address into Sate.regs[REG_PC] instead of common struct.
17 * mn10300.igen (cmp imm8,An): Do not sign extend imm8 value.
21 * simops.c (OP_F0FD): Initialise variable 'sp'.
25 * dv-mn103int.c (decode_group): A group register every 4 bytes not
27 (write_icr): Rewrite equation updating request field.
28 (read_iagr): Fix check that interrupt is still pending.
32 * interp.c (sim_open): Tidy up device creation.
34 * dv-mn103int.c (mn103int_port_event): Drive NMI with non-zero
36 (mn103int_io_read_buffer): Convert absolute address to register
38 (read_icr, write_icr): Convert block offset into group offset.
42 * interp.c (sim_open): Create second 1mb memory region at
44 (sim_open): Create a device tree.
46 (do_interrupt): Delete, needs to use dv-mn103cpu.c
48 * dv-mn103int.c, dv-mn103cpu.c: New files.
52 * mn10300_sim.h (EXTRACT_PSW_LM, INSERT_PSW_LM, PSW_IE, PSW_LM):
58 * configure: Regenerated to track ../common/aclocal.m4 changes.
62 * interp.c (sim-options.h): Include.
63 (sim_kind, myname): Declare when not using common framework.
65 * mn10300_sim.h (do_syscall, generic*): Provide prototypes for
66 functions found in op_utils.c
68 * mn10300.igen (add): Discard unused variables.
70 * configure, config.in: Re-generate with autoconf 2.12.1.
74 Add support for --enable-sim-common option.
75 * Makefile.in (WITHOUT_COMMON_OBJS): Files included if
77 (WITH_COMMON_OBJS): Files included if --enable-sim-common.
78 (MN10300_OBJS,MN10300_INTERP_DEP): New variables.
80 ({WITHOUT,WITH}_COMMON_RUN_OBJS,SIM_RUN_OBJS): New variables.
81 (SIM_EXTRA_CFLAGS): New variable.
82 (clean-extra): Clean up igen files.
83 (../igen/igen,clean-igen,tmp-igen): New rules.
84 * configure.in: Add support for common framework via
86 * configure: Regenerate.
87 * interp.c: #include sim-main if WITH_COMMON, not mn10300_sim.h.
88 (hash,dispatch,sim_size): Don't compile if ! WITH_COMMON.
89 (init_system,sim_write,compare_simops): Likewise.
90 (sim_set_profile,sim_set_profile_size): Likewise.
91 (sim_stop,sim_resume,sim_trace,sim_info): Likewise.
92 (sim_set_callbacks,sim_stop_reason,sim_read,sim_load): Likewise.
93 (enum interrupt_type): New enum.
94 (interrupt_names): New global.
95 (do_interrupt): New function.
96 (sim_open): Define differently if WITH_COMMON.
97 (sim_close,sim_create_inferior,sim_do_command): Likewise.
98 * mn10300_sim.h ({load,store}_{byte,half,word}): Define versions
100 * mn10300.igen: New file.
101 * mn10300.dc: New file.
102 * op_utils.c: New file.
103 * sim-main.h: New file.
107 * configure: Regenerated to track ../common/aclocal.m4 changes.
111 * simops.c (inc): Fix typo.
115 * simops.c (signed multiply instructions): Cast input operands to
116 signed32 before casting them to signed64 so that the sign bit
117 is propagated properly.
121 * Makefile.in: Last change was bad. Define NL_TARGET
122 so that targ-vals.h will be used instead of syscall.h.
123 * simops.c: Use targ-vals.h instead of syscall.h.
124 (OP_F020): Disable unsupported system calls.
128 * Makefile.in: Get header files from libgloss/mn10300/sys.
132 * simops.c: Include sim-types.h.
136 * simops.c (multiply instructions): Cast input operands to a
137 signed64/unsigned64 type as appropriate.
141 * interp.c (sim_store_register, sim_fetch_register): Pass in
142 length parameter. Return -1.
146 * configure: Regenerated to track ../common/aclocal.m4 changes.
150 * configure: Regenerated to track ../common/aclocal.m4 changes.
152 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
154 * configure: Regenerated to track ../common/aclocal.m4 changes.
158 * configure: Regenerated to track ../common/aclocal.m4 changes.
163 * configure: Regenerated to track ../common/aclocal.m4 changes.
167 * simops.c (call:16 call:32): Stack adjustment is determined solely
172 * interp.c (sim_load): Pass lma_p and sim_write args to
177 * simops.c: Correctly handle register restores for "ret" and "retf"
182 * configure: Regenerated to track ../common/aclocal.m4 changes.
186 * configure: Regenerated to track ../common/aclocal.m4 changes.
190 * configure: Regenerated to track ../common/aclocal.m4 changes.
194 * configure: Regenerated to track ../common/aclocal.m4 changes.
198 * configure: Regenerated to track ../common/aclocal.m4 changes.
202 * configure: Regenerated to track ../common/aclocal.m4 changes.
204 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
206 * configure: Regenerated to track ../common/aclocal.m4 changes.
210 * configure: Regenerated to track ../common/aclocal.m4 changes.
215 * interp.c (sim_kill): Delete.
216 (sim_create_inferior): Add ABFD argument.
217 (sim_load): Move setting of PC from here.
218 (sim_create_inferior): To here.
222 * configure: Regenerated to track ../common/aclocal.m4 changes.
227 * interp.c (sim_open): Add ABFD argument.
231 * interp.c (sim_resume): Clear State.exited.
232 (sim_stop_reason): If State.exited is nonzero, then indicate that
233 the simulator exited instead of stopped.
234 * mn10300_sim.h (struct _state): Add exited field.
235 * simops.c (syscall): Set State.exited for SYS_exit.
239 * simops.c: Fix thinko in last change.
243 * simops.c: "call" stores the callee saved registers into the
244 stack! Update the stack pointer properly when done with
247 * simops.c: Fix return address computation for "call" instructions.
251 * interp.c (sim_open): Fix typo.
255 * interp.c (sim_resume): Add missing case in big switch
256 statement (for extb instruction).
260 * interp.c: Replace all references to load_mem and store_mem
261 with references to load_byte, load_half, load_3_byte, load_word
262 and store_byte, store_half, store_3_byte, store_word.
263 (INLINE): Delete definition.
264 (load_mem_big): Likewise.
265 (max_mem): Make it global.
266 (dispatch): Make this function inline.
267 (load_mem, store_mem): Delete functions.
268 * mn10300_sim.h (INLINE): Define.
269 (RLW): Delete unused definition.
270 (load_mem, store_mem): Delete declarations.
271 (load_mem_big): New definition.
272 (load_byte, load_half, load_3_byte, load_word): New functions.
273 (store_byte, store_half, store_3_byte, store_word): New functions.
274 * simops.c: Replace all references to load_mem and store_mem
275 with references to load_byte, load_half, load_3_byte, load_word
276 and store_byte, store_half, store_3_byte, store_word.
280 * interp.c (sim_open): Add callback to arguments.
281 (sim_set_callbacks): Delete SIM_DESC argument.
285 * interp.c (dispatch): Make this an inline function.
287 * simops.c (syscall): Use callback->write regardless of
288 what file descriptor we're writing too.
292 * interp.c (load_mem_big): Remove function. It's now a macro
294 (compare_simops): New function.
295 (sim_open): Sort the Simops table before inserting entries
297 * mn10300_sim.h: Remove unused #defines.
298 (load_mem_big): Define.
302 * interp.c (load_mem): If we get a load from an out of range
304 (store_mem): Likewise for stores.
305 (max_mem): New variable.
309 * mn10300_sim.h: Fix ordering of bits in the PSW.
311 * interp.c: Improve hashing routine to avoid long list
312 traversals for common instructions. Add HASH_STAT support.
313 Rewrite opcode dispatch code using a big switch instead of
314 cascaded if/else statements. Avoid useless calls to load_mem.
318 * mn10300_sim.h (struct _state): Add space for mdrq register.
320 * simops.c: Don't abort for trap. Add support for the extended
321 instructions, "getx", "putx", "mulq", "mulqu", "sat16", "sat24",
326 * configure: Regenerated to track ../common/aclocal.m4 changes.
330 * interp.c (sim_stop): Add stub function.
334 * Makefile.in (SIM_OBJS): Add sim-load.o.
335 * interp.c (sim_kind, myname): New static locals.
336 (sim_open): Set sim_kind, myname. Ignore -E arg.
337 (sim_load): Return SIM_RC. New arg abfd. Call sim_load_file to
338 load file into simulator. Set start address from bfd.
339 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
343 * simops.c (OP_F020): SYS_execv, SYS_time, SYS_times, SYS_utime
344 only include if implemented by host.
345 (OP_F020): Typecast arg passed to time function;
349 * simops.c (syscall): Handle new mn10300 calling conventions.
353 * configure: Regenerated to track ../common/aclocal.m4 changes.
358 * Makefile.in: Change mn10300-opc.o to m10300-opc.o, to match
359 corresponding change in opcodes directory.
363 * interp.c (sim_open): New arg `kind'.
365 * configure: Regenerated to track ../common/aclocal.m4 changes.
369 * configure: Regenerated to track ../common/aclocal.m4 changes.
373 * simops.c: Fix register extraction for a two "movbu" variants.
374 Somewhat simplify "sub" instructions.
375 Correctly sign extend operands for "mul". Put the correct
376 half of the result in MDR for "mul" and "mulu".
377 Implement remaining instructions.
378 Tweak opcode for "syscall".
382 * simops.c: Do syscall emulation in "syscall" instruction. Add
383 dummy "trap" instruction.
387 * configure: Regenerated to track ../common/aclocal.m4 changes.
391 * configure: Re-generate.
395 * configure: Regenerate to track ../common/aclocal.m4 changes.
399 * interp.c (sim_open): New SIM_DESC result. Argument is now
401 (other sim_*): New SIM_DESC argument.
405 * simops.c: Fix carry bit computation for "add" instructions.
407 * simops.c: Fix typos in bset insns. Fix arguments to store_mem
408 for bset imm8,(d8,an) and bclr imm8,(d8,an).
412 * simops.c: Fix register references when computing Z and N bits
417 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
418 COMMON_{PRE,POST}_CONFIG_FRAG instead.
419 * configure.in: sinclude ../common/aclocal.m4.
420 * configure: Regenerated.
424 * interp.c (init_system): Allocate 2^19 bytes of space for the
429 * configure configure.in Makefile.in: Update to new configure
430 scheme which is more compatible with WinGDB builds.
431 * configure.in: Improve comment on how to run autoconf.
432 * configure: Re-run autoconf to get new ../common/aclocal.m4.
433 * Makefile.in: Use autoconf substitution to install common
438 * simops.c: Undo last change to "rol" and "ror", original code
443 * simops.c: Fix "rol" and "ror".
447 * simops.c: Fix typo in last change.
451 * simops.c: Use REG macros in few places not using them yet.
455 * mn10300_sim.h (struct _state): Fix number of registers!
459 * mn10300_sim.h (struct _state): Put all registers into a single
460 array to make gdb implementation easier.
461 (REG_*): Add definitions for all registers in the state array.
462 (SEXT32, SEXT40, SEXT44, SEXT60): Remove unused macros.
463 * simops.c: Related changes.
467 * interp.c (sim_resume): Handle 0xff as a single byte insn.
469 * simops.c: Fix overflow computation for "add" and "inc"
474 * simops.c: Handle "break" instruction.
476 * simops.c: Fix restoring the PC for "ret" and "retf" instructions.
480 * gencode.c (write_opcodes): Also write out the format of the
482 * mn10300_sim.h (simops): Add "format" field.
483 * interp.c (sim_resume): Deal with endianness issues here.
487 * simops.c (REG0_4): Define.
488 Use REG0_4 for indexed loads/stores.
492 * simops.c (REG0_16): Fix typo.
496 * simops.c: Call abort for any instruction that's not currently
499 * simops.c: Define accessor macros to extract register
500 values from instructions. Use them consistently.
502 * interp.c: Delete unused global variable "OP".
503 (sim_resume): Remove unused variable "opcode".
504 * simops.c: Fix some uninitialized variable problems, add
505 parens to fix various -Wall warnings.
507 * gencode.c (write_header): Add "insn" and "extension" arguments
508 to the OP_* declarations.
509 (write_template): Similarly for function templates.
510 * interp.c (insn, extension): Remove global variables. Instead
511 pass them as arguments to the OP_* functions.
512 * mn10300_sim.h: Remove decls for "insn" and "extension".
513 * simops.c (OP_*): Accept "insn" and "extension" as arguments
514 instead of using globals.
518 * simops.c: Fix typos in "mov am,(d16,an)" and "mov am,(d32,an)"
520 * simops.c: Fix thinkos in last change to "inc dn".
524 * simops.c: "add imm,sp" does not effect the condition codes.
525 "inc dn" does effect the condition codes.
529 * simops.c: Treat both operands as signed values for
532 * simops.c: Fix simulation of division instructions.
533 Fix typos/thinkos in several "cmp" and "sub" instructions.
537 * simops.c: Fix carry bit handling in "sub" and "cmp"
540 * simops.c: Fix "mov imm8,an" and "mov imm16,dn".
544 * simops.c: Fix overflow computation for many instructions.
546 * simops.c: Fix "mov dm, an", "movbu dm, (an)", and "movhu dm, (an)".
548 * simops.c: Fix "mov am, dn".
550 * simops.c: Fix more bugs in "add imm,an" and
555 * simops.c: Fix bugs in "movm" and "add imm,an".
557 * simops.c: Don't lose the upper 24 bits of the return
558 pointer in "call" and "calls" instructions. Rough cut
559 at emulated system calls.
561 * simops.c: Implement the remaining 5, 6 and 7 byte instructions.
563 * simops.c: Implement remaining 4 byte instructions.
565 * simops.c: Implement remaining 3 byte instructions.
567 * simops.c: Implement remaining 2 byte instructions. Call
568 abort for instructions we're not implementing now.
572 * simops.c: Implement lots of random instructions.
574 * simops.c: Implement "movm" and "bCC" insns.
576 * mn10300_sim.h (_state): Add another register (MDR).
578 * simops.c: Implement "cmp", "calls", "rets", "jmp" and
579 a few additional random insns.
581 * mn10300_sim.h (PSW_*): Define for CC status tracking.
582 (REG_D0, REG_A0, REG_SP): Define.
583 * simops.c: Implement "add", "addc" and a few other random
586 * gencode.c, interp.c: Snapshot current simulator code.
590 * Makefile.in, config.in, configure, configure.in: New files.
591 * gencode.c, interp.c, mn10300_sim.h, simops.c: New files.