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