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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gdb-7.2/] [sim/] [frv/] [ChangeLog] - Blame information for rev 853

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

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

powered by: WebSVN 2.1.0

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