adedfc4b823ceec542adcc12cc415f36df5473ea
[external/binutils.git] / sim / m68hc11 / ChangeLog
1 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
2
3         * configure: Regenerate.
4
5 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
6
7         * Makefile.in (SIM_OBJS): Add sim-cpu.o.
8         * interp.c (m68hc11_pc_get, m68hc11_pc_set): New functions.
9         (sim_open): Declare new local var i.  Call sim_cpu_alloc_all.
10         Call CPU_PC_FETCH & CPU_PC_STORE for all cpus.
11         (sim_pc_get): Delete.
12         * sim-main.h (SIM_CPU): Define.
13         (STATE_CPU): Drop &.
14         (struct sim_state): Change cpu to an array of pointers.
15
16 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
17
18         * Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
19
20 2015-03-31  Mike Frysinger  <vapier@gentoo.org>
21
22         * m68hc11_sim.c (cpu_get_indexed_operand_addr,
23         cpu_get_indexed_operand8, cpu_get_indexed_operand16): Rename restrict
24         variable to restricted.
25         * sim-main.h (cpu_get_indexed_operand_addr): Likewise.
26
27 2015-03-24  Mike Frysinger  <vapier@gentoo.org>
28
29         * interp.c (sim_pc_get): New function.
30
31 2015-03-24  Mike Frysinger  <vapier@gentoo.org>
32
33         * compile.c (sim_set_profile, sim_set_profile_size, sim_set_callbacks,
34         sim_size, sim_trace): Delete.
35         * sim-main.h (sim_set_profile, sim_set_profile_size): Delete.
36
37 2015-03-24  Mike Frysinger  <vapier@gentoo.org>
38
39         * configure: Regenerate.
40
41 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
42
43         * configure: Regenerate.
44
45 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
46
47         * configure: Regenerate.
48         * configure.ac (m68hc11_extra_objs): Delete.
49         * Makefile.in (SIM_OBJS): Delete SIM_EXTRA_OBJS.
50         (SIM_EXTRA_OBJS): Delete.
51
52 2015-03-16  Mike Frysinger  <vapier@gentoo.org>
53
54         * config.in, configure: Regenerate.
55
56 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
57
58         * Makefile.in (SIM_RUN_OBJS): Delete.
59
60 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
61
62         * configure.ac (AC_CHECK_HEADERS): Delete.
63         * aclocal.m4, configure: Regenerate.
64
65 2014-08-19  Alan Modra  <amodra@gmail.com>
66
67         * configure: Regenerate.
68
69 2014-08-15  Roland McGrath  <mcgrathr@google.com>
70
71         * configure: Regenerate.
72         * config.in: Regenerate.
73
74 2014-03-04  Mike Frysinger  <vapier@gentoo.org>
75
76         * configure: Regenerate.
77
78 2013-09-23  Alan Modra  <amodra@gmail.com>
79
80         * configure: Regenerate.
81
82 2013-06-03  Mike Frysinger  <vapier@gentoo.org>
83
84         * aclocal.m4, configure: Regenerate.
85
86 2013-05-10  Freddie Chopin  <freddie_chopin@op.pl>
87
88         * configure: Rebuild.
89
90 2013-03-26  Mike Frysinger  <vapier@gentoo.org>
91
92         * configure: Regenerate.
93
94 2013-03-23  Joel Sherrill  <joel.sherrill@oarcorp.com>
95
96         * configure.ac: Use $SIM_DV_SOCKSER_O.
97         * configure: Regenerated.
98
99 2012-06-15  Joel Brobecker  <brobecker@adacore.com>
100
101         * config.in, configure: Regenerate.
102
103 2012-03-24  Mike Frysinger  <vapier@gentoo.org>
104
105         * aclocal.m4, config.in, configure: Regenerate.
106
107 2011-12-03  Mike Frysinger  <vapier@gentoo.org>
108
109         * aclocal.m4: New file.
110         * configure: Regenerate.
111
112 2011-10-19  Mike Frysinger  <vapier@gentoo.org>
113
114         * configure: Regenerate after common/acinclude.m4 update.
115
116 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
117
118         * configure.ac: Change include to common/acinclude.m4.
119
120 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
121
122         * configure.ac: Change AC_PREREQ to 2.64.  Delete AC_CONFIG_HEADER
123         call.  Replace common.m4 include with SIM_AC_COMMON.
124         * configure: Regenerate.
125
126 2011-07-05  Mike Frysinger  <vapier@gentoo.org>
127
128         * interp.c (sim_do_command): Delete.
129
130 2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
131
132         * configure: Regenerate.
133
134 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
135
136         * config.in: Regenerate.
137         * configure: Likewise.
138
139         * configure: Regenerate.
140
141 2008-07-11  Hans-Peter Nilsson  <hp@axis.com>
142
143         * configure: Regenerate to track ../common/common.m4 changes.
144         * config.in: Ditto.
145
146 2008-06-06  Vladimir Prus  <vladimir@codesourcery.com>
147             Daniel Jacobowitz  <dan@codesourcery.com>
148             Joseph Myers  <joseph@codesourcery.com>
149
150         * configure: Regenerate.
151
152 2006-12-21  Hans-Peter Nilsson  <hp@axis.com>
153
154         * config.in: Regenerate.
155
156 2006-06-13  Richard Earnshaw  <rearnsha@arm.com>
157
158         * configure: Regenerated.
159
160 2006-06-05  Daniel Jacobowitz  <dan@codesourcery.com>
161
162         * configure: Regenerated.
163
164 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
165
166         * configure: Regenerated.
167
168 2006-03-29  Hans-Peter Nilsson  <hp@axis.com>
169
170         * configure: Regenerate.
171
172 2005-03-23  Mark Kettenis  <kettenis@gnu.org>
173
174         * configure: Regenerate.
175
176 2005-01-14  Andrew Cagney  <cagney@gnu.org>
177
178         * configure.ac: Sinclude aclocal.m4 before common.m4.  Add
179         explicit call to AC_CONFIG_HEADER.
180         * configure: Regenerate.
181
182 2005-01-11  Andrew Cagney  <cagney@localhost.localdomain>
183
184         * configure: Regenerated to track ../common/aclocal.m4 changes.
185
186 2005-01-07  Andrew Cagney  <cagney@gnu.org>
187
188         * configure.ac: Rename configure.in, require autoconf 2.59.
189         * configure: Re-generate.
190
191 2004-12-08  Hans-Peter Nilsson  <hp@axis.com>
192
193         * configure: Regenerate for ../common/aclocal.m4 update.
194
195 2004-06-15  Alan Modra  <amodra@bigpond.net.au>
196
197         * interp.c (sim_prepare_for_program): Use bfd_get_section_size
198         instead of bfd_get_section_size_before_reloc.
199
200 2003-08-08  Stephane Carrez  <stcarrez@nerim.fr>
201
202         * dv-m68hc11tim.c (cycle_to_string): Add flags parameter to better
203         control the translation.
204         (m68hc11tim_print_timer): Update cycle_to_string conversion.
205         (m68hc11tim_timer_event): Fix handling of output
206         compare register with its interrupts.
207         (m68hc11tim_io_write_buffer): Check output compare
208         after setting M6811_TMSK1.
209         (m68hc11tim_io_read_buffer): Fix compilation warning.
210         * dv-m68hc11.c (m68hc11_option_handler): Likewise.
211         * dv-m68hc11spi.c (m68hc11spi_info): Likewise.
212         * dv-m68hc11sio.c (m68hc11sio_info): Likewise.
213         * interrupts.c (interrupts_info): Likewise.
214         (interrupts_reset): Recognize bootstrap mode.
215         * sim-main.h (PRINT_CYCLE, PRINT_TIME): New defines.
216         (_sim_cpu): Add cpu_start_mode.
217         (cycle_to_string): Add flags member.
218         * m68hc11_sim.c (OPTION_CPU_BOOTSTRAP): New option.
219         (cpu_options): Declare new option bootstrap.
220         (cpu_option_handler): Handle it.
221         (cpu_info): Update call to cycle_to_string.
222
223 2003-08-08  Stephane Carrez  <stcarrez@nerim.fr>
224
225         * sim-main.h (phys_to_virt): Use memory bank parameters to translate
226         the physical address in virtual address.
227         (struct _sim_cpu): Add memory bank members.
228         * m68hc11_sim.c (cpu_initialize): Clear memory bank parameters.
229         * interp.c (sim_hw_configure): Create memory bank according to memory
230         bank parameters.
231         (sim_get_bank_parameters): New function to obtain memory bank config
232         from the symbol table.
233         (sim_prepare_for_program): Call it to obtain the memory bank parameters.
234         (sim_open): Call sim_prepare_for_program.
235         * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Use memory bank parameters
236         to check if address is within bank window.
237         (m68hc11cpu_io_read_buffer): Likewise.
238         (attach_m68hc11_regs): Map the memory bank according to memory bank
239         parameters.
240
241 2003-08-08  Stephane Carrez  <stcarrez@nerim.fr>,
242
243         * sim-main.h (PAGE_REGNUM, Z_REGNUM): Use same numbering as gdb.
244
245 2003-08-08  Stephane Carrez  <stcarrez@nerim.fr>,
246             Gary Piercey <gpiercey@northstar-technical.com>
247
248         * m68hc11_sim.c (print_io_word): New function to print 16-bit value.
249         * sim-main.h (print_io_word): Declare.
250         * dv-m68hc11tim.c (tmsk1_desc): New description table for TMSK1.
251         (tflg1_desc): Likewise for TFLG1.
252         (m68hc11tim_info): Print input and output compare registers
253
254 2003-03-02  Stephane Carrez  <stcarrez@nerim.fr>
255
256         * Makefile.in (SIM_EXTRA_CFLAGS): Set WITH_TARGET_ADDRESS_BITSIZE
257         to 32 to support memory bank switching; temporarily use 32-bit for
258         WORD_BITSIZE to avoid a bug in sim-common.
259
260 2003-03-01  Stephane Carrez  <stcarrez@nerim.fr>
261
262         * interp.c (sim_fetch_register): Only store a single byte for
263         1 byte registers.
264
265 2003-02-27  Andrew Cagney  <cagney@redhat.com>
266
267         * interp.c (sim_prepare_for_program, sim_open)
268         (sim_create_inferior): Rename _bfd to bfd.
269
270 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
271
272         * dv-m68hc11eepr.c (struct m68hc11eepr ): Use const char* for filename.
273
274 2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
275
276         * interp.c (sim_prepare_for_program): Look up the image for the 
277         reset vector and set cpu_use_elf_start to 1 if not found.
278         (sim_open): Do not set cpu_use_elf_start.
279
280 2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
281
282         * interp.c (sim_hw_configure): Return 1 for success.
283         (sim_prepare_for_program): Use the sim_hw_configure exit code to
284         return SIM_RC_FAIL.
285
286 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
287
288         * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Translate memory
289         bank window to some virtual address to read from extended memory.
290         (m68hc11cpu_io_write_buffer): Likewise for writing.
291         (attach_m68hc11_regs): When use_bank property is defined, attach
292         to the 68HC12 16K memory bank window.
293         * interp.c (sim_hw_configure): Create memory region for banked
294         memory.
295
296 2002-08-13  Stephane Carrez  <Stephane.Carrez@nerim.fr>
297
298         * interp.c (sim_hw_configure): Connect port-X to cpu-write-port.
299         * dv-m68hc11.c (m68hc11cpu_ports): Add cpu-write-port input.
300         (m68hc11cpu_port_event): Handle CPU_WRITE_PORT event.
301
302 2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
303
304         * dv-m68hc11.c (m68hc11cpu_io_write): Fix to update IO mapping
305         when IO mapping changed, not when internal RAM mapping is changed.
306
307 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
308
309         * m68hc11_sim.c (cpu_special): Handle call and rtc instructions.
310         * sim-main.h (M6812_CALL_INDIRECT): Add to enum.
311         (m6811_regs): Add page register.
312         (cpu_set_page, cpu_get_page): New macros.
313         (phys_to_virt): New function.
314         (cpu_get_indexed_operand_addr, cpu_return): Declare.
315         * gencode.c: Identify indirect addressing mode for call and fix daa.
316         (gen_function_entry): New param to tell if src8/dst8 locals are 
317         necessary.
318         (gen_interpreter): Use it to avoid generation of unused variables.
319         * interp.c (sim_fetch_register): Allow to read page register; page
320         register, A, B and CCR are only 1 byte wide.
321         (sim_store_register): Likewise for writing.
322
323 2002-06-16  Andrew Cagney  <ac131313@redhat.com>
324
325         * configure: Regenerated to track ../common/aclocal.m4 changes.
326
327 2002-06-09  Andrew Cagney  <cagney@redhat.com>
328
329         * Makefile.in (INCLUDE): Update path to callback.h.
330         * sim-main.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
331
332 2002-03-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
333
334         * m68hc11_sim.c (cpu_move8): Call sim_engine_abort in default case.
335         (cpu_move16): Likewise.
336         (sim_memory_error): Use sim_io_printf.
337         (cpu_option_handler): Fix compilation warning.
338         * interp.c (sim_hw_configure): Fix compilation warning; 
339         remove m68hc12sio@2 device.
340         (sim_open): Likewise.
341         * dv-m68hc11tim.c (m68hc11tim_port_event): Fix clear of TFLG2 
342         flags when reset.
343         (cycle_to_string): Improve convertion of cpu cycle number.
344         (m68hc11tim_info): Print info about PACNT.
345         (m68hc11tim_io_write_buffer): Fix clearing of TFLG2; handle
346         TCTL1 and TCTL2 registers.
347         * dv-m68hc11.c (m68hc11_info): Print 6811 current running mode.
348
349 2002-03-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
350
351         * interp.c (sim_hw_configure): Save the HW cpu pointer in the 
352         cpu struct.
353         (sim_hw_configure): Connect the capture input/output events.
354         * sim-main.h (_sim_cpu): New member hw_cpu.
355         (m68hc11cpu_set_oscillator): Declare.
356         (m68hc11cpu_clear_oscillator): Declare.
357         (m68hc11cpu_set_port): Declare.
358         * dv-m68hc11.c (m68hc11_options): New for oscillator commands.
359         (m68hc11cpu_ports): New input ports and output ports to reflect
360         the HC11 IOs.
361         (m68hc11_delete): Cleanup any running oscillator.
362         (attach_m68hc11_regs): Create the input oscillators.
363         (make_oscillator): New function.
364         (find_oscillator): New function.
365         (oscillator_handler): New function.
366         (reset_oscillators): New function.
367         (m68hc11cpu_port_event): Handle the new input ports.
368         (m68hc11cpu_set_oscillator): New function.
369         (m68hc11cpu_clear_oscillator): New function.
370         (get_frequency): New function.
371         (m68hc11_option_handler): New function.
372         (m68hc11cpu_set_port): New function.
373         (m68hc11cpu_io_write): Post the port output events.
374         * dv-m68hc11spi.c (set_bit_port): Use m68hc11cpu_set_port to set
375         the output port value.
376         * dv-m68hc11tim.c (m68hc11tim_port_event): Handle CAPTURE event
377         by latching the TCNT value in the register.
378
379 2002-03-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
380
381         * sim-main.h (cpu_frame, cpu_frame_list): Remove.
382         (cpu_frame_reg, cpu_print_frame): Remove.
383         (cpu_m68hc11_push_uint8, cpu_m68hc11_pop_uint8): Cleanup.
384         (cpu_m68hc11_push_uint16, cpu_m68hc11_pop_uint16): Likewise.
385         (cpu_m68hc12_push_uint8, cpu_m68hc12_push_uint16): Likewise.
386         (cpu_m68hc12_pop_uint8, cpu_m68hc12_pop_uint16): Likewise.
387         * m68hc11_sim.c (cpu_find_frame): Remove.
388         (cpu_create_frame_list): Remove.
389         (cpu_remove_frame_list, cpu_create_frame, cpu_free_frame): Remove.
390         (cpu_frame_reg, cpu_print_frame, cpu_update_frame): Remove.
391         (cpu_call): Cleanup to remove #if HAVE_FRAME and calls to the above.
392         (cpu_update_frame): Likewise.
393         (cpu_return): Likewise.
394         (cpu_reset): Likewise.
395         (cpu_initialize): Likewise.     
396         * interp.c (sim_do_command): Remove call to cpu_print_frame.
397
398 2002-03-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
399
400         * interrupts.c (interrupts_reset): New function, setup interrupt
401         vector address according to cpu mode.
402         (interrupts_initialize): Move reset portion to the above.
403         (interrupt_names): New table to give a name to interrupts.
404         (idefs): Handle pulse accumulator interrupts.
405         (interrupts_info): Print the interrupt history.
406         (interrupt_option_handler): New function.
407         (interrupt_options): New table of options.
408         (interrupts_update_pending): Keep track of when interrupts are
409         raised and implement breakpoint-on-raise-interrupt.
410         (interrupts_process): Keep track of when interrupts are taken
411         and implement breakpoint-on-interrupt.
412         * interrupts.h (struct interrupt_history): Define.
413         (struct interrupt): Keep track of the interrupt history.
414         (interrupts_reset): Declare.
415         (interrupts_initialize): Update prototype.
416         * m68hc11_sim.c (cpu_reset): Reset interrupts.
417         (cpu_initialize): Cleanup.
418
419 2001-07-28  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
420
421         * dv-m68hc11eepr.c (m68hc11eepr_info): Fix print of current write
422         address.
423         (m68hc11eepr_port_event): Fix detach/attach logic.
424
425 2001-07-22  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
426
427         * Makefile.in (SIM_OBJS): Remove sim-resume.o
428         * interp.c (sim_resume): New function from sim-resume.c, install
429         the stepping event after having processed the pending ticks.
430         (has_stepped): Likewise.
431         (sim_info): Produce an output only if verbose or STATE_VERBOSE_P.
432
433 2001-07-10  Andrew Cagney  <ac131313@redhat.com>
434
435         * Makefile.in (gencode): Provide explicit path to gencode.c.
436
437 2001-05-20  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
438
439         * Makefile.in (M68HC11_OBJS): Add m68hc12int.o.
440         (m68hc12int.c): Generate using gencode -m6812.
441         (m68hc11int.c): Likewise with -m6811.
442
443         * gencode.c (m6811_opcode_patterns): New patterns for 68HC12.
444         (m6811_page1_opcodes): Remove duplicate entries.
445         (m6811_page2_opcodes): Likewise.
446         (m6811_page3_opcodes): Likewise.
447         (m6811_page4_opcodes): Likewise.
448         (m6812_page1_opcodes): New table for 68HC12 instructions.
449         (m6812_page2_opcodes): Likewise.
450         (gen_fetch_operands): New modes [] and &[] for 68HC12 operands.
451         (gen_save_result): Likewise.
452         (gen_interpreter_for_table): Handle 68HC11 and 68HC12 opcodes.
453         (cmp_opcode): New function for opcode comparision.
454         (prepare_table): Sort the opcodes.
455         (gen_interpreter): Prepare all the tables and generate either
456         a 68HC11 or a 68HC12 simulator.
457         (main): New options -m6811 and -m6812.
458
459         * m68hc11_sim.c (cpu_single_step): Use pointer to cpu interpretor.
460         (cpu_special): Simulation of some 68HC12 instructions.
461         (cpu_exg): New function.
462         (cpu_dbcc): Likewise.
463         (cpu_fetch_relbranch16): Likewise.
464         (cpu_push_all): Push according to 68HC11 or 68HC12.
465         (cpu_move16): Likewise.
466         (cpu_move8): Likewise.
467         (cpu_get_indexed_operand16): Likewise.
468         (cpu_get_indexed_operand8): Likewise.
469         (cpu_get_indexed_operand_addr): Likewise.
470         (cpu_set_reg, cpu_set_dst_reg, cpu_get_src_reg, cpu_get_reg): Likewise.
471         (cpu_reset): Setup INIT register according to architecture.
472         
473         * sim-main.h (M6811_Special): Add 68HC12 specific instructions.
474         (_sim_cpu): Keep track of the cpu being simulated.
475         (cpu_get_tmp3, cpu_get_tmp2, cpu_set_tmp3, cpu_set_tmp2): New.
476         (cpu_m68hc11_push_uintxx): Rename of cpu_push_uintxx.
477         (cpu_m68hc11_pop_uint8): Likewise.
478         (cpu_m68hc12_push_uintxx): New functions for 68HC12.
479         (cpu_m68hc12_pop_uintxx): Likewise.
480         (cpu_exg, cpu_dbcc, cpu_move8, cpu_move16): Likewise,
481         (cpu_fetch_relbranch16): Likewise.
482         (cpu_interp_m6811): Rename of cpu_interp.
483         (cpu_interp_m6812): New function.       
484         * interp.c (free_state): New function.
485         (dev_list_68hc12): New table.
486         (sim_board_reset): Reset depending on the cpu (HC11 or HC12).
487         (sim_hw_configure): New function.
488         (sim_prepare_for_program): New function.
489         (sim_open): Use above new functions.
490         (sim_close): Call free_state().
491         (sim_info): Print info according to cpu.
492         (sim_create_inferior): Use sim_prepare_for_program.
493         (sim_do_command): Configure the hardware after a change of the
494         architecture.
495
496 2001-05-20  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
497
498         * dv-m68hc11sio.c (m68hc11sio_tx_poll): Always check for
499         pending interrupts.
500         * interrupts.c (interrupts_process): Keep track of the last number
501         of masked insn cycles.
502         (interrupts_initialize): Clear last number of masked insn cycles.
503         (interrupts_info): Report them.
504         (interrupts_update_pending): Compute clear and set masks of 
505         interrupts and clear the interrupt bits before setting them 
506         (due to SCI interrupt sharing).
507         * interrupts.h (struct interrupts): New members last_mask_cycles
508         and xirq_last_mask_cycles.
509
510 2000-11-26  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
511
512         * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Use attach_size
513         instead of a hard-coded value.
514         (m68hc11cpu_io_write_buffer): Likewise.
515         (dv_m68hc11_descriptor): Define a 68hc12 device.
516         * dv-m68hc11eepr.c (dv_m68hc11eepr_descriptor): Likewise.
517         * dv-m68hc11tim.c (dv_m68hc11tim_descriptor): Likewise.
518         * dv-m68hc11spi.c (dv_m68hc11spi_descriptor): Likewise.
519         * dv-m68hc11sio.c (dv_m68hc11sio_descriptor): Likewise.
520
521 2000-11-22  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
522
523         * dv-m68hc11.c (attach_m68hc11_regs): Register a delete handler.
524         (m68hc11cpu_delete): Delete handler to detach the address space.
525
526 2000-11-24  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
527
528         * dv-m68hc11eepr.c (attach_m68hc11eepr_regs): Use hw_malloc.
529         * dv-nvram.c (attach_nvram_regs): Use hw_free and hw_malloc
530         instead of free and malloc.
531
532 2000-09-11  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
533
534         * Makefile.in: Was missing from initial patch.
535
536 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
537
538         * interp.c (sim_store_register): Remove soft register hack.
539         (sim_fetch_register): Likewise.
540         (sim_create_inferior): Likewise.
541         * sim-main.h: Likewise.
542
543 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
544
545         * interrupts.c (interrupts_update_pending): Clear the mask of
546         pending interrupts here.
547         (interrupts_get_current): Don't clear the mask of pending interrupts.
548
549 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
550
551         * sim-main.h: Define cycle_to_string.
552         * dv-m68hc11tim.c (cycle_to_string): New function to translate 
553         the cpu cycle into some formatted time string.
554         (m68hc11tim_print_timer): Use it.
555         * dv-m68hc11sio.c (m68hc11sio_info): Use cycle_to_string.
556         * dv-m68hc11spi.c (m68hc11spi_info): Likewise.
557         * interrupts.c (interrupts_info): Likewise.
558         * m68hc11_sim.c (cpu_info): Likewise.
559
560 2000-09-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
561
562         * dv-m68hc11tim.c (m68hc11tim_timer_event): Compute the overflow
563         interrupt and compare events accurately.  Take into account the
564         pending ticks not processed by the simulator yet (introduced a shift).
565         (m68hc11_port_event): Reset the timer interrupt delays.
566         (m68hc11tim_io_read_buffer): Be able to read several bytes.
567         (m68hc11tim_io_write_buffer): Likewise for write.
568         (m68hc11tim_io_write_buffer): Recompute the timer overflow interrupt.
569
570 2000-09-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
571
572         * dv-m68hc11spi.c (m68hc11spi_io_read_buffer): Clear the interrupts.
573         (m68hc11spi_io_write_buffer): Likewise and fix the spi frame.
574         (m68hc11spi_info): Clarify the status report
575         of the SPI when a byte is being sent.
576         (m68hc11spi_clock): Fix the spi send frame.
577         
578 2000-08-11  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
579
580         * sim-main.h (m68hc11_map_level): Define level of address mappings.
581         * dv-m68hc11eepr.c (struct m68hc11eepr ): New flag to indicate
582         whether the eeprom is currently mapped or not.
583         (m68hc11eepr_port_event): Use the flag to see if we must unmap
584         or map the eeprom.  Update the flag to reflect the current state.
585         Use M6811_EEPROM_LEVEL when mapping the eeprom.
586         (m68hc11eepr_finish): Remove overlap hack.
587         (attach_m68hc11eepr_regs): Use M6811_IO_LEVEL when mapping the
588         config and control registers.
589         * dv-m68hc11.c (m68hc11cpu_finish): Remove overlap hack.
590         (attach_m68hc11_regs): Use M6811_IO_LEVEL.
591         (m68hc11cpu_io_write): Likewise when unmapping and re-mapping.
592         * dv-m68hc11spi.c (m68hc11spi_finish): Likewise.
593         (attach_m68hc11spi_regs): Likewise.
594         * dv-m68hc11tim.c (m68hc11tim_finish): Likewise.
595         (attach_m68hc11tim_regs): Likewise.
596         * dv-m68hc11sio.c (m68hc11sio_finish): Likewise.
597         (attach_m68hc11sio_regs): Likewise.
598         * interp.c (sim_open): Likewise.
599         * dv-nvram.c (attach_nvram_regs): Likewise.
600
601 Thu Jul 27 21:27:25 2000  Andrew Cagney  <cagney@b1.cygnus.com>
602
603         * configure, config.in: Regenerate.
604
605 2000-06-25  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
606
607         * Makefile.in (SIM_RUN_OBJS): Define to use nrun.c
608         * dv-m68hc11.c (m68hc11cpu_finish): Register detach address callback.
609         (dv_m6811_detach_address_callback): New function to detach a
610         device from an address space.
611         * dv-m68hc11eepr.c (m68hc11eepr_port_event): Initialize
612         config register according to --cpu-config option.
613         * sim-main.h (_sim_cpu): Add cpu_config member.
614         * interp.c (sim_open): Delete specific simulator options.
615         * m68hc11_sim.c (cpu_option_handler): New options
616         --emulos and -cpu-config <val> to configure the simulator.
617         (cpu_initialize): Initialize cpu_config member.
618
619 2000-06-24  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
620
621         * emulos.c: Fix indentation and comments.
622         * gencode.c: Likewise.
623         * dv-m68hc11tim.c (m68hc11tim_timer_event): Handle COMPARE_EVENT.
624         (m68hc11tim_io_write_buffer): Write compare registers and
625         setup compare event.
626         * interp.c: Remove unused global variables.
627         * interrupts.c (idefs): New compare interrupts.
628         Fix indentation and comments.
629         * interrupts.h: Likewise.
630
631 2000-06-18  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
632
633         * dv-m68hc11sio.c: Fix indentation and comments.
634         Remove INT_PORT.
635         * dv-m68hc11.c: Fix indentation and comments.
636         (m68hc11cpu_port_event): Move initialization of M6811_HPRIO from here.
637         * m68hc11_sim.c (cpu_reset): To here.
638         * dv-m68hc11eepr.c: Fix indentation and comments.
639         
640 2000-06-17  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
641
642         * dv-nvram.c: New file, rename from dv-pram.c.
643         * dv-pram.c: Delete file.
644         * sim-main.h: Incorporate m68hc11_sim.h.
645         * m68hc11_sim.h: Delete file.
646         * configure.in: Rename pram into nvram.
647         * interp.c (sim_open): Likewise in creation of device tree.
648         
649 2000-05-31  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
650
651         * interp.c (sim_open): Create the SPI device.
652         * dv-m68hc11spi.c: New file for SPI device simulation.
653         * configure.in (hw_extra_devices): Add SPI device.
654
655 2000-05-28  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
656
657         * interrupts.c (interrupts_initialize): Clear XIRQ accounting.
658         (interrupts_process): Separate IRQ and XIRQ accounting.
659         (interrupts_info): Report XIRQ accounting.
660         * interrupts.h (struct interrupts): Added accounting for XIRQ.
661
662 2000-04-16  Stephane Carrez  <stcarrez@worldnet.fr>
663
664         * dv-pram.c (attach_pram_regs): Fix the 'save-modified' mode.
665         * m68hc11_sim.h (_sim_cpu): Allow configuration of cpu mode.
666         * dv-m68hc11.c (attach_m68hc11_regs): Get the cpu MODA,MODB 
667         configuration from the 'mode' device tree property.
668         (m68hc11cpu_port_event): Reset M6811_HPRIO to the cpu MODA, MODB
669         configuration.
670
671 2000-02-24  Stephane Carrez  <stcarrez@worldnet.fr>
672
673         * sim-main.h: Remove WITH_TARGET_* defines.
674         * Makefile.in (SIM_EXTRA_CFLAGS): Specify the WITH_TARGET_* flags.
675
676 2000-02-08  Stephane Carrez  <stcarrez@worldnet.fr>
677
678         * dv-m68hc11sio.c (m68hc11sio_port_event): Setup the SCI to
679         1200 baud when cpu is in bootstrap mode.
680
681         * dv-m68hc11tim.c (m68hc11tim_io_write_buffer): Be able to
682         write in the TCTN timer register.
683
684         * dv-m68hc11sio.c (m68hc11sio_io_write_buffer): Divide cpu clock
685         by 4 to obtain the E clock frequency.
686         (sccr2_desc): Use M6811_TIE for TIE bit.
687         (m68hc11sio_info): Fix baud rate report.
688
689         * dv-m68hc11tim.c (to_realtime): Likewise.
690
691         * interp.c (sim_open): When building device tree, only provide
692         devices that do not exist yet.
693
694         * emulos.c: Fix compilation pb under Windows.
695
696         * dv-m68hc11.c (attach_m68hc11_regs): Get the clock frequency
697         from the 'clock' property.
698
699 2000-01-02  Stephane Carrez  <stcarrez@worldnet.fr>
700
701         * m68hc11_sim.h (*_REGNUM): Define.
702         (_sim_cpu): New member cpu_page0_reg table.
703         * interp.c (sim_create_inferior): Fill the cpu_page0_reg table with
704         addresses of soft registers in .page0.
705         (sim_fetch_register, sim_store_register): Use cpu_page0_reg table 
706         to get/set soft registers.
707
708 1999-12-31  Stephane Carrez  <stcarrez@worldnet.fr>
709
710         * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Clear byte to avoid
711         returning random values.
712
713 1999-12-17  Stephane Carrez  <stcarrez@worldnet.fr>
714
715         * gencode.c: Fix "subb N,x" that used a instead of b.
716
717 1999-09-09  Stephane Carrez  <stcarrez@worldnet.fr>
718
719         * gencode.c: Fixed sbc8 and adc8 when there was a initial carry.
720
721 1999-09-01  Stephane Carrez  <stcarrez@worldnet.fr>
722
723         * sim-main.h (SIM_HANDLES_LMA): Define to enable loading using lma.
724
725 1999-08-14  Stephane Carrez  <stcarrez@worldnet.fr>
726
727         * dv-m68hc11.c (attach_m68hc11_regs): Save the size of the
728         register region in the m68hc11cpu struct.
729         (m68hc11cpu_io_write): When the IO mapping addres changes,
730         detach the register region and re-attach it at the new address.
731         (m68hc11cpu_io_read_buffer): Renamed base_address into
732         attach_address.
733         (m68hc11cpu_io_write_buffer): Likewise. Pass the hw pointer
734         to m68hc11cpu_io_write.
735
736 1999-08-13  Stephane Carrez  <stcarrez@worldnet.fr>
737
738         * gencode.c: For sbc8, check the carry and increment the source
739         before trying to set the carry for the result.
740
741 1999-05-24  John S. Kallal <kallal@voicenet.com>
742         
743         * interp.c (sim_get_info): Don't crash if the command line is 0.
744         Define prototype for sim_get_info() and init_system().
745         (sim_info): Correct call to sim_get_info().
746         
747 1999-05-16  Stephane Carrez  <stcarrez@worldnet.fr>
748
749         * configure.in: Recognize m6811-*-*.
750         * configure: Regenerate.
751         * m68hc11_sim.h (cpu_ccr_update_add8, cpu_ccr_update_add16,
752         cpu_ccr_update_sub8, cpu_ccr_update_sub16):
753         Correct the computation of carry of 8 and 16-bits add and subtract.
754         * gencode.c: Use cpu_ccr_update_sub8 for subtraction (carry and
755         overflow set in a different manner than add).
756
757 1999-05-14  Stephane Carrez  <stcarrez@worldnet.fr>
758
759         * dv-m68hc11.c (dv_m6811_attach_address_callback): Removed a
760         trace message.
761         * interp.c (sim_open, sim_create_inferior): Initialize the
762         cpu_elf_start from the ELF header.
763         * m68hc11_sim.c (cpu_initialize): Clear the new data members.
764         (cpu_restart): Use cpu_elf_start as the starting address when
765         the flag is set.
766         (cpu_special): When cpu_use_elf_start is set, the WAI instruction
767         exits the simulator (exit status is in D).
768         * m68hc11_sim.h (_sim_cpu): Added members cpu_use_elf_start and
769         cpu_elf_star to start execution at address specified in ELF file.
770
771 1999-05-02  Stephane Carrez  <stcarrez@worldnet.fr>
772
773         * Makefile.in, config.in, configure, configure.in: New files.
774         * gencode.c: New file, generation of 68HC11 interpreter.
775         * m68hc11_sim.h, m68hc11_sim.c: New files, specific operations
776         for interpreter.
777         * interrupts.c, interrupts.h: New files, management of interrupts.
778         * interp.c, sim-main.h, 
779         * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c,
780         dv-m68hc11tim.c, dv-pram.c: New files representing devices for
781         68HC11 (dv-pram.c is generic and could probably migrate to common).
782         * emulos.c: New file, basic emulation of some os.