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