Restrict ldsr (load system register) to modifying just non-reserved PSW bits.
[binutils-gdb.git] / sim / v850 / ChangeLog
1 Tue Sep 16 09:02:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
2
3 * sim-main.h (struct _sim_cpu): Add psw_mask so that reserved bits
4 can be masked out.
5
6 * simops.c (OP_2007E0, OP_4007E0): Move "ldsr", "stsr"
7 instructions from here.
8 * v850.igen (ldsr, stsr): To here. Mask out reserved bits when
9 setting PSW.
10
11 * interp.c (sim_open): Set psw_mask if machine known.
12
13 Tue Sep 16 10:20:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
14
15 start-sanitize-v850e
16 * v850-dc: Add rule to diferentiate between breakpoint and divh.
17 * v850.igen (break): New instruction, breakpoint simulator.
18
19 end-sanitize-v850e
20 * v850.igen (breakpoint): Enable. Change to a 32bit instruction.
21
22 start-sanitize-v850e
23 Mon Sep 15 18:44:05 1997 Jim Wilson <wilson@cygnus.com>
24
25 * simops.c (Multiply64): Don't store into register zero.
26
27 start-sanitize-v850e
28 Tue Sep 16 09:02:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
29
30 * Makefile.in (semantics.o): Add dependency.
31
32 * sim-main.h (SAVE_1, SAVE_2): Perform backward compatible save,
33 do not adjust CIA/NIA.
34
35 Mon Sep 15 17:36:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
36
37 start-sanitize-v850eq
38 * simops.c (OP_300, OP_400, OP_70): Make behavour depend on PSW[US].
39
40 * simops.c: Move "divun", "sld.bu", "divhn", "divhun", "divn",
41 "divun", "pushml" code from here to v850.igen.
42 (divun): Make global.
43 (type3_regs): Make global
44
45 * v850.igen: Move simops.c code to here.
46
47 * interp.c (sim_create_inferior): For v850eq set US bit by
48 default.
49
50 end-sanitize-v850eq
51 start-sanitize-v850e
52 * interp.c (sim_open): Don't set arch, now set by
53 sim_analyze_program.
54
55 end-sanitize-v850e
56 * configure: Regenerated to track ../common/aclocal.m4 changes.
57
58 Mon Sep 15 14:39:34 1997 Andrew Cagney <cagney@b1.cygnus.com>
59
60 * simops.c (op_types): Move from here.
61 sim-main.h: To here.
62
63 * sim-main.h (trace_input, trace_output), simops.c: Make global.
64
65 * simops.c (OP_60): Move "jmp" code from here.
66 * v850.igen (jmp): To here.
67
68 start-sanitize-v850eq
69 * simops.c (OP_60): Move "sld.bu" code from here.
70 * v850.igen (sld.bu): To here.
71
72 end-sanitize-v850eq
73 Fri Sep 12 15:11:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
74
75 start-sanitize-v850eq
76 * v850.igen (prepare, ...): Add to v850eq architecture.
77
78 end-sanitize-v850eq
79 start-sanitize-v850e
80 * interp.c (sim_open): Default to v850eq.
81
82 end-sanitize-v850e
83 start-sanitize-v850eq
84
85 * interp.c (sim_open): Default to v850e.
86 end-sanitize-v850eq
87 * sim-main.h (signal.h): Include.
88
89 * v850.igen (illegal): Report/halt illegal instructions.
90
91 * Makefile.in (SIM_EXTRA_CFLAGS): Add SIM_RESERVED_BITS.
92
93 * configure.in: Add reserved bits option.
94 * configure: Regenerate.
95
96 Thu Sep 11 08:40:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
97
98 * interp.c (sim_open): Use sim_do_commandf instead of asprintf.
99
100 * sim-main.h (INSN_NAME):
101
102 * Makefile.in (INCLUDE): Add SIM_EXTRA_DEPS.
103 (SIM_EXTRA_DEPS): Add itable.h
104 (tmp-gencode): Does not depend on simops.h
105
106 * sim-main.h (itable.h): Include.
107 (MAX_INSNS, INSN_NAME): Define.
108
109 * interp.c: Compute inttype from the interrupt_names index that
110 was passed in.
111
112 Wed Sep 10 10:25:40 1997 Andrew Cagney <cagney@b1.cygnus.com>
113
114 * simops.c (trace_input): Use trace_printf instead of
115 sim_io_printf.
116 (trace_output): Ditto.
117 (trace_input): Only trace when TRACE_ALU_P. Delete code
118 disasembling instruction.
119 (trace_output): Only trace when TRACE_ALU_P.
120
121 Tue Sep 9 01:29:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
122
123 * simops.c (trace_input, trace_output): Use sim_io_printf.
124 (OP_620): Pass correct argument to trace.
125 (OP_E607E0): Ditto.
126 (trace_input): Obtain prog_bfd, text_start et.al from simulator
127 struct.
128
129 Mon Sep 8 21:03:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
130
131 * v850.igen: New file.
132 * v850-dc: New file.
133
134 Mon Sep 8 18:33:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
135
136
137 * sim-main.h (SEXT16): Delete, use EXTEND16.
138 (SEXT8): Delete, use EXTEND8.
139 (SEXT32): Delete, used?
140 (SEXT40, SEXT44, SEXT64): Use UNSIGNED64 for constants, not ...LL.
141 (WITH_TARGET_WORD_MSB): Define as 31. v850 little bit endian.
142
143 * simops.c: Use EXTEND15 from sim-bits instead of SEXT16.
144
145 * sim-main.h (DEBUG_TRACE, DEBUG_VALUES, v850_debug): Delete,
146 replace with TRACE_INSN_P and TRACE_ALU_P.
147
148 * simops.c (trace_input, trace_output): Update.
149
150 * interp.c (sim_engine_run): Delete.
151 (lookup_hash): Delete.
152 (sim_open): Do not fill hash table.
153 (sim_trace): Delete.
154
155 Fri Sep 5 17:04:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
156
157 * simops.c (OP_FFFF): Use sim_engine_halt.
158 (OP_12007E0): Ditto.
159 (OP_10007E0): Ditto.
160
161 * sim-main.h (struct sim_cpu): Delete member exception. Using
162 sim-engine et.al.
163
164 * interp.c (sim_info): Do not do anything in sim-info.
165 (sim_stop): Delete, replace with sim-stop.
166 (sim_stop_reason): Delete, replace with sim-reason.
167
168 * sim-main.h (WITH_WATCHPOINTS): Define.
169 (WITH_MODULO_MEMORY): Define
170
171 * Makefile.in (SIM_OBJS): Add sim-resume, sim-watch, sim-stop,
172 sim-reason.
173
174 * interp.c (enum interrupt_cond_type): Delete.
175 (struct interrupt_generator): Delete.
176 (enum interrupt_type): Drop int_none.
177 (sim_open): Initialize WATCHPOINT module.
178 (sim_resume, sim_run): Rename sim_resume to sim_run.
179 (sim_engine_run): Replace interrupt code with call to sim-events.
180 (sim_set_interrupt): Delete.
181 (sim_parse_number): Delete.
182
183 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
184
185 * configure: Regenerated to track ../common/aclocal.m4 changes.
186
187 Thu Sep 4 18:11:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
188
189 * simops.c (fetch_argv): New function, fetch a arg vector from
190 simulator memory.
191
192 * configure.in: Check for fork, execve, execv.
193 * configure: Regenerate.
194
195 * interp.c (sim_store_register, sim_fetch_register): Use H2T_4 and
196 T2H_4 for byte swapping.
197
198 * sim-main.h, interp.c (get_word, get_half, get_byte, put_word,
199 put_half, put_byte): Delete.
200
201 * Makefile.in (SIM_OBJS): Add sim-memopt.o module.
202
203 * sim-main.h (load_mem, store_mem): Redefine as macros.
204 (IMEM, IMEM_IMMED): New macros - fetch instructions.
205
206 * simops.c (OP_10007E0): For SYS_read, SYS_write, SYS_open
207 transfer data via a buffer.
208 (fetch_str): New function, fetch string from memory.
209
210 * Makefile.in (SIM_OBJS): Add sim-hrw.o module.
211
212 * interp.c (sim_open): Establish memory maps using sim-memopt.c
213 via sim_do_command.
214 (sim_do_command): Print error if memory-map command is used. Call
215 sim_args_command.
216 (map): Delete, replaced by sim-core.
217 (sim_memory_init): Delete, replaced by sim-core.
218 (sim_set_memory_map): Delete, replaced by sim-memopt.
219 (load_mem): Delete, replaced by sim-core.
220 (store_mem): Delete, replaced by sim-core.
221 (sim_write): Delete, replaced by sim-hrw.
222 (sim_read): Delete, replaced by sim-hrw.
223
224 * sim-main.h (struct sim_state): Remove memory members, using
225 sim-core.c
226
227 Wed Sep 3 10:18:55 1997 Andrew Cagney <cagney@b1.cygnus.com>
228
229 * sim-main.h: Replace SIM_HAVE_FLATMEM with mem ptr.
230 * interp.c (map): Do not add to a void pointer.
231
232 * Makefile.in (INCLUDE): Add sim-main.h
233
234 * configure.in: Check for time.h
235 * configure: Re-generate.
236
237 * interp.c (struct interrupt_generator): Make time unsigned long,
238 address SIM_ADDR.
239 (sim_resume): Make oldpc SIM_ADDR.
240 (struct hash_entry): Make mask/opcode unsigned.
241
242 * v850_sim.h (struct simops ): Make opcode and mask unsigned.
243
244 * simops.c (utime.h): Include if available.
245 (OP_10007E0): Check for UTIME function.
246 (divun): Put parentheses around shift argument.
247 (OP_640): Put parentheses around shift argument, was wrong.
248 (OP_107F0): Return something.
249
250 * interp.c (sim_parse_number): Use strtoul not strtol.
251 (sim_resume): Use sim_elapsed_time_get to keep track of the time.
252
253 * configure.in (SIM_AC_OPTION_WARNINGS): Add.
254 (SIM_AC_OPTION_ENDIAN): Set to hardwired big.
255 (SIM_AC_OPTION_HOST_ENDIAN): Add.
256 (AC_CHECK_FUNCS): Add utime.
257 (AC_CHECK_HEADERS): Add stdlib.h, string.h, strings.h, utime.h
258 configure: Regenerate.
259
260
261 * Makefile.in (SIM_RUN_OBJS): Use nrun.o.
262 (SIM_OBJS): Add sim-io.o, sim-hload.o, sim-utils.o, sim-options.o,
263 sim-config.o, sim-module.o, sim-events.o, sim-core.o,
264 sim-endian.o, sim-engine.o, sim-trace.o, sim-profile.o
265 (SIM_ENDIAN, SIM_WARNGINS): Define.
266
267 * simops.c (OP_10007E0): Use sim_io_* for transfers.
268
269 * interp.c (sim_resume): Pass sd around.
270
271 * simops.c (sim-main.h): Include.
272
273 * gencode.c (write_template): Generate #include sim-main.h.
274 (write_opcodes): Ditto.
275
276 * interp.c (prog_bfd, prog_bfd_was_opened_p): Delete.
277 (v850_callback): Ditto.
278 (sim_kind, myname): Ditto.
279 (lookup_hash): Pass SD. Use sim_io_error.
280 (sim_set_memory_map): Pass in SD, use.
281 (init_system): Pass in SD, use.
282 (sim_open): Update.
283 (sim_set_profile): Delete.
284 (sim_set_profile_size): Delete.
285 (do_interrupt): Pass in SD, use.
286 (sim_info): Use sim_io_printf.
287 (sim_create_inferior): Reset registers. Set PC from prog_bfd
288 argument.
289 (sim_load): Delete, use common/sim-hload.c
290 (sim_size): Rename to sim_memory_init.
291 (sim_write): Remove call to init_system.
292 (init_system): Delete.
293 (sim_set_callbacks): Delete.
294 (sim_set_interrupt): Pass in SD, use.
295 (start_time): Delete.
296
297 * v850_sim.h: Remove everything except `struct simops' from here.
298 * sim-main.h: Move most to here.
299 * gencode.c: Move #includes to here.
300
301 * sim-main.h(struct _sim_cpu): Rename struct _state.
302 (#define PC, et.al.): Update
303 (v850_callback): Delete. Replaced with SIM_DESC arg.
304 (int8, uint8, int16, uint16, int32, uint32): Define types using
305 unsigned8 et.al from common/sim-types.h.
306 * sim-main.h (State): Define as STATE_CPU.
307
308 Mon Sep 1 12:07:55 1997 Andrew Cagney <cagney@b1.cygnus.com>
309
310 * configure.in: Check for time, chmod.
311 * configure: Regenerate.
312 * simops.c (SYS_time, SYS_chmod): Use HAVE_TIME, HAVE_CHMOD.
313
314 * simops.c (../../libgloss/v850/sys/syscall.h): Include instead of
315 sys/syscall.h.
316 (OP_10007E0): Check the existance each SYS_* macro independantly.
317
318 * v850_sim.h (SIGQUIT, SIGTRAP): Only define if missing.
319
320 Wed Aug 27 18:13:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
321
322 * configure: Regenerated to track ../common/aclocal.m4 changes.
323 * config.in: Ditto.
324
325 Tue Aug 26 10:42:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
326
327 * interp.c (sim_kill): Delete.
328 (sim_create_inferior): Add ABFD argument.
329 (sim_load): Move setting of PC from here.
330 (sim_create_inferior): To here.
331
332 Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
333
334 * configure: Regenerated to track ../common/aclocal.m4 changes.
335 * config.in: Ditto.
336
337 Mon Aug 25 11:31:23 1997 Andrew Cagney <cagney@b1.cygnus.com>
338
339 * interp.c (sim_open): Add ABFD argument.
340
341 start-sanitize-v850e
342 Fri Aug 22 10:39:28 1997 Nick Clifton <nickc@cygnus.com>
343
344 * simops.c (bsh): Only set CY flag if either of the bottom
345 bytes is zero.
346
347 * simops.c (prepare, dispose): Lower numbered
348 registers go to higher numbered address.
349
350 * simops.c (unsigned divide instructions): S bit set if result has
351 top bit set.
352
353 start-sanitize-v850eq
354 * simops.c (pushml, pushmh, popml, popmh): Lower numbered
355 registers go to higher numbered address.
356 end-sanitize-v850eq
357 end-sanitize-v850e
358
359 Wed Aug 20 13:56:35 1997 Nick Clifton <nickc@cygnus.com>
360
361 * simops.c (OP_107E0, OP_107F0, OP_307E0, OP_307F0): Use correct
362 interpretation of SR bit in list18 structure.
363 start-sanitize-v850eq
364 (divn, divun): New functions to perform N step divide functions.
365 end-sanitize-v850eq
366
367 start-sanitize-v850eq
368 Mon Aug 18 10:59:02 1997 Nick Clifton <nickc@cygnus.com>
369
370 * simops.c (OP_300, OP_400, OP_60, OP_70): Support variant opcodes
371 with US bit set in the PSW.
372 start-sanitize-v850eq
373
374 Wed Aug 13 19:06:55 1997 Nick Clifton <nickc@cygnus.com>
375
376 * interp.c (sim_resume): Opcode functions return amount to be
377 added to PC and all opcodes take a standard format in the OP[]
378 array.
379
380 (do_format_*): Functions removed.
381
382 * v850_sim.h (SP, EP): New register mnemonics.
383
384 * gencode.c (write_header): Functions prototypes return an
385 integer.
386
387 * simops.c: Opcode functions return amount to be added to PC.
388
389 start-sanitize-v850e
390 * v850_sim.h (CTPC, CTPSW, CTBP): New register mnemonics.
391
392 * simops.c: Add support for v850e instructions.
393
394 * .Sanitize (Do-first, Do-last): Add support for keep-v850e
395 command line option.
396
397 end-sanitize-v850e
398
399 start-sanitize-v850eq
400 * .Sanitize (Do-first, Do-last): Add support for keep-v850eq
401 command line option.
402
403 * simops.c: Add support for v850eq instructions.
404 end-sanitize-v850eq
405
406 Tue May 20 10:24:14 1997 Andrew Cagney <cagney@b1.cygnus.com>
407
408 * interp.c (sim_open): Add callback argument.
409 (sim_set_callbacks): Delete SIM_DESC argument.
410
411 Thu Apr 24 00:39:51 1997 Doug Evans <dje@canuck.cygnus.com>
412
413 * configure: Regenerated to track ../common/aclocal.m4 changes.
414
415 Wed Apr 23 17:20:16 1997 Doug Evans <dje@canuck.cygnus.com>
416
417 * interp.c (prog_bfd_was_opened_p): New static local.
418 (prog_bfd): New global variable.
419 (sim_open): Undo patch to add -E support.
420 (sim_close): Close prog_bfd if sim_load opened it.
421 (sim_load): Record bfd of loaded file in prog_bfd.
422 * simops.c (prog_bfd): Renamed from exec_bfd.
423
424 Fri Apr 18 14:17:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
425
426 * interp.c (sim_stop): Stub function.
427
428 Thu Apr 17 03:53:18 1997 Doug Evans <dje@canuck.cygnus.com>
429
430 * Makefile.in (SIM_OBJS): Add sim-load.o.
431 * interp.c (sim_kind, myname): New static locals.
432 (sim_open): Set sim_kind, myname. Ignore -E arg.
433 (sim_load): Return SIM_RC. New arg abfd. Call sim_load_file to
434 load file into simulator. Set start address from bfd.
435 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
436
437 Wed Apr 16 19:53:55 1997 Andrew Cagney <cagney@b1.cygnus.com>
438
439 * simops.c (OP_10007E0): Only provide system calls SYS_execv,
440 SYS_wait, SYS_wait, SYS_utime, SYS_time if defined by the host.
441
442 Mon Apr 7 15:45:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
443
444 * configure: Regenerated to track ../common/aclocal.m4 changes.
445 * config.in: Ditto.
446
447 Wed Apr 2 15:06:28 1997 Doug Evans <dje@canuck.cygnus.com>
448
449 * interp.c (sim_open): New arg `kind'.
450
451 * configure: Regenerated to track ../common/aclocal.m4 changes.
452
453 Wed Apr 2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
454
455 * configure: Regenerated to track ../common/aclocal.m4 changes.
456
457 Wed Mar 19 01:14:00 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
458
459 * configure: Regenerated to track ../common/aclocal.m4 changes.
460
461 Mon Mar 17 15:10:07 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
462
463 * configure: Re-generate.
464
465 Fri Mar 14 10:34:11 1997 Michael Meissner <meissner@cygnus.com>
466
467 * configure: Regenerate to track ../common/aclocal.m4 changes.
468
469 Thu Mar 13 13:00:54 1997 Doug Evans <dje@canuck.cygnus.com>
470
471 * interp.c (sim_open): New SIM_DESC result. Argument is now
472 in argv form.
473 (other sim_*): New SIM_DESC argument.
474
475 Tue Feb 4 13:33:30 1997 Doug Evans <dje@canuck.cygnus.com>
476
477 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
478 COMMON_{PRE,POST}_CONFIG_FRAG instead.
479 * configure.in: sinclude ../common/aclocal.m4.
480 * configure: Regenerated.
481
482 Thu Jan 23 11:46:23 1997 Stu Grossman (grossman@critters.cygnus.com)
483
484 * configure configure.in Makefile.in: Update to new configure
485 scheme which is more compatible with WinGDB builds.
486 * configure.in: Improve comment on how to run autoconf.
487 * configure: Re-run autoconf to get new ../common/aclocal.m4.
488 * Makefile.in: Use autoconf substitution to install common
489 makefile fragment.
490
491 Mon Jan 20 16:05:34 1997 Michael Meissner <meissner@tiktok.cygnus.com>
492
493 * simops.c (OP_{E0,2E0,6E0}): The multiply operations sign extend,
494 not zero extend.
495
496 Tue Jan 14 17:06:03 1997 Stu Grossman (grossman@critters.cygnus.com)
497
498 * simops.c: Put ifdefs around things to make MSVC happy. Get rid
499 of unistd.h. Disable SYS_stat, SYS_chown, SYS_time, SYS_times,
500 SYS_gettimeofday and SYS_utime from MSVC.
501
502 Tue Dec 31 18:11:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
503
504 * simops.c (OP_10007E0): Know that kill encodes the signal number
505 via: 0xdead0000 | signal and turn it back into a signal.
506
507 Fri Dec 27 14:44:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
508
509 * v850_sim.h (SIG_V850_EXIT): Define as -1.
510
511 * interp.c (sim_open): Cast calloc function.
512 (sim_stop_reason): If signal is SIG_V850_EXIT, inform gdb the
513 program exited with the appropriate exit code.
514 (sim_set_interrupt): Declare buildargv.
515
516 * simops.c (OP_10007E0): Make exit signal normal exit. Make time
517 type correct and work on big endian systems.
518
519 Wed Nov 20 02:18:44 1996 Doug Evans <dje@canuck.cygnus.com>
520
521 * Makefile.in: Delete stuff moved to ../common/Make-common.in.
522 (SIM_OBJS,SIM_EXTRA_CFLAGS,SIM_EXTRA_CLEAN): Define.
523 * configure.in: Simplify using macros in ../common/aclocal.m4.
524 Call AC_CHECK_HEADERS(unistd.h).
525 * configure: Regenerated.
526 * config.in: New file.
527 * simops.c: #include "config.h". #include <unistd.h> if present.
528
529 Sun Nov 3 23:02:54 1996 Stan Shebs <shebs@andros.cygnus.com>
530
531 * v850_sim.h (State): New slots dummy_mem, pending_nmi.
532 (EIPC, etc): New macros for system registers.
533 * simops.c, interp.c: Use everywhere.
534
535 * interp.c: Add support for interrupts issued by interrupt
536 generators, either PC- or time-based. Controlled by simulator
537 command "sim interrupt".
538
539 * interp.c: Add support for variable-size allocation of memory,
540 via simulator command "sim memory-map".
541 (map): Issue SIGSEGV for references to invalid memory regions.
542
543 Thu Oct 31 14:44:10 1996 Gavin Koch <gavin@cygnus.com>
544
545 * simops.c: Include <sys/time.h> for struct timeval and
546 struct timezone.
547
548 Wed Oct 30 08:49:10 1996 Jeffrey A Law (law@cygnus.com)
549
550 * simops.c (OP_10007E0): Handle SYS_times and SYS_gettimeofday.
551
552 * simops.c (OP_10007E0): Handle SYS_time.
553
554 Tue Oct 29 14:22:55 1996 Jeffrey A Law (law@cygnus.com)
555
556 * simops.c: Include <sys/stat.h>.
557 (OP_10007E0): Handle SYS_stat.
558
559 Thu Oct 24 12:26:35 1996 Jeffrey A Law (law@cygnus.com)
560
561 * simops.c (OP_10007E0): Don't declare errno.
562
563 * simops.c (OP_500): Mask off low bit in displacement
564 for sld.w.
565 (OP_501): Similarly.
566
567 * simops.c (OP_500): Fix displacement handling for sld.w.
568 (OP_501): Similarly for sst.w.
569
570 * simops.c (trace_input): Remove all references to SEXT7.
571 (OP_300, OP_400, OP_500, OP_380, OP_480, OP_501): Displacement
572 is zero extended for sst/sld instructions.
573 * v850_sim.h (SEX7): Delete. It's no longer needed (and it
574 was incorrect anyway).
575
576 Thu Oct 24 10:33:33 1996 Stu Grossman (grossman@critters.cygnus.com)
577
578 * Makefile.in: Get rid of srcroot. Set all INSTALL macros via
579 autoconf.
580 * gencode.c (write_opcodes): Pad operands field to account for
581 MSVC braindamage.
582 * simops.c: Include errno.h. Exclude SYS_chown, since MSVC
583 doesn't support it. (Why is this here in the first place?!?)
584 * v850_sim.h: Get rid of 64 bit defs. Also, get rid of #elif's.
585 Change number of operands in struct simops from 9 to 6. Define
586 SIGTRAP and SIGQUIT for MSVC.
587
588 Tue Oct 15 16:19:51 1996 Stu Grossman (grossman@critters.cygnus.com)
589
590 * interp.c (MEM_SIZE): It's now bytes, not a power of 2.
591 * (map): Add support for external mem in the 1->2 meg range.
592 Also, abort() when memory access is way out of bounds. (Better to
593 die than to give wrong result. (This will be fixed later.))
594 * (sim_size): MEM_SIZE is now bytes, not shift factor.
595
596 Tue Oct 1 15:53:24 1996 Gavin Koch <gavin@cygnus.com>
597
598 * simops.c (trace_input): Swapped order of operands for output
599 output of OP_IMM_REG. Changed the fetching of the operands for
600 OP_LOAD32, and OP_STORE32 to work like op-function.
601
602 Mon Sep 30 15:46:33 1996 Stu Grossman (grossman@critters.cygnus.com)
603
604 * interp.c: Move includes of remote-sim.h and callback.h to
605 v850-sim.h.
606 * (lookup_hash): Add PC to report of hash failure.
607 * (map load_mem store_mem): New memory subsystem. Models V851
608 memory system.
609 * (sim_write sim_read): Use new memory subsystem.
610 * (sim_resume): Don't load and save PC into EIPC anymore. Needed
611 to make user-defined traps work right.
612 * simops.c (OP_*): Use new memory subsystem.
613 * (OP_14007E0 (reti)): Implement reti.
614 * (OP_14996E0 (trap)): Implement user-defined traps. Move I/O to
615 trap 31. Use new memory subsystem.
616 * v850_sim.h: Prototypes for load_mem, store_mem and map. Use
617 load_mem in RLW macro.
618
619 Fri Sep 27 18:34:09 1996 Stu Grossman (grossman@critters.cygnus.com)
620
621 * gencode.c (write_opcodes): Output hex values for opcode mask
622 and patterns.
623 * interp.c (sim_resume): Save and restore PC from the appropriate
624 register.
625 * (sim_fetch_register sim_store_register): Fix byte-order problem
626 with reading and writing registers.
627 * simops.c (OP_FFFF): Implement pseudo-breakpoint insn.
628
629 Fri Sep 27 17:42:37 1996 Jeffrey A Law (law@cygnus.com)
630
631 * simops.c (trace_input): Fix thinko.
632
633 Wed Sep 18 09:54:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
634
635 * simops.c (exec_bfd): Rename from sim_bfd.
636 (trace_input): Ditto.
637
638 Thu Sep 12 12:03:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
639
640 * simops.c (trace_input): Use find_nearest_line to print line
641 number, function name or file name of PC.
642
643 Wed Sep 11 16:44:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
644
645 * simops.c: Add tracing support. Use SEXTxx macros instead of
646 doing hardwired shifts.
647
648 * configure.in (--enable-sim-cflags): Add switch to add additional
649 flags to simulator buld. If --enable-sim-cflags=trace, turn on
650 tracing.
651 * configure: Regenerate.
652
653 * Makefile.in: Don't require a VPATH capable make if configuring
654 in the same directory. Don't use CFLAGS for configuration flags.
655 Add flags from --enable-sim-cflags. Support canadian cross
656 builds. Rebuild whole simulator if include files change.
657
658 * interp.c (v850_debug): New global for debugging.
659 (lookup_hash,sim_size,sim_set_profile): Use
660 printf_filtered callback, instead of calling printf directly.
661 (sim_{open,trace}): Enable tracing if -t and compiled for tracing.
662
663 * v850_sim.h: Use limits.h to set the various sized types.
664 (SEXT{5,7,16,22}): New macros.
665
666 Mon Sep 9 20:50:46 1996 Jeffrey A Law (law@cygnus.com)
667
668 * interp.c (hash): Make this an inline function
669 when compiling with GCC. Simplify.
670 * simpos.c: Explicitly include "sys/syscall.h". Remove
671 some #if 0'd code. Enable more emulated syscalls.
672
673 Wed Sep 4 01:48:55 1996 Jeffrey A Law (law@cygnus.com)
674
675 * interp.c: Fix sign bit handling for add and sub instructions.
676
677 Tue Sep 3 10:20:30 1996 Jeffrey A Law (law@cygnus.com)
678
679 * gencode.c: Fix various indention & style problems.
680 Remove test code. Remove #if 0 code.
681 * interp.c: Provide prototypes for all static functions.
682 Fix minor indention problems.
683 (sim_open, sim_resume): Remove unused variables.
684 (sim_read): Return type is "int".
685 * simops.c: Remove unused variables.
686 (divh): Make result of divide-by-zero zero.
687 (setf): Initialize result to keep compiler quiet.
688 (sar instructions): These just clear the overflow bit.
689 * v850_sim.h: Provide prototypes for put_byte, put_half
690 and put_word.
691
692 * interp.c: OP should be an array of 32bit operands!
693 (v850_callback): Declare.
694 (do_format_5): Fix extraction of OP[0].
695 (sim_size): Remove debugging printf.
696 (sim_set_callbacks): Do something useful.
697 (sim_stop_reason): Gross hacks to get c-torture running.
698 * simops.c: Simplify code for computing targets of bCC
699 insns. Invert 's' bit if 'ov' bit is set for some
700 instructions. Fix 'cy' bit handling for numerous
701 instructions. Make the simulator stop when a halt
702 instruction is encountered. Very crude support for
703 emulated syscalls (trap 0).
704 * v850_sim.h: Include "callback.h" and declare
705 v850_callback. Items in the operand array are 32bits.
706
707 Sun Sep 1 22:35:35 1996 Jeffrey A Law (law@cygnus.com)
708
709 * interp.c (sim_resume): Fix code to check for a format 3
710 opcode.
711 * simops.c: bCC insns only argument is a constant, not a
712 register value (duh...)
713
714 Fri Aug 30 10:33:49 1996 Jeffrey A Law (law@cygnus.com)
715
716 * simops.c: Fix "not1" and "set1".
717
718 * simops.c: Don't forget to initialize temp for
719 "ld.h" and "ld.w"
720
721 * interp.c: Remove various debugging printfs.
722
723 * simops.c: Fix satadd, satsub boundary case handling.
724
725 * interp.c (hash): Fix.
726 * interp.c (do_format_8): Get operands correctly and
727 call the target function.
728 * simops.c: Rough cut at "clr1", "not1", "set1", and "tst1".
729
730 Thu Aug 29 13:53:29 1996 Jeffrey A Law (law@cygnus.com)
731
732 * interp.c (do_format_4): Get operands correctly and
733 call the target function.
734 * simops.c: Rough cut at "sld.b", "sld.h", "sld.w", "sst.b",
735 "sst.h", and "sst.w".
736
737 * v850_sim.h: The V850 doesn't have split I&D spaces. Change
738 accordingly. Remove many unused definitions.
739 * interp.c: The V850 doesn't have split I&D spaces. Change
740 accordingly.
741 (get_longlong, get_longword, get_word): Deleted.
742 (write_longlong, write_longword, write_word): Deleted.
743 (get_operands): Deleted.
744 (get_byte, get_half, get_word): New functions.
745 (put_byte, put_half, put_word): New functions.
746 * simops.c: Remove unused functions. Rough cut at
747 "ld.b", "ld.h", "ld.w", "st.b", "st.h", "st.w" insns.
748
749 * v850_sim.h (struct _state): Remove "psw" field. Add
750 "sregs" field.
751 (PSW): Remove bogus definition.
752 * simops.c: Change condition code handling to use the psw
753 register within the sregs array. Handle "ldsr" and "stsr".
754
755 * simops.c: Handle "satadd", "satsub", "satsubi", "satsubr".
756
757 * interp.c (do_format_5): Get operands correctly and
758 call the target function.
759 (sim_resume): Don't do a PC update for format 5 instructions.
760 * simops.c: Handle "jarl" and "jmp" instructions.
761
762 * simops.c: Fix minor typos. Handle "cmp", "setf", "tst"
763 "di", and "ei" instructions correctly.
764
765 * interp.c (do_format_3): Get operands correctly and call
766 the target function.
767 * simops.c: Handle bCC instructions.
768
769 * simops.c: Add condition code handling to shift insns.
770 Fix minor typos in condition code handling for other insns.
771
772 * Makefile.in: Fix typo.
773 * simops.c: Add condition code handling to "sub" "subr" and
774 "divh" instructions.
775
776 * interp.c (hash): Update to be more accurate.
777 (lookup_hash): Call hash rather than computing the hash
778 code here.
779 (do_format_1_2): Handle format 1 and format 2 instructions.
780 Get operands correctly and call the target function.
781 (do_format_6): Get operands correctly and call the target
782 function.
783 (do_formats_9_10): Rough cut so shift ops will work.
784 (sim_resume): Tweak to deal with format 1 and format 2
785 handling in a single funtion. Don't update the PC
786 for format 3 insns. Fix typos.
787 * simops.c: Slightly reorganize. Add condition code handling
788 to "add", "addi", "and", "andi", "or", "ori", "xor", "xori"
789 and "not" instructions.
790 * v850_sim.h (reg_t): Registers are 32bits.
791 (_state): The V850 has 32 general registers. Add a 32bit
792 psw and pc register too. Add accessor macros
793
794 * Makefile.in, interp.c, v850_sim.h: Bring over endianness
795 changes from the d10v simulator.
796
797 * simops.c: Add shift support.
798
799 * simops.c: Add multiply & divide support. Abort for system
800 instructions.
801
802 * simops.c: Add logicals, mov, movhi, movea, add, addi, sub
803 and subr. No condition codes yet.
804
805 Wed Aug 28 13:53:22 1996 Jeffrey A Law (law@cygnus.com)
806
807 * ChangeLog, Makefile.in, configure, configure.in, v850_sim.h,
808 gencode.c, interp.c, simops.c: Created.
809