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