OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [sim/] [frv/] [ChangeLog] - Blame information for rev 373

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.