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