import gdb-1999-10-04 snapshot
[platform/upstream/binutils.git] / sim / m32r / ChangeLog
1 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
2
3         * mloop.in: Update call to sim_engine_invalid_insn.
4         * sem.c,sem-switch.c: Rebuild.
5         * traps.c (sim_engine_invalid_insn): New arg `vpc'.  Change type of
6         result to SEM_PC.  Return vpc.
7
8 Wed Sep 29 14:47:20 1999  Dave Brolley  <brolley@cygnus.com>
9
10         * traps.c (sim_engine_invalid_insn): Return PC.
11
12 Thu Sep  2 18:15:53 1999  Andrew Cagney  <cagney@b1.cygnus.com>
13
14         * configure: Regenerated to track ../common/aclocal.m4 changes.
15
16 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
17
18         * sem.c: Rebuild
19
20 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
21
22         * cpu.h,decode.c,decode.h,model.c,sem-switch.c,sem.c: Rebuild.
23
24 1999-08-04  Doug Evans  <devans@casey.cygnus.com>
25
26         * m32r-sim.h (SEM_SKIP_INSN): Delete.
27         * cpu.h,cpuall.h,decode.c,model.c,sem-switch.c,sem.c: Rebuild.
28
29 1999-05-08  Felix Lee  <flee@cygnus.com>
30
31         * configure: Regenerated to track ../common/aclocal.m4 changes.
32         
33 Fri Apr 16 16:47:43 1999  Doug Evans  <devans@charmed.cygnus.com>
34
35         * devices.c (device_io_read_buffer): New arg `sd'.
36         (device_io_write_buffer): New arg `sd'.
37         (device_error): Give proper arg spec.
38
39 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
40
41         * sem-switch.c,sem.c: Rebuild.
42
43 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
44
45         * decode.c: Rebuild.
46
47 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
48
49         * m32r-sim.h (M32R_DEVICE_LEN): Fix off by one error.
50
51 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
52
53         * arch.c,arch.h,model.c: Rebuild.
54         * m32r-sim.h (a_m32r_h_gr_get,a_m32r_h_gr_set): Declare.
55         (a_m32r_h_cr_get,a_m32r_h_cr_set): Declare.
56         * m32r.c (m32rbf_fetch_register): Replace calls to a_m32r_h_pc_get,
57         a_m32r_h_accum_get with appropriate calls to m32rbf_*.
58         (m32rbf_store_register): Ditto.
59         (a_m32r_h_gr_get,a_m32r_h_gr_set): New functions.
60         (a_m32r_h_cr_get,a_m32r_h_cr_set): Ditto.
61         * sim-if.c (sim_open): Update call to m32r_cgen_cpu_open.
62         * traps.c (m32r_core_signal): Replace calls to a_m32r_h_*,
63         with appropriate calls to m32rbf_*.
64
65 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
66
67         * arch.c,arch.h,cpu.c,cpu.h,sem.c,sem-switch.c: Rebuild.
68         * m32r-sim.h (GET_H_*,SET_H_*, except GET_H_SM): Delete.
69         * sim-if.c (sim_open): Update call to m32r_cgen_cpu_open.
70
71 1999-02-25  Doug Evans  <devans@casey.cygnus.com>
72
73         * cpu.c,cpu.h: Rebuild.
74
75 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
76
77         * Makefile.in (SIM_EXTRA_DEPS): Add m32r-desc.h, delete cpu-opc.h.
78         (stamp-xmloop): s/-parallel/-parallel-write/.
79         * configure.in (sim_link_files,sim_link_links): Delete.
80         * configure: Rebuild.
81         * decode.c,decode.h,model.c,sem-switch.c,sem.c: Rebuild.
82         * mloop.in (execute): CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE.
83         * sim-if.c (sim_open): m32r_cgen_cpu_open renamed from
84         m32r_cgen_opcode_open.  Set disassembler.
85         (sim_close): m32r_cgen_cpu_open renamed from m32r_cgen_opcode_open.
86         * sim-main.h: Don't include cpu-opc.h,cpu-sim.h. Include
87         m32r-desc.h,m32r-opc.h,m32r-sim.h.
88
89 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
90
91         * cpu.h,decode.c,model.c,sem-switch.c,sem.c: Rebuild.
92
93 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
94
95         * decode.h,model.c: Regenerate.
96
97 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
98
99         * arch.c,arch.h,cpuall.h: Regenerate.
100         * cpu.c,cpu.h,decode.c,decode.h,model.c,sem-switch.c,sem.c: Regenerate.
101         * traps.c (sim_engine_invalid_insn): PCADDR->IADDR.
102
103 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
104
105         * Makefile.in (m32r-clean): rm eng.h.
106         * sim-main.h: Delete inclusion of ansidecl.h.
107         * cpu.h: Regenerate.
108
109 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
110
111         * cpu.h: Regenerate.
112
113 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
114
115         * Makefile.in (MAIN_INCLUDE_DEPS): Delete.
116         (INCLUDE_DEPS,OPS_INCLUDE_DEPS): Delete.
117         (sim-if.o): Use SIM_MAIN_DEPS.
118         (arch.o,traps.o,devices.o): Ditto.
119         (M32RBF_INCLUDE_DEPS): Use CGEN_MAIN_CPU_DEPS.
120         (m32r.o,mloop.o,cpu.o,decode.o,sem.o,model.o): Simplify dependencies.
121         * cpu.c,cpu.h,decode.c,model.c,sem-switch.c,sem.c: Regenerate.
122         * m32r-sim.h (m32rbf_h_cr_[gs]et_handler): Declare.
123         ([GS]ET_H_CR): Define.
124         (m32rbf_h_psw_[gs]et_handler): Declare.
125         ([GS]ET_H_PSW): Define.
126         (m32rbf_h_accum_[gs]et_handler): Declare.
127         ([GS]ET_H_ACCUM): Define.
128         * sim-if.c (sim_open): Model probing code moved to sim-model.c.
129         * m32r.c (WANT_CPU): Define as m32rbf.
130         (all register access fns): Rename to ..._handler.
131
132 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
133
134         * configure.in: --enable-cgen-maint support moved to common/aclocal.m4.
135         (SIM_AC_OPTION_ALIGNMENT): Make strict.
136         * configure: Regenerate.
137
138         * sem-switch.c,sem.c,semx-switch.c: Regenerate.
139         * sim-main.h (SIM_ENGINE_HALT_HOOK,SIM_ENGINE_RESTART_HOOK): Define.
140         * traps.c (m32r_core_signal): Handle --environment=operating.
141
142 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
143
144         * cpu.h,decode.c,sem-switch.c,sem.c: Regenerate.
145
146         * sim-if.c: Include string.h or strings.h if present.
147
148 1998-12-04  Doug Evans  <devans@casey.cygnus.com>
149
150         * configure.in: Call SIM_AC_OPTION_INLINE.
151         * configure: Regenerate.
152         * sim-main.h: Protect against multiple inclusion.
153         Don't include cgen-scache.h,cgen-cpu.h,cgen-trace.h,cpuall.h.
154         Done by cgen-sim.h now.
155         * tconfig.in (SIM_HAVE_MODEL): Delete, moved to cgen-types.h.
156         * cpuall.h: Regenerate.
157         * cpu.h,decode.c,sem-switch.c,sem.c: Regenerate.
158         * mloop.in (extract16): Make static inline again.
159         Simplify with call to @cpu@_fill_argbuf,@cpu@_fill_argbuf_tp.
160         (extract32): Ditto.
161         Simplify with call to @cpu@_fill_argbuf,@cpu@_fill_argbuf_tp.
162         (execute): Test ARGBUF_PROFILE_P before profiling.
163         Update calls to TRACE_INSN_INIT,TRACE_INSN_FINI.
164
165 1998-11-22  Doug Evans  <devans@tobor.to.cygnus.com>
166
167         * devices.c (device_io_write_buffer): Fix typo.
168         * sim-if.c (sim_open): Hack in call to dv_sockser_install.
169         * tconfig.in (HAVE_DV_SOCKSER): Add but comment out.
170
171 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
172
173         * Makefile.in (M32R_OBJS): Delete extract.o.
174         (extract.o): Delete.
175         * cpu.c,cpu.h,decode.c,decode.h,sem-switch.c,sem.c: Rebuild.
176         * mloop.in (extract16): Update type of `insn' arg.
177         Delete call to d->extract.
178         (extract32): Ditto.
179
180 Wed Nov  4 23:55:37 1998  Doug Evans  <devans@seba.cygnus.com>
181
182         * sim-main.h: Delete inclusion of config.h, include sim-basics.h
183         before cgen-types.h.
184         * tconfig.in: Guard against multiple inclusion.
185         * cpu.h: Delete decls moved to genmloop.sh.
186
187 Mon Oct 19 14:13:05 1998  Doug Evans  <devans@seba.cygnus.com>
188
189         * sim-main.h: #include cpu-opc.h.
190         * arch.c,arch.h,decode.c,extract.c,model.c,sem.c: Regenerate
191         to get #include cleanup.
192
193         * Makefile.in (SIM_EXTRA_DEPS): Replace cgen headers with
194         CGEN_INCLUDE_DEPS.
195         (M32RBF_INCLUDE_DEPS): Define.
196         (m32r .o's): Depend on it.
197         (mloop.c): Update call to genmloop.sh.
198         * cpu.h,cpuall.h: Regenerate.
199         * sim-main.h: Delete inclusion of cpu.h,decode.h, moved to cpuall.h.
200         #include cgen-scache.h,cgen-cpu.h.
201         * tconfig.in (WITH_FOO semantic macros): Delete.
202
203 Fri Oct 16 09:15:29 1998  Doug Evans  <devans@charmed.cygnus.com>
204
205         * sim-if.c (sim_do_command): Handle "sim info reg {bbpsw,bbpc}".
206
207 Fri Oct  9 16:11:58 1998  Doug Evans  <devans@seba.cygnus.com>
208
209         Add pseudo-basic-block execution support.
210         * Makefile.in (SIM_OBJS): Add sim-reg.o, cgen-run.o, sim-stop.o.
211         (SIM_EXTRA_DEPS): Add include/opcode/cgen.h.
212         (INCLUDE_DEPS): Delete cpu-sim.h, include/opcode/cgen.h.
213         (mloop.c): Build pseudo-basic-block version.  Depend on stamp-cpu.
214         * arch.c,arch.h,cpuall.h: Regenerate.
215         * cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
216         * sem-switch.c,sem.c: Regenerate.
217         * m32r-sim.h (M32R_MISC_PROFILE): New members load_regs,
218         load_regs_pending.
219         * m32r.c (m32rbf_fetch_register): Renamed from m32rb_fetch_register.
220         (m32rbf_store_register,m32rbf_h_cr_get,m32rbf_h_cr_set,
221         m32rbf_h_psw_get,m32rbf_h_psw_set,m32rbf_h_accum_get,
222         m32rbf_h_accum_set): Likewise.
223         (m32r_model_{init,update}_insn_cycles): Delete.
224         (m32rbf_model_insn_{before,after}): New fns.
225         (m32r_model_record_cti,m32r_model_record_cycles): Delete.
226         (m32rb_model_mark_get_h_gr,m32rb_model_mark_set_h_gr): Delete.
227         (m32rb_model_mark_busy_reg,m32rb_model_mark_unbusy_reg): Delete.
228         (check_load_stall): New fn.
229         (m32rbf_model_m32r_d_u_{exec,cmp,mac,cti,load,store}): New fns.
230         (m32rbf_model_test_u_exec): New fn.
231         * mloop.in: Rewrite, use pbb support.
232         * sim-if.c (sim_stop,sim_sync_stop,sim_resume): Delete.
233         (sim_fetch_register,sim_store_register): Delete.
234         * sim-main.h (CIA_GET,CIA_SET): Fix.
235         (SIM_ENGINE_HALT_HOOK,SIM_ENGINE_RESTART_HOOK): Delete.
236         * tconfig.in (WITH_SCACHE_PBB): Define.
237         (WITH_SCACHE_PBB_M32RBF): Define.
238         * traps.c (sim_engine_invalid_insn): Renamed from ..._illegal_....
239         (m32r_trap): Pass pc to sim_engine_halt.
240         * configure.in (SIM_AC_OPTION_SCACHE): Change 1024 to 16384.
241         * configure: Regenerate.
242
243 Wed Sep 16 18:22:27 1998  Doug Evans  <devans@canuck.cygnus.com>
244
245         * m32r-sim.h ({PSW,CBR,SPI,SPU,BPC,BBPSW,BBPC}_REGNUM): New macros.
246         ({ACC1L,ACC1H}_REGNUM): New macros.
247         (m32r_decode_gdb_ctrl_regnum): Add prototype.
248         * m32r.c (m32r_decode_gdb_ctrl_regnum): New function.
249         (m32r_fetch_register,m32r_store_register): Rewrite.
250
251 Tue Sep 15 15:01:14 1998  Doug Evans  <devans@canuck.cygnus.com>
252
253         * m32r-sim.h (GET_H_SM): New macro.
254         (UART params): Update to msa2000.
255         * devices.c (device_io_read_buffer): Update to msa2000.
256         * m32r.c (m32rb_h_cr_get,m32rb_h_cr_set): Handle bbpc,bbpsw.
257         (m32rb_h_psw_get,m32rb_h_psw_set): New functions.
258         * arch.c,arch.h,cpu.c,cpu.h,sem-switch.c,sem.c: Regenerate.
259
260 Wed Sep  9 15:29:36 1998  Doug Evans  <devans@canuck.cygnus.com>
261
262         * m32r-sim.h (m32r_trap): Update prototype.
263         * traps.c (m32r_trap): New arg `pc'.
264         * sem.c,sem-switch.c: Regenerated.
265
266 Mon Aug  3 12:59:17 1998  Doug Evans  <devans@seba.cygnus.com>
267
268         Rename cpu m32r to m32rb to distinguish from architecture name.
269         * Makefile.in (mloop.c): cpu m32r renamed to m32rb.
270         * sim-main.h (WANT_CPU_M32RB): Renamed from WANT_CPU_M32R.
271         * tconfig.in (WANT_CPU_M32RB): Ditto.
272         * m32r.c (WANT_CPU_M32RB): Ditto.
273         (*): m32r_ cpu fns renamed to m32rb_.
274         * sim-if.c (sim_stop,sim_sync_stop,sim_resume): Update.
275         * arch.h,arch.c: Regenerate.
276         * cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
277         * sem-switch.c,sem.c: Regenerate.
278
279         * sim-if.c (sim_open): Don't allocate memory on top of any user
280         specified memory.
281         (h_gr_get,h_gr_set): Delete.
282         * sim-main.h (h_gr_get,h_gr_set): Delete.
283         * traps.c (m32r_trap): Replace calls to h_gr_[gs]et with
284         a_m32r_h_gr_[gs]et.
285
286         * Makefile.in (INCLUDE_DEPS): Add include/opcode/cgen.h.
287
288         * sim-if.c (sim_open): Open opcode table.
289         (sim_close): Close it.
290
291 Fri Jul 24 13:00:29 1998  Doug Evans  <devans@canuck.cygnus.com>
292
293         * m32r.c: Include cgen-mem.h.
294         * traps.c (m32r_trap): Tweak for -Wall.
295
296 Tue Jul 21 16:53:10 1998  Doug Evans  <devans@seba.cygnus.com>
297
298         * cpu.h,extract.c: Regenerate.  pc-rel calcs done on f_dispNN now.
299
300 Wed Jul  1 16:51:15 1998  Doug Evans  <devans@seba.cygnus.com>
301
302         * Makefile.in: cgen_maint -> CGEN_MAINT.
303         * configure.in: AC_SUBST cgen,cgendir.  No longer look for guile.
304         * configure: Regenerate.
305         * arch.c,arch.h,cpuall.h: Regenerate.
306         * cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
307         * sem-switch.c,sem.c: Regenerate.
308
309 Sat Jun 13 07:49:23 1998  Doug Evans  <devans@fallis.cygnus.com>
310
311         * m32r-sim.h (M32R_MISC_PROFILE): New members insn_cycles, cti_stall,
312         load_stall,biggest_cycles.
313         * m32r.c (m32r_model_mark_get_h_gr): Update.
314         (m32r_model_init_insn_cycles,m32r_model_update_insn_cycles): New fns.
315         (m32r_model_record_cti,m32r_model_record_cycles): New functions.
316         * mloop.in: Call cycle init/update fns.
317         * model.c: Regenerate.
318
319 Wed Jun 10 17:39:29 1998  Doug Evans  <devans@canuck.cygnus.com>
320
321         * traps.c: New file.  Trap support moved here from sim-if.c.
322         * Makefile.in (SIM_OBJS): Add traps.o
323         * sim-if.c: Don't include targ-vals.h.
324         (sim_engine_illegal_insn): Moved to traps.c
325         * sim-main.h (SIM_CORE_SIGNAL): Define.
326         (m32r_core_signal): Declare.
327         * m32r-sim.h (m32r_trap): Declare.
328
329         * devices.c (device_io_read_buffer): Handle cache purging via MCCR
330         register.
331
332         * m32r-sim.h (M32R_MISC_PROFILE): Move here from sim-main.h.
333         (PROFILE_COUNT_SHORTINSNS,PROFILE_COUNT_LONGINSNS): New macros.
334         (TRAP_SYSCALL,TRAP_BREAKPOINT): New macros.
335
336         * extract.c,sem-switch.c,sem.c: Regenerate.
337
338 Wed May 20 00:10:40 1998  Doug Evans  <devans@seba.cygnus.com>
339
340         * m32r-sim.h (PROFILE_COUNT_PARINSNS): New macro.
341         * mloopx.in (extract): Set abuf.addr for proper fill nop counting.
342         (execute): Count parallel insns.
343         * sim-if.c (print_m32r_misc_cpu): Print count.
344         * sim-main.h (M32R_MISC_PROFILE): New member parallel_count.
345
346         Zero bottom two bits of pc in jmp,jl insns.
347         * sem.c,sem-switch.c: Regenerate.
348
349 Tue May 19 16:45:33 1998  Doug Evans  <devans@seba.cygnus.com>
350
351         * sim-if.c (do_trap): Treat traps 2-15 as hardware does.
352
353 Sat May 16 13:04:30 1998  Doug Evans  <devans@seba.cygnus.com>
354
355         * sim-if.c (sim_stop): Update call to @cpu@_engine_stop.
356         (sim_sync_stop): New function.
357
358 Fri May 15 16:43:27 1998  Doug Evans  <devans@seba.cygnus.com>
359
360         * Makefile.in (devices.o): Add dependencies.
361
362         * arch.h,cpu.c,cpu.h,cpuall.h: Regenerate.
363         * sem-switch.c,sem.c: Regenerate.
364         * mloop.in (execute): Update calls to TRACE_INSN_{INIT,FINI}.
365
366 Thu May  7 02:51:35 1998  Doug Evans  <devans@seba.cygnus.com>
367
368         * Makefile.in (SIM_OBJS): Add sim-cpu.o.
369
370 Wed May  6 14:51:39 1998  Doug Evans  <devans@seba.cygnus.com>
371
372         * arch.h,arch.c,cpu.h,cpuall.h: Regenerate, tweaks mostly.
373         * model.c: Ditto.  Reorganize model/mach data.
374
375         * Makefile.in (m32r.o,mloop.o,cpu.o,model.o): Add decode.h dependency.
376         * decode.c,decode.h: Regenerate, introduces IDESC table.
377         * mloop.in (extract16,extract32): Add IDESC support.
378         Update names of semantic handler member names.
379         (execute): Ditto.  Delete call to PROFILE_COUNT_INSN.
380
381         * sem-switch.c: Regenerate.  Redo computed goto label handling.
382         * sem.c: Regenerate.  Call PROFILE_COUNT_INSN.
383
384         * m32r.c (m32r_fetch_register): Change result type and args to
385         conform to sim_fetch_register interface.
386         (m32r_store_register): Ditto for sim_store_register interface.
387
388         * sim-if.c (alloc_cpu): Delete.
389         (free_state): Uninstall modules here ...
390         (sim_open): ... and not here.  Call sim_cpu_alloc_all.
391         Set default architecture/model if not specified.
392         (sim_fetch_register,sim_store_register): Rewrite.
393
394         * sim-if.c (h_pc_get,h_pc_set): Delete.  Renamed to sim_pc_[gs]et
395         and moved to common/sim-cpu.c.
396         (sim_create_inferior): Update.
397         (do_trap): Update.
398         * sim-main.h (h_pc_get,h_pc_set): Delete.
399
400         * sim-main.h (sim_cia): Change to USI.
401         (sim_cpu): Move m32r_misc_profile before machine generated part.
402
403 Tue Apr 28 18:33:31 1998  Geoffrey Noer  <noer@cygnus.com>
404
405         * configure: Regenerated to track ../common/aclocal.m4 changes.
406
407 Tue Apr 28 18:05:53 1998  Nick Clifton  <nickc@cygnus.com>
408
409         * model.c: Rebuilt.
410
411 Mon Apr 27 15:36:30 1998  Doug Evans  <devans@seba.cygnus.com>
412
413         * cpu.h,model.c,sem-switch.c,sem.c: Regenerated.  Mostly comment
414         and variable renaming due to macro insn additions.
415         * mloop.in: Update to use CGEN_INSN_NUM.
416
417 Sun Apr 26 15:31:55 1998  Tom Tromey  <tromey@creche>
418
419         * configure: Regenerated to track ../common/aclocal.m4 changes.
420         * config.in: Ditto.
421
422 Sun Apr 26 15:20:05 1998  Tom Tromey  <tromey@cygnus.com>
423
424         * acconfig.h: New file.
425         * configure.in: Reverted change of Apr 24; use sinclude again.
426
427 Fri Apr 24 14:16:40 1998  Tom Tromey  <tromey@creche>
428
429         * configure: Regenerated to track ../common/aclocal.m4 changes.
430         * config.in: Ditto.
431
432 Fri Apr 24 11:19:26 1998  Tom Tromey  <tromey@cygnus.com>
433
434         * configure.in: Don't call sinclude.
435
436 Mon Apr 20 16:12:35 1998  Doug Evans  <devans@canuck.cygnus.com>
437
438         * cpu.c,sem.c,sem-switch.c: Regenerate.  From
439         - cgen/m32r.cpu (h-accum): Add attribute FUN-ACCESS.
440         * m32r.c (m32r_h_accum_get,m32r_h_accum_set): New functions.
441         #include cgen-ops.h.
442
443 Fri Apr 10 18:22:41 1998  Doug Evans  <devans@canuck.cygnus.com>
444
445         * cpu.h,decode.c,decode.h,extract.c,sem.c,sem-switch.c: Regenerate.
446
447 Sat Apr  4 20:36:25 1998  Andrew Cagney  <cagney@b1.cygnus.com>
448
449         * configure: Regenerated to track ../common/aclocal.m4 changes.
450
451 Fri Mar 27 16:15:52 1998  Andrew Cagney  <cagney@b1.cygnus.com>
452
453         * configure: Regenerated to track ../common/aclocal.m4 changes.
454
455 Wed Mar 25 12:35:29 1998  Andrew Cagney  <cagney@b1.cygnus.com>
456
457         * configure: Regenerated to track ../common/aclocal.m4 changes.
458
459 Wed Mar 18 12:38:12 1998  Andrew Cagney  <cagney@b1.cygnus.com>
460
461         * configure: Regenerated to track ../common/aclocal.m4 changes.
462
463 Sat Mar 14 20:53:36 1998  Doug Evans  <devans@seba.cygnus.com>
464
465         * config.in (HAVE_FCNTL_H): Add.
466         * configure: Regenerate.
467         * Makefile.in (SIM_OBJS): Add devices.o.
468         * m32r-sim.h (m32r_devices): Renamed from m32r_mspr_device.
469         (UART_*): Define m32r serial port parameters.
470         (M32R_DEVICE_ADDR,M32R_DEVICE_LEN): Define.
471         * m32r.c (device_io_{read,write}_buffer,device_error): Move from here,
472         * devices.c: To here.
473         * sim-if.c: Don't include signal.h,sim-core.h.
474         (sim_open): Use M32R_DEVICE_{ADDR,LEN} in sim_core_attach call.
475         (sim_resume): Call sim_module_{resume,suspend}.
476         * m32r.c (m32r_h_cr_{get,set}): Use register number enums.
477
478         * tconfig.in (SIM_HANDLES_LMA): Define.
479
480         * sim-if.c (do_trap): Result is new pc.
481         Handle --environment=operating.
482         * sem-switch.c,sem.c: Regenerate.
483
484 Wed Mar 11 14:07:39 1998  Andrew Cagney  <cagney@b1.cygnus.com>
485
486         * sim-if.c (syscall_read_mem, syscall_write_mem): Replace
487         sim_core_*_map with read_map, write_map, exec_map resp.
488
489 Wed Mar  4 11:36:51 1998  Doug Evans  <devans@seba.cygnus.com>
490
491         * Makefile.in (SIM_EXTRA_DEPS): Add cpu-opc.h.
492         (arch.o): Delete cpu-opc.h dependency.
493         (decode.o,model.o): Likewise.
494
495         * cpu.h,model.c,sem-switch.c,sem.c: Regenerate.
496
497 Thu Feb 26 18:38:35 1998  Andrew Cagney  <cagney@b1.cygnus.com>
498
499         * sim-if.c (sim_open): Initialize PROFILE_INFO_CPU_CALLBACK.
500
501         * sim-if.c (sim_info): Delete.
502
503 Mon Feb 23 13:30:46 1998  Doug Evans  <devans@seba.cygnus.com>
504
505         * sim-main.h: #include symcat.h.
506         * m32r-sim.h (BRANCH_NEW_PC): Delete current_cpu arg.
507         (NEW_PC_{BASE,SKIP,2,4,BRANCH_P}): New macros.
508         * cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
509         * sem.c,sem-switch.c: Regenerate.
510
511 Mon Feb 23 12:27:52 1998  Nick Clifton  <nickc@cygnus.com>
512
513         * m32r.c (m32r_h_cr_set, m32r_h_cr_get): Shadow control register 6
514         in the backup PC register.
515
516 Thu Feb 19 16:39:35 1998  Doug Evans  <devans@canuck.cygnus.com>
517
518         * m32r.c (do_lock,do_unlock): Delete.
519         * cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
520         * sem.c,sem-switch.c: Regenerate.
521
522 Tue Feb 17 18:18:10 1998  Doug Evans  <devans@seba.cygnus.com>
523
524         * Makefile.in (M32R_OBJS): Add cpu.o.
525         (cpu.o): Add rule for.
526         (NL_TARGET): Define.
527         * configure.in: Add AC_CHECK_PROG(SCHEME).
528         * cpu.c: New file.
529         * cpuall.h,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
530         * sem-switch.c,sem.c: Regenerate.
531         * mloop.in (execute): Update call to semantic fn.
532
533         * m32r.c (do_trap): Move from here.
534         * sim-if.c (do_trap): To here, and rewrite to use CB_SYSCALL support.
535         (sim_create_inferior): Use h_pc_set.
536         (h_pc_{get,set}): New functions.
537         (h_gr_{get,set}): New functions.
538         (syscall_{read,write}_mem): New functions.
539         * sim-main.h (h_{gr,pc}_{get,set}): Declare.
540
541 Tue Feb 17 12:44:38 1998  Andrew Cagney  <cagney@b1.cygnus.com>
542
543         * sim-if.c (sim_store_register, sim_fetch_register): Pass in
544         length parameter.  Return -1.
545         (sim_create_inferior): Pass 4 sim_store_register.
546
547 Wed Feb 11 19:53:48 1998  Doug Evans  <devans@canuck.cygnus.com>
548
549         * sim-main.h (CIA_GET,CIA_SET): Provide dummy definitions for now.
550
551         * decode.c, decode.h, sem.c, sem-switch.c, model.c: Regenerate.
552
553 Mon Feb  9 19:41:54 1998  Doug Evans  <devans@canuck.cygnus.com>
554
555         * decode.c, sem.c: Regenerate.
556
557 Thu Feb  5 12:44:31 1998  Doug Evans  <devans@seba.cygnus.com>
558
559         * Makefile.in (m32r.o): Depend on cpu.h
560         (extract.o): Pass -DSCACHE_P.
561         * mloop.in (extract{16,32}): Update call to m32r_decode.
562         * arch.h,cpu.h,cpuall.h,decode.[ch]: Regenerate.
563         * extract.c,model.c,sem-switch.c,sem.c: Regenerate.
564         * sim-main.h: #include "ansidecl.h".
565         Don't include cpu-opc.h, done by arch.h.
566
567 Sun Feb  1 16:47:51 1998  Andrew Cagney  <cagney@b1.cygnus.com>
568
569         * configure: Regenerated to track ../common/aclocal.m4 changes.
570
571 Sat Jan 31 18:15:41 1998  Andrew Cagney  <cagney@b1.cygnus.com>
572
573         * configure: Regenerated to track ../common/aclocal.m4 changes.
574
575 Tue Jan 20 14:16:02 1998  Nick Clifton  <nickc@cygnus.com>
576
577         * cpux.h: Fix duplicate definition of h_accums field for
578         fmt_53_sadd structure.
579
580 Mon Jan 19 22:26:29 1998  Doug Evans  <devans@seba>
581
582         * configure: Regenerated to track ../common/aclocal.m4 changes.
583
584 Mon Jan 19 14:13:40 1998  Doug Evans  <devans@seba.cygnus.com>
585
586         * arch.c, arch.h, cpuall.h: New files.
587         * arch-defs.h: Deleted.
588         * mloop.in: Renamed from mainloop.in.
589         * Makefile.in: Update.
590         * sem-ops.h: Deleted.
591         * mem-ops.h: Deleted.
592         (arch): Renamed from CPU.
593         * cpu.h: New file.
594         * decode.c: Redone.
595         * decode.h: Redone.
596         * extract.c: Redone.
597         * model.c: Redone.
598         * sem-switch.c: Redone.
599         * sem.c: Renamed from semantics.c, and redone.
600         * m32r-sim.h (PROFILE_COUNT_FILLNOPS): Update.
601         (GETTWI,SETTWI,BRANCH_NEW_PC): Define.
602         * m32r.c (WANT_CPU,WANT_CPU_M32R): Define.
603         (m32r_{fetch,store}_register): New functions.
604         (model_mark_{get,set}_h_gr): Prefix with m32r_.
605         (m32r_model_mark_{busy,unbusy}_reg): Prefix with m32r_.
606         (h_cr_{get,set}): Prefix with m32r_.
607         (do_trap): Fetch state from current_cpu, not current_state.
608         Call sim_engine_halt instead of engine_halt.
609         * sim-if.c (alloc_cpu): New function.
610         (free_state): New function.
611         (sim_open): Call sim_state_alloc, and malloc space for selected cpu
612         type.  Call sim_analyze_program.
613         (sim_create_inferior): Handle selected cpu type when setting PC.
614         (sim_stop_reason): Deleted.
615         (print_m32r_misc_cpu): Update.
616         (sim_{read,write}): Deleted.
617         (sim_engine_illegal_insn): New function.
618         * sim-main.h: Don't include arch-defs.h,sim-core.h,sim-events.h.
619         Include arch.h,cpuall.h.  Include cpu.h,decode.h if m32r.
620         (_sim_cpu): Include member appropriate cpu_data member for the cpu.
621         (M32R_MISC_PROFILE): Renamed from M32R_PROFILE.
622         (sim_state): Delete members core,events,halt_jmp_buf.
623         Change `cpu' member to be a pointer to the cpu's struct, rather than
624         record inside the state struct.
625         * tconfig.in (WITH_DEVICES): Define here.
626         (WITH_FAST,WITH_SEM_SWITCH_{FULL,FAST}): Define for the cpu.
627
628 Fri Jan 16 12:16:56 1998  Nick Clifton  <nickc@cygnus.com>
629
630         * arch-defs.h (INSN_NAME): Fix typo.
631
632 Mon Dec 15 23:17:11 1997  Andrew Cagney  <cagney@b1.cygnus.com>
633
634         * configure: Regenerated to track ../common/aclocal.m4 changes.
635         * config.in: Ditto.
636
637 Thu Dec  4 09:21:05 1997  Doug Evans  <devans@canuck.cygnus.com>
638
639         * m32r-sim.h (MSPR_ADDR): New macro.
640         (m32r_mspr_device): Declare.
641         (struct _device): Define.
642         * m32r.c (m32r_mspr_device): New global.
643         (device_{io_{read,write}_buffer,error}): New functions.
644         * mem-ops.h (SETMEM*): Use sim_core_write_map, not read map.
645         * sim-if.c: Delete redundant inclusion of cpu-sim.h.
646         (sim_open): Attach device to handle MSPR register.
647         * sim-main.h (WITH_DEVICES): Define as 1.
648         Include cpu-sim.h.
649
650         * configure: Regenerated to track ../common/aclocal.m4 changes.
651
652 Wed Dec  3 18:08:44 1997  Doug Evans  <devans@canuck.cygnus.com>
653
654         * configure.in (SIM_AC_OPTION_ENVIRONMENT): Call.
655         * configure: Regenerated.
656
657 Wed Nov 19 12:17:08 1997  Doug Evans  <devans@canuck.cygnus.com>
658
659         * mem-ops.h: Rename SIM_SIG{ACCESS,ALIGN} to SIM_SIG{SEGV,BUS}.
660         * sim-if.c (sim_open): Call sim_config.
661         (sim_stop_reason): Update call to sim_signal_to_host.
662
663 Tue Nov 18 15:33:48 1997  Doug Evans  <devans@canuck.cygnus.com>
664
665         * Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS).
666
667 Fri Oct 31 18:46:46 1997  Andrew Cagney  <cagney@b1.cygnus.com>
668
669         * sim-if.c (sim_open): Delete dead call to sim_core_attach.
670
671 Mon Oct 27 12:43:54 1997  Doug Evans  <devans@canuck.cygnus.com>
672
673         * sem-ops.h (U{DIV,MOD}[BHSD]I): Use unsigned division.
674
675 Fri Oct  3 09:28:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
676
677         * configure: Regenerated to track ../common/aclocal.m4 changes.
678
679 Wed Sep 24 17:38:57 1997  Andrew Cagney  <cagney@b1.cygnus.com>
680
681         * configure: Regenerated to track ../common/aclocal.m4 changes.
682
683 Tue Sep 23 11:04:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
684
685         * configure: Regenerated to track ../common/aclocal.m4 changes.
686
687 Tue Sep 23 10:19:51 1997  Andrew Cagney  <cagney@b1.cygnus.com>
688
689         * Makefile.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_SCACHE,
690         SIM_DEFAULT_MODEL): Delete, moved to common.
691         (SIM_EXTRA_CFLAGS): Update.
692         
693 Mon Sep 22 11:46:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
694
695         * configure.in (sim_link_links): Configure non-strict memory
696         alignment.
697
698         * configure: Regenerated to track ../common/aclocal.m4 changes.
699
700 Fri Sep 19 17:45:25 1997  Andrew Cagney  <cagney@b1.cygnus.com>
701
702         * configure: Regenerated to track ../common/aclocal.m4 changes.
703
704 Wed Sep 17 17:44:40 1997  Andrew Cagney  <cagney@b1.cygnus.com>
705
706         * sim-if.c (sim_open): Allocate memory under sim-memopt module
707         using sim_do_commandf.
708         (sim_open): Set magic-number at the start.
709         (sim_do_command): Implement.
710
711         * sim-main.h (sim_engine_halt): Map onto engine_halt.
712
713 Mon Sep 15 17:36:15 1997  Andrew Cagney  <cagney@b1.cygnus.com>
714
715         * configure: Regenerated to track ../common/aclocal.m4 changes.
716
717 Thu Sep  4 17:21:23 1997  Doug Evans  <dje@seba>
718
719         * configure: Regenerated to track ../common/aclocal.m4 changes.
720
721 Fri Sep  5 10:21:48 1997  Andrew Cagney  <cagney@b1.cygnus.com>
722
723         * Makefile.in (SIM_OBJS): Add sim-memopt.o module.
724
725 Thu Sep  4 10:30:02 1997  Andrew Cagney  <cagney@b1.cygnus.com>
726
727         * sim-if.c (sim_open): Pass zero modulo arg to sim_core_attach.
728
729 Wed Aug 27 18:13:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
730
731         * configure: Regenerated to track ../common/aclocal.m4 changes.
732         * config.in: Ditto.
733
734 Tue Aug 26 10:39:42 1997  Andrew Cagney  <cagney@b1.cygnus.com>
735
736         * sim-if.c (sim_kill): Delete.
737         (sim_create_inferior): Add ABFD argument.
738         (sim_load): Move setting of PC from here.
739         (sim_create_inferior): To here.
740         (sim_load): Delete, use sim-hload.c instead.
741
742         * Makefile.in (SIM_OBJS): Add sim-hload.o module.
743
744 Mon Aug 25 17:50:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
745
746         * configure: Regenerated to track ../common/aclocal.m4 changes.
747         * config.in: Ditto.
748
749 Mon Aug 25 15:54:08 1997  Andrew Cagney  <cagney@b1.cygnus.com>
750
751         * sim-if.c (sim_open): Add ABFD argument.
752
753 Tue Jul 22 10:16:16 1997  Doug Evans  <dje@canuck.cygnus.com>
754
755         * sim-main.h (M32R_DEFAULT_MEM_SIZE): New macro.
756         * sim-if.c (sim_open): Use it.
757
758 Wed Jun  4 12:48:12 1997  Andrew Cagney  <cagney@b1.cygnus.com>
759
760         * sim-main.h (WITH_ENGINE): Disable the common engine for now.
761
762 Tue May 27 14:15:44 1997  Andrew Cagney  <cagney@b1.cygnus.com>
763
764         * sim-if.c (sim_read): Pass NULL cpu to sim_core_read_buffer.
765         (sim_write): Ditto for write.
766
767         * m32r.c (do_trap): Ditto for read/write.
768
769 Tue May 20 10:18:25 1997  Andrew Cagney  <cagney@b1.cygnus.com>
770
771         * sim-if.c (sim_open): Add callback argument.
772         (sim_set_callbacks, sim_callback): Delete.
773         (sim_load): Set STATE_LOADED_P.
774
775 Mon May 19 12:55:42 1997  Andrew Cagney  <cagney@b1.cygnus.com>
776
777         * Makefile.in (SIM_OBJS): Link in sim-abort.o as a stub for
778         sim_engine_abort.
779
780 Mon May  5 12:45:28 1997  Andrew Cagney  <cagney@b1.cygnus.com>
781
782         * sim-if.c (sim_open): Update to reflect changes to core in
783         ../common/.
784         * mem-ops.h (GETMEMQI, GETMEMHI, GETMEMSI, GETMEMDI, GETMEMUQI,
785         GETMEMUHI, GETMEMUSI, GETMEMUDI, SETMEMQI, SETMEMHI, SETMEMSI,
786         SETMEMDI, SETMEMUQI, SETMEMUHI, SETMEMUSI, SETMEMUDI): Ditto.
787
788 Sat May  3 08:38:55 1997  Doug Evans  <dje@seba.cygnus.com>
789
790         * decode.c (decode): Add computed goto support.
791
792 Fri May  2 16:30:26 1997  Andrew Cagney  <cagney@b1.cygnus.com>
793
794         * mem-ops.h: Stub additional core read/write arguments.
795
796         * sim-main.h: Declare sim_cia - type SI.
797         (struct _sim_cpu): Move base type to end per common.
798         (struct _sim_state): Ditto.
799
800 Thu May  1 11:15:34 1997  Doug Evans  <dje@canuck.cygnus.com>
801
802         Merge from branch into devo.  CGEN generic files moved to common
803         directory.  K&R C support is no longer provided.
804
805 Thu Apr 24 00:39:51 1997  Doug Evans  <dje@canuck.cygnus.com>
806
807         * configure: Regenerated to track ../common/aclocal.m4 changes.
808
809 Sat Apr 12 12:57:33 1997  Felix Lee  <flee@yin.cygnus.com>
810
811         * Makefile.in, seman-cache.c: new file, for wingdb build.
812         * sim-alloca.h: fixed for wingdb.
813         
814 Mon Apr  7 13:33:29 1997  Doug Evans  <dje@seba.cygnus.com>
815
816         * decode.c (*): m32r_cgen_insn_table renamed to ..._entries.
817         * mainloop.in: Use CGEN_INSN_INDEX instead of CGEN_INSN_TYPE.
818         * simdefs.h (INSN_NAME): m32r_cgen_insn_table renamed to ..._entries.
819
820 Fri Apr  4 19:23:12 1997  Doug Evans  <dje@canuck.cygnus.com>
821
822         * cgen-utils.in (ex_illegal): Fill in abuf->length, abuf->addr.
823         (exc_illegal): Likewise.
824         * decode.c (decode_vars): Add decode_illegal.
825         * genmloop.sh: #include "cpu-opc.h".
826         * sem-switch.c (case_INSN_ILLEGAL): Declare.
827         (labels): Add case_INSN_ILLEGAL.
828         (SWITCH): Add INSN_ILLEGAL case.
829
830 Wed Mar 26 12:34:00 1997  Doug Evans  <dje@canuck.cygnus.com>
831
832         * model.c (model_module): Use 0 not NULL.
833
834         * genmloop.sh (sim_main_loop): Handle k&r c.
835
836         * sem-switch.c: Regenerate to get k&r c support.
837         * semantics.c: Likewise.
838
839         * m32r.c (ADD_{OV,CA}_SI,SUB_{OV,CA}_SI): Renamed to {ADD,SUB}[OC]FSI.
840         (ADDCSI,SUBCSI): New functions.
841         * sem-switch.c (addv,addv3,addx,subv,subx): Fix carry bit handling.
842         * semantics.c (addv,addv3,addx,subv,subx): Fix carry bit handling.
843
844         * simcache.c (simcache_{install,init,uninstall}): Use
845         DECLARE_MODULE_INSTALL_HANDLER.
846         (simcache_option_handler): Use DECLARE_OPTION_HANDLER.
847
848         * utils.c: #include "semops.h".
849
850 Tue Mar 11 14:30:26 1997  Doug Evans  <dje@seba.cygnus.com>
851
852         * profile.c (profile_print_simcache): Fix thinko in printf text.
853
854         * simdefs.h (struct argbuf): Add member to fmt_20 so it's not empty.
855
856 Mon Mar 10 11:06:29 1997  Doug Evans  <dje@seba.cygnus.com>
857
858         * m32r.c (h_cr_get): Rewrite.
859         (h_cr_set): Rewrite.
860         * sem-switch.c (rte): bcarry renamed to bcond.
861         * semantics.c (rte): Likewise.
862         * simdefs.h (CPU_STATE): Likewise.
863
864         * config.in (HAVE_SYS_TIME_H): Add.
865         * configure.in: Check for sys/time.h.
866         * configure: Regenerated.
867         * utils.c: Include sys/time.h if present.
868
869         * common.c (sim_parse_args): Account for NULL terminating entry
870         in long_options table.
871
872         * genmloop.sh (RUN_FAST_P): Don't run fast if tracing.
873         Always use cache if configured in.
874         * mainloop.in (do_extract_insn{16,32}): New functions.
875         (normal,fast): Call them.  Handle starting in left slot.
876         * simcache.c (simcache_option_handler): Disallow -c0.
877         * sem-switch.c (TRACE_RESULT): Redefine so no tracing.
878
879         * profile.c (profile_print_simcache): Fix percentage calc.
880
881         * Makefile.in (INCLUDE_DEPS): Delete simcommon.h.
882
883 Sun Mar  9 20:42:17 1997  Doug Evans  <dje@seba.cygnus.com>
884
885         * Makefile.in (COMMON_{PRE,POST}_CONFIG_FRAG): Add delimiters for.
886         (M32R_INCLUDE_DEPS): Use cpu-sim.h instead of m32r-sim.h.
887         Add mod-list.h.
888         (mrun.o): Don't depend on M32R_INCLUDE_DEPS.
889         (sim-if.o,m32r.o,utils.o): Likewise.
890         (common.o): Don't explicitly depend on mod-list.h.
891         (mainloop.c): Pass CPU to genmloop.sh.
892         (stamp-modules): Depend on configure.
893         (decode.o): Depend on decode,h, memops.h, semops.h, cpu-opc.h.
894         (extract.o): Depend on decode.h, memops.h, semops.h.
895         (semantics.o,seman-cache.o): Likewise.
896         (model.o,ops.o): Depend on memops.h.
897         (extr-cache.o): Disable building for the moment.
898
899         * simcommon.h: Delete, move contents into cgen-sim.h.
900         * cgen-sim.h: Don't include ansidecl.h,bfd.h,simfns.h.
901         (UINT,CGEN_CAT3): Define.
902         ({extract,semantic}_fn_t): Renamed to {EXTRACT,SEMANTIC}_FN.
903         (decode_t): Renamed to DECODE.
904
905         * simfns.h: Delete, contents moved to memops.h,semops.h.
906         * memops.h: New file.
907         * semops.h: New file.
908         * decode.h: Renamed from semantics.h.
909
910         * sim-argv.h: New file.
911         * Makefile.in (memory.o,trace.o,profile.o,simcache.o,common): Add
912         dependency of sim-argv.h.
913
914         * sim-alloca.h: New file.
915         * common.c: Include it.
916         * Makefile.in (common.o): Add dependency.
917
918         * config.in (HAVE_TIME_H,HAVE_SYS_RESOURCE_H): Add.
919         (HAVE_GETRUSAGE,HAVE_TIME): Add.
920         * configure.in: sinclude ../common/aclocal.m4.
921         Check for headers time.h, sys/resource.h.
922         Check for functions time, getrusage.
923         (sim_link_{files,links}): Add link cpu-opc.h.
924         (sim_profile): Add simcache.
925         (SIM_AC_PROFILE): Add simcache, profile.o.
926         (simcache module): Delete extr-cache.o for now.
927         (--enable-sim-cache): Allow specification of default cache size.
928         * configure: Regenerated.
929
930         * decode.c: #include cgen-sim.h,memops.h,semops.h,decode.h,
931         cpu-sim.h,cpu-opc.h.  Don't include m32r-sim.h.
932         Regenerate.
933
934         * extract.c: #include cgen-sim.h,decode.h,cpu-sim.h.
935         Don't include m32r-sim.h.
936         (*): Define/Undef FLD macro.  Use it to reference ARGBUF.
937         Simplify profiling test with PROFILE_MODEL_P.
938         (mvfc,mvtc): Fix access of control registers.
939         * semantic.c: #include cgen-sim.h,memops.h,semops.h,decode.h,cpu-sim.h.
940         Don't include m32r-sim.h.
941         (*): Define/Undef FLD macro.  Use it to reference ARGBUF.
942         Simplify profiling test with PROFILE_MODEL_P.
943         (mvfc,mvtc): Fix access of control registers.
944
945         * sem-switch.c: New file, for GCC computed goto support.
946
947         * genmloop.sh: Add #include's of bfd.h,callback.h,cgen-sim.h,
948         memops.h,semops.h,trace.h,cpu-sim.h.
949         (RUN_FAST_P): Change default to run fast if cache size > 0
950         and not profiling.
951         (sim_main_loop): Record execution time.
952         Record instruction count even in fast mode.
953         (init): Allow cpu to provide init code in mainloop.in.
954         (FAST): Define as 0 or 1 depending on fast mode.
955         * mainloop.in (normal): Combine with fast case.
956         Add support for GCC computed gotos.  Count simcache hits/misses.
957         (init): Initialize "switch" labels if GNUC.
958
959         * cgen-utils.in: Don't include opcode/cgen.h.
960         Include cgen-sim.h, cpu-opc.h.
961         * common.c: Don't include simcommon.h,mod-list.h.  Include cgen-sim.h.
962         * m32r-sim.h: Don't include mod-list.h
963         (RUN_FAST_P): Delete.
964         * m32r.c: Don't include profile.h.  #include ansidecl.h,cgen-sim.h,
965         semops.h,memory.h,trace.h
966         (h_cr_get,h_cr_set): New functions.
967         * memory.c: #include cgen-sim.h,callback.h.
968         * ops.c: Don't include profile.h,m32r-sim.h.
969         Include cgen-sim.h,memops.h,cpu-sim.h.
970         (MEMOPS_DEFINE_INLINE): Renamed from SIMFNS_DEFINE_INLINE.
971         * trace.c: Include cgen-sim.h,cpu-opc.h.
972         * trace.h (trace_insn_{init,fini}): Declare.
973
974         * model.c: Don't include signal.h,stdlib.h,m32r-sim.h.
975         Include cgen-sim.h,cpu-sim.h,cpu-opc.h.
976         Regenerate to get new insn aliases.
977
978         * mrun.c: #include "ansidecl.h".
979         (STATE): Use struct sim_state instead.
980
981         * profile.c: Surround #include <stdlib.h> with HAVE_STDLIB_H.
982         Don't include simcommon.h.  Include cgen-sim.h,cpu-opc.h.
983         (PROFILE_{READ,WRITE}_MASK): Replace with PROFILE_MEMORY_MASK.
984         (profile_print_simcache): New function.
985         (profile_print): Call it.  Print simulator speed stats.
986         * profile.h (PROFILE_{READ,WRITE}_MASK): Replace with
987         PROFILE_MEMORY_MASK.
988         (MODULE_PROFILE_SIMCACHE_P): Define.
989         (PROFILE_SIMCACHE_MASK): Define.
990         (PROFILE_COUNT): New members total_insn_count,exec_time.
991         New members simcache_hits,simcache_misses.
992         (PROFILE_SIMCACHE_{HITS,MISSES}): Define.
993         (PROFILE_MODEL_P): New macro.
994         (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): New macros.
995
996         * sim-if.c: Surround #include <stdlib.h> with HAVE_STDLIB_H.
997         Don't include simcommon.h,m32r-sim.h.  Include cgen-sim.h,cpu-sim.h.
998         (sim_resume): Use USING_SIMCACHE_P instead of RUN_FAST_P.
999         (sim_info): Pass verbose to profile_print.
1000
1001         * simcache.c: Include cgen-sim.h,callback.h.
1002         (USING_SIMCACHE_P): Replace with SIMCACHE_P.
1003         (simcache_option_handler): Ensure cache size at least 2.
1004         Allow config time specification of default cache size.
1005         * simcache.h (struct simcache): Support GCC computed gotos.
1006         (SIMCACHE_DEFAULT_CACHE_SIZE): USe CONFIG_SIM_CACHE_SIZE if defined.
1007         (USING_SIMCACHE_P): New macro.
1008
1009         * simdefs.h: Don't include m32r-opc.h.
1010         (CGEN_MAX_SIM_INSNS): Define.
1011         (CPU_STATE): Regenerate.
1012         (ARGBUF): Regenerate.
1013         (extract,semantic handler decls): Delete, moved to decode.h.
1014
1015         * tconfig.in: Don't include cgen-sim.h,m32r-sim.h.
1016         (USE_SEM_SWITCH): Define.
1017
1018         * utils.c: Include bfd.h,time.h,sys/resource.h.
1019         (sim_time_get,sim_time_elapsed): New functions.
1020         * cgen-sim.h (SIM_TIME,sim_time_get,sim_time_elapsed): Declare.
1021
1022 Fri Jan 31 20:25:06 1997  Doug Evans  <dje@canuck.cygnus.com>
1023
1024         * configure.in (AC_CHECK_HEADERS): Handle i386-windows.
1025         * configure: Regenerated.
1026         * model.c: #include <stdlib.h>.
1027         * simcache.c: #include "libiberty.h".
1028         * simcommon.h (alloca): Handle i386-windows.
1029
1030         * common.c: #include libiberty.h.
1031         (sim_signal_to_host): Return 5 if wingdb.
1032
1033 Mon Jan 27 15:22:49 1997  Doug Evans  <dje@seba.cygnus.com>
1034
1035         * configure.in (sim_cache): Enabled by default now, pass default
1036         cache size to --enable-sim-cache.
1037         * simcache.c (simcache_option_handler): Allow -c 0.
1038
1039         * simdefs.h,simfns.h: Regenerate
1040         * decode.c,extract.c,model.c,ops.c,semantics.c: Regenerate.
1041
1042 Tue Jan 21 16:21:01 1997  Doug Evans  <dje@seba.cygnus.com>
1043
1044         Add model profiling support.
1045         * configure.in: Handle --enable-sim-model.
1046         (sim_profile): Add model.
1047         * Makefile.in (model.o): Add rule.
1048         * cgen-sim.h (UNIT,INSN_TIMING,MACH,MODEL): New types.
1049         * extract.c (*): Add model profiling support.
1050         * m32r.c (model_mark_{get,set}_h_gr): New functions.
1051         (model_mark_{busy,unbusy}_reg): New functions.
1052         * profile.c (profile_option_handler): Recognize --profile model.
1053         (profile_print_model): New function.
1054         (profile_print): Call it.
1055         * profile.h (MODULE_profile_model,MODULE_PROFILE_MODEL_P): Define.
1056         (PROFILE_MODEL_MASK,PROFILE_LABEL_WIDTH): Define.
1057         (PROFILE_COUNT): New members cycle_count,cti_stall_count,
1058         load_stall_count,taken_count,untaken_count.
1059         * semantics.c (*): Add model profiling support.
1060         * simcommon.h (struct sim_state): New members mach,model.
1061         * simdefs.h (CPU_PROFILE,MODEL_TYPE,UNIT_TYPE): New type.
1062         (MAX_MODELS,MAX_UNITS): Define.
1063         * tconfig.in (STATE_EXTRA_MEMBERS): Add cpu_profile.
1064
1065         * Makefile.in (INCLUDE_DEPS): Add $(SIM_MODULES_HDRS).
1066         (stamp-modules): Depend on genmodlist.sh.
1067         * common.c (standard_options): Add --max-insns.
1068         (copy_argv): New function.
1069         * tconfig.in (SIM_HAVE_MAX_INSNS): Define.
1070         * genmloop.sh: Allow mainloop.in to contain support code.
1071         * mainloop.in: Move do_insn16,do_insn32 here.
1072         * m32r.c (do_trap): Handle SYS_argvlen,SYS_argv,SYS_read.
1073         * sim-if.c (sim_open): Don't set max insn count.
1074         (sim_create_inferior): Save argv,envp.
1075         * simcommon.h (struct sim_state): New members argv,envp.
1076         * simdefs.h ([GS]ETTWI,[GS]ETTUWI,[GS]ETTAI): Define.
1077         ([GS]ETMEMWI,[GS]ETMEMUWI,[GS]ETMEMAI): Define.
1078         (ARGBUF): New members h_gr_get, h_gr_set.
1079         * trace.c (trace_insn_init,trace_insn_fini): New functions.
1080         (trace_printf): Print to buffer, output later by trace_insn_fini.
1081         * trace.h (TRACE_INSN_{INIT,FINI}): Define.
1082
1083 Thu Dec 19 16:01:59 1996  Doug Evans  <dje@canuck.cygnus.com>
1084
1085         * configure.in (AC_FUNC_ALLOCA): Call.
1086         * configure: Regenerate.
1087         * config.h (HAVE_ALLOCA_H): Add.
1088         * simcommon.h: Add alloca support.
1089         (DECLARE_MODULE_INSTALL_HANDLER): Define.
1090         (DECLARE_OPTION_HANDLER): Define.
1091         (MEM_FN): Declare using PARAMS.
1092         (DECLARE_MEM_FN): Define.
1093         * trace.c (trace_result): Tweak for !STDC.
1094         * cgen-sim.h (UDI_FN_SUPPORT): Define if ! HAVE_LONGLONG.
1095         * cgen-utils.in (disasm_sprintf): Fix va_arg call in !STDC case.
1096         * common.c (sim_print_help_fn): Use PARAMS.
1097         (standard_option_handler): Fix decl for !STDC systems.
1098         * memory.c: #include <stdio.h>
1099         (mem_flat_{install,init,uninstall}): Fix decl for !STDC systems.
1100         (mem_flat_{read,write},mem_flat_option_handler): Likewise.
1101         * profile.c (profile_install): Likewise.
1102         (profile_option_handler): Likewise.
1103
1104 Thu Dec 19 11:06:19 1996  Doug Evans  <dje@seba.cygnus.com>
1105
1106         * semantics.c (*): Don't suffix big unsigned numbers with "U".
1107         Prefix them with 0x instead.
1108
1109         * cgen-sim.h (DI_FN_SUPPORT): Define if ! HAVE_LONGLONG.
1110         (SLADI,SRADI,CONVSIDI,CONVDISI): Delete, moved to simfns.h.
1111         * semantics.c (machi,maclo,macwhi,macwlo,mulhi,mullo): Implement.
1112         (mulwhi,mulwlo,mvtachi,mvtaclo,rac,rach): Implement.
1113         * simfns.h: Add decls for functional DI,UDI,SF,DF,XF,TF support.
1114         Add support for boolean and/or.
1115         * utils.c: Redo naming of DI functional support.
1116         (ANDDI,ORDI,ADDDI,MULDI,GEDI,LEDI,CONVHIDI): New functions.
1117
1118 Tue Dec 17 12:57:48 1996  Doug Evans  <dje@seba.cygnus.com>
1119
1120         * Directory created.