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