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