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