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