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