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