1 2001-05-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
3 * dv-m68hc11sio.c (m68hc11sio_tx_poll): Always check for
5 * interrupts.c (interrupts_process): Keep track of the last number
7 (interrupts_initialize): Clear last number of masked insn cycles.
8 (interrupts_info): Report them.
9 (interrupts_update_pending): Compute clear and set masks of
10 interrupts and clear the interrupt bits before setting them
11 (due to SCI interrupt sharing).
12 * interrupts.h (struct interrupts): New members last_mask_cycles
13 and xirq_last_mask_cycles.
15 2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr>
17 * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Use attach_size
18 instead of a hard-coded value.
19 (m68hc11cpu_io_write_buffer): Likewise.
20 (dv_m68hc11_descriptor): Define a 68hc12 device.
21 * dv-m68hc11eepr.c (dv_m68hc11eepr_descriptor): Likewise.
22 * dv-m68hc11tim.c (dv_m68hc11tim_descriptor): Likewise.
23 * dv-m68hc11spi.c (dv_m68hc11spi_descriptor): Likewise.
24 * dv-m68hc11sio.c (dv_m68hc11sio_descriptor): Likewise.
26 2000-11-22 Stephane Carrez <Stephane.Carrez@worldnet.fr>
28 * dv-m68hc11.c (attach_m68hc11_regs): Register a delete handler.
29 (m68hc11cpu_delete): Delete handler to detach the address space.
31 2000-11-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
33 * dv-m68hc11eepr.c (attach_m68hc11eepr_regs): Use hw_malloc.
34 * dv-nvram.c (attach_nvram_regs): Use hw_free and hw_malloc
35 instead of free and malloc.
37 2000-09-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
39 * Makefile.in: Was missing from initial patch.
41 2000-09-10 Stephane Carrez <Stephane.Carrez@worldnet.fr>
43 * interp.c (sim_store_register): Remove soft register hack.
44 (sim_fetch_register): Likewise.
45 (sim_create_inferior): Likewise.
46 * sim-main.h: Likewise.
48 2000-09-10 Stephane Carrez <Stephane.Carrez@worldnet.fr>
50 * interrupts.c (interrupts_update_pending): Clear the mask of
51 pending interrupts here.
52 (interrupts_get_current): Don't clear the mask of pending interrupts.
54 2000-09-10 Stephane Carrez <Stephane.Carrez@worldnet.fr>
56 * sim-main.h: Define cycle_to_string.
57 * dv-m68hc11tim.c (cycle_to_string): New function to translate
58 the cpu cycle into some formatted time string.
59 (m68hc11tim_print_timer): Use it.
60 * dv-m68hc11sio.c (m68hc11sio_info): Use cycle_to_string.
61 * dv-m68hc11spi.c (m68hc11spi_info): Likewise.
62 * interrupts.c (interrupts_info): Likewise.
63 * m68hc11_sim.c (cpu_info): Likewise.
65 2000-09-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
67 * dv-m68hc11tim.c (m68hc11tim_timer_event): Compute the overflow
68 interrupt and compare events accurately. Take into account the
69 pending ticks not processed by the simulator yet (introduced a shift).
70 (m68hc11_port_event): Reset the timer interrupt delays.
71 (m68hc11tim_io_read_buffer): Be able to read several bytes.
72 (m68hc11tim_io_write_buffer): Likewise for write.
73 (m68hc11tim_io_write_buffer): Recompute the timer overflow interrupt.
75 2000-09-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
77 * dv-m68hc11spi.c (m68hc11spi_io_read_buffer): Clear the interrupts.
78 (m68hc11spi_io_write_buffer): Likewise and fix the spi frame.
79 (m68hc11spi_info): Clarify the status report
80 of the SPI when a byte is being sent.
81 (m68hc11spi_clock): Fix the spi send frame.
83 2000-08-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
85 * sim-main.h (m68hc11_map_level): Define level of address mappings.
86 * dv-m68hc11eepr.c (struct m68hc11eepr ): New flag to indicate
87 whether the eeprom is currently mapped or not.
88 (m68hc11eepr_port_event): Use the flag to see if we must unmap
89 or map the eeprom. Update the flag to reflect the current state.
90 Use M6811_EEPROM_LEVEL when mapping the eeprom.
91 (m68hc11eepr_finish): Remove overlap hack.
92 (attach_m68hc11eepr_regs): Use M6811_IO_LEVEL when mapping the
93 config and control registers.
94 * dv-m68hc11.c (m68hc11cpu_finish): Remove overlap hack.
95 (attach_m68hc11_regs): Use M6811_IO_LEVEL.
96 (m68hc11cpu_io_write): Likewise when unmapping and re-mapping.
97 * dv-m68hc11spi.c (m68hc11spi_finish): Likewise.
98 (attach_m68hc11spi_regs): Likewise.
99 * dv-m68hc11tim.c (m68hc11tim_finish): Likewise.
100 (attach_m68hc11tim_regs): Likewise.
101 * dv-m68hc11sio.c (m68hc11sio_finish): Likewise.
102 (attach_m68hc11sio_regs): Likewise.
103 * interp.c (sim_open): Likewise.
104 * dv-nvram.c (attach_nvram_regs): Likewise.
106 Thu Jul 27 21:27:25 2000 Andrew Cagney <cagney@b1.cygnus.com>
108 * configure, config.in: Regenerate.
110 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
112 * Makefile.in (SIM_RUN_OBJS): Define to use nrun.c
113 * dv-m68hc11.c (m68hc11cpu_finish): Register detach address callback.
114 (dv_m6811_detach_address_callback): New function to detach a
115 device from an address space.
116 * dv-m68hc11eepr.c (m68hc11eepr_port_event): Initialize
117 config register according to --cpu-config option.
118 * sim-main.h (_sim_cpu): Add cpu_config member.
119 * interp.c (sim_open): Delete specific simulator options.
120 * m68hc11_sim.c (cpu_option_handler): New options
121 --emulos and -cpu-config <val> to configure the simulator.
122 (cpu_initialize): Initialize cpu_config member.
124 2000-06-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
126 * emulos.c: Fix indentation and comments.
127 * gencode.c: Likewise.
128 * dv-m68hc11tim.c (m68hc11tim_timer_event): Handle COMPARE_EVENT.
129 (m68hc11tim_io_write_buffer): Write compare registers and
131 * interp.c: Remove unused global variables.
132 * interrupts.c (idefs): New compare interrupts.
133 Fix indentation and comments.
134 * interrupts.h: Likewise.
136 2000-06-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
138 * dv-m68hc11sio.c: Fix indentation and comments.
140 * dv-m68hc11.c: Fix indentation and comments.
141 (m68hc11cpu_port_event): Move initialization of M6811_HPRIO from here.
142 * m68hc11_sim.c (cpu_reset): To here.
143 * dv-m68hc11eepr.c: Fix indentation and comments.
145 2000-06-17 Stephane Carrez <Stephane.Carrez@worldnet.fr>
147 * dv-nvram.c: New file, rename from dv-pram.c.
148 * dv-pram.c: Delete file.
149 * sim-main.h: Incorporate m68hc11_sim.h.
150 * m68hc11_sim.h: Delete file.
151 * configure.in: Rename pram into nvram.
152 * interp.c (sim_open): Likewise in creation of device tree.
154 2000-05-31 Stephane Carrez <Stephane.Carrez@worldnet.fr>
156 * interp.c (sim_open): Create the SPI device.
157 * dv-m68hc11spi.c: New file for SPI device simulation.
158 * configure.in (hw_extra_devices): Add SPI device.
160 2000-05-28 Stephane Carrez <Stephane.Carrez@worldnet.fr>
162 * interrupts.c (interrupts_initialize): Clear XIRQ accounting.
163 (interrupts_process): Separate IRQ and XIRQ accounting.
164 (interrupts_info): Report XIRQ accounting.
165 * interrupts.h (struct interrupts): Added accounting for XIRQ.
167 2000-04-16 Stephane Carrez <stcarrez@worldnet.fr>
169 * dv-pram.c (attach_pram_regs): Fix the 'save-modified' mode.
170 * m68hc11_sim.h (_sim_cpu): Allow configuration of cpu mode.
171 * dv-m68hc11.c (attach_m68hc11_regs): Get the cpu MODA,MODB
172 configuration from the 'mode' device tree property.
173 (m68hc11cpu_port_event): Reset M6811_HPRIO to the cpu MODA, MODB
176 2000-02-24 Stephane Carrez <stcarrez@worldnet.fr>
178 * sim-main.h: Remove WITH_TARGET_* defines.
179 * Makefile.in (SIM_EXTRA_CFLAGS): Specify the WITH_TARGET_* flags.
181 2000-02-08 Stephane Carrez <stcarrez@worldnet.fr>
183 * dv-m68hc11sio.c (m68hc11sio_port_event): Setup the SCI to
184 1200 baud when cpu is in bootstrap mode.
186 * dv-m68hc11tim.c (m68hc11tim_io_write_buffer): Be able to
187 write in the TCTN timer register.
189 * dv-m68hc11sio.c (m68hc11sio_io_write_buffer): Divide cpu clock
190 by 4 to obtain the E clock frequency.
191 (sccr2_desc): Use M6811_TIE for TIE bit.
192 (m68hc11sio_info): Fix baud rate report.
194 * dv-m68hc11tim.c (to_realtime): Likewise.
196 * interp.c (sim_open): When building device tree, only provide
197 devices that do not exist yet.
199 * emulos.c: Fix compilation pb under Windows.
201 * dv-m68hc11.c (attach_m68hc11_regs): Get the clock frequency
202 from the 'clock' property.
204 2000-01-02 Stephane Carrez <stcarrez@worldnet.fr>
206 * m68hc11_sim.h (*_REGNUM): Define.
207 (_sim_cpu): New member cpu_page0_reg table.
208 * interp.c (sim_create_inferior): Fill the cpu_page0_reg table with
209 addresses of soft registers in .page0.
210 (sim_fetch_register, sim_store_register): Use cpu_page0_reg table
211 to get/set soft registers.
213 1999-12-31 Stephane Carrez <stcarrez@worldnet.fr>
215 * dv-m68hc11.c (m68hc11cpu_io_write_buffer): Clear byte to avoid
216 returning random values.
218 1999-12-17 Stephane Carrez <stcarrez@worldnet.fr>
220 * gencode.c: Fix "subb N,x" that used a instead of b.
222 1999-09-09 Stephane Carrez <stcarrez@worldnet.fr>
224 * gencode.c: Fixed sbc8 and adc8 when there was a initial carry.
226 1999-09-01 Stephane Carrez <stcarrez@worldnet.fr>
228 * sim-main.h (SIM_HANDLES_LMA): Define to enable loading using lma.
230 1999-08-14 Stephane Carrez <stcarrez@worldnet.fr>
232 * dv-m68hc11.c (attach_m68hc11_regs): Save the size of the
233 register region in the m68hc11cpu struct.
234 (m68hc11cpu_io_write): When the IO mapping addres changes,
235 detach the register region and re-attach it at the new address.
236 (m68hc11cpu_io_read_buffer): Renamed base_address into
238 (m68hc11cpu_io_write_buffer): Likewise. Pass the hw pointer
239 to m68hc11cpu_io_write.
241 1999-08-13 Stephane Carrez <stcarrez@worldnet.fr>
243 * gencode.c: For sbc8, check the carry and increment the source
244 before trying to set the carry for the result.
246 1999-05-24 John S. Kallal <kallal@voicenet.com>
248 * interp.c (sim_get_info): Don't crash if the command line is 0.
249 Define prototype for sim_get_info() and init_system().
250 (sim_info): Correct call to sim_get_info().
252 1999-05-16 Stephane Carrez <stcarrez@worldnet.fr>
254 * configure.in: Recognize m6811-*-*.
255 * configure: Regenerate.
256 * m68hc11_sim.h (cpu_ccr_update_add8, cpu_ccr_update_add16,
257 cpu_ccr_update_sub8, cpu_ccr_update_sub16):
258 Correct the computation of carry of 8 and 16-bits add and subtract.
259 * gencode.c: Use cpu_ccr_update_sub8 for subtraction (carry and
260 overflow set in a different manner than add).
262 1999-05-14 Stephane Carrez <stcarrez@worldnet.fr>
264 * dv-m68hc11.c (dv_m6811_attach_address_callback): Removed a
266 * interp.c (sim_open, sim_create_inferior): Initialize the
267 cpu_elf_start from the ELF header.
268 * m68hc11_sim.c (cpu_initialize): Clear the new data members.
269 (cpu_restart): Use cpu_elf_start as the starting address when
271 (cpu_special): When cpu_use_elf_start is set, the WAI instruction
272 exits the simulator (exit status is in D).
273 * m68hc11_sim.h (_sim_cpu): Added members cpu_use_elf_start and
274 cpu_elf_star to start execution at address specified in ELF file.
276 1999-05-02 Stephane Carrez <stcarrez@worldnet.fr>
278 * Makefile.in, config.in, configure, configure.in: New files.
279 * gencode.c: New file, generation of 68HC11 interpreter.
280 * m68hc11_sim.h, m68hc11_sim.c: New files, specific operations
282 * interrupts.c, interrupts.h: New files, management of interrupts.
283 * interp.c, sim-main.h,
284 * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c,
285 dv-m68hc11tim.c, dv-pram.c: New files representing devices for
286 68HC11 (dv-pram.c is generic and could probably migrate to common).
287 * emulos.c: New file, basic emulation of some os.