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