3 * sim-main.h (SIM_CPU): Delete.
7 * sim-main.h (sim_cia): Delete.
11 * sim-main.h (CIA_GET, CIA_SET): Delete.
15 * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
16 * sim-main.h (STATE_CPU): Delete.
20 * configure: Regenerate.
24 * Makefile.in (SIM_OBJS): Add sim-cpu.o.
25 * interp.c (m68hc11_pc_get, m68hc11_pc_set): New functions.
26 (sim_open): Declare new local var i. Call sim_cpu_alloc_all.
27 Call CPU_PC_FETCH & CPU_PC_STORE for all cpus.
29 * sim-main.h (SIM_CPU): Define.
31 (struct sim_state): Change cpu to an array of pointers.
35 * Makefile.in (SIM_OBJS): Delete sim-engine.o and sim-hrw.o.
39 * m68hc11_sim.c (cpu_get_indexed_operand_addr,
40 cpu_get_indexed_operand8, cpu_get_indexed_operand16): Rename restrict
41 variable to restricted.
42 * sim-main.h (cpu_get_indexed_operand_addr): Likewise.
46 * interp.c (sim_pc_get): New function.
50 * compile.c (sim_set_profile, sim_set_profile_size, sim_set_callbacks,
51 sim_size, sim_trace): Delete.
52 * sim-main.h (sim_set_profile, sim_set_profile_size): Delete.
56 * configure: Regenerate.
60 * configure: Regenerate.
64 * configure: Regenerate.
65 * configure.ac (m68hc11_extra_objs): Delete.
66 * Makefile.in (SIM_OBJS): Delete SIM_EXTRA_OBJS.
67 (SIM_EXTRA_OBJS): Delete.
71 * config.in, configure: Regenerate.
75 * Makefile.in (SIM_RUN_OBJS): Delete.
79 * configure.ac (AC_CHECK_HEADERS): Delete.
80 * aclocal.m4, configure: Regenerate.
84 * configure: Regenerate.
88 * configure: Regenerate.
89 * config.in: Regenerate.
93 * configure: Regenerate.
97 * configure: Regenerate.
101 * aclocal.m4, configure: Regenerate.
105 * configure: Rebuild.
109 * configure: Regenerate.
113 * configure.ac: Use $SIM_DV_SOCKSER_O.
114 * configure: Regenerated.
118 * config.in, configure: Regenerate.
122 * aclocal.m4, config.in, configure: Regenerate.
126 * aclocal.m4: New file.
127 * configure: Regenerate.
131 * configure: Regenerate after common/acinclude.m4 update.
135 * configure.ac: Change include to common/acinclude.m4.
139 * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER
140 call. Replace common.m4 include with SIM_AC_COMMON.
141 * configure: Regenerate.
145 * interp.c (sim_do_command): Delete.
149 * configure: Regenerate.
153 * config.in: Regenerate.
154 * configure: Likewise.
156 * configure: Regenerate.
160 * configure: Regenerate to track ../common/common.m4 changes.
167 * configure: Regenerate.
171 * config.in: Regenerate.
175 * configure: Regenerated.
179 * configure: Regenerated.
183 * configure: Regenerated.
187 * configure: Regenerate.
191 * configure: Regenerate.
195 * configure.ac: Sinclude aclocal.m4 before common.m4. Add
196 explicit call to AC_CONFIG_HEADER.
197 * configure: Regenerate.
201 * configure: Regenerated to track ../common/aclocal.m4 changes.
205 * configure.ac: Rename configure.in, require autoconf 2.59.
206 * configure: Re-generate.
210 * configure: Regenerate for ../common/aclocal.m4 update.
214 * interp.c (sim_prepare_for_program): Use bfd_get_section_size
215 instead of bfd_get_section_size_before_reloc.
219 * dv-m68hc11tim.c (cycle_to_string): Add flags parameter to better
220 control the translation.
221 (m68hc11tim_print_timer): Update cycle_to_string conversion.
222 (m68hc11tim_timer_event): Fix handling of output
223 compare register with its interrupts.
224 (m68hc11tim_io_write_buffer): Check output compare
225 after setting M6811_TMSK1.
226 (m68hc11tim_io_read_buffer): Fix compilation warning.
227 * dv-m68hc11.c (m68hc11_option_handler): Likewise.
228 * dv-m68hc11spi.c (m68hc11spi_info): Likewise.
229 * dv-m68hc11sio.c (m68hc11sio_info): Likewise.
230 * interrupts.c (interrupts_info): Likewise.
231 (interrupts_reset): Recognize bootstrap mode.
232 * sim-main.h (PRINT_CYCLE, PRINT_TIME): New defines.
233 (_sim_cpu): Add cpu_start_mode.
234 (cycle_to_string): Add flags member.
235 * m68hc11_sim.c (OPTION_CPU_BOOTSTRAP): New option.
236 (cpu_options): Declare new option bootstrap.
237 (cpu_option_handler): Handle it.
238 (cpu_info): Update call to cycle_to_string.
242 * sim-main.h (phys_to_virt): Use memory bank parameters to translate
243 the physical address in virtual address.
244 (struct _sim_cpu): Add memory bank members.
245 * m68hc11_sim.c (cpu_initialize): Clear memory bank parameters.
246 * interp.c (sim_hw_configure): Create memory bank according to memory
248 (sim_get_bank_parameters): New function to obtain memory bank config
249 from the symbol table.
250 (sim_prepare_for_program): Call it to obtain the memory bank parameters.
251 (sim_open): Call sim_prepare_for_program.
252 * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Use memory bank parameters
253 to check if address is within bank window.
254 (m68hc11cpu_io_read_buffer): Likewise.
255 (attach_m68hc11_regs): Map the memory bank according to memory bank
260 * sim-main.h (PAGE_REGNUM, Z_REGNUM): Use same numbering as gdb.
265 * m68hc11_sim.c (print_io_word): New function to print 16-bit value.
266 * sim-main.h (print_io_word): Declare.
267 * dv-m68hc11tim.c (tmsk1_desc): New description table for TMSK1.
268 (tflg1_desc): Likewise for TFLG1.
269 (m68hc11tim_info): Print input and output compare registers
273 * Makefile.in (SIM_EXTRA_CFLAGS): Set WITH_TARGET_ADDRESS_BITSIZE
274 to 32 to support memory bank switching; temporarily use 32-bit for
275 WORD_BITSIZE to avoid a bug in sim-common.
279 * interp.c (sim_fetch_register): Only store a single byte for
284 * interp.c (sim_prepare_for_program, sim_open)
285 (sim_create_inferior): Rename _bfd to bfd.
289 * dv-m68hc11eepr.c (struct m68hc11eepr ): Use const char* for filename.
293 * interp.c (sim_prepare_for_program): Look up the image for the
294 reset vector and set cpu_use_elf_start to 1 if not found.
295 (sim_open): Do not set cpu_use_elf_start.
299 * interp.c (sim_hw_configure): Return 1 for success.
300 (sim_prepare_for_program): Use the sim_hw_configure exit code to
305 * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Translate memory
306 bank window to some virtual address to read from extended memory.
307 (m68hc11cpu_io_write_buffer): Likewise for writing.
308 (attach_m68hc11_regs): When use_bank property is defined, attach
309 to the 68HC12 16K memory bank window.
310 * interp.c (sim_hw_configure): Create memory region for banked
315 * interp.c (sim_hw_configure): Connect port-X to cpu-write-port.
316 * dv-m68hc11.c (m68hc11cpu_ports): Add cpu-write-port input.
317 (m68hc11cpu_port_event): Handle CPU_WRITE_PORT event.
321 * dv-m68hc11.c (m68hc11cpu_io_write): Fix to update IO mapping
322 when IO mapping changed, not when internal RAM mapping is changed.
326 * m68hc11_sim.c (cpu_special): Handle call and rtc instructions.
327 * sim-main.h (M6812_CALL_INDIRECT): Add to enum.
328 (m6811_regs): Add page register.
329 (cpu_set_page, cpu_get_page): New macros.
330 (phys_to_virt): New function.
331 (cpu_get_indexed_operand_addr, cpu_return): Declare.
332 * gencode.c: Identify indirect addressing mode for call and fix daa.
333 (gen_function_entry): New param to tell if src8/dst8 locals are
335 (gen_interpreter): Use it to avoid generation of unused variables.
336 * interp.c (sim_fetch_register): Allow to read page register; page
337 register, A, B and CCR are only 1 byte wide.
338 (sim_store_register): Likewise for writing.
342 * configure: Regenerated to track ../common/aclocal.m4 changes.
346 * Makefile.in (INCLUDE): Update path to callback.h.
347 * sim-main.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
351 * m68hc11_sim.c (cpu_move8): Call sim_engine_abort in default case.
352 (cpu_move16): Likewise.
353 (sim_memory_error): Use sim_io_printf.
354 (cpu_option_handler): Fix compilation warning.
355 * interp.c (sim_hw_configure): Fix compilation warning;
356 remove m68hc12sio@2 device.
357 (sim_open): Likewise.
358 * dv-m68hc11tim.c (m68hc11tim_port_event): Fix clear of TFLG2
360 (cycle_to_string): Improve convertion of cpu cycle number.
361 (m68hc11tim_info): Print info about PACNT.
362 (m68hc11tim_io_write_buffer): Fix clearing of TFLG2; handle
363 TCTL1 and TCTL2 registers.
364 * dv-m68hc11.c (m68hc11_info): Print 6811 current running mode.
368 * interp.c (sim_hw_configure): Save the HW cpu pointer in the
370 (sim_hw_configure): Connect the capture input/output events.
371 * sim-main.h (_sim_cpu): New member hw_cpu.
372 (m68hc11cpu_set_oscillator): Declare.
373 (m68hc11cpu_clear_oscillator): Declare.
374 (m68hc11cpu_set_port): Declare.
375 * dv-m68hc11.c (m68hc11_options): New for oscillator commands.
376 (m68hc11cpu_ports): New input ports and output ports to reflect
378 (m68hc11_delete): Cleanup any running oscillator.
379 (attach_m68hc11_regs): Create the input oscillators.
380 (make_oscillator): New function.
381 (find_oscillator): New function.
382 (oscillator_handler): New function.
383 (reset_oscillators): New function.
384 (m68hc11cpu_port_event): Handle the new input ports.
385 (m68hc11cpu_set_oscillator): New function.
386 (m68hc11cpu_clear_oscillator): New function.
387 (get_frequency): New function.
388 (m68hc11_option_handler): New function.
389 (m68hc11cpu_set_port): New function.
390 (m68hc11cpu_io_write): Post the port output events.
391 * dv-m68hc11spi.c (set_bit_port): Use m68hc11cpu_set_port to set
392 the output port value.
393 * dv-m68hc11tim.c (m68hc11tim_port_event): Handle CAPTURE event
394 by latching the TCNT value in the register.
398 * sim-main.h (cpu_frame, cpu_frame_list): Remove.
399 (cpu_frame_reg, cpu_print_frame): Remove.
400 (cpu_m68hc11_push_uint8, cpu_m68hc11_pop_uint8): Cleanup.
401 (cpu_m68hc11_push_uint16, cpu_m68hc11_pop_uint16): Likewise.
402 (cpu_m68hc12_push_uint8, cpu_m68hc12_push_uint16): Likewise.
403 (cpu_m68hc12_pop_uint8, cpu_m68hc12_pop_uint16): Likewise.
404 * m68hc11_sim.c (cpu_find_frame): Remove.
405 (cpu_create_frame_list): Remove.
406 (cpu_remove_frame_list, cpu_create_frame, cpu_free_frame): Remove.
407 (cpu_frame_reg, cpu_print_frame, cpu_update_frame): Remove.
408 (cpu_call): Cleanup to remove #if HAVE_FRAME and calls to the above.
409 (cpu_update_frame): Likewise.
410 (cpu_return): Likewise.
411 (cpu_reset): Likewise.
412 (cpu_initialize): Likewise.
413 * interp.c (sim_do_command): Remove call to cpu_print_frame.
417 * interrupts.c (interrupts_reset): New function, setup interrupt
418 vector address according to cpu mode.
419 (interrupts_initialize): Move reset portion to the above.
420 (interrupt_names): New table to give a name to interrupts.
421 (idefs): Handle pulse accumulator interrupts.
422 (interrupts_info): Print the interrupt history.
423 (interrupt_option_handler): New function.
424 (interrupt_options): New table of options.
425 (interrupts_update_pending): Keep track of when interrupts are
426 raised and implement breakpoint-on-raise-interrupt.
427 (interrupts_process): Keep track of when interrupts are taken
428 and implement breakpoint-on-interrupt.
429 * interrupts.h (struct interrupt_history): Define.
430 (struct interrupt): Keep track of the interrupt history.
431 (interrupts_reset): Declare.
432 (interrupts_initialize): Update prototype.
433 * m68hc11_sim.c (cpu_reset): Reset interrupts.
434 (cpu_initialize): Cleanup.
438 * dv-m68hc11eepr.c (m68hc11eepr_info): Fix print of current write
440 (m68hc11eepr_port_event): Fix detach/attach logic.
444 * Makefile.in (SIM_OBJS): Remove sim-resume.o
445 * interp.c (sim_resume): New function from sim-resume.c, install
446 the stepping event after having processed the pending ticks.
447 (has_stepped): Likewise.
448 (sim_info): Produce an output only if verbose or STATE_VERBOSE_P.
452 * Makefile.in (gencode): Provide explicit path to gencode.c.
456 * Makefile.in (M68HC11_OBJS): Add m68hc12int.o.
457 (m68hc12int.c): Generate using gencode -m6812.
458 (m68hc11int.c): Likewise with -m6811.
460 * gencode.c (m6811_opcode_patterns): New patterns for 68HC12.
461 (m6811_page1_opcodes): Remove duplicate entries.
462 (m6811_page2_opcodes): Likewise.
463 (m6811_page3_opcodes): Likewise.
464 (m6811_page4_opcodes): Likewise.
465 (m6812_page1_opcodes): New table for 68HC12 instructions.
466 (m6812_page2_opcodes): Likewise.
467 (gen_fetch_operands): New modes [] and &[] for 68HC12 operands.
468 (gen_save_result): Likewise.
469 (gen_interpreter_for_table): Handle 68HC11 and 68HC12 opcodes.
470 (cmp_opcode): New function for opcode comparision.
471 (prepare_table): Sort the opcodes.
472 (gen_interpreter): Prepare all the tables and generate either
473 a 68HC11 or a 68HC12 simulator.
474 (main): New options -m6811 and -m6812.
476 * m68hc11_sim.c (cpu_single_step): Use pointer to cpu interpretor.
477 (cpu_special): Simulation of some 68HC12 instructions.
478 (cpu_exg): New function.
479 (cpu_dbcc): Likewise.
480 (cpu_fetch_relbranch16): Likewise.
481 (cpu_push_all): Push according to 68HC11 or 68HC12.
482 (cpu_move16): Likewise.
483 (cpu_move8): Likewise.
484 (cpu_get_indexed_operand16): Likewise.
485 (cpu_get_indexed_operand8): Likewise.
486 (cpu_get_indexed_operand_addr): Likewise.
487 (cpu_set_reg, cpu_set_dst_reg, cpu_get_src_reg, cpu_get_reg): Likewise.
488 (cpu_reset): Setup INIT register according to architecture.
490 * sim-main.h (M6811_Special): Add 68HC12 specific instructions.
491 (_sim_cpu): Keep track of the cpu being simulated.
492 (cpu_get_tmp3, cpu_get_tmp2, cpu_set_tmp3, cpu_set_tmp2): New.
493 (cpu_m68hc11_push_uintxx): Rename of cpu_push_uintxx.
494 (cpu_m68hc11_pop_uint8): Likewise.
495 (cpu_m68hc12_push_uintxx): New functions for 68HC12.
496 (cpu_m68hc12_pop_uintxx): Likewise.
497 (cpu_exg, cpu_dbcc, cpu_move8, cpu_move16): Likewise,
498 (cpu_fetch_relbranch16): Likewise.
499 (cpu_interp_m6811): Rename of cpu_interp.
500 (cpu_interp_m6812): New function.
501 * interp.c (free_state): New function.
502 (dev_list_68hc12): New table.
503 (sim_board_reset): Reset depending on the cpu (HC11 or HC12).
504 (sim_hw_configure): New function.
505 (sim_prepare_for_program): New function.
506 (sim_open): Use above new functions.
507 (sim_close): Call free_state().
508 (sim_info): Print info according to cpu.
509 (sim_create_inferior): Use sim_prepare_for_program.
510 (sim_do_command): Configure the hardware after a change of the
515 * dv-m68hc11sio.c (m68hc11sio_tx_poll): Always check for
517 * interrupts.c (interrupts_process): Keep track of the last number
518 of masked insn cycles.
519 (interrupts_initialize): Clear last number of masked insn cycles.
520 (interrupts_info): Report them.
521 (interrupts_update_pending): Compute clear and set masks of
522 interrupts and clear the interrupt bits before setting them
523 (due to SCI interrupt sharing).
524 * interrupts.h (struct interrupts): New members last_mask_cycles
525 and xirq_last_mask_cycles.
529 * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Use attach_size
530 instead of a hard-coded value.
531 (m68hc11cpu_io_write_buffer): Likewise.
532 (dv_m68hc11_descriptor): Define a 68hc12 device.
533 * dv-m68hc11eepr.c (dv_m68hc11eepr_descriptor): Likewise.
534 * dv-m68hc11tim.c (dv_m68hc11tim_descriptor): Likewise.
535 * dv-m68hc11spi.c (dv_m68hc11spi_descriptor): Likewise.
536 * dv-m68hc11sio.c (dv_m68hc11sio_descriptor): Likewise.
540 * dv-m68hc11.c (attach_m68hc11_regs): Register a delete handler.
541 (m68hc11cpu_delete): Delete handler to detach the address space.
545 * dv-m68hc11eepr.c (attach_m68hc11eepr_regs): Use hw_malloc.
546 * dv-nvram.c (attach_nvram_regs): Use hw_free and hw_malloc
547 instead of free and malloc.
551 * Makefile.in: Was missing from initial patch.
555 * interp.c (sim_store_register): Remove soft register hack.
556 (sim_fetch_register): Likewise.
557 (sim_create_inferior): Likewise.
558 * sim-main.h: Likewise.
562 * interrupts.c (interrupts_update_pending): Clear the mask of
563 pending interrupts here.
564 (interrupts_get_current): Don't clear the mask of pending interrupts.
568 * sim-main.h: Define cycle_to_string.
569 * dv-m68hc11tim.c (cycle_to_string): New function to translate
570 the cpu cycle into some formatted time string.
571 (m68hc11tim_print_timer): Use it.
572 * dv-m68hc11sio.c (m68hc11sio_info): Use cycle_to_string.
573 * dv-m68hc11spi.c (m68hc11spi_info): Likewise.
574 * interrupts.c (interrupts_info): Likewise.
575 * m68hc11_sim.c (cpu_info): Likewise.
579 * dv-m68hc11tim.c (m68hc11tim_timer_event): Compute the overflow
580 interrupt and compare events accurately. Take into account the
581 pending ticks not processed by the simulator yet (introduced a shift).
582 (m68hc11_port_event): Reset the timer interrupt delays.
583 (m68hc11tim_io_read_buffer): Be able to read several bytes.
584 (m68hc11tim_io_write_buffer): Likewise for write.
585 (m68hc11tim_io_write_buffer): Recompute the timer overflow interrupt.
589 * dv-m68hc11spi.c (m68hc11spi_io_read_buffer): Clear the interrupts.
590 (m68hc11spi_io_write_buffer): Likewise and fix the spi frame.
591 (m68hc11spi_info): Clarify the status report
592 of the SPI when a byte is being sent.
593 (m68hc11spi_clock): Fix the spi send frame.
597 * sim-main.h (m68hc11_map_level): Define level of address mappings.
598 * dv-m68hc11eepr.c (struct m68hc11eepr ): New flag to indicate
599 whether the eeprom is currently mapped or not.
600 (m68hc11eepr_port_event): Use the flag to see if we must unmap
601 or map the eeprom. Update the flag to reflect the current state.
602 Use M6811_EEPROM_LEVEL when mapping the eeprom.
603 (m68hc11eepr_finish): Remove overlap hack.
604 (attach_m68hc11eepr_regs): Use M6811_IO_LEVEL when mapping the
605 config and control registers.
606 * dv-m68hc11.c (m68hc11cpu_finish): Remove overlap hack.
607 (attach_m68hc11_regs): Use M6811_IO_LEVEL.
608 (m68hc11cpu_io_write): Likewise when unmapping and re-mapping.
609 * dv-m68hc11spi.c (m68hc11spi_finish): Likewise.
610 (attach_m68hc11spi_regs): Likewise.
611 * dv-m68hc11tim.c (m68hc11tim_finish): Likewise.
612 (attach_m68hc11tim_regs): Likewise.
613 * dv-m68hc11sio.c (m68hc11sio_finish): Likewise.
614 (attach_m68hc11sio_regs): Likewise.
615 * interp.c (sim_open): Likewise.
616 * dv-nvram.c (attach_nvram_regs): Likewise.
620 * configure, config.in: Regenerate.
624 * Makefile.in (SIM_RUN_OBJS): Define to use nrun.c
625 * dv-m68hc11.c (m68hc11cpu_finish): Register detach address callback.
626 (dv_m6811_detach_address_callback): New function to detach a
627 device from an address space.
628 * dv-m68hc11eepr.c (m68hc11eepr_port_event): Initialize
629 config register according to --cpu-config option.
630 * sim-main.h (_sim_cpu): Add cpu_config member.
631 * interp.c (sim_open): Delete specific simulator options.
632 * m68hc11_sim.c (cpu_option_handler): New options
633 --emulos and -cpu-config <val> to configure the simulator.
634 (cpu_initialize): Initialize cpu_config member.
638 * emulos.c: Fix indentation and comments.
639 * gencode.c: Likewise.
640 * dv-m68hc11tim.c (m68hc11tim_timer_event): Handle COMPARE_EVENT.
641 (m68hc11tim_io_write_buffer): Write compare registers and
643 * interp.c: Remove unused global variables.
644 * interrupts.c (idefs): New compare interrupts.
645 Fix indentation and comments.
646 * interrupts.h: Likewise.
650 * dv-m68hc11sio.c: Fix indentation and comments.
652 * dv-m68hc11.c: Fix indentation and comments.
653 (m68hc11cpu_port_event): Move initialization of M6811_HPRIO from here.
654 * m68hc11_sim.c (cpu_reset): To here.
655 * dv-m68hc11eepr.c: Fix indentation and comments.
659 * dv-nvram.c: New file, rename from dv-pram.c.
660 * dv-pram.c: Delete file.
661 * sim-main.h: Incorporate m68hc11_sim.h.
662 * m68hc11_sim.h: Delete file.
663 * configure.in: Rename pram into nvram.
664 * interp.c (sim_open): Likewise in creation of device tree.
668 * interp.c (sim_open): Create the SPI device.
669 * dv-m68hc11spi.c: New file for SPI device simulation.
670 * configure.in (hw_extra_devices): Add SPI device.
674 * interrupts.c (interrupts_initialize): Clear XIRQ accounting.
675 (interrupts_process): Separate IRQ and XIRQ accounting.
676 (interrupts_info): Report XIRQ accounting.
677 * interrupts.h (struct interrupts): Added accounting for XIRQ.
681 * dv-pram.c (attach_pram_regs): Fix the 'save-modified' mode.
682 * m68hc11_sim.h (_sim_cpu): Allow configuration of cpu mode.
683 * dv-m68hc11.c (attach_m68hc11_regs): Get the cpu MODA,MODB
684 configuration from the 'mode' device tree property.
685 (m68hc11cpu_port_event): Reset M6811_HPRIO to the cpu MODA, MODB
690 * sim-main.h: Remove WITH_TARGET_* defines.
691 * Makefile.in (SIM_EXTRA_CFLAGS): Specify the WITH_TARGET_* flags.
695 * dv-m68hc11sio.c (m68hc11sio_port_event): Setup the SCI to
696 1200 baud when cpu is in bootstrap mode.
698 * dv-m68hc11tim.c (m68hc11tim_io_write_buffer): Be able to
699 write in the TCTN timer register.
701 * dv-m68hc11sio.c (m68hc11sio_io_write_buffer): Divide cpu clock
702 by 4 to obtain the E clock frequency.
703 (sccr2_desc): Use M6811_TIE for TIE bit.
704 (m68hc11sio_info): Fix baud rate report.
706 * dv-m68hc11tim.c (to_realtime): Likewise.
708 * interp.c (sim_open): When building device tree, only provide
709 devices that do not exist yet.
711 * emulos.c: Fix compilation pb under Windows.
713 * dv-m68hc11.c (attach_m68hc11_regs): Get the clock frequency
714 from the 'clock' property.
718 * m68hc11_sim.h (*_REGNUM): Define.
719 (_sim_cpu): New member cpu_page0_reg table.
720 * interp.c (sim_create_inferior): Fill the cpu_page0_reg table with
721 addresses of soft registers in .page0.
722 (sim_fetch_register, sim_store_register): Use cpu_page0_reg table
723 to get/set soft registers.
727 * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Clear byte to avoid
728 returning random values.
732 * gencode.c: Fix "subb N,x" that used a instead of b.
736 * gencode.c: Fixed sbc8 and adc8 when there was a initial carry.
740 * sim-main.h (SIM_HANDLES_LMA): Define to enable loading using lma.
744 * dv-m68hc11.c (attach_m68hc11_regs): Save the size of the
745 register region in the m68hc11cpu struct.
746 (m68hc11cpu_io_write): When the IO mapping addres changes,
747 detach the register region and re-attach it at the new address.
748 (m68hc11cpu_io_read_buffer): Renamed base_address into
750 (m68hc11cpu_io_write_buffer): Likewise. Pass the hw pointer
751 to m68hc11cpu_io_write.
755 * gencode.c: For sbc8, check the carry and increment the source
756 before trying to set the carry for the result.
760 * interp.c (sim_get_info): Don't crash if the command line is 0.
761 Define prototype for sim_get_info() and init_system().
762 (sim_info): Correct call to sim_get_info().
766 * configure.in: Recognize m6811-*-*.
767 * configure: Regenerate.
768 * m68hc11_sim.h (cpu_ccr_update_add8, cpu_ccr_update_add16,
769 cpu_ccr_update_sub8, cpu_ccr_update_sub16):
770 Correct the computation of carry of 8 and 16-bits add and subtract.
771 * gencode.c: Use cpu_ccr_update_sub8 for subtraction (carry and
772 overflow set in a different manner than add).
776 * dv-m68hc11.c (dv_m6811_attach_address_callback): Removed a
778 * interp.c (sim_open, sim_create_inferior): Initialize the
779 cpu_elf_start from the ELF header.
780 * m68hc11_sim.c (cpu_initialize): Clear the new data members.
781 (cpu_restart): Use cpu_elf_start as the starting address when
783 (cpu_special): When cpu_use_elf_start is set, the WAI instruction
784 exits the simulator (exit status is in D).
785 * m68hc11_sim.h (_sim_cpu): Added members cpu_use_elf_start and
786 cpu_elf_star to start execution at address specified in ELF file.
790 * Makefile.in, config.in, configure, configure.in: New files.
791 * gencode.c: New file, generation of 68HC11 interpreter.
792 * m68hc11_sim.h, m68hc11_sim.c: New files, specific operations
794 * interrupts.c, interrupts.h: New files, management of interrupts.
795 * interp.c, sim-main.h,
796 * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c,
797 dv-m68hc11tim.c, dv-pram.c: New files representing devices for
798 68HC11 (dv-pram.c is generic and could probably migrate to common).
799 * emulos.c: New file, basic emulation of some os.