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