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