1 2015-04-18 Mike Frysinger <vapier@gentoo.org>
3 * sim-main.h (sim_cia): Delete.
4 (frv_sim_engine_halt_hook): Move below includes.
6 2015-04-17 Mike Frysinger <vapier@gentoo.org>
8 * sim-main.h (CIA_GET, CIA_SET): Delete.
9 * traps.c (frv_sim_engine_halt_hook): Change CIA_SET to CPU_PC_SET.
11 2015-04-15 Mike Frysinger <vapier@gentoo.org>
13 * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
14 * sim-main.h (STATE_CPU): Delete.
16 2015-04-15 Mike Frysinger <vapier@gentoo.org>
18 * sim-main.h (struct sim_state): Change cpu to an array of pointers.
19 (STATE_CPU): Handle WITH_SMP.
21 2015-04-13 Mike Frysinger <vapier@gentoo.org>
23 * configure: Regenerate.
25 2015-04-06 Mike Frysinger <vapier@gentoo.org>
27 * Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
29 2015-03-31 Mike Frysinger <vapier@gentoo.org>
31 * config.in, configure: Regenerate.
33 2015-03-24 Mike Frysinger <vapier@gentoo.org>
35 * configure: Regenerate.
37 2015-03-24 Mike Frysinger <vapier@gentoo.org>
39 * configure: Regenerate.
41 2015-03-23 Mike Frysinger <vapier@gentoo.org>
43 * configure: Regenerate.
45 2015-03-23 Mike Frysinger <vapier@gentoo.org>
47 * devices.c: Delete dv-sockser.h include.
48 (device_io_read_buffer): Delete uart code.
49 (device_io_write_buffer): Likewise.
51 2015-03-23 Mike Frysinger <vapier@gentoo.org>
53 * configure: Regenerate.
55 2015-03-16 Mike Frysinger <vapier@gentoo.org>
57 * aclocal.m4, config.in, configure: Regenerate.
58 * tconfig.in: Rename file ...
59 * tconfig.h: ... here.
61 2015-03-15 Mike Frysinger <vapier@gentoo.org>
63 * tconfig.in [HAVE_DV_SOCKSER]: Delete.
65 2015-03-14 Mike Frysinger <vapier@gentoo.org>
67 * Makefile.in (SIM_RUN_OBJS): Delete.
69 2014-08-23 Hans-Peter Nilsson <hp@axis.com>
71 * configure.ac: Default simulator hardware to off again. Remove
72 dead frv_extra_objs substitution.
73 * configure: Regenerate.
74 * Makefile.in: Remove unused frv_extra_objs.
76 2014-08-19 Alan Modra <amodra@gmail.com>
78 * configure: Regenerate.
80 2014-08-15 Roland McGrath <mcgrathr@google.com>
82 * configure: Regenerate.
83 * config.in: Regenerate.
85 2013-09-23 Alan Modra <amodra@gmail.com>
87 * configure: Regenerate.
89 2013-06-03 Mike Frysinger <vapier@gentoo.org>
91 * aclocal.m4, configure: Regenerate.
93 2013-03-30 Joel Sherrill <joel.sherrill@oarcorp.com>
94 Mike Frysinger <vapier@gentoo.org>
96 * configure.ac: Add frv_extra_objs. Change simulator hardware
97 from always on to defaulting to yes it is enabled.
98 * Makefile.in: Conditionalize reference to dv-sockser.o.
99 * configure: Regenerated.
101 2013-03-26 Mike Frysinger <vapier@gentoo.org>
103 * configure: Regenerate.
105 2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
107 * configure.ac: Fail if dv-sockser.o not available.
108 Error when --disable-sim-hardware is specified.
109 * configure: Regenerated.
111 2012-06-15 Joel Brobecker <brobecker@adacore.com>
113 * config.in, configure: Regenerate.
115 2012-03-24 Mike Frysinger <vapier@gentoo.org>
117 * aclocal.m4, config.in, configure: Regenerate.
119 2011-12-03 Mike Frysinger <vapier@gentoo.org>
121 * aclocal.m4: New file.
122 * configure: Regenerate.
124 2011-10-17 Mike Frysinger <vapier@gentoo.org>
126 * configure.ac: Change include to common/acinclude.m4.
128 2011-10-17 Mike Frysinger <vapier@gentoo.org>
130 * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER
131 call. Replace common.m4 include with SIM_AC_COMMON.
132 * configure: Regenerate.
134 2011-07-05 Mike Frysinger <vapier@gentoo.org>
136 * sim-if.c (sim_do_command): Delete.
138 2010-04-21 Mike Frysinger <vapier@gentoo.org>
140 * profile.c (sim_profile_print_bar): Add cpu argument.
142 2010-03-30 Mike Frysinger <vapier@gentoo.org>
144 * devices.c (device_error): Add const to message.
146 2010-02-12 Doug Evans <dje@sebabeach.org>
148 * decode.c, * decode.h: Regenerate.
150 2010-02-11 Doug Evans <dje@sebabeach.org>
152 * cpu.h, * decode.c, * model.c, * sem.c: Regenerate.
154 2010-01-24 Doug Evans <dje@sebabeach.org>
158 2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
160 * configure: Regenerate.
162 2010-01-02 Doug Evans <dje@sebabeach.org>
164 * arch.c, * arch.h, * cpu.c, * cpu.h, * cpuall.h, * decode.c,
165 * decode.h, * model.c, * sem.c: Regenerate, update copyright year.
167 2009-11-22 Doug Evans <dje@sebabeach.org>
170 * cpuall.h: Regenerate.
171 * decode.c: Regenerate.
172 * decode.h: Regenerate.
174 2009-11-03 Doug Evans <dje@sebabeach.org>
176 * arch.c: Regenerate.
177 * arch.h: Regenerate.
180 * cpuall.h: Regenerate.
181 * decode.c: Regenerate.
182 * decode.h: Regenerate.
183 * model.c: Regenerate.
186 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
188 * config.in: Regenerate.
189 * configure: Likewise.
191 * configure: Regenerate.
193 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
197 2008-12-23 Hans-Peter Nilsson <hp@axis.com>
199 * arch.c, arch.h, cpu.c, cpu.h, cpuall.h, decode.c, decode.h,
200 model.c, sem.c: Regenerate.
202 2008-07-11 Hans-Peter Nilsson <hp@axis.com>
204 * configure: Regenerate to track ../common/common.m4 changes.
207 2008-06-06 Vladimir Prus <vladimir@codesourcery.com>
208 Daniel Jacobowitz <dan@codesourcery.com>
209 Joseph Myers <joseph@codesourcery.com>
211 * configure: Regenerate.
213 2006-12-21 Hans-Peter Nilsson <hp@axis.com>
215 * config.in: Regenerate.
217 2006-06-13 Richard Earnshaw <rearnsha@arm.com>
219 * configure: Regenerated.
221 2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
223 * configure: Regenerated.
225 2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
227 * configure: Regenerated.
229 2005-10-28 Dave Brolley <brolley@redhat.com>
231 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
233 Contribute the following changes:
234 2003-09-29 Dave Brolley <brolley@redhat.com>
236 * frv-sim.h: Use CGEN_ATTR_VALUE_ENUM_TYPE in place of
237 CGEN_ATTR_VALUE_TYPE.
242 2005-03-23 Mark Kettenis <kettenis@gnu.org>
244 * configure: Regenerate.
246 2005-01-14 Andrew Cagney <cagney@gnu.org>
248 * configure.ac: Sinclude aclocal.m4 before common.m4. Add
249 explicit call to AC_CONFIG_HEADER.
250 * configure: Regenerate.
252 2005-01-12 Andrew Cagney <cagney@gnu.org>
254 * configure.ac: Update to use ../common/common.m4.
255 * configure: Re-generate.
257 2005-01-11 Andrew Cagney <cagney@localhost.localdomain>
259 * configure: Regenerated to track ../common/aclocal.m4 changes.
261 2005-01-07 Andrew Cagney <cagney@gnu.org>
263 * configure.ac: Rename configure.in, require autoconf 2.59.
264 * configure: Re-generate.
266 2004-12-08 Hans-Peter Nilsson <hp@axis.com>
268 * configure: Regenerate for ../common/aclocal.m4 update.
270 2004-08-27 Richard Sandiford <rsandifo@redhat.com>
272 * cpu.[ch], arch.[ch], decode.[ch]: Regenerated.
273 * cpuall.h, model.c, sem.c: Regenerated.
275 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
277 * Makefile.in (SIM_OBJS): Add profile-fr450.o.
278 (profile-fr450.o): New dependency.
279 (stamp-cpu): Add fr450 to the list of machs.
280 * sim-frv.h (SPR_IS_ACC): New macro.
281 (H_SPR_ACC4, H_SPR_ACC63, H_SPR_ACCG4, H_SPR_ACCG63): Delete.
282 * cache.c (frv_cache_init, non_cache_access): Handle bfd_mach_fr450.
283 * frv.c (check_register_alignment, check_fr_register_alignment)
284 (check_memory_alignment, do_media_average): Likewise.
285 (frvbf_clear_accumulators): Likewise. Use a mask of valid registers
286 rather than a consecutive range.
287 * interrupts.c (frv_queue_illegal_instruction_interrupt)
288 (frv_queue_non_implemented_instruction_interrupt): Handle
290 * memory.c (check_data_read_address, check_readwrite_address)
291 (check_insn_read_address, check_write_address): Likewise.
292 * mloop.in (@cpu@_simulate_insn_prefetch): Likewise.
293 * profile.c (reset_gr_flags, reset_fr_flags, reset_acc_flags)
294 (frvbf_model_insn_before, frvbf_model_insn_after): Likewise.
295 * profile-fr450.c: New file.
296 * registers.c (fr450_spr): New array.
297 (frv_register_control_init): Check its size. Use it for fr450.
298 (frv_check_register_access): Handle bfd_mach_fr450.
299 (frv_check_spr_read_access): Likewise. Generalize accumulator check.
300 * traps.c (frv_core_signal, frvbf_media_cr_not_aligned): Likewise.
301 (frvbf_media_acc_not_aligned): Likewise.
302 (frvbf_media_register_not_aligned): Likewise.
303 * arch.c: Regenerate.
304 * arch.h: Regenerate.
306 * cpuall.h: Regenerate.
307 * decode.h: Regenerate.
308 * model.c: Regenerate.
310 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
312 * cache.c (frv_cache_init): Change fr400 cache statistics to match
314 (non_cache_access): Add missing breaks.
315 * interrupts.c (set_exception_status_registers): Always set EAR15
316 for data_access_errors.
317 * memory.c (fr400_check_write_address): Remove redundant alignment
319 * model.c: Regenerate.
321 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
323 * frv.c (frvbf_iacc_cut): Rework, taking rounding into account.
325 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
327 * decode.c, decode.h, model.c, sem.c: Regenerate.
329 2003-11-24 Kevin Buettner <kevinb@redhat.com>
331 * frv-sim.h (GR_REGNUM_MAX, FR_REGNUM_MAX, PC_REGNUM, SPR_REGNUM_MIN)
332 (SPR_REGNUM_MAX): Delete.
333 * frv.c (gdb/sim-frv.h): Include.
334 (frvbf_fetch_register, frvbf_store_register): Use register number
335 constants from gdb/sim-frv.h. Check availability of general
336 purpose and float registers.
338 2003-11-03 Dave Brolley <brolley@redhat.com>
340 * cache.c (address_interference): Check for higher priority requests
341 in the same pipeline.
343 2003-10-31 Dave Brolley <brolley@redhat.com>
345 * frv-sim.h (LR_REGNUM): Removed.
346 (SPR_REGNUM_MIN,SPR_REGNUM_MAX): New macros.
347 * frv.c (frvbf_fetch_register): Fetch SPR registers based on
348 SPR_REGNUM_MIN and SPR_REGNUM_MAX. Check whether SPRs are implemented.
349 Return 0 for an unimplemented register. Return the length of the data
350 for an implemented register.
351 (frvbf_store_register): Ditto.
353 2003-10-30 Andrew Cagney <cagney@redhat.com>
355 * traps.c: Replace "struct symbol_cache_entry" with "struct
358 2003-10-10 Dave Brolley <brolley@redhat.com>
360 * cpu.h, sem.c: Regenerate.
362 2003-10-06 Dave Brolley <brolley@redhat.com>
364 * profile-fr550.[ch]: New files.
365 * configure.in: Move frv handling to alphabetically correct placement.
366 * Makefile.in: Add fr550 support.
367 * frv-sim.h,frv.c,interrups.c,memory.c,mloop.in,pipeline.c,
368 profile.[ch],registers.c,traps.c: Add fr550 support.
369 * arch.c,arch.h,cpu.c,cpu.h,cpuall.h,model.h,decode.c,decode.h,sem.c:
372 2003-09-25 Dave Brolley <brolley@redhat.com>
374 * reset.c (frv_initialize): Call frv_register_control_init first.
376 2003-09-24 Dave Brolley <brolley@redhat.com>
378 * profile.h (update_FR_ptime): New prototype.
379 (update_FRdouble_ptime): Ditto.
380 (update_SPR_ptime): Ditto.
381 (increase_ACC_busy): Ditto.
382 (enforce_full_acc_latency): Ditto.
383 (post_wait_for_SPR): Ditto.
384 * profile.c (update_FR_ptime): Moved here from profile-fr500.c.
385 (update_FRdouble_ptime): Ditto.
386 (update_SPR_ptime): New function.
387 (increase_ACC_busy): Ditto.
388 (enforce_full_acc_latency): Ditto.
389 (vliw_wait_for_fdiv_resource): Correct resource name.
390 (vliw_wait_for_fsqrt_resource): Ditto.
391 (post_wait_for_SPR): New function.
392 * profile-fr500.c (frvbf_model_fr500_u_commit): New function.
393 (frvbf_model_fr500_u_gr2fr): Pass out_FRk as output register to
394 adjust_float_register_busy.
395 (frvbf_model_fr500_u_gr_load): Record latency of SPR registers.
396 (frvbf_model_fr500_u_fr_load): Wait for and record latency of SPR
398 (frvbf_model_fr500_u_float_arith): Ditto.
399 (frvbf_model_fr500_u_float_dual_arith): Ditto.
400 (frvbf_model_fr500_u_float_div): Ditto.
401 (frvbf_model_fr500_u_float_sqrt): Ditto.
402 (frvbf_model_fr500_u_float_convert): Ditto.
403 (update_FR_ptime): Moved to profile.c
404 (update_FRdouble_ptime): Moved to profile.c
405 * profile-fr400.c (update_FR_ptime): Removed. Identical to functions
407 (update_FRdouble_ptime): Ditto.
408 * arch.h,cpu.h,sem.c,decode.[ch],model.c,sem.c: Regenerated.
410 2003-09-12 Dave Brolley <brolley@redhat.com>
412 * registers.c (frv_check_spr_read_access): Check for access to
413 ACC4-ACC63 and ACCG4-ACCG63.
414 * profile.h (frv-desc.h): #include it.
415 (spr_busy): New member of FRV_PROFILE_STATE.
416 (spr_latency): Ditto.
417 (GNER_FOR_GR): New macro.
418 (FNER_FOR_FR): New maccro.
419 (update_SPR_latency): New function.
420 (vliw_wait_for_SPR): New function.
421 * profile.c (update_latencies): Update SPR latencies.
422 (update_target_latencies): Ditto.
423 (update_SPR_latency): New function.
424 (vliw_wait_for_SPR): New function.
425 * profile-fr500.c (frvbf_model_fr500_u_idiv): Record GNER latency.
426 (frvbf_model_fr500_u_trap): Removed unused variable, ps.
427 (frvbf_model_fr500_u_check): Ditto.
428 (frvbf_model_fr500_u_clrgr): New unit modeller for fr500.
429 (frvbf_model_fr500_u_clrfr): Ditto.
430 (frvbf_model_fr500_u_spr2gr): Wait for SPR.
431 (frvbf_model_fr500_u_gr2spr): Ditto.
432 * frv-sim.h (H_SPR_ACC4): New macro.
433 (H_SPR_ACCG4): New macro;
434 (H_SPR_ACC0): Removed.
435 (H_SPR_ACCG0): Removed.
436 * arch.h,model.c,sem[ch],decode.[ch]: Regenerated.
438 2003-09-10 Dave Brolley <brolley@redhat.com>
440 * profile.c (slot_names): FM1 was listed twice. Changed first
441 instance to FM0. Added IALL, FMALL and FMLOW.
442 (print_parallel): Don't examine slots with no insns.
444 2003-09-09 Dave Brolley <brolley@redhat.com>
446 * frv.c (do_media_average): Select machine using a switch.
448 2003-09-08 Dave Brolley <brolley@redhat.com>
450 On behalf of Doug Evans <dje@sebabeach.org>
451 * Makefile.in (stamp-arch,stamp-cpu): Pass archfile to cgen.
452 Remove copying of .cpu file to cgen/cpu, no longer needed.
454 2003-09-03 Dave Brolley <brolley@redhat.com>
456 * cpu.h, model.c, sem.c, decode.h, decode.c: Regenerated.
458 2003-08-29 Dave Brolley <brolley@redhat.com>
460 * Makefile.in (stamp-arch): Copy frv.cpu from $(srcdir)../../cpu
461 temporarily when regenerating files.
464 2003-08-20 Micheal Snyder <msnyder@redhat.com>
466 * All generated files: Regenerate.
468 2001-10-11 Dave Brolley <brolley@redhat.com>
470 * cpu.h,decode.c,decode.h,sem.c: Regenerate.
472 2001-10-09 Dave Brolley <brolley@redhat.com>
474 * traps.c (frv_rett): Halt if PSR.S and PSR.ET are both set or both
476 * reset.c (frv_hardware_reset): Invalidate both caches.
477 * registers.c: Update init, reset and read-only masks for all registers
479 * profile.h (cur_gr_complex): New field of FRV_PROFILE_STATE
480 (prev_gr_complex): New field of FRV_PROFILE_STATE
481 (set_use_is_gr_complex): New function.
482 (set_use_not_gr_complex): New function.
483 (use_is_gr_complex): New function.
484 (decrease_GR_busy): New function.
485 * profile.c (reset_gr_flags): New function.
486 (reset_cc_flags): New function.
487 (set_use_is_gr_complex): New function.
488 (set_use_not_gr_complex): New function.
489 (use_is_gr_complex): New function.
490 (update_latencies): Reset gr and cc flags when latency reaches 0.
491 (decrease_GR_busy): New function.
492 * profile-fr400.h (fr500_reset_acc_flags): Removed.
493 (fr500_reset_cc_flags): New function.
494 * profile-fr500.c (frvbf_model_fr400_u_*): Reflect latencies from fr500
496 * profile-fr400.h (fr400_reset_gr_flags): New function.
497 (fr400_reset_fr_flags): New function.
498 (fr400_reset_acc_flags): New function.
499 * profile-fr400.c (set_use_not_media_p4): New function.
500 (set_use_not_media_p6): New function.
501 (set_acc_use_not_media_p2): New function.
502 (set_acc_use_not_media_p4): New function.
503 (fr400_reset_gr_flags): New function.
504 (fr400_reset_fr_flags): New function.
505 (fr400_reset_acc_flags): New function.
506 (frvbf_model_fr400_u_*): Reflect latencies from fr400 LSI version 1.1.
507 (frvbf_model_fr400_u_media_hilo): New function.
508 * pipeline.c (frv_vliw_setup_insn): Don't clear MSR0.MTT.
509 * memory.c (fr400_check_data_read_address): Check address range only
510 for double word loads. Don't check alignment here.
511 (fr400_check_readwrite_address): New function.
512 (fr500_check_readwrite_address): New function.
513 (check_readwrite_address): New function.
514 (fr500_check_insn_read_address): Correct address ranges.
515 (frvbf_read_mem_*): Check address range here.
516 (frv_address_forbidden): Removed.
517 (fr400_check_write_address): New function.
518 (check_write_address): New function.
519 (frvbf_write_mem_*): Don't check address range here.
520 (frvbf_mem_set_*): Check address range here.
521 * interrupts.c (frv_queue_data_access_error_interrupt): Now takes an
522 address as second argument.
523 (frv_queue_data_access_exception_interrupt): New function.
524 (frv_queue_illegal_instruction_interrupt): Generate fp_exception for
525 media insns on fr400.
526 (frv_queue_non_implemented_instruction_interrupt): Generate mp_exception
527 for media insns on fr400.
528 (frv_detect_insn_access_interrupts): Don't check for illegal addresses
529 of insns here. Check for MTRAP insn if PSR.EM is not set.
530 (frv_set_mp_exception_registers): Only set MSR0.MTT if it is not already
532 (set_exception_status_registers): Do not always set EPCR. Set EAR for
533 data_acess_error only if not fr400.
534 * frv.c (do_media_average): New function.
535 (frvbf_media_average): New function.
536 (frvbf_insn_cache_invalidate): Check for illegal invocation.
537 (frvbf_data_cache_invalidate): Ditto.
538 (frvbf_data_cache_flush): Ditto.
539 * frv-sim.h (GET_FSR_QNE): New macro.
540 (frv_msr_mtt): Remove MTT_SEQUENCE_ERROR.
541 (GET_MSR_SRDAV): New macro.
542 (GET_MSR_RDAV): New macro.
543 (GET_MSR_RD): New macro.
544 (frv_queue_data_access_error_interrupt): Now takes an address as second
546 (frv_address_forbidden): Removed.
547 * cache.c (non_cache_access): Correct address ranges. Now takes cache
549 * arch.h,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
551 2001-08-20 Dave Brolley <brolley@redhat.com>
553 * sim-main.h (_sim_cpu): New field 'elf_flags'.
554 * sim-if.c (sim_open): Extract the elf_flags from the input file and
555 save them with each cpu.
556 * mloop.in (main loop): Pass elf flags to frv_vliw_reset. Set
557 last_insn_p before executing the insn.
558 * cache.c (frv_cache_invalidate): Flush scache if this is the cpu's
560 (frv_cache_invalidate_all): Ditto.
562 2001-08-20 Richard Sandiford <rsandifo@redhat.com>
564 * traps.c (syscall_read_mem): Flush the data cache before reading.
565 (syscall_write_mem): Flush the data cache before writing.
566 Invalidate both caches.
568 2001-07-05 Ben Elliston <bje@redhat.com>
570 * Makefile.in (stamp-arch): Use $(CGEN_CPU_DIR).
571 (stamp-cpu): Likewise.
573 2001-05-23 Dave Brolley <brolley@redhat.com>
575 * profile-fr400.c (acc_use_is_media_p2): New function.
576 (frvbf_model_fr400_u_media_2): Account for latency of output
578 (frvbf_model_fr400_u_media_2_quad): Ditto.
579 (frvbf_model_fr400_u_media_2_acc): New function.
580 (frvbf_model_fr400_u_media_2_acc_dual): New function.
581 (frvbf_model_fr400_u_media_2_add_sub): New function.
582 (frvbf_model_fr400_u_media_2_add_sub_dual): New function.
583 (frvbf_model_fr400_u_media_3_dual): New function.
584 (frvbf_model_fr400_u_media_4_acc_dual): New function.
585 * arch.h,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
587 2001-05-15 Dave Brolley <brolley@redhat.com>
589 * registers.c (fr400_spr): Enable write access to HSR0.CBM.
590 * profile.h (FRV_PROFILE_STATE): New field 'all_cache_entries'.
591 * profile.c (CACHE_QUEUE_ELEMENT): New 'all' field.
592 (request_cache_flush): Save 'all' argument.
593 (request_cache_invalidate): Save all_cache_entries from profile state
594 to 'all' field of the request.
595 (submit_cache_request): Pass the 'all' field of the request to
596 frv_cache_request_invalidate.
597 * frv.c (frv_insn_cache_invalidate): Add new 'all' parameter. Perform
598 operation even if HSR0.ICE is not set.
599 (frv_data_cache_invalidate): Add new 'all' parameter. Perform
600 operation even if HSR0.DCE is not set.
601 (frv_data_cache_flush): Ditto.
602 * frv-sim.h (frv_insn_cache_invalidate): Add new 'all' parameter.
603 (frv_data_cache_invalidate): Add new 'all' parameter.
604 (frv_data_cache_flush): Add new 'all' parameter.
605 * cache.h (FRV_CACHE_INVALIDATE_REQUEST): Add new 'all' field.
606 (frv_cache_request_invalidate): Add new 'all' parameter.
607 * cache.c (frv_cache_request_invalidate): Add new 'all' parameter. Save
608 its value in the invalidate request.
609 (address_interference): Accept the value '-1' for the address argument
610 to mean 'any address'.
611 (handle_req_invalidate): Handle request to invalidate all cache lines.
612 * cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
614 2001-05-14 Dave Brolley <brolley@redhat.com>
616 * profile.h (past_first_p): New field of profiling state.
617 (branch_penalty): Ditto.
618 (branch_hint): Ditto.
619 (update_branch_penalty): New function.
620 * profile.c (frvbf_model_insn_after): Reset past_first_p and
621 branch_address fields of the profiling state.
622 (frvbf_model_branch): New function.
623 (update_branch_penalty): New function.
624 * profile-fr500.c (frvbf_model_fr500_u_branch): Remove ICCi_3 and
626 (frvbf_model_fr500_u_trap): New function.
627 (frvbf_model_fr500_u_check): New function.
628 (frvbf_model_fr500_u_media_dual_htob): post-processing latency is 3
630 * profile-fr400.c (frvbf_model_fr400_u_branch): Set branch penalties
631 as documented in the fr400 LSI. Remove ICCi_3 and FCCi_3 inputs.
632 (frvbf_model_fr400_u_media_dual_expand): Check resource usage as
633 documented in teh fr400 LSI.
634 (frvbf_model_fr400_u_media_dual_htob): Ditto.
635 (frvbf_model_fr400_u_media_dual_unpack): Removed.
636 (frvbf_model_fr500_u_trap): New function.
637 (frvbf_model_fr500_u_check): New function.
638 * mloop.in (simulate_dual_insn_prefetch): New function.
639 (@cpu@_simulate_insn_prefetch): Call simulate_dual_insn_prefetch with
640 arguments for each machine type.
641 * arch.h,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
643 2001-05-09 Dave Brolley <brolley@redhat.com>
645 * Makefile.in (profile.o): Add profile-fr400.h as a dependency.
646 (profile-fr400.o): New target.
647 * profile.c: New file.
648 * profile.h: New file.
649 * profile-fr400.c: New file.
650 * profile-fr400.h: New file.
651 * profile-fr500.c: New file.
652 * profile-fr500.h: New file.
653 * arch.h,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
655 2001-05-02 Dave Brolley <brolley@redhat.com>
657 * sim-main.h (profile.h): #include it.
658 (CPU_PROFILE_STATE): New macro.
659 (profile_state): New frv specific cpu field.
660 * reset.c (frv_initialize): insn_fetch_address and branch_address now
661 part of global profiling state.
662 * Makefile.in (SIM_OBJS): Add profile.o and profile-fr500.o.
663 (SIM_EXTRA_DEPS): Add profile.h.
664 (registers.o): Correct name of source file.
665 (profile.o): New target.
666 (profile-fr500.o): New target.
667 * frv-sim.h: Move profile related data structures to profile.h.
668 * frv.c: Move fr500 specific functions to profile-fr500.c.
669 * cpu.h: Regenerated.
671 2001-04-27 Dave Brolley <brolley@redhat.com>
673 * sim-main.h (CPU_PIPELINE): Renamed to CPU_VLIW.
674 * interrupts.c: Rename FRV_PIPELINE to FRV_VLIW.
675 Rename pipeline to vliw. Rename CPU_PIPELINE to CPU_VLIW.
676 Rename PIPE_* to UNIT_*.
677 (frv_queue_illegal_instruction_interrupt): Use
678 frv_is_float_insn and frv_is_media_insn.
679 (frv_queue_non_implemented_instruction_interrupt): Ditto.
680 (frv_detect_insn_access_interrupts): Ditto.
681 * frv.c: Rename FRV_PIPELINE to FRV_VLIW. Rename pipeline to vliw.
682 Rename CPU_PIPELINE to CPU_VLIW. Rename PIPE_* to UNIT_*.
686 * frv-sim.h (frv_pipeline_setup_insn): Renamed to frv_vliw_setup_insn.
687 * cache.c: Rename PIPE_* to UNIT_*.
689 2001-04-24 Dave Brolley <brolley@redhat.com>
691 * frv.c (frvbf_load_quad_GR): Delete have_data and hsr0.
692 (frvbf_load_quad_FRint): Ditto.
693 (frvbf_load_quad_CPR): Ditto.
694 * cache.c (frv_cache_init): Initialize cache for fr400 vs other
696 (bfd.h): #include it.
697 (non_cache_access): Update for revised fr500 and for fr400.
698 * registers.c (frv_spr): Don't reset PSR.PS.
700 (frv_reset_spr): Set PSR.PS to the former value of PSR.S.
702 2001-04-23 Dave Brolley <brolley@redhat.com>
704 * traps.c (frv_core_signal): On fr400, generate data_access_error.
705 (frvbf_media_cr_not_aligned): On fr400, generate illegal_instruction.
706 (frvbf_media_acc_not_aligned): Ditto.
707 (frvbf_media_register_not_aligned): Ditto.
708 (frvbf_division_exception): Use GET_ISR_EDE.
709 * registers.c (frv_check_spr_read_access): New function.
710 (frv_check_spr_write_access): New function.
711 (frv_check_spr_access): Deleted.
712 (frv_check_register_access): On fr400, generate illegal_instruction.
713 * memory.c (fr400_check_data_read_address): New function.
714 (fr500_check_data_read_address): Ditto.
715 (check_data_read_address): Ditto.
716 (fr400_check_insn_read_address): Ditto.
717 (fr500_check_insn_read_address): Ditto.
718 (check_insn_read_address): Ditto.
719 (frvbf_read_mem_QI): Call check_data_read_access.
720 (frvbf_read_mem_UQI): Ditto.
721 (frvbf_read_mem_HI): Ditto.
722 (frvbf_read_mem_UHI): Ditto.
723 (frvbf_read_mem_SI): Ditto.
724 (frvbf_read_mem_DI): Ditto.
725 (frvbf_read_mem_DF): Ditto.
726 (frvbf_read_imem_USI): Call check_insn_read_access.
727 (frv_address_forbidden): Now takes cpu as first argument. Check based
729 (fr400_mem_address_unaligned): New function.
730 (fr500_mem_address_unaligned): Ditto.
731 (check_write_address): Ditto.
732 (frvbf_mem_set_QI): Call check_write_address.
733 (frvbf_mem_set_HI): Ditto.
734 (frvbf_mem_set_SI): Ditto.
735 (frvbf_mem_set_DI): Ditto.
736 (frvbf_mem_set_DF): Ditto.
737 (frvbf_mem_set_XI): Ditto.
738 * interrupts.c (bfd.h): #include it.
739 (frv_queue_data_access_error_interrupt): New function.
740 (frv_queue_instruction_access_error_interrupt): New function.
741 (frv_queue_instruction_access_exception_interrupt): New function.
742 (frv_queue_illegal_instruction_interrupt): No fp_exception on fr400.
743 (frv_queue_non_implemented_instruction_interrupt): Ditto.
744 (frv_detect_insn_access_interrupts): Reorder tests to match priority
746 (set_isr_exception_fields): Accumulate dtt bits.
747 * frv.c (check_register_alignment): New function.
748 (check_fr_register_alignment): New function.
749 (check_memory_alignment): New function.
750 (frvbf_h_gr_double_get_handler): Call check_register_alignment.
751 (frvbf_h_gr_double_set_handler): Ditto.
752 (frvbf_h_cpr_double_get_handler): Ditto.
753 (frvbf_h_cpr_double_set_handler): Ditto.
754 (frvbf_h_gr_quad_set_handler): Ditto.
755 (frvbf_h_cpr_quad_set_handler): Ditto.
756 (frvbf_h_fr_double_get_handler): Call check_fr_register_alignment.
757 (frvbf_h_fr_double_set_handler): Ditto.
758 (frvbf_h_fr_quad_set_handler): Ditto.
759 (frvbf_h_spr_get_handler): Call frv_check_spr_read_access.
760 (frvbf_h_spr_set_handler): Call frv_check_spr_write_access.
761 (frvbf_load_quad_GR): Call check_memory_aligment.
762 (frvbf_load_quad_FRint): Ditto.
763 (frvbf_load_quad_CPR): Ditto.
764 (frvbf_store_quad_GR): Call check_memory_aligment and
765 check_register_alignment.
766 (frvbf_store_quad_FRint): Ditto.
767 (frvbf_store_quad_CPR): Ditto.
768 (frvbf_signed_integer_divide: Use GET_ISR_EDEM.
769 * frv-sim.h (H_SPR_ACC0): New macro.
770 (H_SPR_ACC63): New macro.
771 (H_SPR_ACCG0): New macro.
772 (H_SPR_ACCG63): New macro.
773 (frv_dtt): New enumerator.
774 (GET_ISR_EDE): Renamed from GET_ISR_EDEM.
775 (GET_ISR_DTT): New macro.
776 (frv_queue_data_access_error_interrupt): New function.
777 (frv_queue_instruction_access_error_interrupt): New function.
778 (frv_queue_instruction_access_exception_interrupt): New function.
779 (frv_address_forbidden): Now takes cpu as first argument.
782 2001-04-10 Dave Brolley <brolley@redhat.com>
784 * registers.c (fr500_spr): Add new fields to fr500 PSR register.
785 (fr500_spr): Add STBAR and MMCR unimplemented registers for fr500.
786 (fr400_spr): Implement SPR registers for fr400.
787 (frv_register_control_init): Handle bfd_mach_fr400 properly.
788 * frv.c (spr_bpsr_get_handler): Mask field before shifting.
789 (spr_psr_get_handler): Ditto.
790 (spr_ccr_get_handler): Ditto.
791 (spr_cccr_get_handler): Ditto.
792 (frvbf_clear_accumulators): Only 4 accumulators on fr400.
793 * frv-sim.h: Update comment about MCCR_* macros.
794 * cpu.c,cpu.h: Regenerate.
796 2001-04-05 Dave Brolley <brolley@redhat.com>
798 * cpu.h,decode.c,model.c,sem.c: Regenerate.
800 2001-04-05 Dave Brolley <brolley@redhat.com>
802 * reset.c: Update copyright.
803 * registers.c (frv_register_control_init): Handle bfd_mach_fr400.
804 * frv.c (frvbf_model_fr400_u_exec): New function.
805 * Makefile.in (stamp-cpu): Add fr400 to list of machines.
806 * arch.c,arch.h,cpu.c,cpu.h,cpuall.h,model.h,decode.c,decode.h,sem.c:
809 2000-11-22 Dave Brolley <brolley@redhat.com>
811 * arch.c,arch.h,cpu.c,cpu.h,cpuall.h,model.h,decode.c,decode.h,sem.c:
814 2000-11-10 Dave Brolley <brolley@redhat.com>
816 * decode.c: Regenerate.
818 2000-09-12 Dave Brolley <brolley@redhat.com>
820 * traps.c (frv_sim_engine_halt_hook): New function.
821 (frv_itrap): Caches now invalidated in sim_engine_halt via
822 SIM_ENGINE_HALT_HOOK.
824 * sim-main.h (frv_sim_engine_halt_hook): New function.
825 (SIM_ENGINE_HALT_HOOK): New macro.
826 (SIM_ENGINE_RESTART_HOOK): New macro.
827 * interrupts.c: Call to frv_term now done within sim_engine_halt via
828 SIM_ENGINE_HALT_HOOK.
830 2000-09-08 Dave Brolley <brolley@redhat.com>
832 * traps.c (frv_itrap): Invalidate and flush the data and insn caches
833 respectively when stopping for a breakpoint.
835 * cache.h (frv_cache_invalidate_all): New function.
836 * cache.c (frv_cache_invalidate_all): New function.
838 2000-09-05 Dave Brolley <brolley@redhat.com>
840 * traps.c (frv_break): If SIM_HAVE_BREAKPOINTS, call
841 sim_handle_breakpoint. Otherwise if environment != operating call
842 sim_engine_halt. Otherwise handle normally.
843 * interrupts.c (frv_queue_break_interrupt): Don't handle debugger
844 breakpoints here. Moved to frv_break in traps.c.
848 2000-09-01 Dave Brolley <brolley@redhat.com>
850 * interrupts.c (frv_queue_break_interrupt): Call sim_handle_breakpoint
851 before queuing an interrupt in order to allow 'break' to be used as
854 2000-08-29 Dave Brolley <brolley@redhat.com>
856 * traps.c (frv_itrap): Invalidate the insn cache at a breakpoint.
858 2000-07-27 Dave Brolley <brolley@redhat.com>
860 * cpu.h,decode.c: Rebuild.
862 2000-07-26 Dave Brolley <brolley@redhat.com>
864 * frv.c (spr_cccr_get_handler): Change CRx to CCx.
865 (spr_cccr_set_handler): Change CRx to CCx.
866 * cpu.h,decode.c,decode.h,model.c,sem.c: Rebuild.
868 2000-07-24 Dave Brolley <brolley@redhat.com>
871 * frv.c (frvbf_unsigned_integer_divide): Queue a write for the result.
872 Don't write it directly.
874 Thu Jul 6 13:51:12 2000 Dave Brolley <brolley@topaz>
876 * configure: Regenerated to track ../common/aclocal.m4 changes.
878 2000-07-05 Ben Elliston <bje@redhat.com>
880 * configure: Regenerated to track ../common/aclocal.m4 changes.
882 2000-06-28 Dave Brolley <brolley@redhat.com>
884 * cpu.h,decode.c,decode.h,model.c,sem.c: Rebuild.
886 2000-06-21 Dave Brolley <brolley@redhat.com>
888 * pipeline.c: All code except frv_pipeline_setup_insn moved to
890 * mloop.in (main loop): frv_pipeline_add_insn broken up into
891 frv_pipeline_add_insn and frv_pipeline_setup_insn.
892 * frv-sim.h: Move pipeline status code to frv.opc.
893 * model.c: Regenerate.
895 2000-06-12 Dave Brolley <brolley@redhat.com>
897 * options.c (frv_option_handler): --profile-parallel implies
899 * mloop.in (fetch_buffer): Removed.
900 (@cpu@_simulate_insn_prefetch): Monitoring of fetch buffer moved to
901 run_caches. Use cache directly if not counting cycles. Don't use
902 cache at all if not counting cycles and cache not enabled.
903 * frv.c (frv_insn_fetch_buffer): New global variable.
904 (run_caches): Monitor the status of insn prefetch requests.
905 * frv-sim.h (FRV_INSN_FETCH_BUFFER): New struct type.
906 (frv_insn_fetch_buffer): New global variable.
908 2000-06-12 Dave Brolley <brolley@redhat.com>
910 * mloop.in (fetch_buffer): New static struct.
911 (@cpu@_simulate_insn_prefetch): Rewritten.
912 * cache.c (frv_cache_request_invalidate): Don't invalidate return
914 (address_interference): Defer to any WAR request in either pipeline.
916 2000-06-09 Dave Brolley <brolley@redhat.com>
918 * pipeline.c (insns_in_slot): New Array.
919 (frv_pipeline_add_insn): Call COUNT_INSNS_IN_SLOT.
920 * options.c (frv_options): Remove 'NONBLOCK' argument from data-cache
922 (parse_cache_option): New function.
923 (frv_option_handler): Call parse_cache_option.
924 * frv.c (vliw_branch_taken): New variable.
925 (vliw_load_stall): New variable.
926 (handle_resource_wait): Update vliw_load_stall.
927 (frvbf_model_insn_before): Initialize vliw_branch_taken and
929 (frvbf_model_insn_after): Increment PROFILE_MODEL_LOAD_STALL_CYCLES.
930 (load_wait_for_FR): Update vliw_load_stall.
931 (load_wait_for_GR): Update vliw_load_stall.
932 (load_wait_for_FRdouble): Update vliw_load_stall.
933 (load_wait_for_GRdouble): Update vliw_load_stall.
934 (frvbf_model_fr500_u_branch): Count branches taken and not taken.
935 (slot_names): New static array.
936 (print_parallel): Now takes second argument 'verbose'. Print cycles per
937 VLIW insn and instructions per cycle. Also tabulate the number of insns
938 in each type of VLIW slot.
939 (frv_profile_info): Call print_parallel with new second argument.
940 * frv-sim.h (insn_in_slot): New array.
941 (COUNT_INSNS_IN_SLOT): New macro.
942 (INSNS_IN_SLOT): New macro.
943 * cache.c: Remove references to non_blocking_count. Remove references to
944 last_was_hit. Remove references to req_none.
945 (handle_req_store): Adjust statistics before requeuing the store
947 (handle_req_WAR): Don't let the WAR request affect the cache statistics.
948 * cache.h: Remove references to non_blocking_count. Remove references to
949 last_was_hit. Remove references to req_none.
950 * model.c: Regenerate.
952 2000-06-08 Dave Brolley <brolley@redhat.com>
954 * frv.c (request_complete): Copy load data from the correct return
957 2000-06-07 Dave Brolley <brolley@redhat.com>
959 * traps.c (frv_core_signal): Call frv_term before exiting.
960 (frv_itrap): Call frv_term before exiting.
961 (next_available_nesr): Make sure NECR is implemented before reading it.
962 (next_valid_nesr): Ditto.
963 (frvbf_check_non_excepting_load): Ditto.
964 (frvbf_clear_ne_flags): Ditto.
965 (frvbf_commit): Ditto.
966 (frvbf_check_recovering_store): Delay cache operation if 'model_insn'.
967 * sim-main.h (_sim_cpu): Add load_address, load_length, load_flag and
969 (CPU_LOAD_ADDRESS): New macro.
970 (CPU_LOAD_LENGTH): New macro.
971 (CPU_LOAD_SIGNED): New macro.
972 (CPU_LOAD_LOCK): New macro.
973 * reset.c (frv_term): New function.
974 (frv_power_on_reset): Use SETMEMSI if the cache is not enabled.
975 (frv_hardware_reset): Use SETMEMSI if the cache is not enabled.
976 (frv_software_reset): Use SETMEMSI if the cache is not enabled.
977 * mloop.in (execute): Call FRV_COUNT_CYCLES to decide whether to model
978 the insn. Model the insn in two passes. One before and one after
980 (cache_reqno): new static variable.
981 (@cpu@_simulate_insn_prefetch): Model fetch latency by waiting for the
982 cache rather than assuming a fixed latency.
983 (xinit): Turn on PROFILE_MODEL_P before each vliw insn if the timer is
984 enabled so that modeling data is collected by cgen during execution.
985 (full-exec): Restore PROFILE_MODEL_P after each vliw insn.
986 * memory.c (data_non_cache_access): Removed.
987 (insn_non_cache_access): Removed.
988 (frvbf_read_mem_QI): Delay read operation if 'model_insn'.
989 (frvbf_read_mem_UQI): Delay read operation if 'model_insn'.
990 (frvbf_read_mem_HI): Delay read operation if 'model_insn'.
991 (frvbf_read_mem_UHI): Delay read operation if 'model_insn'.
992 (frvbf_read_mem_SI): Delay read operation if 'model_insn'.
993 (frvbf_read_mem_DI): Delay read operation if 'model_insn'.
994 (frvbf_read_mem_DF): Delay read operation if 'model_insn'.
995 (frvbf_read_imem_USI): Read the cache or ememory passively.
996 (frvbf_write_mem_QI): Don't check for non-cache access here.
997 (frvbf_write_mem_UQI): Call frvbf_write_mem_QI.
998 (frvbf_write_mem_HI): Don't check for non-cache access here.
999 (frvbf_write_mem_UHI): Call frvbf_write_mem_QI.
1000 (frvbf_write_mem_SI): Don't check for non-cache access here.
1001 (frvbf_write_mem_DI): Don't check for non-cache access here.
1002 (frvbf_write_mem_DF): Don't check for non-cache access here.
1003 (frvbf_mem_set_QI): Use cycle-accurate cache write if 'model_insn'.
1004 (frvbf_mem_set_HI): Use cycle-accurate cache write if 'model_insn'.
1005 (frvbf_mem_set_SI): Use cycle-accurate cache write if 'model_insn'.
1006 (frvbf_mem_set_DI): Use cycle-accurate cache write if 'model_insn'.
1007 (frvbf_mem_set_DF): Use cycle-accurate cache write if 'model_insn'.
1008 (frvbf_mem_set_XI): Use cycle-accurate cache write if 'model_insn'.
1009 * interrupts.c (check_reset): Read the cache and memory passively.
1010 (frv_program_or_software_interrupt): Call frv_term before calling
1012 * frv.c (all modeling functions): Break into two passes. One before
1013 execuetion and one after. call load_wait_for_* for all GR and FR
1015 (frvbf_load_quad_GR): Delay performing the load if 'model_insn'.
1016 (frvbf_load_quad_FRint): Delay performing the load if 'model_insn'.
1017 (frvbf_load_quad_CPR): Delay performing the load if 'model_insn'.
1018 (frvbf_insn_cache_preload): Delay cache operation if 'model_insn'.
1019 (frvbf_data_cache_preload): Delay cache operation if 'model_insn'.
1020 (frvbf_insn_cache_unlock): Delay cache operation if 'model_insn'.
1021 (frvbf_data_cache_unlock): Delay cache operation if 'model_insn'.
1022 (frvbf_insn_cache_invalidate): Delay cache operation if 'model_insn'.
1023 (frvbf_data_cache_invalidate): Delay cache operation if 'model_insn'.
1024 (frvbf_data_cache_flush): Delay cache operation if 'model_insn'.
1025 (model_insn): New global variable.
1026 (fr_ptime): New array.
1027 (cache_request): New enumeration.
1028 (CACHE_QUEUE_ELEMENT): New struct type.
1029 (CACHE_QUEUE_SIZE): New macro.
1030 (cache_queue): New static struct.
1031 (request_cache_load): New function.
1032 (request_cache_flush): New function.
1033 (request_cache_invalidate): New function.
1034 (request_cache_preload): New function.
1035 (request_cache_unlock): New function.
1036 (submit_cache_request): New function.
1037 (activate_cache_requests): New function.
1038 (load_pending_for_register): New function.
1039 (flush_pending_for_address): New function.
1040 (remove_cache_queue_element): New function.
1041 (copy_load_data): New function.
1042 (request_complete): New function.
1043 (run_caches): New function.
1044 (frv_model_trace_wait_cycles): New function.
1045 (wait_for_flush): New function.
1046 (frvbf_model_insn_before): Insn prefect wait now modeled in
1047 frvbf_simulate_insn_prefetch. Incremement vliw_insns here. Call
1049 (frvbf_model_insn_after): Call activate_cache_requests. Don't increment
1050 vliw_insns here anymore.
1051 (update_FR_latency_for_load): New function.
1052 (update_FRdouble_latency_for_load): New function.
1053 (update_FR_ptime): New function.
1054 (update_FRdouble_ptime): New function.
1055 (update_GR_latency_for_swap): New function.
1056 (load_wait_for_GR): New function.
1057 (load_wait_for_FR): New function.
1058 (load_wait_for_GRdouble): New function.
1059 (load_wait_for_FRdouble): New function.
1060 (frvbf_model_fr500_u_ici): New function.
1061 (frvbf_model_fr500_u_dci): New function.
1062 (frvbf_model_fr500_u_dcf): New function.
1063 (frvbf_model_fr500_u_icpl): New function.
1064 (frvbf_model_fr500_u_dcpl): New function.
1065 (frvbf_model_fr500_u_icul): New function.
1066 (frvbf_model_fr500_u_dcul): New function.
1067 * frv-sim.h (frv_term): New function.
1068 (insn_non_cache_access): Removed.
1069 (FRV_COUNT_CYCLES): New macro.
1070 (frv_save_peofile_model_p): New global variable.
1071 (model_insn): New enumerated global variable.
1072 (frv_model_advance_cycles): New function.
1073 (frv_model_trace_wait_cycles): New function.
1074 * cache.h (FRV_CACHE_REQUEST_KIND): New enumeration.
1075 (FRV_CACHE_WAR_REQUEST): New struct type.
1076 (FRV_CACHE_STORE_REQUEST): New struct type.
1077 (FRV_CACHE_INVALIDATE_REQUEST): New struct type.
1078 (FRV_CACHE_PRELOAD_REQUEST): New struct type.
1079 (FRV_CACHE_REQUEST): New struct type.
1080 (FRV_CACHE_RETURN_BUFFER): New struct type.
1081 (FRV_CACHE_FLUSH_STATUS): New struct type.
1082 (FRV_CACHE_STATUS): New struct type.
1083 (FRV_CACHE_STAGE): New struct type.
1084 (FRV_CACHE_STAGES): New enumeration.
1085 (FRV_CACHE_WAR): New struct type.
1086 (FRV_CACHE_PIPELINE): New struct type.
1087 (FRV_CACHE_ARS): New struct type.
1088 (FRV_CACHE_STATISTICS): New struct type.
1089 (FRV_CACHE): Add pipeline, statistics, BARS and NARS.
1090 (CACHE_RETURN_DATA): 'return_buffer' is now within 'status'.
1091 (CACHE_RETURN_DATA_ADDRESS): New macro.
1092 (frv_cache_read): Now takes pipe index as second argument.
1093 (frv_cache_enabled): New function.
1094 (frv_cache_request_load): New function.
1095 (frv_cache_request_store): New function.
1096 (frv_cache_request_invalidate): New function.
1097 (frv_cache_request_preload): New function.
1098 (frv_cache_request_unlock): New function.
1099 (frv_cache_run): New function.
1100 (frv_cache_read_passive_SI): New function.
1101 (frv_cache_data_in_buffer): New function.
1102 (frv_cache_data_flushed): New function.
1103 * cache.c (frv_cache_init): Initialize pipelines and xARS registers.
1104 (frv_cache_enabled): New function.
1105 (non_cache_access): New function.
1106 (write_data_to_memory): Count write accesses for each mode. Write to
1107 memory using sim_core_write_unaligned_1;
1108 (read_data_from_memory): New function.
1109 (fill_line_from_memory): Use read_data_from_memory.
1110 (copy_line_to_return_buffer): New function.
1111 (copy_memory_to_return_buffer): New function.
1112 (set_return_buffer_reqno): New function.
1113 (frv_cache_read): Now takes pipe index as second argument. Check for
1115 (frv_cache_preload): Check for non-cache access.
1116 (frv_cache_unlock): Check for non-cache access.
1117 (invalidate_return_buffer): New function.
1118 (frv_cache_invalidate): Check for non-cache access.
1119 (convert_slot_to_index): New function.
1120 (FREE_CHAIN_SIZE): New macro.
1121 (frv_cache_request_free_chain): New static variable.
1122 (frv_store_request_free_chain): New static variable.
1123 (allocate_new_cache_requests): New function.
1124 (new_cache_request): New function.
1125 (free_cache_request): New function.
1126 (new_store_request): New function.
1127 (pipeline_remove_request): New function.
1128 (pipeline_add_request): New function.
1129 (pipeline_requeue_request): New function.
1130 (next_priority): New function.
1131 (add_WAR_request): New function.
1132 (pipeline_next_request): New function.
1133 (pipeline_stage_request): New function.
1134 (advance_pipelines): New function.
1135 (frv_cache_request_load): New function.
1136 (frv_cache_request_store): New function.
1137 (frv_cache_request_invalidate): New function.
1138 (frv_cache_request_preload): New function.
1139 (frv_cache_request_unlock): New function.
1140 (address_interference): New function.
1141 (wait_for_WAR): New function.
1142 (wait_in_WAR): New function.
1143 (handle_req_load): New function.
1144 (handle_req_preload): New function.
1145 (handle_req_store): New function.
1146 (handle_req_invalidate): New function.
1147 (handle_req_unlock): New function.
1148 (handle_req_WAR): New function.
1149 (arbitrate_requests): New function.
1150 (move_ARS_to_WAR): New function.
1151 (decrease_latencies): New function.
1152 (frv_cache_run): New function.
1153 (frv_cache_read_passive_SI): New function.
1154 (frv_cache_data_in_buffer): New function.
1155 (frv_cache_data_flushed): New function.
1156 * arch.h,decode.c,decode.h,model.c,sem.c: Rebuild.
1158 Wed May 24 14:40:34 2000 Andrew Cagney <cagney@b1.cygnus.com>
1160 * configure: Regenerated to track ../common/aclocal.m4 changes.
1162 2000-05-19 Dave Brolley <brolley@redhat.com>
1164 * traps.c (frv_rett): Check for exceptions in the order specified in the
1165 architecture spec. Allow privileged_instruction interrrupt to be handled
1167 * registers.c (frv_register_control_init): Handle bfd_mach_frvtomcat.
1168 * frv.c (frvbf_signed_integer_divide): Use updated dtt to decide whether
1169 to clear the NE flag.
1170 (frvbf_model_tomcat_u_exec): New function.
1171 * frv-sim.h (frvbf_division_exception): Now returns updated dtt.
1172 * Makefile.in (stamp-cpu): Add 'tomcat' to 'mach' value.
1173 * arch.c,arch.h,cpu.h,cpuall.h,model.h,decode.c,sem.c: Regenerate.
1175 2000-05-18 Dave Brolley <brolley@redhat.com>
1177 * sim-if.c (elf-bfd.h): #include it.
1178 (sim_open): Set machine amd architecture based on elf flags.
1180 2000-04-04 Dave Brolley <brolley@redhat.com>
1182 * frv-sim.h (frv_h_psr_esr_set_handler): Removed.
1183 Delete '#if 0' blocks.
1184 * frv.c: Delete '#if 0' blocks.
1185 (spr_psr_set_handler): Remove special handling for circular referencing of handlers for
1187 (frv_h_psr_esr_set_handler): Removed.
1188 * interrupts.c: Delete '#if 0' blocks.
1189 * memory.c: Delete '#if 0' blocks.
1190 * cpu.c,cpu.h: Regenerate.
1192 2000-04-03 Dave Brolley <brolley@redhat.com>
1194 * traps.c (frvbf_check_recovering_store): Invalidate data cache line
1195 containing the target address.
1196 (clear_nesr_neear): No longer takes hi_available and lo_available.
1197 Remove bogus check for available GR registers.
1198 (frvbf_clear_ne_flags): Update call to clear_nesr_neear.
1199 (frvbf_commit): Update call to clear_nesr_neear.
1200 * interrupts.c (next_available_esr): Removed.
1201 (next_available_edr): Removed.
1202 (next_available_fq): Removed.
1203 * frv.c (frvbf_fetch_register): Remove "FIXME" comment.
1204 (frvbf_store_register): Remove "FIXME" comment.
1205 * frv-sim.h (UART_INCHAR_ADDR): Removed.
1206 (UART_OUTCHAR_ADDR): Removed.
1207 (UART_STATUS_ADDR): Removed.
1208 (UART_INPUT_READY): Removed.
1209 (UART_OUTPUT_READY): Removed.
1210 (FRV_DEVICE_ADDR): Removed.
1211 (FRV_DEVICE_LEN): Removed.
1212 (SET_NESR): Call frvbf_force_update.
1213 (SET_NEEAR): Call frvbf_force_update.
1214 (SET_NE_FLAGS): Call frvbf_force_update.
1216 2000-03-30 Dave Brolley <brolley@redhat.com>
1218 * configure: Regenerated.
1220 2000-03-30 Dave Brolley <brolley@redhat.com>
1222 * registers.c (fr500_spr): Define ESR14-15 and EPCSR14-15 for fr500.
1223 * memory.c (frvbf_write_mem_*): Save slot containing the insn
1224 performing the write.
1225 (frvbf_mem_set_*): Overwrite the slot information of the interrupt
1226 queue element with the information in the interrupt state.
1227 * interrupts.c (frv_queue_interrupt): Call frv_set_interrupt_queue_slot.
1228 (frv_queue_fp_exception_interrupt): Initialize 'new_element'.
1229 (frv_set_interrupt_queue_slot): New function.
1230 (esr_for_data_access_exception): New function.
1231 (set_edr_register): edr_index is now passed in.
1232 (fq_for_exception): New function.
1233 (set_fp_exception_registers): Call fq_for_exception. Interrupt queue
1234 element now passed in.
1235 (set_exception_status_registers): Obtain slot from interrupt queue
1236 element. Call esr_for_data_access_exception. Use ESR14
1237 for data_store_error. Use ESR15 for data_access_error. Use EDR0.
1238 (frv_save_data_written_for_interrupts): Save slot containing the insn
1239 performing the write.
1240 * frv-sim.h (struct frv_fp_exception_info): Use frv_fsr_traps and
1242 (struct frv_interrupt_state): Add 'slot' field.
1243 (frv_set_interrupt_queue_slot): New function.
1244 (frv_set_write_queue_slot): New function.
1246 2000-03-24 Dave Brolley <brolley@redhat.com>
1248 * mloop.in (_parallel_write_init): Initialize
1249 frv_interrupt_state.imprecise_interrupt.
1250 (_parallel_write_queued): After an imprecise interrupt, only perform
1251 forced writes and floating point writes (for certain exceptions).
1252 * interrupts.c (handle_interrupt): Set
1253 frv_interrupt_state.imprecise_interrupt for writeback after an imprecise
1255 (frv_process_interrupts): No need to clear f_ne_flags.
1256 * frv.c (frvbf_signed_integer_divide): Queue writes to GR registers and
1257 force them to happen even if there is an overflow exception.
1258 (frvbf_force_update): New function.
1259 * frv-sim.h (frvbf_force_update): New function.
1260 (struct frv_interrupt_state): Add imprecise_interrupt.
1261 (FRV_WRITE_QUEUE_FORCE_WRITE): New macro.
1262 * sem.c: Regenerate.
1264 2000-03-23 Dave Brolley <brolley@redhat.com>
1266 * traps.c (frv_rett): Queue FRV_ILLEGAL_INSTRUCTION directly.
1267 * registers.c (frv_spr): MCIRL -> MCILR.
1268 * interrupts.c (frv_queue_non_implemented_instruction_interrupt):
1270 (frv_detect_insn_access_interrupts):
1271 Call frv_queue_non_implemented_instruction_interrupt.
1272 (frv_process_interrupts): Clear accumulated NE flags.
1273 * frv.c (frvbf_media_cop): New function.
1274 (frvbf_set_ne_index): Now takes (SIM_CPU *) as first argument. Clear
1275 the NE flag of the given target register.
1276 (frvbf_model_fr500_u_float_arith): Account for FRdouble registers.
1277 (frvbf_model_fr500_u_float_dual_arith): Account for FRdouble registers.
1278 (frvbf_model_fr500_u_float_dual_sqrt): New function.
1279 (frvbf_model_fr500_u_float_convert): Account for FRdouble registers.
1280 (frvbf_model_fr500_u_float_dual_convert): New function.
1281 * frv-sim.h (frvbf_media_cop): New function.
1282 (GET_FQ): Use H_SPR_FQST0.
1283 (SET_FQ): Use H_SPR_FQST0.
1284 (SET_FQ_OPC): Use J_SPR_FQOP0.
1285 (GET_MSR_EMCI): New macro.
1286 (frv_queue_non_implemented_instruction_interrupt): New function.
1287 * arch.h,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1289 2000-03-08 Dave Brolley <brolley@redhat.com>
1291 * traps.c (frv_rett): Align new_pc.
1292 * memory.c (frvbf_read_mem_HI): Align address.
1293 (frvbf_read_mem_UHI): Align address.
1294 (frvbf_read_mem_SI): Align address.
1295 (frvbf_read_mem_DI): Align address.
1296 (frvbf_read_mem_DF): Align address.
1297 (frvbf_read_imem_USI): Align address.
1298 (frvbf_mem_set_HI): Align address.
1299 (frvbf_mem_set_SI): Align address.
1300 (frvbf_mem_set_DI): Align address.
1301 (frvbf_mem_set_DF): Align address.
1302 (frvbf_mem_set_XI): Align address.
1303 * registers.c (frv_spr): Initialize FSR0.NS to 1.
1304 (fr500_spr): Initialize FSR0.NS to 1.
1305 * interrupts.c (frv_queue_mem_address_not_aligned_interrupt): Check
1306 whether the exception is masked.
1307 * frv.c (frvbf_load_quad_GR): Align address.
1308 (frvbf_store_quad_GR): Align address.
1309 (frvbf_load_quad_FRint): Align address.
1310 (frvbf_store_quad_FRint): Align address.
1311 (frvbf_load_quad_CPR): Align address.
1312 (frvbf_store_quad_CPR): Align address.
1313 * frv-sim.h (GET_ISR_EMAM): New macro.
1315 2000-03-08 Dave Brolley <brolley@redhat.com>
1317 * traps.c (frvbf_division_exception): Check for masked overflow and
1318 set NE flags, if necessary.
1319 (frvbf_check_recovering_store): Queue writes to the hardware.
1320 (check_registers_available): Removed.
1321 (which_registers_available): Call frv_{fr,gr}_registers_available.
1322 (frvbf_clear_ne_flags): Call check_register_access.
1323 (frvbf_commit): Call check_register_access.
1324 * registers.h (frv_fr_registers_available): New function.
1325 (frv_gr_registers_available): New function.
1326 (frv_check_register_access): New function.
1327 (frv_check_gr_access): New function.
1328 (frv_check_fr_access): New function.
1329 * registers.c (frv_spr): Correct initial value of ISR.
1330 (fr500_spr): Correct initial value of ISR.
1331 (frv_fr_registers_available): New function.
1332 (frv_gr_registers_available): New function.
1333 (frv_check_register_access): New function.
1334 (frv_check_gr_access): New function.
1335 (frv_check_fr_access): New function.
1336 * interrupts.c (frv_queue_division_exception_interrupt): New function.
1337 (set_isr_exception_fields): New function.
1338 (set_exception_status_registers): Set ISR fields for division exception.
1339 (frv_save_data_written_for_interrupts): Handle CGEN_FN_SF_WRITE.
1340 * frv.c (frvbf_h_gr_get_handler): New function.
1341 (frvbf_h_gr_set_handler): New function.
1342 (frvbf_h_fr_get_handler): New function.
1343 (frvbf_h_fr_set_handler): New function.
1344 (frvbf_h_spr_get_handler): Remove special handling for ISR.
1345 (frvbf_h_spr_set_handler): Remove special handling for ISR.
1346 (spr_isr_get_handler): Removed.
1347 (spr_isr_set_handler): Removed.
1348 (frvbf_signed_integer_divide): New funciton.
1349 (frvbf_unsigned_integer_divide): New funciton.
1350 * frv-sim.h (frvbf_h_gr_get_handler): New function.
1351 (frvbf_h_gr_set_handler): New function.
1352 (frvbf_h_fr_get_handler): New function.
1353 (frvbf_h_fr_set_handler): New function.
1354 (frvbf_signed_integer_divide): New funciton.
1355 (frvbf_unsigned_integer_divide): New funciton.
1356 (frv_dtt): New enumeration.
1357 (struct frv_interrupt_queue_element): Add dtt member.
1358 (GET_ISR): New macro.
1359 (SET_ISR): New macro.
1360 (GET_ISR_EDEM): New macro.
1361 (SET_ISR_DTT): New macro.
1362 (SET_ISR_AEXC): New macro.
1363 (frvbf_division_exception): Add 2 'int' arguments.
1364 (frvbf_check_non_excepting_divide): Removed.
1365 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1367 2000-02-29 Dave Brolley <brolley@redhat.com>
1369 * traps.c (frv_itrap): Use GET_H_GR, SET_H_GR, GET_H_FR.
1370 (frv_rett): Use hardware access macros. Write PSR as a whole.
1371 (next_available_nesr): Check that NECR is valid.
1372 (next_valid_nesr): Check that NECR is valid.
1373 (frvbf_check_non_excepting_load): User new NECR access macros. Don't
1374 call hardware access functions. Use cover macros.
1375 (check_registers_available): New function.
1376 (clear_nesr_near): Check register availability.
1377 (clear_ne_flags): Check register availability.
1378 (frvbf_clear_ne_flags): Check register availability.
1379 (frvbf_commit): Check register availability.
1380 (which_registers_available): New function.
1381 * sim-main.h (registers.h): #include it.
1382 (register_control): New cpu field.
1383 (CPU_REGISTER_CONTROL): New macro.
1384 * reset.c (frv_initialize): Set HSR0 fields for cache here.
1385 (frv_power_on_reset): Initialize SPR registers and RSTR.
1386 (frv_hardware_reset): Initialize SPR registers and RSTR.
1387 (frv_software_reset): Reset SPR registers and RSTR.
1388 * options.c (frv_option_handler): Don't set HSR0 fields for cache here.
1389 Call frv_cache_init.
1390 * mloop.in (main loop): Check for insn access interrupts before
1392 * interrupts.c (frv_queue_external_interrupt): Use GET_H_PSR_ET.
1393 (frv_detect_insn_access_interrupts): Don't call hardware access
1394 functions directly. Use cover macros.
1395 (check_reset): Don't reset RSTR here.
1396 (next_available_esr): ESFR -> ESFR_FLAG.
1397 (next_available_edr): ESFR -> ESFR_FLAG.
1398 (clear_exception_status_registers): Use GET_ESFR and SET_ESFR.
1400 (frv_break_interrupt): Don't call hardware access functions directly.
1402 (frv_program_or_software_interrupt): Ditto.
1403 (frv_external_interrupt): Ditto.
1404 * frv.c (frvbf_fetch_register): Don't call 'get' functions directly.
1405 (frvbf_store_register): Don't call 'set' functions directly.
1406 (frvbf_h_gr_double_get_handler): Use GET_H_GR.
1407 (frvbf_h_gr_double_set_handler): Use SET_H_GR.
1408 (frvbf_h_fr_double_get_handler): Use GET_H_FR.
1409 (frvbf_h_fr_double_set_handler): Use SET_H_FR.
1410 (frvbf_h_fr_int_get_handler): Use GET_H_FR.
1411 (frvbf_h_fr_int_set_handler): Use SET_H_FR.
1412 (frvbf_h_cpr_double_get_handler): Use GET_H_CPR.
1413 (frvbf_h_cpr_double_set_handler): Use SET_H_CPR.
1414 (frvbf_h_gr_quad_set_handler): Use SET_H_GR.
1415 (frvbf_h_fr_quad_set_handler): Use SET_H_FR.
1416 (frvbf_h_spr_get_handler): Check SPR access. Call renamed functions.
1417 Support shadow registers.
1418 (frvbf_h_spr_set_handler): Check SPR access. Call renamed functions.
1419 Support shadow registers.
1420 (spr_psr_get_handler): Renamed from frvbf_h_psr_get_handler.
1421 (spr_psr_set_handler): Renamed from frvbf_h_psr_set_handler.
1422 (spr_tbr_get_handler): Renamed from frvbf_h_tbr_get_handler.
1423 (spr_tbr_set_handler): Renamed from frvbf_h_tbr_set_handler.
1424 (spr_bpsr_get_handler): Renamed from frvbf_h_bpsr_get_handler.
1425 (spr_bpsr_set_handler): Renamed from frvbf_h_bpsr_set_handler.
1426 (spr_ccr_get_handler): Renamed from frvbf_h_ccr_get_handler.
1427 (spr_ccr_set_handler): Renamed from frvbf_h_ccr_set_handler.
1428 (spr_lr_get_handler): Renamed from frvbf_h_lr_get_handler.
1429 (spr_lr_set_handler): Renamed from frvbf_h_lr_set_handler.
1430 (spr_cccr_get_handler): Renamed from frvbf_h_cccr_get_handler.
1431 (spr_cccr_set_handler): Renamed from frvbf_h_cccr_set_handler.
1432 (spr_isr_get_handler): Renamed from frvbf_h_isr_get_handler.
1433 (spr_isr_set_handler): Renamed from frvbf_h_isr_set_handler.
1434 (spr_sr_get_handler): Renamed from frvbf_h_sr_get_handler.
1435 (spr_sr_set_handler): Renamed from frvbf_h_sr_set_handler.
1436 (frvbf_h_psr_esr_set_handler): Update to conform to FRV architecture
1438 (spr_ccr_get_handler): Don't reference the hardware directly.
1439 (spr_ccr_set_handler): Don't reference the hardware directly.
1440 (spr_cccr_get_handler): Don't reference the hardware directly.
1441 (spr_cccr_set_handler): Don't reference the hardware directly.
1442 (spr_sr_get_handler): New function.
1443 (spr_sr_set_handler): New function.
1444 (frvbf_switch_supervisor_user_context): Temporarily switch to
1446 (frvbf_store_quad_GR): Don't call handler directly.
1447 (frvbf_store_quad_FRint): Don't call handler directly.
1448 (frvbf_store_quad_CPR): Don't call handler directly.
1449 (frvbf_clear_all_accumulators): Removed.
1450 (frvbf_clear_accumulators): New function.
1451 (frvbf_model_fr500_u_media): Expand busy_adjustment to 8 members.
1452 Account for in_ACCGi and out_ACCGk.
1453 * frv-sim.h (RSTR_HARDWARE_RESET): New macro.
1454 (RSTR_SOFTWARE_RESET): New macro.
1455 (spr_psr_get_handler): Renamed from frvbf_h_psr_get_handler.
1456 (spr_psr_set_handler): Renamed from frvbf_h_psr_set_handler.
1457 (spr_tbr_get_handler): Renamed from frvbf_h_tbr_get_handler.
1458 (spr_tbr_set_handler): Renamed from frvbf_h_tbr_set_handler.
1459 (spr_bpsr_get_handler): Renamed from frvbf_h_bpsr_get_handler.
1460 (spr_bpsr_set_handler): Renamed from frvbf_h_bpsr_set_handler.
1461 (spr_ccr_get_handler): Renamed from frvbf_h_ccr_get_handler.
1462 (spr_ccr_set_handler): Renamed from frvbf_h_ccr_set_handler.
1463 (spr_lr_get_handler): Renamed from frvbf_h_lr_get_handler.
1464 (spr_lr_set_handler): Renamed from frvbf_h_lr_set_handler.
1465 (spr_cccr_get_handler): Renamed from frvbf_h_cccr_get_handler.
1466 (spr_cccr_set_handler): Renamed from frvbf_h_cccr_set_handler.
1467 (spr_isr_get_handler): Renamed from frvbf_h_isr_get_handler.
1468 (spr_isr_set_handler): Renamed from frvbf_h_isr_set_handler.
1469 (spr_sr_get_handler): Renamed from frvbf_h_sr_get_handler.
1470 (spr_sr_set_handler): Renamed from frvbf_h_sr_set_handler.
1471 (frvbf_clear_all_accumulators): Removed.
1472 (frvbf_clear_accumulators): New function.
1473 (GET_HSR0): Use GET_H_SPR.
1474 (SET_HSR0): Use SET_H_SPR.
1475 (CLEAR_HSR0_ICE): New macro.
1476 (CLEAR_HSR0_DCE): New macro.
1477 (GET_IHSR8): Use GET_H_SPR.
1478 (GET_PSR): New macro.
1479 (SET_PSR_ET): New macro.
1480 (GET_PSR_PS): New macro.
1481 (SET_PSR_S): New macro.
1482 (GET_ESFR): Changed to reference entire register.
1483 (SET_ESFR): Changed to reference entire register.
1484 (GET_ESFR_FLAG): New macro.
1485 (SET_ESFR_FLAG): New macro.
1486 (NECR_ELOS): Removed.
1487 (NECR_NEN): Removed.
1488 (NECR_VALID): Removed.
1489 (GET_NECR): New macro.
1490 (GET_NECR_ELOS): New macro.
1491 (GET_NECR_NEN): New macro.
1492 (GET_NECR_VALID): New macro.
1493 (NESR_RANGE): Removed.
1494 (GET_NESR): Use GET_H_SPR.
1495 (GET_NE_FLAGS): Use GET_H_SPR.
1496 * cache.h (CACHE_INITIALIZED): New macro.
1497 * Makefile.in (SIM_OBJS): Add registers.o.
1498 (SIM_EXTRA_DEPS): Add registers.h.
1499 (registers.o): New target.
1500 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1502 2000-02-17 Dave Brolley <brolley@redhat.com>
1504 * interrupts.c (frv_interrupt_table): Update priority order and handler
1505 offsets to conform to the architecture version 1.3a.
1506 * frv-sim.h (frv_interrupt_kind): Update priority order to conform
1507 to the architecture version 1.3a.
1509 2000-02-17 Dave Brolley <brolley@redhat.com>
1511 * interrupts.c (frv_interrupt_table): Update priority order and handler
1512 offsets to conform to the latest specifications.
1513 (frv_queue_interrupt): Correct comment. Identical interrupts can be
1514 queued. New variable 'iclass' used to test for external interrupts.
1515 * frv-sim.h (frv_interrupt_kind): Update priority order to conform
1516 to the latest specifications.
1518 2000-01-20 Dave Brolley <brolley@redhat.com>
1520 * sim-if.c (sim_open): Move frv-specific initialization to
1521 frv_initialize in reset.c.
1522 * interrupts.c (check_reset): Use RSTR_ADDRESS. Check and reset RSTR
1523 status bits for hardware vs software reset.
1524 * reset.c: New file.
1525 * frv-sim.h (frv_initialize): New function.
1526 (frv_power_on_reset): New function.
1527 (frv_hardware_reset): New function.
1528 (frv_software_reset): New function.
1529 (RSTR_ADDRESS): New macro.
1530 (RSTR_INITIAL_VALUE): New macro.
1531 (GET_RSTR_HR): New macro.
1532 (GET_RSTR_SR): New macro.
1533 (SET_RSTR_H): New macro.
1534 (SET_RSTR_S): New macro.
1535 (CLEAR_RSTR_P): New macro.
1536 (CLEAR_RSTR_H): New macro.
1537 (CLEAR_RSTR_S): New macro.
1538 (CLEAR_RSTR_HR): New macro.
1539 (CLEAR_RSTR_SR): New macro.
1541 2000-01-03 Dave Brolley <brolley@cygnus.com>
1543 * mloop.in (execute): Only call modeling function if the pointer is not
1545 * frv.c (frvbf_model_insn_after): Only access FR500_MODEL_DATA for
1548 2000-01-03 Dave Brolley <brolley@cygnus.com>
1550 * options.c (OPTION_FRV_MEMORY_LATENCY): New enumerator.
1551 (frv_options): Add --memory-latency.
1552 (frv_option_handler): Handle FRV_OPTION_MEMORY_LATENCY.
1553 * mloop.in (@cpu@_simulate_insn_prefetch): Use cache memory_latency.
1554 * frv.c (SET_ACC_USE_IS_MEDIA_P1): operate on d->curr_acc_p1
1555 (SET_ACC_USE_NOT_MEDIA_P1): operate on d->curr_acc_p1
1556 (SET_ACC_USE_IS_MEDIA_P2): operate on d->curr_acc_p1
1557 (SET_ACC_USE_NOT_MEDIA_P2): operate on d->curr_acc_p1
1558 (update_latencies): Only clear usage flags if the register has no
1560 (frvbf_model_insn_before): Update cur_acc_p1 and cur_acc_p2. Use | (or)
1561 not |= (or assgnment).
1562 (frvbf_model_insn_after): Print post processing wait for all insns.
1563 Update prev_acc_p1 and prev_acc_p2.
1564 (frvbf_model_fr500_u_gr_load_store): Use cache memory_latency.
1565 (frvbf_model_fr500_u_fr_load_store): Use cache memory_latency.
1566 (frvbf_model_fr500_u_swap): Use cache memory_latency.
1567 (frvbf_model_fr500_u_media): Use busy_adjustment[4] for out_ACC40Sk.
1568 (frvbf_model_fr500_u_media): Use busy_adjustment[5] for out_ACC40Uk.
1569 (frvbf_model_fr500_u_media_quad_arith): New function.
1570 (frvbf_model_fr500_u_media_dual_mul): New function.
1571 (frvbf_model_fr500_u_media_quad_mul): New function.
1572 (frvbf_model_fr500_u_media_quad_complex): New function.
1573 (frvbf_model_fr500_u_media_dual_expand): New function.
1574 (frvbf_model_fr500_u_media_dual_unpack): New function.
1575 (frvbf_model_fr500_u_media_dual_btoh): New function.
1576 (frvbf_model_fr500_u_media_dual_htob): New function.
1577 (frvbf_model_fr500_u_media_dual_btohe): New function.
1578 (frv_ref_SI): New function.
1579 * cache.h (FRV_CACHE): Add memory_latency field.
1580 * cache.c (frv_cache_init): Initialize memory_latency.
1581 * arch.h,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1583 1999-12-17 Dave Brolley <brolley@cygnus.com>
1585 * sim-if.c (sim_open): Initialize insn prefetch and reset register.
1586 * options.c (OPTIONS_FRV_PROFILE_CACHE): New enumeration.
1587 (OPTIONS_FRV_PROFILE_PARALLEL): New enumeration.
1588 (OPTIONS_FRV_TIMER): New enumeration.
1589 (frv_options): Add --profile-cache, --profile-parallel, --timer.
1590 (frv_option_handler): Override common implementation of -p. Handle
1591 --profile-cache, --profile-parallel, --timer.
1592 * mloop.in (execute): Call profiling functions if the timer interrupt
1594 (@cpu@_simulate_insn_prefetch): New function.
1595 (main loop): Call @cpu@_simulate_insn_prefetch.
1596 * interrupts.c (frv_queue_interrupt): Don't queue two external
1597 interrupts of the same priority.
1598 (frv_queue_external_interrupt): New function.
1599 (frv_external_interrupt): New function.
1600 (handle_interrupt): Handle external interrupts.
1601 (check_reset): New function.
1602 (frv_process_interrupts): Call check_reset.
1603 * frv.c: Include "bfd.h"
1604 (frvbf_h_psr_get_handler): Set the PIL field.
1605 (frvbf_h_psr_set_handler): Get the PIL field.
1606 (DUAL_REG): New macro.
1607 (DUAL_DOUBLE): New macro.
1608 (SET_USE_IS_FPOP): New macro.
1609 (SET_USE_NOT_FPOP): New macro.
1610 (USE_IS_FPOP): New macro.
1611 (SET_USE_IS_MEDIA): New macro.
1612 (SET_USE_NOT_MEDIA): New macro.
1613 (USE_IS_MEDIA_P1): New macro.
1614 (SET_USE_IS_MEDIA_P1): New macro.
1615 (SET_USE_NOT_MEDIA_P1): New macro.
1616 (SET_USE_IS_MEDIA_P2): New macro.
1617 (SET_USE_NOT_MEDIA_P2): New macro.
1618 (USE_IS_MEDIA_P2): New macro.
1619 (SET_ACC_USE_IS_MEDIA_P1): New macro.
1620 (SET_ACC_USE_NOT_MEDIA_P1): New macro.
1621 (ACC_USE_IS_MEDIA_P1): New macro.
1622 (SET_ACC_USE_IS_MEDIA_P2): New macro.
1623 (SET_ACC_USE_NOT_MEDIA_P2): New macro.
1624 (ACC_USE_IS_MEDIA_P2): New macro.
1625 (RESOURCE_IDIV): New macro.
1626 (RESOURCE_FDIV): New macro.
1627 (RESOURCE_SQRT): New macro.
1628 (fr_busy_adjust): New array.
1629 (acc_busy_adjust): New array.
1630 (apply_latency_adjustments): New function.
1631 (update_latencies): New function.
1632 (handle_wait_cycles): New function.
1633 (handle_resource_wait): New function.
1634 (update_target_latencies): New function.
1635 (frvbf_model_insn_before): Add resource latency to cycle counts.
1636 (frvbf_model_insn_after): Add resource latency to cycle counts.
1637 (update_GR_latency): New function.
1638 (update_GRdouble_latency): New function.
1639 (update_FR_latency): New function.
1640 (update_FRdouble_latency): New function.
1641 (decrease_ACC_busy): New function.
1642 (decrease_FR_busy): New function.
1643 (increase_FR_busy): New function.
1644 (update_ACC_latency): New function.
1645 (update_CCR_latency): New function.
1646 (update_idiv_resource_latency): New function.
1647 (update_fdiv_resource_latency): New function.
1648 (update_fsqrt_resource_latency): New function.
1649 (vliw_wait_for_GR): New function.
1650 (vliw_wait_for_GRdouble): New function.
1651 (vliw_wait_for_FR): New function.
1652 (vliw_wait_for_FRdouble): New function.
1653 (vliw_wait_for_CCR): New function.
1654 (vliw_wait_for_ACC): New function.
1655 (vliw_wait_for_idiv_resource): New function.
1656 (vliw_wait_for_fdiv_resource): New function.
1657 (vliw_wait_for_fsqrt_resource): New function.
1658 (enforce_full_fr_latency): New function.
1659 (frvbf_model_fr500_u_exec): New function.
1660 (frvbf_model_fr500_u_integer): New function.
1661 (frvbf_model_fr500_u_imul): New function.
1662 (frvbf_model_fr500_u_idiv): New function.
1663 (frvbf_model_fr500_u_branch): New function.
1664 (frvbf_model_fr500_u_set_hilo): New function.
1665 (frvbf_model_fr500_u_gr_load_store): New function.
1666 (frvbf_model_fr500_u_fr_load_store): New function.
1667 (frvbf_model_fr500_u_swap): New function.
1668 (frvbf_model_fr500_u_fr2fr): New function.
1669 (frvbf_model_fr500_u_fr2gr): New function.
1670 (frvbf_model_fr500_u_spr2gr): New function.
1671 (frvbf_model_fr500_u_gr2fr): New function.
1672 (frvbf_model_fr500_u_gr2spr): New function.
1673 (post_wait_for_FR): New function.
1674 (post_wait_for_FRdouble): New function.
1675 (post_wait_for_ACC): New function.
1676 (post_wait_for_CCR): New function.
1677 (post_wait_for_fdiv): New function.
1678 (post_wait_for_fsqrt): New function.
1679 (adjust_float_register_busy): New function.
1680 (adjust_double_register_busy): New function.
1681 (restore_float_register_busy): New function.
1682 (restore_double_register_busy): New function.
1683 (frvbf_model_fr500_u_float_arith): New function.
1684 (frvbf_model_fr500_u_float_dual_arith): New function.
1685 (frvbf_model_fr500_u_float_div): New function.
1686 (frvbf_model_fr500_u_float_sqrt): New function.
1687 (frvbf_model_fr500_u_float_compare): New function.
1688 (frvbf_model_fr500_u_float_dual_compare): New function.
1689 (frvbf_model_fr500_u_float_convert): New function.
1690 (frvbf_model_fr500_u_media): New function.
1691 (frvbf_model_fr500_u_barrier): New function.
1692 (frvbf_model_fr500_u_membar): New function.
1693 * frv-sim.h (LEUINT): New macro.
1694 (GET_HSR0_SA): New macro.
1695 (struct frv_interrupt_timer): New struct.
1696 (struct frv_interrupt_state): Add timer fiield.
1697 (frv_queue_external_interrupt): New function.
1698 (frv_external_interrupt): New function.
1699 (frv_profile_info): New function.
1700 (PROFILE_CACHE_IDX): New enumerator.
1701 (PROFILE_PARALLEL_IDX): New enumerator.
1702 (PROFILE_cache): New macro.
1703 (PROFILE_parallel): New macro.
1704 (WITH_PROFILE_CACHE_P): New macro.
1705 (WITH_PROFILE_PARALLEL_P): New macro.
1706 * cache.h (FRV_CACHE): Add last_was_hit field.
1707 * cache.c (get_tag): Use new last_was_hit field.
1708 (frv_cache_read): Ditto.
1709 (frv_cache_write): Ditto.
1710 * arch.h,cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1712 1999-12-13 Dave Brolley <brolley@cygnus.com>
1714 * frv.c (frvbf_h_spr_set_handler): Handle accumulator guards.
1715 (frvbf_clear_all_accumulators): Pass frvbf_h_acc40S_set to
1716 sim_queue_fn_di_write.
1717 (frvbf_media_cut_ss): New function.
1718 * frv-sim.h (frvbf_media_cut_ss): New function.
1719 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1721 1999-12-13 Dave Brolley <brolley@cygnus.com>
1723 * pipeline.c (check_insn_major_constraints): F-4, F-8 and M-8 have
1725 * interrupts.c (frv_queue_illegal_instruction_interrupt): Use
1726 FRV_IS_FLOAT_INSN and FRV_IS_MEDIA_INSN.
1727 (frv_detect_insn_access_interrupts): Use FRV_IS_FLOAT_INSN and
1729 * frv.c (frvbf_model_simple_u_exec): New function.
1730 * frv-sim.h (FRV_IS_FLOAT_INSN): Range includes F-8.
1731 (FRV_IS_MEDIA_INSN): Range includes M-8.
1733 * Makefile.in (stamp-cpu): add 'simple' to the list of machines.
1734 * arch.c,arch.h,cpu.h,cpuall.h,decode.c,decode.h,model.c,sem.c:
1737 1999-12-10 Dave Brolley <brolley@cygnus.com>
1739 * traps.c (check_registers_available): New function.
1740 (clear_ne_flags): Generate register_exception if register(s) not
1742 (frvbf_commit): Generate register_exception if register(s) not
1744 * interrupts.c (frv_program_or_software_interrupt): No need to copy
1746 * frv.c (frvbf_h_psr_set_handler): Special handling for PSR.S and
1748 (frvbf_h_psr_s_set_handler): New function.
1749 (frvbf_h_psr_esr_set_handler): New function.
1750 (frvbf_switch_supervisor_user_context): New function.
1751 (frvbf_scan_result): Reflect latest ISA.
1752 * frv-sim.h (frvbf_h_psr_s_set_handler): New function.
1753 (frvbf_h_psr_esr_set_handler): New function.
1754 (frvbf_switch_supervisor_user_context): New function.
1755 (GET_HSR0_FRN): New Macro.
1756 (GET_HSR0_GRN): New Macro.
1757 (GET_HSR0_FRHE): New Macro.
1758 (GET_HSR0_FRLE): New Macro.
1759 (GET_HSR0_GRHE): New Macro.
1760 (GET_HSR0_GRLE): New Macro.
1761 (frv_ec): New value for FRV_EC_COMMIT_EXCEPTION.
1762 (GET_ESFR): New bit ordering.
1763 (SET_ESFR): New bit ordering.
1764 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1766 1999-12-10 Michael Meissner <meissner@cygnus.com>
1768 * Makefile.in (sim-if.o): Add eng.h dependency.
1770 1999-12-09 Dave Brolley <brolley@cygnus.com>
1772 * mloop.in (execute): Pass sc->first_insn_p to @cpu@_model_insn_before.
1773 Pass sc->last_insn_p to @cpu@_model_insn_before.
1774 (main loop): Compute sc->first_insn_p.
1775 * frv.c (frvbf_model_insn_before): Set state variables.
1776 (frvbf_model_insn_after): Count basic cycles. Set state variables.
1777 (frvbf_model_fr500_u_integer): Remove.
1778 * arch.h,cpu.h,decode.h,model.c: Regenerate.
1780 1999-12-07 Dave Brolley <brolley@cygnus.com>
1782 * sim-main.h (cache.h): Include it.
1783 (insn_cache): New member.
1784 (data_cache): New member.
1785 (CPU_INSN_CACHE): New macro.
1786 (CPU_DATA_CACHE): New macro.
1787 * sim-if.c (WANT_CPU): New macro.
1788 (WANT_CPU_FRVBF): New macro.
1789 (sim_open): Call sim_add_option_table. Call frv_cache_init for the
1790 data and insn caches for each cpu.
1791 (sim_close): Call frv_cache_term for the insn and data caches of each
1793 * mloop.in (extract): Read insn from the cache.
1794 (main loop): Access the insn cache in order to maintain stats.
1795 * memory.c (data_non_cache_access): New function.
1796 (insn_non_cache_access): New function.
1797 (frvbf_read_mem_QI): Attempt to read from the cache first.
1798 (frvbf_read_mem_UQI): Ditto.
1799 (frvbf_read_mem_HI): Ditto.
1800 (frvbf_read_mem_UHI): Ditto.
1801 (frvbf_read_mem_SI): Ditto.
1802 (frvbf_read_mem_DI): Ditto.
1803 (frvbf_read_mem_DF): Ditto.
1804 (frvbf_read_imem_USI): New function.
1805 (frvbf_write_mem_QI): Write through the cache is it is enabled.
1806 (frvbf_write_mem_UQI): Ditto.
1807 (frvbf_write_mem_HI): Ditto.
1808 (frvbf_write_mem_UHI): Ditto.
1809 (frvbf_write_mem_SI): Ditto.
1810 (frvbf_write_mem_DI): Ditto.
1811 (frvbf_write_mem_DF): Ditto.
1812 (frvbf_mem_set_QI): New function.
1813 (frvbf_mem_set_HI): New function.
1814 (frvbf_mem_set_SI): New function.
1815 (frvbf_mem_set_DI): New function.
1816 (frvbf_mem_set_DF): New function.
1817 (frvbf_mem_set_XI): New function.
1818 * interrupts.c (frv_save_data_written_for_interrupts): Handle
1819 CGEN_FN_MEM_QI_WRITE,
1820 CGEN_FN_MEM_HI_WRITE, CGEN_FN_MEM_SI_WRITE, CGEN_FN_MEM_DI_WRITE,
1821 CGEN_FN_MEM_DF_WRITE, CGEN_FN_MEM_XI_WRITE.
1822 * frv.c (frvbf_load_quad_GR): Call frvbf_read_mem_SI.
1823 Call sim_queue_fn_mem_xi_write.
1824 (frvbf_load_quad_FRint): Call frvbf_read_mem_SI.
1825 Call sim_queue_fn_mem_xi_write.
1826 (frvbf_load_quad_CPR): Call frvbf_read_mem_SI.
1827 Call sim_queue_fn_mem_xi_write.
1828 (frvbf_insn_cache_preload): New function.
1829 (frvbf_data_cache_preload): New function.
1830 (frvbf_insn_cache_unlock): New function.
1831 (frvbf_data_cache_unlock): New function.
1832 (frvbf_insn_cache_invalidate): New function.
1833 (frvbf_data_cache_invalidate): New function.
1834 (frvbf_data_cache_flush): New function.
1835 * frv-sim.h (sim-options.h): Include it.
1836 (GET_HSR0): New macro.
1837 (SET_HSR0): New macro.
1838 (GET_HSR0_ICE): New macro.
1839 (SET_HSR0_ICE): New macro.
1840 (GET_HSR0_DCE): New macro.
1841 (SET_HSR0_DCE): New macro.
1842 (GET_HSR0_CBM): New macro.
1843 (GET_HSR0_RME): New macro.
1844 (GET_IHSR8): New macro.
1845 (GET_IHSR8_NBC): New macro.
1846 (frvbf_insn_cache_preload): New function.
1847 (frvbf_data_cache_preload): New function.
1848 (frvbf_insn_cache_unlock): New function.
1849 (frvbf_data_cache_unlock): New function.
1850 (frvbf_insn_cache_invalidate): New function.
1851 (frvbf_data_cache_invalidate): New function.
1852 (frvbf_data_cache_flush): New function.
1853 (insn_non_cache_access): New function.
1854 (frvbf_read_imem_USI): New function.
1855 (frvbf_mem_set_QI): New function.
1856 (frvbf_mem_set_HI): New function.
1857 (frvbf_mem_set_SI): New function.
1858 (frvbf_mem_set_DI): New function.
1859 (frvbf_mem_set_DF): New function.
1860 (frvbf_mem_set_XI): New function.
1861 (frv_options): FRV specific command line options.
1862 * Makefile.in (SIM_OBJS): Add options.o and cache.o.
1863 (SIM_EXTRA_DEPS): Add $(sim-options_h).
1864 (cache.o): New target.
1865 (options.o): New target.
1866 * cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1867 * cache.h: New file.
1868 * cache.c: New file.
1869 * options.c: New file.
1871 1999-11-29 Dave Brolley <brolley@cygnus.com>
1873 * traps.c (frvbf_check_non_excepting_load): Use new NE_FLAG macros.
1874 (frvbf_check_non_excepting_divide): Ditto.
1875 (clear_ne_flags): Ditto
1876 (frvbf_commit): Ditto.
1877 * pipeline.c (frv_pipeline_add_insn): Clear the NE index for all insns.
1878 * mloop.in (_parallel_write_init): Clear NE flags here.
1879 * interrupts.c (frv_queue_fp_exception_interrupt): Set NE flags here
1880 for non excepting insns. Also check for masked interrupts here.
1881 (frv_process_interrupts): Write NE flags here.
1882 (set_fp_exception_registers): No longer check for masked interrupts
1884 (check_for_compound_interrupt): No need to worry about masked
1886 * frv-sim.h (frv_interrupt_state): Add f_ne_flags member.
1887 (GET_NE_FLAGS): New macro.
1888 (SET_NE_FLAGS): New macro.
1889 (GET_NE_FLAG): Operate on accumulated argument.
1890 (SET_NE_FLAG): Operate on accumulated argument.
1891 (CLEAR_NE_FLAG): Operate on accumulated argument.
1892 * Makefile.in (FRVBF_INCLUDE_DEPS): Add $(SIM_EXTRA_DEPS)
1893 (frv.o): Correct dependencies.
1895 (pipeline.o): Ditto.
1896 (interrupts.o): Ditto.
1898 * sem.c: Regenerate.
1900 1999-11-26 Dave Brolley <brolley@cygnus.com>
1902 * traps.c (frvbf_fpu_error): Only call frv_queue_fp_exception if
1903 there is an exception indicated in the mask.
1904 * pipeline.c (frv_pipeline_add_insn): Clear ne_index in the interrupt
1905 state when adding a floating point insn to the pipeline.
1906 * interrupts.c (set_fp_exception_registers): Set NE flag for
1907 non-excepting insns.
1908 * frv-sim.h (frvbf_h_fr_double_get_handler): Mode of data is DF.
1909 (frvbf_h_fr_double_set_handler): Mode of data is DF.
1910 (frvbf_h_fr_int_get_handler): New function.
1911 (frvbf_h_fr_int_set_handler): New function.
1912 (frvbf_set_ne_index): New function.
1913 (NE_NOFLAG): New macro.
1914 (frv_interrupt_state): Add ne_index member.
1915 * frv.c (frvbf_h_fr_double_get_handler): Mode of data is DF.
1916 (frvbf_h_fr_double_set_handler): Mode of data is DF.
1917 (frvbf_h_fr_int_get_handler): New function.
1918 (frvbf_h_fr_int_set_handler): New function.
1919 (frvbf_set_ne_index): New function.
1920 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1922 1999-11-24 Dave Brolley <brolley@cygnus.com>
1924 * cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1926 1999-11-23 Dave Brolley <brolley@cygnus.com>
1928 * frv-sim.h (frvbf_media_cut): New function.
1929 * frv.c (frvbf_media_cut): New function.
1930 * cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1932 1999-11-22 Dave Brolley <brolley@cygnus.com>
1934 * frv-sim.h (frvbf_clear_all_accumulators): New function.
1935 * frv.c.h (frvbf_clear_all_accumulators): New function.
1936 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1938 1999-11-18 Dave Brolley <brolley@cygnus.com>
1940 * pipeline.c (frv_pipeline_add_insn): Only clear MSR0 and FSR0 fields
1941 if this is the first insn of its class in the pipeline.
1942 * frv-sim.h (frvbf_media_register_not_aligned): New function.
1943 * traps.c (frvbf_media_register_not_aligned): New function.
1944 * cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1946 1999-11-17 Dave Brolley <brolley@cygnus.com>
1948 * pipeline.c (frv_pipeline_add_insn): Clear MSRx.SIE fields.
1949 * frv-sim.h (OR_MSR_SIE): New macro.
1950 (CLEAR_MSR_SIE): New macro.
1951 (frvbf_media_overflow): Now takes sie argument.
1952 (frv_set_mp_exception_registers): Now takes sie argument.
1953 * interrupts.c (frv_set_mp_exception_registers): Now takes sie argument.
1955 * cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1957 1999-11-15 Dave Brolley <brolley@cygnus.com>
1959 * traps.c (frv_mtrap): New function.
1960 (frvbf_media_cr_not_aligned): New function.
1961 (frvbf_media_acc_not_aligned): New function.
1962 (frvbf_media_overflow): New function.
1963 * pipeline.c (frv_pipeline_add_insn): Clear MSR fields.
1964 * interrupts.c: Call frv_set_mp_exception_registers.
1965 (frv_set_mp_exception_registers): New function.
1966 * frv-sim.h (frv_msr_mtt): New enumeration.
1967 (GET_MSR): New macro.
1968 (SET_MSR): New macro.
1969 (GET_MSR_AOVF): New macro.
1970 (SET_MSR_AOVF): New macro.
1971 (GET_MSR_OVF): New macro.
1972 (SET_MSR_OVF): New macro.
1973 (CLEAR_MSR_OVF): New macro.
1974 (GET_MSR_MTT): New macro.
1975 (SET_MSR_MTT): New macro.
1976 (frv_set_mp_exception_registers): New function.
1977 (frv_mtrap): New function.
1978 (FRV_IS_MEDIA_INSN): New macro.
1979 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1981 1999-11-10 Dave Brolley <brolley@cygnus.com>
1983 * sim-main.h (_sim_cpu): Add debug_state member.
1984 * mloop.in (_parallel_write_queued): Clear data_written.length.
1985 * interrupts.c (frv_interrupt_table): Offset of BREAK_EXCEPTION
1987 (frv_queue_break_interrupt): New function.
1988 (frv_break_interrupt): New function.
1989 (handle_interrupt): Handle break_interrupt.
1990 (frv_non_operating_interrupt): Now takes interrupt_kind.
1991 * frv-sim.h (frv_queue_break_interrupt): New function.
1992 (frv_break_interrupt): New function.
1993 (frv_break): New function.
1994 (frv_non_operating_interrupt): Now takes interrupt_kind.
1995 * cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
1997 1999-11-09 Dave Brolley <brolley@cygnus.com>
1999 * pipeline.c (frv_pipeline_add_insn): Clear FSR0.FTT when adding
2000 a floating point insn.
2001 * traps.c (frvbf_fpu_error): Map fpu status to frv interrupts.
2002 * interrupts.c (frv_queue_illegal_instruction_interrupt): Call
2003 frv_queue_fp_exception_interrupt.
2004 (frv_queue_fp_exception_interrupt): New function.
2005 (next_available_fq): New function.
2006 (set_fp_exception_registers): New function.
2007 (set_exception_status_registers): Now returns 1 if interrupt not masked.
2008 (check_for_compound_interrupt): Now returns NULL if interrupt masked.
2009 (frv_program_interrupt): Don't process interrupt if it is masked.
2010 * frv.c (frvbf_h_fr_double_get_handler): Call
2011 frv_queue_fp_exception_interrupt.
2012 (frvbf_h_fr_double_set_handler): Call frv_queue_fp_exception_interrupt.
2013 (frvbf_h_fr_quad_set_handler): Call frv_queue_fp_exception_interrupt.
2014 (frvbf_store_quad_FRint): Call frv_queue_fp_exception_interrupt.
2015 * frv-sim.h: Get/set hardware directly in GET/SET macros.
2016 (frv_fp_exception_info): New struct type.
2017 (frv_interrupt_queue_element): Add fp_info member.
2018 (frv_fsr_traps): New enumeration.
2019 (frv_fsr_ftt): New enumeration.
2020 (frv_sie): New enumeration.
2021 (frv_miv): New enumeration.
2022 (GET_FSR): New macro.
2023 (SET_FSR): New macro.
2024 (GET_FSR_TEM): New macro.
2025 (SET_FSR_QNE): New macro.
2026 (SET_FSR_FTT): New macro.
2027 (GET_FSR_AEXC): New macro.
2028 (SET_FSR_AEXC): New macro.
2029 (GET_FQ): New macro.
2030 (SET_FQ): New macro.
2031 (SET_FQ_OPC): New macro.
2032 (SET_FQ_MIV): New macro.
2033 (SET_FQ_SIE): New macro.
2034 (SET_FQ_FTT): New macro.
2035 (SET_FQ_CEXC): New macro.
2036 (GET_FQ_VALID): New macro.
2037 (SET_FQ_VALID): New macro.
2038 (frv_queue_fp_exception_interrupt): New function.
2039 (FRV_IS_FLOAT_INSN): New macro.
2041 1999-11-04 Dave Brolley <brolley@cygnus.com>
2043 * traps.c (frvbf_fpu_error): No floating point errors need to be
2045 * interrupts.c (clear_exception_status_registers): Clear 'valid' fields
2046 of the ESR registers too.
2047 (set_exception_status_registers): Don't set EAR for any precise
2048 interrupts. Register index should be 1 for insns in PIPE_I1. Clear
2049 ESR.EAV and ESR.EDV if not setting them. Set ESR.VALID.
2050 (non_operating_interrupt): No need for return code.
2051 (frv_program_or_software_interrupt): Process interrupt regardless
2052 of operating mode. If PSR.ET was not set at the start of processing,
2053 then stop the simulation with a message.
2054 (frv_save_data_written_for_interrupts): Handle CGEN_FN_XI_WRITE and
2056 * frv.c (frvbf_h_gr_quad_set_handler): New function.
2057 (frvbf_h_fr_quad_set_handler): New function.
2058 (frvbf_h_cpr_quad_set_handler): New function.
2059 (frvbf_load_quad_GR): Renamed from frvbf_load_multiple_GR. Use new
2060 sim_queue_fn_xi_write.
2061 (frvbf_load_quad_FRint): Renamed from frvbf_load_multiple_GR. Use new
2062 sim_queue_fn_xi_write.
2063 (frvbf_load_quad_CPR): Renamed from frvbf_load_multiple_GR. Use new
2064 sim_queue_fn_xi_write.
2065 (frvbf_store_quad_GR): Renamed from frvbf_store_multiple_GR. Use new
2066 sim_queue_mem_xi_write.
2067 (frvbf_store_quad_FRint): Renamed from frvbf_store_multiple_GR. Use new
2068 sim_queue_mem_xi_write.
2069 (frvbf_store_quad_CPR): Renamed from frvbf_store_multiple_GR. Use new
2070 sim_queue_mem_xi_write.
2071 * frv-sim.h (frvbf_h_gr_quad_set_handler): New function.
2072 (frvbf_h_fr_quad_set_handler): New function.
2073 (frvbf_h_cpr_quad_set_handler): New function.
2074 (SET_ESR_VALID): New macro.
2075 (CLEAR_ESR_VALID): New macro.
2076 (CLEAR_ESR_EAV): New macro.
2077 (CLEAR_ESR_EDV): New macro.
2078 * sem.c: Regenerate.
2080 1999-11-02 Dave Brolley <brolley@cygnus.com>
2082 * traps.c (frv_core_signal): Call
2083 frv_queue_mem_address_not_aligned_interrupt.
2084 * mloop.in (_parallel_write_queued): Call
2085 frv_save_data_written_for_interrupts.
2086 * frv.c (frvbf_h_gr_double_get_handler): Call
2087 frv_queue_register_exception_interrupt.
2088 (frvbf_h_cpr_double_get_handler): Call
2089 frv_queue_register_exception_interrupt.
2090 (frvbf_h_cpr_double_set_handler): Call
2091 frv_queue_register_exception_interrupt.
2092 (frvbf_load_multiple_GR): Call
2093 frv_queue_register_exception_interrupt.
2094 (frvbf_store_multiple_GR): Call
2095 frv_queue_register_exception_interrupt.
2096 (frvbf_load_multiple_CPR): Call
2097 frv_queue_register_exception_interrupt.
2098 (frvbf_store_multiple_CPR): Call
2099 frv_queue_register_exception_interrupt.
2100 (frvbf_h_tbr_get_handler): Fix TBR.TBA mask.
2101 * interrupts.c (frv_queue_software_interrupt): Now returns interrupt
2103 (frv_queue_program_interrupt): Now returns interrupt queue element.
2104 (frv_queue_illegal_instruction_interrupt): Now returns interrupt queue
2106 (frv_queue_interrupt): Now returns interrupt queue element.
2107 (frv_queue_register_exception_interrupt): New function.
2108 (frv_queue_mem_address_not_aligned_interrupt): New function.
2109 (frv_save_data_written_for_interrupts): New function.
2110 (next_available_edr): EDR registers available in blocks of 4.
2111 (clear_exception_status_registers): New function.
2112 (set_exception_status_registers): Pass esr to SET_ESR* macros.
2114 * frv-sim.h (struct frv_data_written): New struct type.
2115 (frv_interrupt_queue_element): Add data_written member.
2116 (frv_queue_software_interrupt): Now returns interrupt queue element.
2117 (frv_queue_program_interrupt): Now returns interrupt queue element.
2118 (frv_queue_illegal_instruction_interrupt): Now returns interrupt queue
2120 (frv_queue_interrupt): Now returns interrupt queue element.
2121 (frv_queue_register_exception_interrupt): New function.
2122 (frv_queue_mem_address_not_aligned_interrupt): New function.
2123 (frv_save_data_written_for_interrupts): New function.
2125 1999-10-27 Dave Brolley <brolley@cygnus.com>
2127 * interrupts.c (ITABLE_ENTRY): New macro.
2128 (frv_interrupt_table): Add exception codes.
2129 (next_available_esr): New function.
2130 (next_available_edr): New function.
2131 (set_edr_register): New function.
2132 (set_exception_status_registers): New function.
2133 (check_for_compound_interrupt): Record information on all interrupts
2135 (frv_program_interrupt): Always call check_for_compound_interrupt.
2136 * frv.c (frvbf_h_pc_set_handler): Removed.
2137 (frvbf_h_spr_get_handler): Handle LR register.
2138 (frvbf_h_spr_set_handler): Handle LR register.
2139 (frvbf_h_lr_get_handler): New function.
2140 (frvbf_h_lr_set_handler): New function.
2141 * frv-sim.h (frvbf_h_lr_get_handler): New function.
2142 (frvbf_h_lr_set_handler): New function.
2143 (frv_ec): New enumeration.
2144 (frv_interrupt): Add frv_ec field.
2145 (frv_rec): New enumeration.
2146 (frv_daec): New enumeration.
2147 (frv_interrupt_queue_element): Add eaddress, rec, iaec, daec fields.
2148 (SET_ESR_EC): New macro.
2149 (SET_ESR_REC): New macro.
2150 (SET_ESR_IAEC): New macro.
2151 (SET_ESR_DAEC): New macro.
2152 (SET_ESR_EAV): New macro.
2153 (GET_ESR_EDV): New macro.
2154 (SET_ESR_EDV): New macro.
2155 (GET_ESR_EDN): New macro.
2156 (SET_ESR_EDN): New macro.
2157 (GET_ESR): New macro.
2158 (SET_ESR): New macro.
2159 (SET_EPCR): New macro.
2160 (SET_EAR): New macro.
2161 (SET_EDR): New macro.
2162 (GET_ESFR): New macro.
2163 (SET_ESFR): New macro.
2164 * cpu.c,cpu.h,sem.c: Rebuild.
2166 1999-10-26 Dave Brolley <brolley@cygnus.com>
2168 * traps.c (frvbf_check_non_excepting_load): Only set NESR, NECR, NEEAR
2170 (clear_nesr_neear): Only execute if mach is frv.
2172 1999-10-22 Dave Brolley <brolley@cygnus.com>
2174 * sim-main.h (sim_cpu): Add pipeline.
2175 (CPU_PIPELINE): New macro.
2176 * mloop.in (_parallel_write_queued): Maintain pc in cpu during writes.
2177 (main loop): Maintain pc in cpu.
2178 * frv-sim.h (frv_queue_software_interrupt): New interface.
2179 (frv_queue_program_interrupt): New interface.
2180 (frv_queue_illegal_instruction_interrupt: New interface.
2181 (frv_queue_interrupt): New interface.
2182 (frv_detect_insn_access_interrupts): New interface.
2183 (frv_process_interrupts): New interface.
2184 (frv_program_interrupt): New interface.
2185 (frv_software_interrupt): New interface.
2186 (frv_program_or_software_interrupt): New interface.
2187 (FRV_PIPELINE): Moved from pipline.c.
2188 (frv_pipeline_reset): New interface.
2189 (frv_pipeline_add_insn): New interface.
2190 * interrupts.c (frv_queue_software_interrupt): New interface.
2191 (frv_queue_program_interrupt): New interface.
2192 (frv_queue_illegal_instruction_interrupt: New interface.
2193 (frv_queue_interrupt): New interface.
2194 (frv_detect_insn_access_interrupts): New interface.
2195 (frv_process_interrupts): New interface.
2196 (frv_program_interrupt): New interface.
2197 (frv_software_interrupt): New interface.
2198 (frv_program_or_software_interrupt): New interface.
2199 * frv.c: Use new interfaces.
2200 * pipeline.c: Use new interfaces.
2201 * traps.c: Use new interfaces.
2202 * memory.c: Use new interfaces.
2203 (frv_address_forbidden): No longer static.
2205 1999-10-19 Dave Brolley <brolley@cygnus.com>
2207 * traps.c (frvbf_check_non_excepting_load): Set NESR.DAEC, NESR.REC and
2209 * mloop.in (_parallel_write_queued): Handle CGEN_FN_PC_WRITE.
2210 * frv.c (frvbf_h_pc_set_handler): New function.
2211 * interrupts.c (frv_detect_data_interrupt): Removed.
2212 (address_forbidden): Removed.
2213 * frv-sim.h (frv_detect_data_interrupt): Removed.
2214 (NESR_MEM_ADDRESS_NOT_ALIGNED): New macro.
2215 (NESR_REGISTER_NOT_ALIGNED): New macro.
2216 (NESR_UQI_SIZE): New macro.
2217 (NESR_QI_SIZE): New macro.
2218 (NESR_UHI_SIZE): New macro.
2219 (NESR_HI_SIZE): New macro.
2220 (NESR_SI_SIZE): New macro.
2221 (NESR_DI_SIZE): New macro.
2222 (NESR_XI_SIZE): New macro.
2223 (GET_NESR_DAEC): New macro.
2224 (SET_NESR_DAEC): New macro.
2225 (GET_NESR_REC): New macro.
2226 (SET_NESR_REC): New macro.
2227 (GET_NESR_EC): New macro.
2228 (SET_NESR_EC): New macro.
2229 (frvbf_read_mem_QI): New function.
2230 (frvbf_read_mem_UQI): New function.
2231 (frvbf_read_mem_HI): New function.
2232 (frvbf_read_mem_UHI): New function.
2233 (frvbf_read_mem_SI): New function.
2234 (frvbf_read_mem_WI): New function.
2235 (frvbf_read_mem_DI): New function.
2236 (frvbf_read_mem_DF): New function.
2237 (frvbf_write_mem_QI): New function.
2238 (frvbf_write_mem_UQI): New function.
2239 (frvbf_write_mem_HI): New function.
2240 (frvbf_write_mem_UHI): New function.
2241 (frvbf_write_mem_SI): New function.
2242 (frvbf_write_mem_WI): New function.
2243 (frvbf_write_mem_DI): New function.
2244 (frvbf_write_mem_DF): New function.
2245 * Makefile.in (SIM_OBJS): Add memory.o.
2246 * cpu.c,cpu.h,sem.c: Rebuild.
2248 1999-10-18 Dave Brolley <brolley@cygnus.com>
2250 * sim-if.c (sim_open): Use a real fpu error function.
2251 * pipeline.c (frv_pipeline_add_insn): Don't add invalid insns.
2252 * mloop.in (_parallel_write_queued): Clear queue after writing.
2253 * interrupts.c (check_for_compound_interrupt): New function.
2254 (non_operating_interrupt): New function.
2255 * frv-sim.h (frvbf_h_gr_double_get_handler): New function.
2256 (frvbf_h_gr_double_set_handler): New function.
2257 (frvbf_h_fr_double_get_handler): New function.
2258 (frvbf_h_fr_double_set_handler): New function.
2259 (frvbf_h_cpr_double_get_handler): New function.
2260 (frvbf_h_cpr_double_set_handler): New function.
2261 (frv_interrupt_queue_element): New struct type.
2262 (frv_queue_program_interrupt): Now takes pc.
2263 (frv_queue_illegal_instruction_interrupt): Now takes pc.
2264 (frv_queue_interrupt): Now takes pc.
2265 (frv_program_interrupt): Now takes frv_interrupt_queue_element.
2266 (frv_software_interrupt): Now takes frv_interrupt_queue_element.
2267 (frvbf_division_exception): New function.
2268 (frvbf_fpu_error): New function.
2269 (frvbf_load_multiple_GR): New function.
2270 (frvbf_load_multiple_FR): New function.
2271 (frvbf_load_multiple_CPR): New function.
2272 * frv.c (frvbf_h_gr_double_get_handler): New function.
2273 (frvbf_h_gr_double_set_handler): New function.
2274 (frvbf_h_fr_double_get_handler): New function.
2275 (frvbf_h_fr_double_set_handler): New function.
2276 (frvbf_h_cpr_double_get_handler): New function.
2277 (frvbf_h_cpr_double_set_handler): New function.
2278 (frv_interrupt_queue_element): New struct type.
2279 (frv_queue_program_interrupt): Now takes pc.
2280 (frv_queue_illegal_instruction_interrupt): Now takes pc.
2281 (frv_queue_interrupt): Now takes pc.
2282 (frv_program_interrupt): Now takes frv_interrupt_queue_element.
2283 (frv_software_interrupt): Now takes frv_interrupt_queue_element.
2284 (frvbf_fpu_error): New function.
2285 (frvbf_load_multiple_GR): New function.
2286 (frvbf_load_multiple_FR): New function.
2287 (frvbf_load_multiple_CPR): New function.
2288 * traps.c (frvbf_division_exception): New function.
2289 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Rebuild.
2291 1999-10-12 Dave Brolley <brolley@cygnus.com>
2293 * mloop.in (new_vpc): New variable.
2294 (main loop): Call frv_detect_insn_access_interrupts. Call
2295 frv_detect_data_interrupts.
2296 * interrupts.c (access_queued_to): New function.
2297 (frv_detect_data_interrupts): New function.
2298 (frv_detect_insn_access_interrupts): New function.
2299 (frv_program_or_software_interrupt): Set PSR.S.
2300 * frv-sim.h (frv_detect_data_interrupts): New function.
2301 (frv_detect_insn_interrupts): New function.
2303 1999-10-07 Dave Brolley <brolley@cygnus.com>
2305 * frv-sim.h (frvbf_h_gr_hi_get_handler): New function.
2306 (frvbf_h_gr_hi_set_handler): New function.
2307 (frvbf_h_gr_lo_get_handler): New function.
2308 (frvbf_h_gr_lo.set_handler): New function.
2309 * frv.c (frvbf_h_gr_hi_get_handler): New function.
2310 (frvbf_h_gr_hi_set_handler): New function.
2311 (frvbf_h_gr_lo_get_handler): New function.
2312 (frvbf_h_gr_lo.set_handler): New function.
2313 (frvbf_model_fr500_u_integer): New function.
2314 * arch.h,cpu.h,cpu.c,decode.h,decode.c,model.c,sem.c: Rebuild.
2316 1999-10-04 Dave Brolley <brolley@cygnus.com>
2318 * traps.c: Use sim_engine_abort.
2319 * pipeline.c (frv_pipeline): Add field for insn major.
2320 (add_next_to_pipe): Return address of matching pipeline.
2321 (find_major_in_pipeline): New function.
2322 (check_insn_major_constraints: New function.
2323 (frv_pipeline_add_insn): Add checks for insn major constraints.
2324 * interrupts.c (frv_process_interrupts): Use sim_engine_abort.
2325 * frv.c (frvbf_h_spr_get_handler): No need to abort.
2327 Thu Sep 30 18:10:25 1999 Dave Brolley <brolley@cygnus.com>
2329 * pipeline.c: New file.
2330 * mloop.in (main loop): Call frv_pipeline_reset.
2331 Call frv_pipeline_add_insn.
2332 * frv-sim.h (frv_pipeline_reset): New function.
2333 (frv_pipeline_add_insn): New function.
2334 * Makefile.in (SIM_OBJS): Add pipeline.o
2336 1999-09-29 Doug Evans <devans@casey.cygnus.com>
2339 * traps.c (sim_engine_invalid_insn): New arg `vpc'. Change type of
2340 result to SEM_PC. Return vpc.
2342 Wed Sep 29 16:01:52 1999 Dave Brolley <brolley@cygnus.com>
2344 * interrupts.c (frv_interrupt_table): DATA_STORE_ERROR is imprecise.
2345 (frv_queue_interrupt): Don't detect identical interrupts here.
2347 Wed Sep 29 14:49:52 1999 Dave Brolley <brolley@cygnus.com>
2349 * interrupts.c: New file.
2350 * traps.c (sim_engine_invalid_insn): Return PC of next insn.
2351 (frv_software_interrupt): Moved to interrupts.c.
2352 (frv_itrap): New interface. Call frv_queue_software_interrupt.
2353 * mloop.in (@cpu@_parallel_write_init): set previous_vliw_pc.
2354 (@cpu@_perform_writeback): New function.
2355 (main loop): Call frv_process_interrupts.
2356 * frv-sim.h (frvbf_write_next_vliw_addr_to_PCSR): Removed.
2357 (frv_itrap): New interface.
2358 (frv_interrupt_class): New enumeration.
2359 (frv_interrupt_kind): New enumeration.
2360 (struct frv_interrupt): New struct type.
2361 (frv_interrupt_table): New table of interrupt information.
2362 (FRV_INTERRUPT_QUEUE_SIZE): New macro.
2363 (struct frv_interrupt_state): New struct type.
2364 (frv_interrupt_state): New global variable.
2365 (previous_vliw_pc): New global variable.
2366 (frv_queue_software_interrupt): New function.
2367 (frv_queue_program_interrupt): New function.
2368 (frv_queue_interrupt): New function.
2369 (frv_process_interrupts): New function.
2370 (frv_program_interrupt): New function.
2371 (frv_software_interrupt): New function.
2372 (frv_program_or_software_interrupt): New function.
2373 (frv_clear_interrupt_classes): New function.
2374 * frv.c (frvbf_write_next_vliw_addr_to_PCSR): Removed.
2375 * Makefile.in (SIM_OBJS): Add interrupts.o
2378 1999-09-25 Doug Evans <devans@casey.cygnus.com>
2380 * cpu.h,cpuall.h,decode.c,sem.c: Rebuild.
2382 Tue Sep 21 17:16:47 1999 Dave Brolley <brolley@cygnus.com>
2384 * mloop.in (main loop): Determine last insn from scache entry.
2386 * cpuall.h: Rebuild.
2388 Tue Sep 14 14:21:31 1999 Dave Brolley <brolley@cygnus.com>
2390 * frv-sim.h (frvbf_write_next_vliw_addr_to_PCSR): New flag.
2391 (NECR_ELOS): Define as unshifted value.
2392 (NECR_NEN): Define as unshifted value.
2393 (NECR_VALID): Define as unshifted value.
2394 (SET_NESR): Rewite to use post-write queue.
2395 (SET_NESR_VALID): Rewite to operate on argument.
2396 (SET_NESR_EAV): Rewite to operate on argument.
2397 (SET_NESR_FR): Rewite to operate on argument.
2398 (CLEAR_NESR_FR): Rewite to operate on argument.
2399 (SET_NESR_DRN): Rewite to operate on argument.
2400 (SET_NESR_SIZE): Rewite to operate on argument.
2401 (SET_NESR_NEAN): Rewite to operate on argument.
2402 (SET_NEEAR): Rewite to use post-write queue.
2403 (SET_NE_FLAG): Rewite to use post-write queue.
2404 (CLEAR_NE_FLAG): Rewite to use post-write queue.
2405 * traps.c (frv_software_interrupt): Rewite to use post-write queue.
2406 (frv_rett): Rewite to use post-write queue.
2407 (next_available_nesr): Rewrite to use new macro interfaces.
2408 (next_valid_nesr): Ditto.
2409 (frvbf_check_non_excepting_load): Ditto.
2410 (frvbf_check_recovering_store): Ditto.
2411 (clear_nesr_neear): Ditto.
2412 (clear_ne_flags): Ditto.
2413 * mloop.in (main loop): Update PCSR with address of next VLIW insn
2415 * frv.c (frvbf_h_spr_get_handler): Shift register fields here now.
2416 (frvbf_store_multiple_GR): Rewite to use post-write queue.
2417 (frvbf_store_multiple_FRint): Rewite to use post-write queue.
2418 (frvbf_store_multiple_CPR): Rewite to use post-write queue.
2419 * Makefile.in (frv.o): Depend on cgen-par.h.
2421 Fri Sep 10 17:03:15 1999 Dave Brolley <brolley@cygnus.com>
2423 * frv-sim.h (frvbf_set_write_next_vliw_addr_to_LR): New function.
2424 (frvbf_write_next_vliw_addr_to_LR): New flag.
2425 * frv.c (frvbf_set_write_next_vliw_addr_to_LR): New function.
2426 * mloop.in: Only take the first branch in a VLIW insn. Set LR to the
2427 address of the next VLIW insn if flag is set.
2428 * cpu.h,decode.c,sem.c: Rebuild.
2430 Tue Sep 7 13:44:23 1999 Dave Brolley <brolley@cygnus.com>
2432 * mloop.in: Limit parallel insns to MAX_PARALLEL_INSNS.
2435 1999-09-02 Doug Evans <devans@casey.cygnus.com>
2437 * configure: Regenerated to track ../common/aclocal.m4 changes.
2439 1999-09-01 Doug Evans <devans@casey.cygnus.com>
2441 * decode.c: Rebuild.
2443 Mon Aug 30 17:54:57 1999 Dave Brolley <brolley@cygnus.com>
2445 * traps.c (frv_rett): New function.
2446 * frv.c (frvbf_h_spr_get_handler): Handle bpsr.
2447 (frvbf_h_spr_set_handler): Handle bpsr.
2448 (frvbf_h_bpsr_get_handler): New function.
2449 (frvbf_h_bpsr_set_handler): New function.
2450 * frv-sim.h (frv_rett): New function.
2451 (frvbf_h_bpsr_get_handler): New function.
2452 (frvbf_h_bpsr_set_handler): New function.
2453 * mloop.in: Read actual packing bit.
2454 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Rebuild.
2456 Tue Aug 31 16:04:37 1999 Dave Brolley <brolley@cygnus.com>
2458 * traps.c (WANT_CPU): New macro.
2459 (WANT_CPU_FRVBF): New macro.
2460 (frvbf_check_recovering_store): Use registers for source and queue
2462 * mloop.in: New main loop for parallel support.
2463 (@cpu@_parallel_write_init): New function.
2464 (@cpu@_parallel_write_queued): New function.
2465 * frv-sim.h (set_icc_for_shift_left): New interface.
2466 (set_icc_for_shift_right): New interface.
2467 (frvbf_check_recovering_store): New interface.
2468 * frv.c (set_icc_for_shift_left): Pass and return icc value.
2469 (set_icc_for_shift_right): Pass and return icc value.
2470 (frvbf_check_recovering_store): New interface.
2471 * Makefile.in (FRV_OBJS): Add cgen-par.o.
2472 (stamp-mloop): Add cgen parallel options.
2473 (stamp-arch): Remove with-profile option.
2474 (stamp-cpu): Add cgen parallel options.
2475 * arch.h,cpu.h,decode.c,decode.h,model.c,sem.c: Rebuild.
2477 1999-08-28 Doug Evans <devans@casey.cygnus.com>
2479 * cpu.h,decode.c,sem.c: Rebuild.
2481 Wed Aug 25 12:25:04 1999 Dave Brolley <brolley@cygnus.com>
2483 * arch.h,cpu.h,decode.h,model.c,sem.c: Rebuild.
2485 Thu Aug 19 17:59:00 1999 Dave Brolley <brolley@cygnus.com>
2487 * configure.in: fr500 now the default model.
2488 * configure: Regenerate.
2489 * frv.c: Change frv-1 to frv-gen.
2490 (frvbf_model_fr500_u_exec): New function.
2491 * Makefile.in (stamp-cpu): Use 'mach=frv,fr500' to build decoder.
2492 * mloop.in: Fix typos in comments.
2493 * arch.c,arch.h,cpu.h,cpuall.h,decode.h,model.c,sem.c: Rebuild.
2495 1999-08-17 Dave Brolley <brolley@cygnus.com>
2497 * cpu.h,decode.c,decode.h,model.c,sem.c: Rebuild.
2499 1999-08-09 Doug Evans <devans@casey.cygnus.com>
2501 * cpu.h,decode.c,decode.h,model.c,sem.c: Rebuild.
2503 1999-08-04 Doug Evans <devans@casey.cygnus.com>
2505 * cpu.h,cpuall.h,decode.c,model.c,sem.c: Rebuild.
2507 Fri Jul 16 14:50:15 1999 Dave Brolley <brolley@cygnus.com>
2509 * frv.c (frvbf_fetch_register): Use GDB register number macros.
2510 (frvbf_store_register): Use GDB register number macros.
2511 (frvbf_cut): New function.
2512 * frv-sim.h (GR_REGNUM_MAX): New macro.
2513 (FR_REGNUM_MAX): New macro.
2514 (PC_REGNUM): New macro.
2515 (LR_REGNUM): New macro.
2516 (frvbf_cut): New function.
2517 * cpu.h,decode.c,decode.h,model.c,sem.c: Regenerate.
2519 1999-07-15 Stan Shebs <shebs@andros.cygnus.com>
2521 * frv.c (frvbf_fetch_register): Add ability to get LR register,
2522 add default for unhandled registers.
2523 (frvbf_store_register): Add ability to set LR register.
2525 1999-07-14 Stan Shebs <shebs@andros.cygnus.com>
2527 * frv.c (frvbf_fetch_register, frvbf_store_register): Fill in.
2528 (decode_gdb_dr_regnum): Remove, not used.
2530 1999-07-13 Michael Meissner <meissner@cygnus.com>
2532 * Makefile.in (SIM_EXTRA_FLAGS): Incorporate @sim_trapdump@.
2534 * configure.in (--enable-sim-trapdump): New switch to make unknown
2535 traps dump the register contents, instead of doing the trap thing.
2536 * configure: Regenerate.
2538 * frv-sim.h (TRAP_BREAKPOINT): Define as 81, so it can be used.
2539 (TRAP_REGDUMP{1,2}): Define to provide register dumping support
2542 * traps.h (toplevel): Include bfd.h, libiberity.h.
2543 (frv_itrap): Add support for --enable-sim-trapdump and traps 2,3
2544 dumping the registers.
2546 Thu Jul 8 10:57:39 1999 Dave Brolley <brolley@cygnus.com>
2548 * Makefile.in (SIM_EXTRA_LIBS): Removed. libm no longer needed.
2550 Wed Jul 7 17:01:12 1999 Dave Brolley <brolley@cygnus.com>
2552 * cpu.c,cpu.h,decode.c,model.c,sem.c: Rebuild.
2554 Tue Jul 6 16:12:18 1999 Dave Brolley <brolley@cygnus.com>
2556 * frv.c (frvbf_square_root_SF): Removed.
2557 (frvbf_square_root_DF): Removed.
2558 (frvbf_h_fr_double_get_handler): Removed.
2559 (frvbf_h_fr_double_set_handler): Removed.
2560 (frvbf_h_fr_int_get_handler): Removed.
2561 (frvbf_h_fr_int_set_handler): Removed.
2562 * frv-sim.h (frvbf_square_root_SF): Removed.
2563 (frvbf_square_root_DF): Removed.
2564 (frvbf_h_fr_double_get_handler): Removed.
2565 (frvbf_h_fr_double_set_handler): Removed.
2566 (frvbf_h_fr_int_get_handler): Removed.
2567 (frvbf_h_fr_int_set_handler): Removed.
2568 * decode.c,decode.h,model.c,sem.c: Rebuild.
2570 1999-07-05 Doug Evans <devans@casey.cygnus.com>
2572 * Makefile.in (SIM_OBJS): Add cgen-fpu.o, cgen-accfp.o.
2573 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem.c: Rebuild.
2574 * sim-if.c (sim_open): Initialize fpu.
2575 * frv-sim.h (SETMEMSF,SETMEMDF): Delete.
2576 * frv.c (frvbf_store_multiple_FRint): Replace frvbf_h_fr_int_get
2577 with frvbf_h_fr_get.
2579 Wed Jun 30 15:56:56 1999 Dave Brolley <brolley@cygnus.com>
2581 * frv-sim.h (NESR_RANGE): New macro.
2582 (NO_NESR): New macro.
2583 (GET_NESR_VALID): New macro.
2584 (next_ne_index): Removed.
2585 * traps.c (next_available_nesr): New function.
2586 (next_valid_nesr): New function.
2587 (frvbf_check_non_excepting_load): Use next_available_nesr.
2588 (frvbf_check_recovering_store): Use next_available_nesr and
2590 (clear_nesr_neear): Use next_available_nesr and next_valid_nesr.
2591 (frvbf_check_recovering_store): Only consider one matching register.
2594 Tue Jun 29 16:54:32 1999 Dave Brolley <brolley@cygnus.com>
2596 * frv.c (frvbf_square_root_SF): New function.
2597 (frvbf_square_root_DF): New function.
2598 (frvbf_h_fr_double_get_handler): New function.
2599 (frvbf_h_fr_double_set_handler): New function.
2600 * frv-sim.h (frvbf_square_root_SF): New function.
2601 (frvbf_square_root_DF): New function.
2602 (frvbf_h_fr_double_get_handler): New function.
2603 (frvbf_h_fr_double_set_handler): New function.
2604 * cpu.h,cpu.c,decode.c,decode.h,model.c,sem.c: Rebuild.
2606 1999-06-28 Dave Brolley <brolley@cygnus.com>
2608 * decode.c,decode.h,model.c,sem.c: Regenerate.
2610 Thu Jun 24 17:26:32 1999 Dave Brolley <brolley@cygnus.com>
2612 * Makefile.in (SIM_EXTRA_LIBS): Add -lm.
2613 * frv-sim.h (frvbf_h_fr_int_get_handler): New function.
2614 (frvbf_h_fr_int_set_handler): New function.
2615 (frvbf_store_multiple_FRint): New function.
2616 (frvbf_square_root_SF): New function.
2617 * frv.c (frvbf_h_fr_int_get_handler): New function.
2618 (frvbf_h_fr_int_set_handler): New function.
2619 (frvbf_store_multiple_FRint): New function.
2620 (frvbf_square_root_SF): New function.
2621 * cpu.h,cpu.c,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2623 1999-06-23 Doug Evans <devans@casey.cygnus.com>
2625 * Makefile.in (stamp-mloop): Delete -fast -pbb -switch args
2626 to genmloop.sh. Pass -scache instead.
2627 (mloop.o): Delete sem-switch.c dependency.
2628 (sem-switch.c): Delete rule.
2629 (stamp-cpu): Don't build sem-switch.c.
2630 * sem-switch.c: Delete.
2631 * mloop.in (xfull-exec-*): Fix call to execute.
2632 * tconfig.in (WITH_SCACHE_PBB): Define as 0.
2634 * cpu.h,decode.c,model.c,sem-switch.c,sem.c: Rebuild.
2636 Tue Jun 22 16:23:57 1999 Dave Brolley <brolley@cygnus.com>
2638 * cpu.h,decode.c,sem.c,sem-switch.c: Regenerate.
2640 Mon Jun 21 17:34:10 1999 Dave Brolley <brolley@cygnus.com>
2642 * mloop.in (execute): Force gr0 to zero before each insn.
2643 * cpu.h,cpu.c,decode.c,sem.c,sem-switch.c: Regenerate.
2645 1999-06-18 Doug Evans <devans@casey.cygnus.com>
2647 * cpu.h,decode.c,model.c,sem-switch.c,sem.c: Rebuild.
2649 Fri Jun 18 17:49:23 1999 Dave Brolley <brolley@cygnus.com>
2651 * frv.c (frvbf_h_gr_get_handler): New function.
2652 (frvbf_h_gr_set_handler): New function:
2653 (frvbf_store-multiple_GR): New function:
2654 (frvbf_store-multiple_FR): New function:
2655 (frvbf_store-multiple_CPR): New function:
2656 * frv-sim.h (frvbf_h_gr_get_handler): New function.
2657 (frvbf_h_gr_set_handler): New function:
2658 (frvbf_store-multiple_GR): New function:
2659 (frvbf_store-multiple_FR): New function:
2660 (frvbf_store-multiple_CPR): New function:
2661 * traps.c (frv_itrap): Implement proper syscalls interface.
2662 * cpu.h,cpu.c,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2664 Fri Jun 18 14:36:23 1999 Dave Brolley <brolley@cygnus.com>
2666 * traps.c (frvbf_check_non_excepting_divide): New function.
2667 (frvbf_check_recovering_store): New function.
2668 (clear_nesr_neear): New function.
2669 (clear_ne_flags): New function.
2670 (frvbf_commit): New function.
2672 * frv-sim.h (frvbf_check_non_excepting_divide): New function.
2673 (frvbf_check_recovering_store): New function.
2674 (clear_nesr_neear): New function.
2675 (clear_ne_flags): New function.
2676 (frvbf_commit): New function.
2677 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2679 1999-06-16 Dave Brolley <brolley@cygnus.com>
2681 * frv.c (frvbf_h_spr_get_handler): Handle SPR_NECR.
2682 (frvbf_h_spr_set_handler): Handle SPR_NECR.
2683 * traps.c (next_ne_index): New variable.
2684 (frvbf_check_non_excepting_load): New function.
2685 * frv-sim.h (NECR_ELOS): New macro.
2686 (NECR_NEN): New macro.
2687 (NECR_VALID): New macro.
2688 (SET_NESR_VALID): New macro.
2689 (SET_NESR_EAV): New macro.
2690 (SET_NESR_FR): New macro.
2691 (CLEAR_NESR_FR): New macro.
2692 (SET_NESR_DRN): New macro.
2693 (SET_NESR_SIZE): New macro.
2694 (SET_NESR_NEAN): New macro.
2695 (SET_NEEAR): New macro.
2696 (GET_NE_FLAG): New macro.
2697 (SET_NE_FLAG): New macro.
2698 (CLEAR_NE_FLAG): New macro.
2699 (frvbf_check_non_excepting_load): New function:
2700 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2702 Wed Jun 9 18:12:49 1999 Dave Brolley <brolley@cygnus.com>
2704 * cpu.h,decode.c,model.c,sem.c,sem-switch.c: Regenerate.
2706 Tue Jun 8 18:13:51 1999 Dave Brolley <brolley@cygnus.com>
2708 * frv.c (cr_logic): Correct andcr, nandcr, andncr and nandncr.
2709 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2711 Mon Jun 7 17:09:15 1999 Dave Brolley <brolley@cygnus.com>
2713 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2715 1999-06-07 Dave Brolley <brolley@cygnus.com>
2717 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2719 Thu Jun 3 17:33:31 1999 Dave Brolley <brolley@cygnus.com>
2721 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2723 Wed Jun 2 17:50:21 1999 Dave Brolley <brolley@cygnus.com>
2725 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2727 Tue Jun 1 17:58:53 1999 Dave Brolley <brolley@cygnus.com>
2729 * cpu.h,decode.c,model.c,sem.c,sem-switch.c: Regenerate.
2731 Mon May 31 17:57:25 1999 Dave Brolley <brolley@cygnus.com>
2733 * traps.c (frv_software_interrupt): Pass current_cpu to
2734 frvbf_h_psr_esr_get.
2735 (frv_software_interrupt): Calculate the new PC based on TBR.
2736 * cpu.h,decode.c,model.c,sem.c,sem-switch.c: Regenerate.
2738 1999-05-31 Dave Brolley <brolley@cygnus.com>
2740 * cpu.h,decode.c,model.c,sem.c,sem-switch.c: Regenerate.
2742 Thu May 27 17:42:00 1999 Dave Brolley <brolley@cygnus.com>
2744 * frv-sim.h (frvbf_h_cccr_get_handler): New function.
2745 (frvbf_h_cccr_set_handler): New function.
2746 (frvbf_scan_result): New function.
2747 (frvbf_cr_logic): New function.
2748 * frv.c (frvbf_h_cccr_get_handler): New function.
2749 (frvbf_h_cccr_set_handler): New function.
2750 (frvbf_scan_result): New function.
2751 (frvbf_cr_logic): New function.
2752 (cr_ops,cr_result,cr_logic): New table.
2753 * cpu.h,decode.c,model.c,sem.c,sem-switch.c: Regenerate.
2755 1999-05-25 Dave Brolley <brolley@cygnus.com>
2757 * frv.c (frvbf_h_spr_get_handler): Add support for TBR and PSR.
2758 (frvbf_h_spr_set_handler): Add support for TBR and PSR.
2759 (frv_psr_get_handler): New function.
2760 (frv_psr_set_handler): New function.
2761 (frv_tbr_get_handler): New function.
2762 (frv_tbr_set_handler): New function.
2763 (frvbf_h_ccr_get_handler): Add support for fCC.
2764 (frvbf_h_ccr_set_handler): Add support for fCC.
2765 * frv-sim.h (frv_psr_get_handler): New function.
2766 (frv_psr_set_handler): New function.
2767 (frv_tbr_get_handler): New function.
2768 (frv_tbr_set_handler): New function.
2769 * traps.c (frv_software_interrupt): Implement.
2770 * cpu.h,cpu.c,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2772 Thu May 20 16:39:27 1999 Dave Brolley <brolley@cygnus.com>
2774 * cpu.h,cpu.c,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2776 1999-05-18 Dave Brolley <brolley@cygnus.com>
2778 * frv.c: (frvbf_set_icc_for_shift_left): New function.
2779 (frvbf_set_icc_for_shift_right): New function.
2780 * frv-sim.h (frvbf_set_icc_for_shift_left): New function.
2781 (frvbf_set_icc_for_shift_right): New function.
2782 (SETMEMSF): New Macro.
2783 (SETMEMDF): New Macro.
2784 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2786 Thu May 13 17:14:49 1999 Dave Brolley <brolley@cygnus.com>
2788 * frv.c (frvbf_h_ccr_get_handler): New function.
2789 (frvbf_h_ccr_set_handler): New function.
2790 * cpu.h,cpu.c,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2792 Tue May 11 16:13:15 1999 Dave Brolley <brolley@cygnus.com>
2794 * frv-sim.h (frvbf_h_spr_get_handler,frvbf_h_spr_set_handler,
2795 frvbf_h_isr_get_handler, frvbf_h_isr_set_handler): New functions.
2797 * cpu.h,cpu.c,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2799 1999-05-10 Dave Brolley <brolley@cygnus.com>
2801 * cpu.h,cpu.c,decode.c,model.c,sem.c,sem-switch.c: Regenerate.
2803 Thu May 6 16:48:21 1999 Dave Brolley <brolley@cygnus.com>
2805 * cpu.h,decode.c,sem.c,sem-switch.c: Regenerate.
2806 * frv-sim.h (TRAP_SYSCALL): Define as 0x80.
2808 Wed May 5 11:52:24 1999 Dave Brolley <brolley@cygnus.com>
2810 * traps.c (frv_software_interrupt): New function.
2811 (frv_itrap): New function.
2812 * frv-sim.h (TRAP_SYSCALL): define as 0.
2813 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2815 Mon May 3 13:49:21 1999 Dave Brolley <brolley@cygnus.com>
2817 * cpu.h,decode.c,decode.h,model.c,sem.c,sem-switch.c: Regenerate.
2819 Thu Apr 29 17:37:06 1999 Dave Brolley <brolley@cygnus.com>
2821 * Directory created.