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