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