* m68hc11_sim.c (print_io_word): New function to print 16-bit value.
[external/binutils.git] / sim / m68hc11 / ChangeLog
1 2003-08-08  Stephane Carrez  <stcarrez@nerim.fr>,
2             Gary Piercey <gpiercey@northstar-technical.com>
3
4         * m68hc11_sim.c (print_io_word): New function to print 16-bit value.
5         * sim-main.h (print_io_word): Declare.
6         * dv-m68hc11tim.c (tmsk1_desc): New description table for TMSK1.
7         (tflg1_desc): Likewise for TFLG1.
8         (m68hc11tim_info): Print input and output compare registers
9
10 2003-03-02  Stephane Carrez  <stcarrez@nerim.fr>
11
12         * Makefile.in (SIM_EXTRA_CFLAGS): Set WITH_TARGET_ADDRESS_BITSIZE
13         to 32 to support memory bank switching; temporarily use 32-bit for
14         WORD_BITSIZE to avoid a bug in sim-common.
15
16 2003-03-01  Stephane Carrez  <stcarrez@nerim.fr>
17
18         * interp.c (sim_fetch_register): Only store a single byte for
19         1 byte registers.
20
21 2003-02-27  Andrew Cagney  <cagney@redhat.com>
22
23         * interp.c (sim_prepare_for_program, sim_open)
24         (sim_create_inferior): Rename _bfd to bfd.
25
26 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
27
28         * dv-m68hc11eepr.c (struct m68hc11eepr ): Use const char* for filename.
29
30 2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
31
32         * interp.c (sim_prepare_for_program): Look up the image for the 
33         reset vector and set cpu_use_elf_start to 1 if not found.
34         (sim_open): Do not set cpu_use_elf_start.
35
36 2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
37
38         * interp.c (sim_hw_configure): Return 1 for success.
39         (sim_prepare_for_program): Use the sim_hw_configure exit code to
40         return SIM_RC_FAIL.
41
42 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
43
44         * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Translate memory
45         bank window to some virtual address to read from extended memory.
46         (m68hc11cpu_io_write_buffer): Likewise for writing.
47         (attach_m68hc11_regs): When use_bank property is defined, attach
48         to the 68HC12 16K memory bank window.
49         * interp.c (sim_hw_configure): Create memory region for banked
50         memory.
51
52 2002-08-13  Stephane Carrez  <Stephane.Carrez@nerim.fr>
53
54         * interp.c (sim_hw_configure): Connect port-X to cpu-write-port.
55         * dv-m68hc11.c (m68hc11cpu_ports): Add cpu-write-port input.
56         (m68hc11cpu_port_event): Handle CPU_WRITE_PORT event.
57
58 2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
59
60         * dv-m68hc11.c (m68hc11cpu_io_write): Fix to update IO mapping
61         when IO mapping changed, not when internal RAM mapping is changed.
62
63 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
64
65         * m68hc11_sim.c (cpu_special): Handle call and rtc instructions.
66         * sim-main.h (M6812_CALL_INDIRECT): Add to enum.
67         (m6811_regs): Add page register.
68         (cpu_set_page, cpu_get_page): New macros.
69         (phys_to_virt): New function.
70         (cpu_get_indexed_operand_addr, cpu_return): Declare.
71         * gencode.c: Identify indirect addressing mode for call and fix daa.
72         (gen_function_entry): New param to tell if src8/dst8 locals are 
73         necessary.
74         (gen_interpreter): Use it to avoid generation of unused variables.
75         * interp.c (sim_fetch_register): Allow to read page register; page
76         register, A, B and CCR are only 1 byte wide.
77         (sim_store_register): Likewise for writing.
78
79 2002-06-16  Andrew Cagney  <ac131313@redhat.com>
80
81         * configure: Regenerated to track ../common/aclocal.m4 changes.
82
83 2002-06-09  Andrew Cagney  <cagney@redhat.com>
84
85         * Makefile.in (INCLUDE): Update path to callback.h.
86         * sim-main.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
87
88 2002-03-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
89
90         * m68hc11_sim.c (cpu_move8): Call sim_engine_abort in default case.
91         (cpu_move16): Likewise.
92         (sim_memory_error): Use sim_io_printf.
93         (cpu_option_handler): Fix compilation warning.
94         * interp.c (sim_hw_configure): Fix compilation warning; 
95         remove m68hc12sio@2 device.
96         (sim_open): Likewise.
97         * dv-m68hc11tim.c (m68hc11tim_port_event): Fix clear of TFLG2 
98         flags when reset.
99         (cycle_to_string): Improve convertion of cpu cycle number.
100         (m68hc11tim_info): Print info about PACNT.
101         (m68hc11tim_io_write_buffer): Fix clearing of TFLG2; handle
102         TCTL1 and TCTL2 registers.
103         * dv-m68hc11.c (m68hc11_info): Print 6811 current running mode.
104
105 2002-03-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
106
107         * interp.c (sim_hw_configure): Save the HW cpu pointer in the 
108         cpu struct.
109         (sim_hw_configure): Connect the capture input/output events.
110         * sim-main.h (_sim_cpu): New member hw_cpu.
111         (m68hc11cpu_set_oscillator): Declare.
112         (m68hc11cpu_clear_oscillator): Declare.
113         (m68hc11cpu_set_port): Declare.
114         * dv-m68hc11.c (m68hc11_options): New for oscillator commands.
115         (m68hc11cpu_ports): New input ports and output ports to reflect
116         the HC11 IOs.
117         (m68hc11_delete): Cleanup any running oscillator.
118         (attach_m68hc11_regs): Create the input oscillators.
119         (make_oscillator): New function.
120         (find_oscillator): New function.
121         (oscillator_handler): New function.
122         (reset_oscillators): New function.
123         (m68hc11cpu_port_event): Handle the new input ports.
124         (m68hc11cpu_set_oscillator): New function.
125         (m68hc11cpu_clear_oscillator): New function.
126         (get_frequency): New function.
127         (m68hc11_option_handler): New function.
128         (m68hc11cpu_set_port): New function.
129         (m68hc11cpu_io_write): Post the port output events.
130         * dv-m68hc11spi.c (set_bit_port): Use m68hc11cpu_set_port to set
131         the output port value.
132         * dv-m68hc11tim.c (m68hc11tim_port_event): Handle CAPTURE event
133         by latching the TCNT value in the register.
134
135 2002-03-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
136
137         * sim-main.h (cpu_frame, cpu_frame_list): Remove.
138         (cpu_frame_reg, cpu_print_frame): Remove.
139         (cpu_m68hc11_push_uint8, cpu_m68hc11_pop_uint8): Cleanup.
140         (cpu_m68hc11_push_uint16, cpu_m68hc11_pop_uint16): Likewise.
141         (cpu_m68hc12_push_uint8, cpu_m68hc12_push_uint16): Likewise.
142         (cpu_m68hc12_pop_uint8, cpu_m68hc12_pop_uint16): Likewise.
143         * m68hc11_sim.c (cpu_find_frame): Remove.
144         (cpu_create_frame_list): Remove.
145         (cpu_remove_frame_list, cpu_create_frame, cpu_free_frame): Remove.
146         (cpu_frame_reg, cpu_print_frame, cpu_update_frame): Remove.
147         (cpu_call): Cleanup to remove #if HAVE_FRAME and calls to the above.
148         (cpu_update_frame): Likewise.
149         (cpu_return): Likewise.
150         (cpu_reset): Likewise.
151         (cpu_initialize): Likewise.     
152         * interp.c (sim_do_command): Remove call to cpu_print_frame.
153
154 2002-03-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
155
156         * interrupts.c (interrupts_reset): New function, setup interrupt
157         vector address according to cpu mode.
158         (interrupts_initialize): Move reset portion to the above.
159         (interrupt_names): New table to give a name to interrupts.
160         (idefs): Handle pulse accumulator interrupts.
161         (interrupts_info): Print the interrupt history.
162         (interrupt_option_handler): New function.
163         (interrupt_options): New table of options.
164         (interrupts_update_pending): Keep track of when interrupts are
165         raised and implement breakpoint-on-raise-interrupt.
166         (interrupts_process): Keep track of when interrupts are taken
167         and implement breakpoint-on-interrupt.
168         * interrupts.h (struct interrupt_history): Define.
169         (struct interrupt): Keep track of the interrupt history.
170         (interrupts_reset): Declare.
171         (interrupts_initialize): Update prototype.
172         * m68hc11_sim.c (cpu_reset): Reset interrupts.
173         (cpu_initialize): Cleanup.
174
175 2001-07-28  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
176
177         * dv-m68hc11eepr.c (m68hc11eepr_info): Fix print of current write
178         address.
179         (m68hc11eepr_port_event): Fix detach/attach logic.
180
181 2001-07-22  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
182
183         * Makefile.in (SIM_OBJS): Remove sim-resume.o
184         * interp.c (sim_resume): New function from sim-resume.c, install
185         the stepping event after having processed the pending ticks.
186         (has_stepped): Likewise.
187         (sim_info): Produce an output only if verbose or STATE_VERBOSE_P.
188
189 2001-07-10  Andrew Cagney  <ac131313@redhat.com>
190
191         * Makefile.in (gencode): Provide explicit path to gencode.c.
192
193 2001-05-20  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
194
195         * Makefile.in (M68HC11_OBJS): Add m68hc12int.o.
196         (m68hc12int.c): Generate using gencode -m6812.
197         (m68hc11int.c): Likewise with -m6811.
198
199         * gencode.c (m6811_opcode_patterns): New patterns for 68HC12.
200         (m6811_page1_opcodes): Remove duplicate entries.
201         (m6811_page2_opcodes): Likewise.
202         (m6811_page3_opcodes): Likewise.
203         (m6811_page4_opcodes): Likewise.
204         (m6812_page1_opcodes): New table for 68HC12 instructions.
205         (m6812_page2_opcodes): Likewise.
206         (gen_fetch_operands): New modes [] and &[] for 68HC12 operands.
207         (gen_save_result): Likewise.
208         (gen_interpreter_for_table): Handle 68HC11 and 68HC12 opcodes.
209         (cmp_opcode): New function for opcode comparision.
210         (prepare_table): Sort the opcodes.
211         (gen_interpreter): Prepare all the tables and generate either
212         a 68HC11 or a 68HC12 simulator.
213         (main): New options -m6811 and -m6812.
214
215         * m68hc11_sim.c (cpu_single_step): Use pointer to cpu interpretor.
216         (cpu_special): Simulation of some 68HC12 instructions.
217         (cpu_exg): New function.
218         (cpu_dbcc): Likewise.
219         (cpu_fetch_relbranch16): Likewise.
220         (cpu_push_all): Push according to 68HC11 or 68HC12.
221         (cpu_move16): Likewise.
222         (cpu_move8): Likewise.
223         (cpu_get_indexed_operand16): Likewise.
224         (cpu_get_indexed_operand8): Likewise.
225         (cpu_get_indexed_operand_addr): Likewise.
226         (cpu_set_reg, cpu_set_dst_reg, cpu_get_src_reg, cpu_get_reg): Likewise.
227         (cpu_reset): Setup INIT register according to architecture.
228         
229         * sim-main.h (M6811_Special): Add 68HC12 specific instructions.
230         (_sim_cpu): Keep track of the cpu being simulated.
231         (cpu_get_tmp3, cpu_get_tmp2, cpu_set_tmp3, cpu_set_tmp2): New.
232         (cpu_m68hc11_push_uintxx): Rename of cpu_push_uintxx.
233         (cpu_m68hc11_pop_uint8): Likewise.
234         (cpu_m68hc12_push_uintxx): New functions for 68HC12.
235         (cpu_m68hc12_pop_uintxx): Likewise.
236         (cpu_exg, cpu_dbcc, cpu_move8, cpu_move16): Likewise,
237         (cpu_fetch_relbranch16): Likewise.
238         (cpu_interp_m6811): Rename of cpu_interp.
239         (cpu_interp_m6812): New function.       
240         * interp.c (free_state): New function.
241         (dev_list_68hc12): New table.
242         (sim_board_reset): Reset depending on the cpu (HC11 or HC12).
243         (sim_hw_configure): New function.
244         (sim_prepare_for_program): New function.
245         (sim_open): Use above new functions.
246         (sim_close): Call free_state().
247         (sim_info): Print info according to cpu.
248         (sim_create_inferior): Use sim_prepare_for_program.
249         (sim_do_command): Configure the hardware after a change of the
250         architecture.
251
252 2001-05-20  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
253
254         * dv-m68hc11sio.c (m68hc11sio_tx_poll): Always check for
255         pending interrupts.
256         * interrupts.c (interrupts_process): Keep track of the last number
257         of masked insn cycles.
258         (interrupts_initialize): Clear last number of masked insn cycles.
259         (interrupts_info): Report them.
260         (interrupts_update_pending): Compute clear and set masks of 
261         interrupts and clear the interrupt bits before setting them 
262         (due to SCI interrupt sharing).
263         * interrupts.h (struct interrupts): New members last_mask_cycles
264         and xirq_last_mask_cycles.
265
266 2000-11-26  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
267
268         * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Use attach_size
269         instead of a hard-coded value.
270         (m68hc11cpu_io_write_buffer): Likewise.
271         (dv_m68hc11_descriptor): Define a 68hc12 device.
272         * dv-m68hc11eepr.c (dv_m68hc11eepr_descriptor): Likewise.
273         * dv-m68hc11tim.c (dv_m68hc11tim_descriptor): Likewise.
274         * dv-m68hc11spi.c (dv_m68hc11spi_descriptor): Likewise.
275         * dv-m68hc11sio.c (dv_m68hc11sio_descriptor): Likewise.
276
277 2000-11-22  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
278
279         * dv-m68hc11.c (attach_m68hc11_regs): Register a delete handler.
280         (m68hc11cpu_delete): Delete handler to detach the address space.
281
282 2000-11-24  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
283
284         * dv-m68hc11eepr.c (attach_m68hc11eepr_regs): Use hw_malloc.
285         * dv-nvram.c (attach_nvram_regs): Use hw_free and hw_malloc
286         instead of free and malloc.
287
288 2000-09-11  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
289
290         * Makefile.in: Was missing from initial patch.
291
292 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
293
294         * interp.c (sim_store_register): Remove soft register hack.
295         (sim_fetch_register): Likewise.
296         (sim_create_inferior): Likewise.
297         * sim-main.h: Likewise.
298
299 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
300
301         * interrupts.c (interrupts_update_pending): Clear the mask of
302         pending interrupts here.
303         (interrupts_get_current): Don't clear the mask of pending interrupts.
304
305 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
306
307         * sim-main.h: Define cycle_to_string.
308         * dv-m68hc11tim.c (cycle_to_string): New function to translate 
309         the cpu cycle into some formatted time string.
310         (m68hc11tim_print_timer): Use it.
311         * dv-m68hc11sio.c (m68hc11sio_info): Use cycle_to_string.
312         * dv-m68hc11spi.c (m68hc11spi_info): Likewise.
313         * interrupts.c (interrupts_info): Likewise.
314         * m68hc11_sim.c (cpu_info): Likewise.
315
316 2000-09-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
317
318         * dv-m68hc11tim.c (m68hc11tim_timer_event): Compute the overflow
319         interrupt and compare events accurately.  Take into account the
320         pending ticks not processed by the simulator yet (introduced a shift).
321         (m68hc11_port_event): Reset the timer interrupt delays.
322         (m68hc11tim_io_read_buffer): Be able to read several bytes.
323         (m68hc11tim_io_write_buffer): Likewise for write.
324         (m68hc11tim_io_write_buffer): Recompute the timer overflow interrupt.
325
326 2000-09-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
327
328         * dv-m68hc11spi.c (m68hc11spi_io_read_buffer): Clear the interrupts.
329         (m68hc11spi_io_write_buffer): Likewise and fix the spi frame.
330         (m68hc11spi_info): Clarify the status report
331         of the SPI when a byte is being sent.
332         (m68hc11spi_clock): Fix the spi send frame.
333         
334 2000-08-11  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
335
336         * sim-main.h (m68hc11_map_level): Define level of address mappings.
337         * dv-m68hc11eepr.c (struct m68hc11eepr ): New flag to indicate
338         whether the eeprom is currently mapped or not.
339         (m68hc11eepr_port_event): Use the flag to see if we must unmap
340         or map the eeprom.  Update the flag to reflect the current state.
341         Use M6811_EEPROM_LEVEL when mapping the eeprom.
342         (m68hc11eepr_finish): Remove overlap hack.
343         (attach_m68hc11eepr_regs): Use M6811_IO_LEVEL when mapping the
344         config and control registers.
345         * dv-m68hc11.c (m68hc11cpu_finish): Remove overlap hack.
346         (attach_m68hc11_regs): Use M6811_IO_LEVEL.
347         (m68hc11cpu_io_write): Likewise when unmapping and re-mapping.
348         * dv-m68hc11spi.c (m68hc11spi_finish): Likewise.
349         (attach_m68hc11spi_regs): Likewise.
350         * dv-m68hc11tim.c (m68hc11tim_finish): Likewise.
351         (attach_m68hc11tim_regs): Likewise.
352         * dv-m68hc11sio.c (m68hc11sio_finish): Likewise.
353         (attach_m68hc11sio_regs): Likewise.
354         * interp.c (sim_open): Likewise.
355         * dv-nvram.c (attach_nvram_regs): Likewise.
356
357 Thu Jul 27 21:27:25 2000  Andrew Cagney  <cagney@b1.cygnus.com>
358
359         * configure, config.in: Regenerate.
360
361 2000-06-25  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
362
363         * Makefile.in (SIM_RUN_OBJS): Define to use nrun.c
364         * dv-m68hc11.c (m68hc11cpu_finish): Register detach address callback.
365         (dv_m6811_detach_address_callback): New function to detach a
366         device from an address space.
367         * dv-m68hc11eepr.c (m68hc11eepr_port_event): Initialize
368         config register according to --cpu-config option.
369         * sim-main.h (_sim_cpu): Add cpu_config member.
370         * interp.c (sim_open): Delete specific simulator options.
371         * m68hc11_sim.c (cpu_option_handler): New options
372         --emulos and -cpu-config <val> to configure the simulator.
373         (cpu_initialize): Initialize cpu_config member.
374
375 2000-06-24  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
376
377         * emulos.c: Fix indentation and comments.
378         * gencode.c: Likewise.
379         * dv-m68hc11tim.c (m68hc11tim_timer_event): Handle COMPARE_EVENT.
380         (m68hc11tim_io_write_buffer): Write compare registers and
381         setup compare event.
382         * interp.c: Remove unused global variables.
383         * interrupts.c (idefs): New compare interrupts.
384         Fix indentation and comments.
385         * interrupts.h: Likewise.
386
387 2000-06-18  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
388
389         * dv-m68hc11sio.c: Fix indentation and comments.
390         Remove INT_PORT.
391         * dv-m68hc11.c: Fix indentation and comments.
392         (m68hc11cpu_port_event): Move initialization of M6811_HPRIO from here.
393         * m68hc11_sim.c (cpu_reset): To here.
394         * dv-m68hc11eepr.c: Fix indentation and comments.
395         
396 2000-06-17  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
397
398         * dv-nvram.c: New file, rename from dv-pram.c.
399         * dv-pram.c: Delete file.
400         * sim-main.h: Incorporate m68hc11_sim.h.
401         * m68hc11_sim.h: Delete file.
402         * configure.in: Rename pram into nvram.
403         * interp.c (sim_open): Likewise in creation of device tree.
404         
405 2000-05-31  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
406
407         * interp.c (sim_open): Create the SPI device.
408         * dv-m68hc11spi.c: New file for SPI device simulation.
409         * configure.in (hw_extra_devices): Add SPI device.
410
411 2000-05-28  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
412
413         * interrupts.c (interrupts_initialize): Clear XIRQ accounting.
414         (interrupts_process): Separate IRQ and XIRQ accounting.
415         (interrupts_info): Report XIRQ accounting.
416         * interrupts.h (struct interrupts): Added accounting for XIRQ.
417
418 2000-04-16  Stephane Carrez  <stcarrez@worldnet.fr>
419
420         * dv-pram.c (attach_pram_regs): Fix the 'save-modified' mode.
421         * m68hc11_sim.h (_sim_cpu): Allow configuration of cpu mode.
422         * dv-m68hc11.c (attach_m68hc11_regs): Get the cpu MODA,MODB 
423         configuration from the 'mode' device tree property.
424         (m68hc11cpu_port_event): Reset M6811_HPRIO to the cpu MODA, MODB
425         configuration.
426
427 2000-02-24  Stephane Carrez  <stcarrez@worldnet.fr>
428
429         * sim-main.h: Remove WITH_TARGET_* defines.
430         * Makefile.in (SIM_EXTRA_CFLAGS): Specify the WITH_TARGET_* flags.
431
432 2000-02-08  Stephane Carrez  <stcarrez@worldnet.fr>
433
434         * dv-m68hc11sio.c (m68hc11sio_port_event): Setup the SCI to
435         1200 baud when cpu is in bootstrap mode.
436
437         * dv-m68hc11tim.c (m68hc11tim_io_write_buffer): Be able to
438         write in the TCTN timer register.
439
440         * dv-m68hc11sio.c (m68hc11sio_io_write_buffer): Divide cpu clock
441         by 4 to obtain the E clock frequency.
442         (sccr2_desc): Use M6811_TIE for TIE bit.
443         (m68hc11sio_info): Fix baud rate report.
444
445         * dv-m68hc11tim.c (to_realtime): Likewise.
446
447         * interp.c (sim_open): When building device tree, only provide
448         devices that do not exist yet.
449
450         * emulos.c: Fix compilation pb under Windows.
451
452         * dv-m68hc11.c (attach_m68hc11_regs): Get the clock frequency
453         from the 'clock' property.
454
455 2000-01-02  Stephane Carrez  <stcarrez@worldnet.fr>
456
457         * m68hc11_sim.h (*_REGNUM): Define.
458         (_sim_cpu): New member cpu_page0_reg table.
459         * interp.c (sim_create_inferior): Fill the cpu_page0_reg table with
460         addresses of soft registers in .page0.
461         (sim_fetch_register, sim_store_register): Use cpu_page0_reg table 
462         to get/set soft registers.
463
464 1999-12-31  Stephane Carrez  <stcarrez@worldnet.fr>
465
466         * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Clear byte to avoid
467         returning random values.
468
469 1999-12-17  Stephane Carrez  <stcarrez@worldnet.fr>
470
471         * gencode.c: Fix "subb N,x" that used a instead of b.
472
473 1999-09-09  Stephane Carrez  <stcarrez@worldnet.fr>
474
475         * gencode.c: Fixed sbc8 and adc8 when there was a initial carry.
476
477 1999-09-01  Stephane Carrez  <stcarrez@worldnet.fr>
478
479         * sim-main.h (SIM_HANDLES_LMA): Define to enable loading using lma.
480
481 1999-08-14  Stephane Carrez  <stcarrez@worldnet.fr>
482
483         * dv-m68hc11.c (attach_m68hc11_regs): Save the size of the
484         register region in the m68hc11cpu struct.
485         (m68hc11cpu_io_write): When the IO mapping addres changes,
486         detach the register region and re-attach it at the new address.
487         (m68hc11cpu_io_read_buffer): Renamed base_address into
488         attach_address.
489         (m68hc11cpu_io_write_buffer): Likewise. Pass the hw pointer
490         to m68hc11cpu_io_write.
491
492 1999-08-13  Stephane Carrez  <stcarrez@worldnet.fr>
493
494         * gencode.c: For sbc8, check the carry and increment the source
495         before trying to set the carry for the result.
496
497 1999-05-24  John S. Kallal <kallal@voicenet.com>
498         
499         * interp.c (sim_get_info): Don't crash if the command line is 0.
500         Define prototype for sim_get_info() and init_system().
501         (sim_info): Correct call to sim_get_info().
502         
503 1999-05-16  Stephane Carrez  <stcarrez@worldnet.fr>
504
505         * configure.in: Recognize m6811-*-*.
506         * configure: Regenerate.
507         * m68hc11_sim.h (cpu_ccr_update_add8, cpu_ccr_update_add16,
508         cpu_ccr_update_sub8, cpu_ccr_update_sub16):
509         Correct the computation of carry of 8 and 16-bits add and subtract.
510         * gencode.c: Use cpu_ccr_update_sub8 for subtraction (carry and
511         overflow set in a different manner than add).
512
513 1999-05-14  Stephane Carrez  <stcarrez@worldnet.fr>
514
515         * dv-m68hc11.c (dv_m6811_attach_address_callback): Removed a
516         trace message.
517         * interp.c (sim_open, sim_create_inferior): Initialize the
518         cpu_elf_start from the ELF header.
519         * m68hc11_sim.c (cpu_initialize): Clear the new data members.
520         (cpu_restart): Use cpu_elf_start as the starting address when
521         the flag is set.
522         (cpu_special): When cpu_use_elf_start is set, the WAI instruction
523         exits the simulator (exit status is in D).
524         * m68hc11_sim.h (_sim_cpu): Added members cpu_use_elf_start and
525         cpu_elf_star to start execution at address specified in ELF file.
526
527 1999-05-02  Stephane Carrez  <stcarrez@worldnet.fr>
528
529         * Makefile.in, config.in, configure, configure.in: New files.
530         * gencode.c: New file, generation of 68HC11 interpreter.
531         * m68hc11_sim.h, m68hc11_sim.c: New files, specific operations
532         for interpreter.
533         * interrupts.c, interrupts.h: New files, management of interrupts.
534         * interp.c, sim-main.h, 
535         * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c,
536         dv-m68hc11tim.c, dv-pram.c: New files representing devices for
537         68HC11 (dv-pram.c is generic and could probably migrate to common).
538         * emulos.c: New file, basic emulation of some os.