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