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