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