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