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