Add generic sim-info.c:sim_info() function using module mechanism.
[platform/upstream/binutils.git] / sim / m32r / ChangeLog
1 Thu Feb 26 18:38:35 1998  Andrew Cagney  <cagney@b1.cygnus.com>
2
3         * sim-if.c (sim_open): Initialize PROFILE_INFO_CPU_CALLBACK.
4
5         * sim-if.c (sim_info): Delete.
6
7 start-sanitize-m32rx
8 Fri Feb 27 10:14:29 1998  Doug Evans  <devans@canuck.cygnus.com>
9
10         * mloopx.in: Fix handling of branch in parallel with another insn.
11         * semx.c: Regenerate.
12
13 end-sanitize-m32rx
14 Mon Feb 23 13:30:46 1998  Doug Evans  <devans@seba.cygnus.com>
15
16         * sim-main.h: #include symcat.h.
17         * m32r-sim.h (BRANCH_NEW_PC): Delete current_cpu arg.
18         (NEW_PC_{BASE,SKIP,2,4,BRANCH_P}): New macros.
19         * cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
20         * sem.c,sem-switch.c: Regenerate.
21 start-sanitize-m32rx
22         * m32r-sim.h (SEM_NEXT_PC): Modify to handle parallel exec.
23         * mloopx.in: Rewrite.
24         * cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
25 end-sanitize-m32rx
26
27 Mon Feb 23 12:27:52 1998  Nick Clifton  <nickc@cygnus.com>
28
29         * m32r.c (m32r_h_cr_set, m32r_h_cr_get): Shadow control register 6
30         in the backup PC register.
31 start-sanitize-m32rx
32         * m32rx.c (m32r_h_cr_set, m32r_h_cr_get): Shadow control register 6
33         in the backup PC register.
34 end-sanitize-m32rx
35
36 Thu Feb 19 16:39:35 1998  Doug Evans  <devans@canuck.cygnus.com>
37
38         * m32r.c (do_lock,do_unlock): Delete.
39         * cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
40         * sem.c,sem-switch.c: Regenerate.
41 start-sanitize-m32rx
42         * cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
43 end-sanitize-m32rx
44
45 Tue Feb 17 18:18:10 1998  Doug Evans  <devans@seba.cygnus.com>
46
47         * Makefile.in (M32R_OBJS): Add cpu.o.
48         (cpu.o): Add rule for.
49         (NL_TARGET): Define.
50         * configure.in: Add AC_CHECK_PROG(SCHEME).
51         * cpu.c: New file.
52         * cpuall.h,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
53         * sem-switch.c,sem.c: Regenerate.
54         * mloop.in (execute): Update call to semantic fn.
55 start-sanitize-m32rx
56         (M32RX_OBJS): Add cpux.o.
57         (cpux.o): Add rule for.
58         cpux.c: New file.
59         * cpux.h,decodex.c,decodex.h,modelx.c,readx.c,semx.c: Regenerate.
60         * m32rx.c (m32rx_h_accums_{get,set}): Rewrite.
61         (m32rx_h_cr_{get,set}): New functions.
62         (m32rx_h_accums_{get,set}): New functions.
63         * mloopx.in: Rewrite main loop.
64 end-sanitize-m32rx
65
66         * m32r.c (do_trap): Move from here.
67         * sim-if.c (do_trap): To here, and rewrite to use CB_SYSCALL support.
68         (sim_create_inferior): Use h_pc_set.
69         (h_pc_{get,set}): New functions.
70         (h_gr_{get,set}): New functions.
71         (syscall_{read,write}_mem): New functions.
72         * sim-main.h (h_{gr,pc}_{get,set}): Declare.
73
74 Tue Feb 17 12:44:38 1998  Andrew Cagney  <cagney@b1.cygnus.com>
75
76         * sim-if.c (sim_store_register, sim_fetch_register): Pass in
77         length parameter.  Return -1.
78         (sim_create_inferior): Pass 4 sim_store_register.
79
80 Wed Feb 11 19:53:48 1998  Doug Evans  <devans@canuck.cygnus.com>
81
82         * sim-main.h (CIA_GET,CIA_SET): Provide dummy definitions for now.
83
84         * decode.c, decode.h, sem.c, sem-switch.c, model.c: Regenerate.
85 start-sanitize-m32rx
86         * cpux.c, decodex.c, decodex.h, readx.c, semx.c, modelx.c: Regenerate.
87 end-sanitize-m32rx
88
89 Mon Feb  9 19:41:54 1998  Doug Evans  <devans@canuck.cygnus.com>
90
91         * decode.c, sem.c: Regenerate.
92 start-sanitize-m32rx
93         * cpux.h, decodex.c, readx.c, semx.c: Regenerate.
94         * m32rx.c (m32rx_h_accums_set): New function.
95         (m32rx_model_mark_[gs]et_h_gr): New function.
96         * mloopx.in: Rewrite.
97         * Makefile.in (mloopx.o): Build with -parallel.
98         * sim-main.h (_sim_cpu): Delete member `par_exec'.
99         * tconfig.in (WITH_SEM_SWITCH_FULL): Define as 0 for m32rx.
100 end-sanitize-m32rx
101
102 Thu Feb  5 12:44:31 1998  Doug Evans  <devans@seba.cygnus.com>
103
104         * Makefile.in (m32r.o): Depend on cpu.h
105         (extract.o): Pass -DSCACHE_P.
106         * mloop.in (extract{16,32}): Update call to m32r_decode.
107         * arch.h,cpu.h,cpuall.h,decode.[ch]: Regenerate.
108         * extract.c,model.c,sem-switch.c,sem.c: Regenerate.
109         * sim-main.h: #include "ansidecl.h".
110         Don't include cpu-opc.h, done by arch.h.
111 start-sanitize-m32rx
112         * Makefile.in (M32RX_OBJS): Build m32rx support now.
113         (m32rx.o): New rule.
114         * m32r-sim.h (m32rx_h_cr_[gs]et): Define.
115         * m32rx.c (m32rx_{fetch,store}_register): Update {get,set} of PC.
116         (m32rx_h_accums_get): New function.
117         * mloopx.in: Update call to m32rx_decode.  Rewrite exec loop.
118         * cpux.h,decodex.[ch],modelx.c,readx.c,semx.c: Regenerate.
119 end-sanitize-m32rx
120
121 Sun Feb  1 16:47:51 1998  Andrew Cagney  <cagney@b1.cygnus.com>
122
123         * configure: Regenerated to track ../common/aclocal.m4 changes.
124
125 Sat Jan 31 18:15:41 1998  Andrew Cagney  <cagney@b1.cygnus.com>
126
127         * configure: Regenerated to track ../common/aclocal.m4 changes.
128
129 start-sanitize-m32rx
130 Thu Jan 29 11:22:00 1998  Doug Evans  <devans@canuck.cygnus.com>
131
132         * Makefile.in (M32RX_OBJS): Comment out until m32rx port working.
133         * arch.h (HAVE_CPU_M32R{,X}): Delete, moved to m32r-opc.h.
134         * arch.c (machs): Check ifdef HAVE_CPU_FOO for each entry.
135
136 end-sanitize-m32rx
137 Tue Jan 20 14:16:02 1998  Nick Clifton  <nickc@cygnus.com>
138
139         * cpux.h: Fix duplicate definition of h_accums field for
140         fmt_53_sadd structure.
141
142 start-sanitize-m32rx
143 Tue Jan 20 01:42:17 1998  Doug Evans  <devans@seba.cygnus.com>
144
145         * Makefile.in: Add m32rx objs, and rules to build them.
146         * cpux.h, decodex.h, decodex.c, readx.c, semx.c, modelx.c: New files.
147         * m32rx.c, mloopx.in: New files.
148
149 end-sanitize-m32rx
150 Mon Jan 19 22:26:29 1998  Doug Evans  <devans@seba>
151
152         * configure: Regenerated to track ../common/aclocal.m4 changes.
153
154 Mon Jan 19 14:13:40 1998  Doug Evans  <devans@seba.cygnus.com>
155
156         * arch.c, arch.h, cpuall.h: New files.
157         * arch-defs.h: Deleted.
158         * mloop.in: Renamed from mainloop.in.
159         * Makefile.in: Update.
160         * sem-ops.h: Deleted.
161         * mem-ops.h: Deleted.
162 start-sanitize-cygnus
163         Add cgen support for generating files.
164 end-sanitize-cygnus
165         (arch): Renamed from CPU.
166         * cpu.h: New file.
167         * decode.c: Redone.
168         * decode.h: Redone.
169         * extract.c: Redone.
170         * model.c: Redone.
171         * sem-switch.c: Redone.
172         * sem.c: Renamed from semantics.c, and redone.
173         * m32r-sim.h (PROFILE_COUNT_FILLNOPS): Update.
174         (GETTWI,SETTWI,BRANCH_NEW_PC): Define.
175         * m32r.c (WANT_CPU,WANT_CPU_M32R): Define.
176         (m32r_{fetch,store}_register): New functions.
177         (model_mark_{get,set}_h_gr): Prefix with m32r_.
178         (m32r_model_mark_{busy,unbusy}_reg): Prefix with m32r_.
179         (h_cr_{get,set}): Prefix with m32r_.
180         (do_trap): Fetch state from current_cpu, not current_state.
181         Call sim_engine_halt instead of engine_halt.
182         * sim-if.c (alloc_cpu): New function.
183         (free_state): New function.
184         (sim_open): Call sim_state_alloc, and malloc space for selected cpu
185         type.  Call sim_analyze_program.
186         (sim_create_inferior): Handle selected cpu type when setting PC.
187 start-sanitize-m32rx
188         (sim_resume): Handle m32rx.
189 end-sanitize-m32rx
190         (sim_stop_reason): Deleted.
191         (print_m32r_misc_cpu): Update.
192 start-sanitize-m32rx
193         (sim_{fetch,store}_register): Handle m32rx.
194 end-sanitize-m32rx
195         (sim_{read,write}): Deleted.
196         (sim_engine_illegal_insn): New function.
197         * sim-main.h: Don't include arch-defs.h,sim-core.h,sim-events.h.
198         Include arch.h,cpuall.h.  Include cpu.h,decode.h if m32r.
199 start-sanitize-m32rx
200         Include cpux.h,decodex.h if m32rx.
201 end-sanitize-m32rx
202         (_sim_cpu): Include member appropriate cpu_data member for the cpu.
203         (M32R_MISC_PROFILE): Renamed from M32R_PROFILE.
204         (sim_state): Delete members core,events,halt_jmp_buf.
205         Change `cpu' member to be a pointer to the cpu's struct, rather than
206         record inside the state struct.
207         * tconfig.in (WITH_DEVICES): Define here.
208         (WITH_FAST,WITH_SEM_SWITCH_{FULL,FAST}): Define for the cpu.
209
210 Fri Jan 16 12:16:56 1998  Nick Clifton  <nickc@cygnus.com>
211
212         * arch-defs.h (INSN_NAME): Fix typo.
213
214 Mon Dec 15 23:17:11 1997  Andrew Cagney  <cagney@b1.cygnus.com>
215
216         * configure: Regenerated to track ../common/aclocal.m4 changes.
217         * config.in: Ditto.
218
219 Thu Dec  4 09:21:05 1997  Doug Evans  <devans@canuck.cygnus.com>
220
221         * m32r-sim.h (MSPR_ADDR): New macro.
222         (m32r_mspr_device): Declare.
223         (struct _device): Define.
224         * m32r.c (m32r_mspr_device): New global.
225         (device_{io_{read,write}_buffer,error}): New functions.
226         * mem-ops.h (SETMEM*): Use sim_core_write_map, not read map.
227         * sim-if.c: Delete redundant inclusion of cpu-sim.h.
228         (sim_open): Attach device to handle MSPR register.
229         * sim-main.h (WITH_DEVICES): Define as 1.
230         Include cpu-sim.h.
231
232         * configure: Regenerated to track ../common/aclocal.m4 changes.
233
234 Wed Dec  3 18:08:44 1997  Doug Evans  <devans@canuck.cygnus.com>
235
236         * configure.in (SIM_AC_OPTION_ENVIRONMENT): Call.
237         * configure: Regenerated.
238
239 Wed Nov 19 12:17:08 1997  Doug Evans  <devans@canuck.cygnus.com>
240
241         * mem-ops.h: Rename SIM_SIG{ACCESS,ALIGN} to SIM_SIG{SEGV,BUS}.
242         * sim-if.c (sim_open): Call sim_config.
243         (sim_stop_reason): Update call to sim_signal_to_host.
244
245 Tue Nov 18 15:33:48 1997  Doug Evans  <devans@canuck.cygnus.com>
246
247         * Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS).
248
249 Fri Oct 31 18:46:46 1997  Andrew Cagney  <cagney@b1.cygnus.com>
250
251         * sim-if.c (sim_open): Delete dead call to sim_core_attach.
252
253 Mon Oct 27 12:43:54 1997  Doug Evans  <devans@canuck.cygnus.com>
254
255         * sem-ops.h (U{DIV,MOD}[BHSD]I): Use unsigned division.
256
257 Fri Oct  3 09:28:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
258
259         * configure: Regenerated to track ../common/aclocal.m4 changes.
260
261 Wed Sep 24 17:38:57 1997  Andrew Cagney  <cagney@b1.cygnus.com>
262
263         * configure: Regenerated to track ../common/aclocal.m4 changes.
264
265 Tue Sep 23 11:04:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
266
267         * configure: Regenerated to track ../common/aclocal.m4 changes.
268
269 Tue Sep 23 10:19:51 1997  Andrew Cagney  <cagney@b1.cygnus.com>
270
271         * Makefile.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_SCACHE,
272         SIM_DEFAULT_MODEL): Delete, moved to common.
273         (SIM_EXTRA_CFLAGS): Update.
274         
275 Mon Sep 22 11:46:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
276
277         * configure.in (sim_link_links): Configure non-strict memory
278         alignment.
279
280         * configure: Regenerated to track ../common/aclocal.m4 changes.
281
282 Fri Sep 19 17:45:25 1997  Andrew Cagney  <cagney@b1.cygnus.com>
283
284         * configure: Regenerated to track ../common/aclocal.m4 changes.
285
286 Wed Sep 17 17:44:40 1997  Andrew Cagney  <cagney@b1.cygnus.com>
287
288         * sim-if.c (sim_open): Allocate memory under sim-memopt module
289         using sim_do_commandf.
290         (sim_open): Set magic-number at the start.
291         (sim_do_command): Implement.
292
293         * sim-main.h (sim_engine_halt): Map onto engine_halt.
294
295 Mon Sep 15 17:36:15 1997  Andrew Cagney  <cagney@b1.cygnus.com>
296
297         * configure: Regenerated to track ../common/aclocal.m4 changes.
298
299 Thu Sep  4 17:21:23 1997  Doug Evans  <dje@seba>
300
301         * configure: Regenerated to track ../common/aclocal.m4 changes.
302
303 Fri Sep  5 10:21:48 1997  Andrew Cagney  <cagney@b1.cygnus.com>
304
305         * Makefile.in (SIM_OBJS): Add sim-memopt.o module.
306
307 Thu Sep  4 10:30:02 1997  Andrew Cagney  <cagney@b1.cygnus.com>
308
309         * sim-if.c (sim_open): Pass zero modulo arg to sim_core_attach.
310
311 Wed Aug 27 18:13:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
312
313         * configure: Regenerated to track ../common/aclocal.m4 changes.
314         * config.in: Ditto.
315
316 Tue Aug 26 10:39:42 1997  Andrew Cagney  <cagney@b1.cygnus.com>
317
318         * sim-if.c (sim_kill): Delete.
319         (sim_create_inferior): Add ABFD argument.
320         (sim_load): Move setting of PC from here.
321         (sim_create_inferior): To here.
322         (sim_load): Delete, use sim-hload.c instead.
323
324         * Makefile.in (SIM_OBJS): Add sim-hload.o module.
325
326 Mon Aug 25 17:50:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
327
328         * configure: Regenerated to track ../common/aclocal.m4 changes.
329         * config.in: Ditto.
330
331 Mon Aug 25 15:54:08 1997  Andrew Cagney  <cagney@b1.cygnus.com>
332
333         * sim-if.c (sim_open): Add ABFD argument.
334
335 Tue Jul 22 10:16:16 1997  Doug Evans  <dje@canuck.cygnus.com>
336
337         * sim-main.h (M32R_DEFAULT_MEM_SIZE): New macro.
338         * sim-if.c (sim_open): Use it.
339
340 Wed Jun  4 12:48:12 1997  Andrew Cagney  <cagney@b1.cygnus.com>
341
342         * sim-main.h (WITH_ENGINE): Disable the common engine for now.
343
344 Tue May 27 14:15:44 1997  Andrew Cagney  <cagney@b1.cygnus.com>
345
346         * sim-if.c (sim_read): Pass NULL cpu to sim_core_read_buffer.
347         (sim_write): Ditto for write.
348
349         * m32r.c (do_trap): Ditto for read/write.
350
351 Tue May 20 10:18:25 1997  Andrew Cagney  <cagney@b1.cygnus.com>
352
353         * sim-if.c (sim_open): Add callback argument.
354         (sim_set_callbacks, sim_callback): Delete.
355         (sim_load): Set STATE_LOADED_P.
356
357 Mon May 19 12:55:42 1997  Andrew Cagney  <cagney@b1.cygnus.com>
358
359         * Makefile.in (SIM_OBJS): Link in sim-abort.o as a stub for
360         sim_engine_abort.
361
362 Mon May  5 12:45:28 1997  Andrew Cagney  <cagney@b1.cygnus.com>
363
364         * sim-if.c (sim_open): Update to reflect changes to core in
365         ../common/.
366         * mem-ops.h (GETMEMQI, GETMEMHI, GETMEMSI, GETMEMDI, GETMEMUQI,
367         GETMEMUHI, GETMEMUSI, GETMEMUDI, SETMEMQI, SETMEMHI, SETMEMSI,
368         SETMEMDI, SETMEMUQI, SETMEMUHI, SETMEMUSI, SETMEMUDI): Ditto.
369
370 Sat May  3 08:38:55 1997  Doug Evans  <dje@seba.cygnus.com>
371
372         * decode.c (decode): Add computed goto support.
373
374 Fri May  2 16:30:26 1997  Andrew Cagney  <cagney@b1.cygnus.com>
375
376         * mem-ops.h: Stub additional core read/write arguments.
377
378         * sim-main.h: Declare sim_cia - type SI.
379         (struct _sim_cpu): Move base type to end per common.
380         (struct _sim_state): Ditto.
381
382 Thu May  1 11:15:34 1997  Doug Evans  <dje@canuck.cygnus.com>
383
384         Merge from branch into devo.  CGEN generic files moved to common
385         directory.  K&R C support is no longer provided.
386
387 Thu Apr 24 00:39:51 1997  Doug Evans  <dje@canuck.cygnus.com>
388
389         * configure: Regenerated to track ../common/aclocal.m4 changes.
390
391 Sat Apr 12 12:57:33 1997  Felix Lee  <flee@yin.cygnus.com>
392
393         * Makefile.in, seman-cache.c: new file, for wingdb build.
394         * sim-alloca.h: fixed for wingdb.
395         
396 Mon Apr  7 13:33:29 1997  Doug Evans  <dje@seba.cygnus.com>
397
398         * decode.c (*): m32r_cgen_insn_table renamed to ..._entries.
399         * mainloop.in: Use CGEN_INSN_INDEX instead of CGEN_INSN_TYPE.
400         * simdefs.h (INSN_NAME): m32r_cgen_insn_table renamed to ..._entries.
401
402 Fri Apr  4 19:23:12 1997  Doug Evans  <dje@canuck.cygnus.com>
403
404         * cgen-utils.in (ex_illegal): Fill in abuf->length, abuf->addr.
405         (exc_illegal): Likewise.
406         * decode.c (decode_vars): Add decode_illegal.
407         * genmloop.sh: #include "cpu-opc.h".
408         * sem-switch.c (case_INSN_ILLEGAL): Declare.
409         (labels): Add case_INSN_ILLEGAL.
410         (SWITCH): Add INSN_ILLEGAL case.
411
412 Wed Mar 26 12:34:00 1997  Doug Evans  <dje@canuck.cygnus.com>
413
414         * model.c (model_module): Use 0 not NULL.
415
416         * genmloop.sh (sim_main_loop): Handle k&r c.
417
418         * sem-switch.c: Regenerate to get k&r c support.
419         * semantics.c: Likewise.
420
421         * m32r.c (ADD_{OV,CA}_SI,SUB_{OV,CA}_SI): Renamed to {ADD,SUB}[OC]FSI.
422         (ADDCSI,SUBCSI): New functions.
423         * sem-switch.c (addv,addv3,addx,subv,subx): Fix carry bit handling.
424         * semantics.c (addv,addv3,addx,subv,subx): Fix carry bit handling.
425
426         * simcache.c (simcache_{install,init,uninstall}): Use
427         DECLARE_MODULE_INSTALL_HANDLER.
428         (simcache_option_handler): Use DECLARE_OPTION_HANDLER.
429
430         * utils.c: #include "semops.h".
431
432 Tue Mar 11 14:30:26 1997  Doug Evans  <dje@seba.cygnus.com>
433
434         * profile.c (profile_print_simcache): Fix thinko in printf text.
435
436         * simdefs.h (struct argbuf): Add member to fmt_20 so it's not empty.
437
438 Mon Mar 10 11:06:29 1997  Doug Evans  <dje@seba.cygnus.com>
439
440         * m32r.c (h_cr_get): Rewrite.
441         (h_cr_set): Rewrite.
442         * sem-switch.c (rte): bcarry renamed to bcond.
443         * semantics.c (rte): Likewise.
444         * simdefs.h (CPU_STATE): Likewise.
445
446         * config.in (HAVE_SYS_TIME_H): Add.
447         * configure.in: Check for sys/time.h.
448         * configure: Regenerated.
449         * utils.c: Include sys/time.h if present.
450
451         * common.c (sim_parse_args): Account for NULL terminating entry
452         in long_options table.
453
454         * genmloop.sh (RUN_FAST_P): Don't run fast if tracing.
455         Always use cache if configured in.
456         * mainloop.in (do_extract_insn{16,32}): New functions.
457         (normal,fast): Call them.  Handle starting in left slot.
458         * simcache.c (simcache_option_handler): Disallow -c0.
459         * sem-switch.c (TRACE_RESULT): Redefine so no tracing.
460
461         * profile.c (profile_print_simcache): Fix percentage calc.
462
463         * Makefile.in (INCLUDE_DEPS): Delete simcommon.h.
464
465 Sun Mar  9 20:42:17 1997  Doug Evans  <dje@seba.cygnus.com>
466
467         * Makefile.in (COMMON_{PRE,POST}_CONFIG_FRAG): Add delimiters for.
468         (M32R_INCLUDE_DEPS): Use cpu-sim.h instead of m32r-sim.h.
469         Add mod-list.h.
470         (mrun.o): Don't depend on M32R_INCLUDE_DEPS.
471         (sim-if.o,m32r.o,utils.o): Likewise.
472         (common.o): Don't explicitly depend on mod-list.h.
473         (mainloop.c): Pass CPU to genmloop.sh.
474         (stamp-modules): Depend on configure.
475         (decode.o): Depend on decode,h, memops.h, semops.h, cpu-opc.h.
476         (extract.o): Depend on decode.h, memops.h, semops.h.
477         (semantics.o,seman-cache.o): Likewise.
478         (model.o,ops.o): Depend on memops.h.
479         (extr-cache.o): Disable building for the moment.
480
481         * simcommon.h: Delete, move contents into cgen-sim.h.
482         * cgen-sim.h: Don't include ansidecl.h,bfd.h,simfns.h.
483         (UINT,CGEN_CAT3): Define.
484         ({extract,semantic}_fn_t): Renamed to {EXTRACT,SEMANTIC}_FN.
485         (decode_t): Renamed to DECODE.
486
487         * simfns.h: Delete, contents moved to memops.h,semops.h.
488         * memops.h: New file.
489         * semops.h: New file.
490         * decode.h: Renamed from semantics.h.
491
492         * sim-argv.h: New file.
493         * Makefile.in (memory.o,trace.o,profile.o,simcache.o,common): Add
494         dependency of sim-argv.h.
495
496         * sim-alloca.h: New file.
497         * common.c: Include it.
498         * Makefile.in (common.o): Add dependency.
499
500         * config.in (HAVE_TIME_H,HAVE_SYS_RESOURCE_H): Add.
501         (HAVE_GETRUSAGE,HAVE_TIME): Add.
502         * configure.in: sinclude ../common/aclocal.m4.
503         Check for headers time.h, sys/resource.h.
504         Check for functions time, getrusage.
505         (sim_link_{files,links}): Add link cpu-opc.h.
506         (sim_profile): Add simcache.
507         (SIM_AC_PROFILE): Add simcache, profile.o.
508         (simcache module): Delete extr-cache.o for now.
509         (--enable-sim-cache): Allow specification of default cache size.
510         * configure: Regenerated.
511
512         * decode.c: #include cgen-sim.h,memops.h,semops.h,decode.h,
513         cpu-sim.h,cpu-opc.h.  Don't include m32r-sim.h.
514         Regenerate.
515
516         * extract.c: #include cgen-sim.h,decode.h,cpu-sim.h.
517         Don't include m32r-sim.h.
518         (*): Define/Undef FLD macro.  Use it to reference ARGBUF.
519         Simplify profiling test with PROFILE_MODEL_P.
520         (mvfc,mvtc): Fix access of control registers.
521         * semantic.c: #include cgen-sim.h,memops.h,semops.h,decode.h,cpu-sim.h.
522         Don't include m32r-sim.h.
523         (*): Define/Undef FLD macro.  Use it to reference ARGBUF.
524         Simplify profiling test with PROFILE_MODEL_P.
525         (mvfc,mvtc): Fix access of control registers.
526
527         * sem-switch.c: New file, for GCC computed goto support.
528
529         * genmloop.sh: Add #include's of bfd.h,callback.h,cgen-sim.h,
530         memops.h,semops.h,trace.h,cpu-sim.h.
531         (RUN_FAST_P): Change default to run fast if cache size > 0
532         and not profiling.
533         (sim_main_loop): Record execution time.
534         Record instruction count even in fast mode.
535         (init): Allow cpu to provide init code in mainloop.in.
536         (FAST): Define as 0 or 1 depending on fast mode.
537         * mainloop.in (normal): Combine with fast case.
538         Add support for GCC computed gotos.  Count simcache hits/misses.
539         (init): Initialize "switch" labels if GNUC.
540
541         * cgen-utils.in: Don't include opcode/cgen.h.
542         Include cgen-sim.h, cpu-opc.h.
543         * common.c: Don't include simcommon.h,mod-list.h.  Include cgen-sim.h.
544         * m32r-sim.h: Don't include mod-list.h
545         (RUN_FAST_P): Delete.
546         * m32r.c: Don't include profile.h.  #include ansidecl.h,cgen-sim.h,
547         semops.h,memory.h,trace.h
548         (h_cr_get,h_cr_set): New functions.
549         * memory.c: #include cgen-sim.h,callback.h.
550         * ops.c: Don't include profile.h,m32r-sim.h.
551         Include cgen-sim.h,memops.h,cpu-sim.h.
552         (MEMOPS_DEFINE_INLINE): Renamed from SIMFNS_DEFINE_INLINE.
553         * trace.c: Include cgen-sim.h,cpu-opc.h.
554         * trace.h (trace_insn_{init,fini}): Declare.
555
556         * model.c: Don't include signal.h,stdlib.h,m32r-sim.h.
557         Include cgen-sim.h,cpu-sim.h,cpu-opc.h.
558         Regenerate to get new insn aliases.
559
560         * mrun.c: #include "ansidecl.h".
561         (STATE): Use struct sim_state instead.
562
563         * profile.c: Surround #include <stdlib.h> with HAVE_STDLIB_H.
564         Don't include simcommon.h.  Include cgen-sim.h,cpu-opc.h.
565         (PROFILE_{READ,WRITE}_MASK): Replace with PROFILE_MEMORY_MASK.
566         (profile_print_simcache): New function.
567         (profile_print): Call it.  Print simulator speed stats.
568         * profile.h (PROFILE_{READ,WRITE}_MASK): Replace with
569         PROFILE_MEMORY_MASK.
570         (MODULE_PROFILE_SIMCACHE_P): Define.
571         (PROFILE_SIMCACHE_MASK): Define.
572         (PROFILE_COUNT): New members total_insn_count,exec_time.
573         New members simcache_hits,simcache_misses.
574         (PROFILE_SIMCACHE_{HITS,MISSES}): Define.
575         (PROFILE_MODEL_P): New macro.
576         (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): New macros.
577
578         * sim-if.c: Surround #include <stdlib.h> with HAVE_STDLIB_H.
579         Don't include simcommon.h,m32r-sim.h.  Include cgen-sim.h,cpu-sim.h.
580         (sim_resume): Use USING_SIMCACHE_P instead of RUN_FAST_P.
581         (sim_info): Pass verbose to profile_print.
582
583         * simcache.c: Include cgen-sim.h,callback.h.
584         (USING_SIMCACHE_P): Replace with SIMCACHE_P.
585         (simcache_option_handler): Ensure cache size at least 2.
586         Allow config time specification of default cache size.
587         * simcache.h (struct simcache): Support GCC computed gotos.
588         (SIMCACHE_DEFAULT_CACHE_SIZE): USe CONFIG_SIM_CACHE_SIZE if defined.
589         (USING_SIMCACHE_P): New macro.
590
591         * simdefs.h: Don't include m32r-opc.h.
592         (CGEN_MAX_SIM_INSNS): Define.
593         (CPU_STATE): Regenerate.
594         (ARGBUF): Regenerate.
595         (extract,semantic handler decls): Delete, moved to decode.h.
596
597         * tconfig.in: Don't include cgen-sim.h,m32r-sim.h.
598         (USE_SEM_SWITCH): Define.
599
600         * utils.c: Include bfd.h,time.h,sys/resource.h.
601         (sim_time_get,sim_time_elapsed): New functions.
602         * cgen-sim.h (SIM_TIME,sim_time_get,sim_time_elapsed): Declare.
603
604 Fri Jan 31 20:25:06 1997  Doug Evans  <dje@canuck.cygnus.com>
605
606         * configure.in (AC_CHECK_HEADERS): Handle i386-windows.
607         * configure: Regenerated.
608         * model.c: #include <stdlib.h>.
609         * simcache.c: #include "libiberty.h".
610         * simcommon.h (alloca): Handle i386-windows.
611
612         * common.c: #include libiberty.h.
613         (sim_signal_to_host): Return 5 if wingdb.
614
615 Mon Jan 27 15:22:49 1997  Doug Evans  <dje@seba.cygnus.com>
616
617         * configure.in (sim_cache): Enabled by default now, pass default
618         cache size to --enable-sim-cache.
619         * simcache.c (simcache_option_handler): Allow -c 0.
620
621         * simdefs.h,simfns.h: Regenerate
622         * decode.c,extract.c,model.c,ops.c,semantics.c: Regenerate.
623
624 Tue Jan 21 16:21:01 1997  Doug Evans  <dje@seba.cygnus.com>
625
626         Add model profiling support.
627         * configure.in: Handle --enable-sim-model.
628         (sim_profile): Add model.
629         * Makefile.in (model.o): Add rule.
630         * cgen-sim.h (UNIT,INSN_TIMING,MACH,MODEL): New types.
631         * extract.c (*): Add model profiling support.
632         * m32r.c (model_mark_{get,set}_h_gr): New functions.
633         (model_mark_{busy,unbusy}_reg): New functions.
634         * profile.c (profile_option_handler): Recognize --profile model.
635         (profile_print_model): New function.
636         (profile_print): Call it.
637         * profile.h (MODULE_profile_model,MODULE_PROFILE_MODEL_P): Define.
638         (PROFILE_MODEL_MASK,PROFILE_LABEL_WIDTH): Define.
639         (PROFILE_COUNT): New members cycle_count,cti_stall_count,
640         load_stall_count,taken_count,untaken_count.
641         * semantics.c (*): Add model profiling support.
642         * simcommon.h (struct sim_state): New members mach,model.
643         * simdefs.h (CPU_PROFILE,MODEL_TYPE,UNIT_TYPE): New type.
644         (MAX_MODELS,MAX_UNITS): Define.
645         * tconfig.in (STATE_EXTRA_MEMBERS): Add cpu_profile.
646
647         * Makefile.in (INCLUDE_DEPS): Add $(SIM_MODULES_HDRS).
648         (stamp-modules): Depend on genmodlist.sh.
649         * common.c (standard_options): Add --max-insns.
650         (copy_argv): New function.
651         * tconfig.in (SIM_HAVE_MAX_INSNS): Define.
652         * genmloop.sh: Allow mainloop.in to contain support code.
653         * mainloop.in: Move do_insn16,do_insn32 here.
654         * m32r.c (do_trap): Handle SYS_argvlen,SYS_argv,SYS_read.
655         * sim-if.c (sim_open): Don't set max insn count.
656         (sim_create_inferior): Save argv,envp.
657         * simcommon.h (struct sim_state): New members argv,envp.
658         * simdefs.h ([GS]ETTWI,[GS]ETTUWI,[GS]ETTAI): Define.
659         ([GS]ETMEMWI,[GS]ETMEMUWI,[GS]ETMEMAI): Define.
660         (ARGBUF): New members h_gr_get, h_gr_set.
661         * trace.c (trace_insn_init,trace_insn_fini): New functions.
662         (trace_printf): Print to buffer, output later by trace_insn_fini.
663         * trace.h (TRACE_INSN_{INIT,FINI}): Define.
664
665 Thu Dec 19 16:01:59 1996  Doug Evans  <dje@canuck.cygnus.com>
666
667         * configure.in (AC_FUNC_ALLOCA): Call.
668         * configure: Regenerate.
669         * config.h (HAVE_ALLOCA_H): Add.
670         * simcommon.h: Add alloca support.
671         (DECLARE_MODULE_INSTALL_HANDLER): Define.
672         (DECLARE_OPTION_HANDLER): Define.
673         (MEM_FN): Declare using PARAMS.
674         (DECLARE_MEM_FN): Define.
675         * trace.c (trace_result): Tweak for !STDC.
676         * cgen-sim.h (UDI_FN_SUPPORT): Define if ! HAVE_LONGLONG.
677         * cgen-utils.in (disasm_sprintf): Fix va_arg call in !STDC case.
678         * common.c (sim_print_help_fn): Use PARAMS.
679         (standard_option_handler): Fix decl for !STDC systems.
680         * memory.c: #include <stdio.h>
681         (mem_flat_{install,init,uninstall}): Fix decl for !STDC systems.
682         (mem_flat_{read,write},mem_flat_option_handler): Likewise.
683         * profile.c (profile_install): Likewise.
684         (profile_option_handler): Likewise.
685
686 Thu Dec 19 11:06:19 1996  Doug Evans  <dje@seba.cygnus.com>
687
688         * semantics.c (*): Don't suffix big unsigned numbers with "U".
689         Prefix them with 0x instead.
690
691         * cgen-sim.h (DI_FN_SUPPORT): Define if ! HAVE_LONGLONG.
692         (SLADI,SRADI,CONVSIDI,CONVDISI): Delete, moved to simfns.h.
693         * semantics.c (machi,maclo,macwhi,macwlo,mulhi,mullo): Implement.
694         (mulwhi,mulwlo,mvtachi,mvtaclo,rac,rach): Implement.
695         * simfns.h: Add decls for functional DI,UDI,SF,DF,XF,TF support.
696         Add support for boolean and/or.
697         * utils.c: Redo naming of DI functional support.
698         (ANDDI,ORDI,ADDDI,MULDI,GEDI,LEDI,CONVHIDI): New functions.
699
700 Tue Dec 17 12:57:48 1996  Doug Evans  <dje@seba.cygnus.com>
701
702         * Directory created.