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