3 * simops.c: Include sim-types.h.
7 * simops.c (multiply instructions): Cast input operands to a
8 signed64/unsigned64 type as appropriate.
12 * interp.c (sim_store_register, sim_fetch_register): Pass in
13 length parameter. Return -1.
17 * configure: Regenerated to track ../common/aclocal.m4 changes.
21 * configure: Regenerated to track ../common/aclocal.m4 changes.
23 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
25 * configure: Regenerated to track ../common/aclocal.m4 changes.
29 * configure: Regenerated to track ../common/aclocal.m4 changes.
34 * configure: Regenerated to track ../common/aclocal.m4 changes.
38 * simops.c (call:16 call:32): Stack adjustment is determined solely
43 * interp.c (sim_load): Pass lma_p and sim_write args to
48 * simops.c: Correctly handle register restores for "ret" and "retf"
53 * configure: Regenerated to track ../common/aclocal.m4 changes.
57 * configure: Regenerated to track ../common/aclocal.m4 changes.
61 * configure: Regenerated to track ../common/aclocal.m4 changes.
65 * configure: Regenerated to track ../common/aclocal.m4 changes.
69 * configure: Regenerated to track ../common/aclocal.m4 changes.
73 * configure: Regenerated to track ../common/aclocal.m4 changes.
75 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
77 * configure: Regenerated to track ../common/aclocal.m4 changes.
81 * configure: Regenerated to track ../common/aclocal.m4 changes.
86 * interp.c (sim_kill): Delete.
87 (sim_create_inferior): Add ABFD argument.
88 (sim_load): Move setting of PC from here.
89 (sim_create_inferior): To here.
93 * configure: Regenerated to track ../common/aclocal.m4 changes.
98 * interp.c (sim_open): Add ABFD argument.
102 * interp.c (sim_resume): Clear State.exited.
103 (sim_stop_reason): If State.exited is nonzero, then indicate that
104 the simulator exited instead of stopped.
105 * mn10300_sim.h (struct _state): Add exited field.
106 * simops.c (syscall): Set State.exited for SYS_exit.
110 * simops.c: Fix thinko in last change.
114 * simops.c: "call" stores the callee saved registers into the
115 stack! Update the stack pointer properly when done with
118 * simops.c: Fix return address computation for "call" instructions.
122 * interp.c (sim_open): Fix typo.
126 * interp.c (sim_resume): Add missing case in big switch
127 statement (for extb instruction).
131 * interp.c: Replace all references to load_mem and store_mem
132 with references to load_byte, load_half, load_3_byte, load_word
133 and store_byte, store_half, store_3_byte, store_word.
134 (INLINE): Delete definition.
135 (load_mem_big): Likewise.
136 (max_mem): Make it global.
137 (dispatch): Make this function inline.
138 (load_mem, store_mem): Delete functions.
139 * mn10300_sim.h (INLINE): Define.
140 (RLW): Delete unused definition.
141 (load_mem, store_mem): Delete declarations.
142 (load_mem_big): New definition.
143 (load_byte, load_half, load_3_byte, load_word): New functions.
144 (store_byte, store_half, store_3_byte, store_word): New functions.
145 * simops.c: Replace all references to load_mem and store_mem
146 with references to load_byte, load_half, load_3_byte, load_word
147 and store_byte, store_half, store_3_byte, store_word.
151 * interp.c (sim_open): Add callback to arguments.
152 (sim_set_callbacks): Delete SIM_DESC argument.
156 * interp.c (dispatch): Make this an inline function.
158 * simops.c (syscall): Use callback->write regardless of
159 what file descriptor we're writing too.
163 * interp.c (load_mem_big): Remove function. It's now a macro
165 (compare_simops): New function.
166 (sim_open): Sort the Simops table before inserting entries
168 * mn10300_sim.h: Remove unused #defines.
169 (load_mem_big): Define.
173 * interp.c (load_mem): If we get a load from an out of range
175 (store_mem): Likewise for stores.
176 (max_mem): New variable.
180 * mn10300_sim.h: Fix ordering of bits in the PSW.
182 * interp.c: Improve hashing routine to avoid long list
183 traversals for common instructions. Add HASH_STAT support.
184 Rewrite opcode dispatch code using a big switch instead of
185 cascaded if/else statements. Avoid useless calls to load_mem.
189 * mn10300_sim.h (struct _state): Add space for mdrq register.
191 * simops.c: Don't abort for trap. Add support for the extended
192 instructions, "getx", "putx", "mulq", "mulqu", "sat16", "sat24",
197 * configure: Regenerated to track ../common/aclocal.m4 changes.
201 * interp.c (sim_stop): Add stub function.
205 * Makefile.in (SIM_OBJS): Add sim-load.o.
206 * interp.c (sim_kind, myname): New static locals.
207 (sim_open): Set sim_kind, myname. Ignore -E arg.
208 (sim_load): Return SIM_RC. New arg abfd. Call sim_load_file to
209 load file into simulator. Set start address from bfd.
210 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
214 * simops.c (OP_F020): SYS_execv, SYS_time, SYS_times, SYS_utime
215 only include if implemented by host.
216 (OP_F020): Typecast arg passed to time function;
220 * simops.c (syscall): Handle new mn10300 calling conventions.
224 * configure: Regenerated to track ../common/aclocal.m4 changes.
229 * Makefile.in: Change mn10300-opc.o to m10300-opc.o, to match
230 corresponding change in opcodes directory.
234 * interp.c (sim_open): New arg `kind'.
236 * configure: Regenerated to track ../common/aclocal.m4 changes.
240 * configure: Regenerated to track ../common/aclocal.m4 changes.
244 * simops.c: Fix register extraction for a two "movbu" variants.
245 Somewhat simplify "sub" instructions.
246 Correctly sign extend operands for "mul". Put the correct
247 half of the result in MDR for "mul" and "mulu".
248 Implement remaining instructions.
249 Tweak opcode for "syscall".
253 * simops.c: Do syscall emulation in "syscall" instruction. Add
254 dummy "trap" instruction.
258 * configure: Regenerated to track ../common/aclocal.m4 changes.
262 * configure: Re-generate.
266 * configure: Regenerate to track ../common/aclocal.m4 changes.
270 * interp.c (sim_open): New SIM_DESC result. Argument is now
272 (other sim_*): New SIM_DESC argument.
276 * simops.c: Fix carry bit computation for "add" instructions.
278 * simops.c: Fix typos in bset insns. Fix arguments to store_mem
279 for bset imm8,(d8,an) and bclr imm8,(d8,an).
283 * simops.c: Fix register references when computing Z and N bits
288 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
289 COMMON_{PRE,POST}_CONFIG_FRAG instead.
290 * configure.in: sinclude ../common/aclocal.m4.
291 * configure: Regenerated.
295 * interp.c (init_system): Allocate 2^19 bytes of space for the
300 * configure configure.in Makefile.in: Update to new configure
301 scheme which is more compatible with WinGDB builds.
302 * configure.in: Improve comment on how to run autoconf.
303 * configure: Re-run autoconf to get new ../common/aclocal.m4.
304 * Makefile.in: Use autoconf substitution to install common
309 * simops.c: Undo last change to "rol" and "ror", original code
314 * simops.c: Fix "rol" and "ror".
318 * simops.c: Fix typo in last change.
322 * simops.c: Use REG macros in few places not using them yet.
326 * mn10300_sim.h (struct _state): Fix number of registers!
330 * mn10300_sim.h (struct _state): Put all registers into a single
331 array to make gdb implementation easier.
332 (REG_*): Add definitions for all registers in the state array.
333 (SEXT32, SEXT40, SEXT44, SEXT60): Remove unused macros.
334 * simops.c: Related changes.
338 * interp.c (sim_resume): Handle 0xff as a single byte insn.
340 * simops.c: Fix overflow computation for "add" and "inc"
345 * simops.c: Handle "break" instruction.
347 * simops.c: Fix restoring the PC for "ret" and "retf" instructions.
351 * gencode.c (write_opcodes): Also write out the format of the
353 * mn10300_sim.h (simops): Add "format" field.
354 * interp.c (sim_resume): Deal with endianness issues here.
358 * simops.c (REG0_4): Define.
359 Use REG0_4 for indexed loads/stores.
363 * simops.c (REG0_16): Fix typo.
367 * simops.c: Call abort for any instruction that's not currently
370 * simops.c: Define accessor macros to extract register
371 values from instructions. Use them consistently.
373 * interp.c: Delete unused global variable "OP".
374 (sim_resume): Remove unused variable "opcode".
375 * simops.c: Fix some uninitialized variable problems, add
376 parens to fix various -Wall warnings.
378 * gencode.c (write_header): Add "insn" and "extension" arguments
379 to the OP_* declarations.
380 (write_template): Similarly for function templates.
381 * interp.c (insn, extension): Remove global variables. Instead
382 pass them as arguments to the OP_* functions.
383 * mn10300_sim.h: Remove decls for "insn" and "extension".
384 * simops.c (OP_*): Accept "insn" and "extension" as arguments
385 instead of using globals.
389 * simops.c: Fix typos in "mov am,(d16,an)" and "mov am,(d32,an)"
391 * simops.c: Fix thinkos in last change to "inc dn".
395 * simops.c: "add imm,sp" does not effect the condition codes.
396 "inc dn" does effect the condition codes.
400 * simops.c: Treat both operands as signed values for
403 * simops.c: Fix simulation of division instructions.
404 Fix typos/thinkos in several "cmp" and "sub" instructions.
408 * simops.c: Fix carry bit handling in "sub" and "cmp"
411 * simops.c: Fix "mov imm8,an" and "mov imm16,dn".
415 * simops.c: Fix overflow computation for many instructions.
417 * simops.c: Fix "mov dm, an", "movbu dm, (an)", and "movhu dm, (an)".
419 * simops.c: Fix "mov am, dn".
421 * simops.c: Fix more bugs in "add imm,an" and
426 * simops.c: Fix bugs in "movm" and "add imm,an".
428 * simops.c: Don't lose the upper 24 bits of the return
429 pointer in "call" and "calls" instructions. Rough cut
430 at emulated system calls.
432 * simops.c: Implement the remaining 5, 6 and 7 byte instructions.
434 * simops.c: Implement remaining 4 byte instructions.
436 * simops.c: Implement remaining 3 byte instructions.
438 * simops.c: Implement remaining 2 byte instructions. Call
439 abort for instructions we're not implementing now.
443 * simops.c: Implement lots of random instructions.
445 * simops.c: Implement "movm" and "bCC" insns.
447 * mn10300_sim.h (_state): Add another register (MDR).
449 * simops.c: Implement "cmp", "calls", "rets", "jmp" and
450 a few additional random insns.
452 * mn10300_sim.h (PSW_*): Define for CC status tracking.
453 (REG_D0, REG_A0, REG_SP): Define.
454 * simops.c: Implement "add", "addc" and a few other random
457 * gencode.c, interp.c: Snapshot current simulator code.
461 * Makefile.in, config.in, configure, configure.in: New files.
462 * gencode.c, interp.c, mn10300_sim.h, simops.c: New files.